1. Packages
  2. Volcengine
  3. API Docs
  4. vpc
  5. RouteEntry
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.vpc.RouteEntry

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Provides a resource to manage route entry

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Vpc.RouteEntry("foo", new()
        {
            Description = "tf-test-up",
            DestinationCidrBlock = "0.0.0.0/2",
            NextHopId = "ngw-274gwbqe340zk7fap8spkzo7x",
            NextHopType = "NatGW",
            RouteEntryName = "tf-test-up",
            RouteTableId = "vtb-2744hslq5b7r47fap8tjomgnj",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpc.NewRouteEntry(ctx, "foo", &vpc.RouteEntryArgs{
    			Description:          pulumi.String("tf-test-up"),
    			DestinationCidrBlock: pulumi.String("0.0.0.0/2"),
    			NextHopId:            pulumi.String("ngw-274gwbqe340zk7fap8spkzo7x"),
    			NextHopType:          pulumi.String("NatGW"),
    			RouteEntryName:       pulumi.String("tf-test-up"),
    			RouteTableId:         pulumi.String("vtb-2744hslq5b7r47fap8tjomgnj"),
    		})
    		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.vpc.RouteEntry;
    import com.pulumi.volcengine.vpc.RouteEntryArgs;
    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 RouteEntry("foo", RouteEntryArgs.builder()        
                .description("tf-test-up")
                .destinationCidrBlock("0.0.0.0/2")
                .nextHopId("ngw-274gwbqe340zk7fap8spkzo7x")
                .nextHopType("NatGW")
                .routeEntryName("tf-test-up")
                .routeTableId("vtb-2744hslq5b7r47fap8tjomgnj")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vpc.RouteEntry("foo",
        description="tf-test-up",
        destination_cidr_block="0.0.0.0/2",
        next_hop_id="ngw-274gwbqe340zk7fap8spkzo7x",
        next_hop_type="NatGW",
        route_entry_name="tf-test-up",
        route_table_id="vtb-2744hslq5b7r47fap8tjomgnj")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.vpc.RouteEntry("foo", {
        description: "tf-test-up",
        destinationCidrBlock: "0.0.0.0/2",
        nextHopId: "ngw-274gwbqe340zk7fap8spkzo7x",
        nextHopType: "NatGW",
        routeEntryName: "tf-test-up",
        routeTableId: "vtb-2744hslq5b7r47fap8tjomgnj",
    });
    
    resources:
      foo:
        type: volcengine:vpc:RouteEntry
        properties:
          description: tf-test-up
          destinationCidrBlock: 0.0.0.0/2
          nextHopId: ngw-274gwbqe340zk7fap8spkzo7x
          nextHopType: NatGW
          routeEntryName: tf-test-up
          routeTableId: vtb-2744hslq5b7r47fap8tjomgnj
    

    Create RouteEntry Resource

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

    Constructor syntax

    new RouteEntry(name: string, args: RouteEntryArgs, opts?: CustomResourceOptions);
    @overload
    def RouteEntry(resource_name: str,
                   args: RouteEntryArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def RouteEntry(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   destination_cidr_block: Optional[str] = None,
                   next_hop_id: Optional[str] = None,
                   next_hop_type: Optional[str] = None,
                   route_table_id: Optional[str] = None,
                   description: Optional[str] = None,
                   route_entry_name: Optional[str] = None)
    func NewRouteEntry(ctx *Context, name string, args RouteEntryArgs, opts ...ResourceOption) (*RouteEntry, error)
    public RouteEntry(string name, RouteEntryArgs args, CustomResourceOptions? opts = null)
    public RouteEntry(String name, RouteEntryArgs args)
    public RouteEntry(String name, RouteEntryArgs args, CustomResourceOptions options)
    
    type: volcengine:vpc:RouteEntry
    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 RouteEntryArgs
    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 RouteEntryArgs
    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 RouteEntryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteEntryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouteEntryArgs
    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 examplerouteEntryResourceResourceFromVpcrouteEntry = new Volcengine.Vpc.RouteEntry("examplerouteEntryResourceResourceFromVpcrouteEntry", new()
    {
        DestinationCidrBlock = "string",
        NextHopId = "string",
        NextHopType = "string",
        RouteTableId = "string",
        Description = "string",
        RouteEntryName = "string",
    });
    
    example, err := vpc.NewRouteEntry(ctx, "examplerouteEntryResourceResourceFromVpcrouteEntry", &vpc.RouteEntryArgs{
    	DestinationCidrBlock: pulumi.String("string"),
    	NextHopId:            pulumi.String("string"),
    	NextHopType:          pulumi.String("string"),
    	RouteTableId:         pulumi.String("string"),
    	Description:          pulumi.String("string"),
    	RouteEntryName:       pulumi.String("string"),
    })
    
    var examplerouteEntryResourceResourceFromVpcrouteEntry = new RouteEntry("examplerouteEntryResourceResourceFromVpcrouteEntry", RouteEntryArgs.builder()
        .destinationCidrBlock("string")
        .nextHopId("string")
        .nextHopType("string")
        .routeTableId("string")
        .description("string")
        .routeEntryName("string")
        .build());
    
    exampleroute_entry_resource_resource_from_vpcroute_entry = volcengine.vpc.RouteEntry("examplerouteEntryResourceResourceFromVpcrouteEntry",
        destination_cidr_block="string",
        next_hop_id="string",
        next_hop_type="string",
        route_table_id="string",
        description="string",
        route_entry_name="string")
    
    const examplerouteEntryResourceResourceFromVpcrouteEntry = new volcengine.vpc.RouteEntry("examplerouteEntryResourceResourceFromVpcrouteEntry", {
        destinationCidrBlock: "string",
        nextHopId: "string",
        nextHopType: "string",
        routeTableId: "string",
        description: "string",
        routeEntryName: "string",
    });
    
    type: volcengine:vpc:RouteEntry
    properties:
        description: string
        destinationCidrBlock: string
        nextHopId: string
        nextHopType: string
        routeEntryName: string
        routeTableId: string
    

    RouteEntry 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 RouteEntry resource accepts the following input properties:

    DestinationCidrBlock string
    The destination CIDR block of the route entry.
    NextHopId string
    The id of the next hop.
    NextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    RouteTableId string
    The id of the route table.
    Description string
    The description of the route entry.
    RouteEntryName string
    The name of the route entry.
    DestinationCidrBlock string
    The destination CIDR block of the route entry.
    NextHopId string
    The id of the next hop.
    NextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    RouteTableId string
    The id of the route table.
    Description string
    The description of the route entry.
    RouteEntryName string
    The name of the route entry.
    destinationCidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    The id of the next hop.
    nextHopType String
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeTableId String
    The id of the route table.
    description String
    The description of the route entry.
    routeEntryName String
    The name of the route entry.
    destinationCidrBlock string
    The destination CIDR block of the route entry.
    nextHopId string
    The id of the next hop.
    nextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeTableId string
    The id of the route table.
    description string
    The description of the route entry.
    routeEntryName string
    The name of the route entry.
    destination_cidr_block str
    The destination CIDR block of the route entry.
    next_hop_id str
    The id of the next hop.
    next_hop_type str
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    route_table_id str
    The id of the route table.
    description str
    The description of the route entry.
    route_entry_name str
    The name of the route entry.
    destinationCidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    The id of the next hop.
    nextHopType String
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeTableId String
    The id of the route table.
    description String
    The description of the route entry.
    routeEntryName String
    The name of the route entry.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RouteEntryId string
    The id of the route entry.
    Status string
    The description of the route entry.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteEntryId string
    The id of the route entry.
    Status string
    The description of the route entry.
    id String
    The provider-assigned unique ID for this managed resource.
    routeEntryId String
    The id of the route entry.
    status String
    The description of the route entry.
    id string
    The provider-assigned unique ID for this managed resource.
    routeEntryId string
    The id of the route entry.
    status string
    The description of the route entry.
    id str
    The provider-assigned unique ID for this managed resource.
    route_entry_id str
    The id of the route entry.
    status str
    The description of the route entry.
    id String
    The provider-assigned unique ID for this managed resource.
    routeEntryId String
    The id of the route entry.
    status String
    The description of the route entry.

    Look up Existing RouteEntry Resource

    Get an existing RouteEntry 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?: RouteEntryState, opts?: CustomResourceOptions): RouteEntry
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            destination_cidr_block: Optional[str] = None,
            next_hop_id: Optional[str] = None,
            next_hop_type: Optional[str] = None,
            route_entry_id: Optional[str] = None,
            route_entry_name: Optional[str] = None,
            route_table_id: Optional[str] = None,
            status: Optional[str] = None) -> RouteEntry
    func GetRouteEntry(ctx *Context, name string, id IDInput, state *RouteEntryState, opts ...ResourceOption) (*RouteEntry, error)
    public static RouteEntry Get(string name, Input<string> id, RouteEntryState? state, CustomResourceOptions? opts = null)
    public static RouteEntry get(String name, Output<String> id, RouteEntryState 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:
    Description string
    The description of the route entry.
    DestinationCidrBlock string
    The destination CIDR block of the route entry.
    NextHopId string
    The id of the next hop.
    NextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    RouteEntryId string
    The id of the route entry.
    RouteEntryName string
    The name of the route entry.
    RouteTableId string
    The id of the route table.
    Status string
    The description of the route entry.
    Description string
    The description of the route entry.
    DestinationCidrBlock string
    The destination CIDR block of the route entry.
    NextHopId string
    The id of the next hop.
    NextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    RouteEntryId string
    The id of the route entry.
    RouteEntryName string
    The name of the route entry.
    RouteTableId string
    The id of the route table.
    Status string
    The description of the route entry.
    description String
    The description of the route entry.
    destinationCidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    The id of the next hop.
    nextHopType String
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeEntryId String
    The id of the route entry.
    routeEntryName String
    The name of the route entry.
    routeTableId String
    The id of the route table.
    status String
    The description of the route entry.
    description string
    The description of the route entry.
    destinationCidrBlock string
    The destination CIDR block of the route entry.
    nextHopId string
    The id of the next hop.
    nextHopType string
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeEntryId string
    The id of the route entry.
    routeEntryName string
    The name of the route entry.
    routeTableId string
    The id of the route table.
    status string
    The description of the route entry.
    description str
    The description of the route entry.
    destination_cidr_block str
    The destination CIDR block of the route entry.
    next_hop_id str
    The id of the next hop.
    next_hop_type str
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    route_entry_id str
    The id of the route entry.
    route_entry_name str
    The name of the route entry.
    route_table_id str
    The id of the route table.
    status str
    The description of the route entry.
    description String
    The description of the route entry.
    destinationCidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    The id of the next hop.
    nextHopType String
    The type of the next hop, Optional choice contains Instance, NetworkInterface, NatGW, VpnGW, TransitRouter.
    routeEntryId String
    The id of the route entry.
    routeEntryName String
    The name of the route entry.
    routeTableId String
    The id of the route table.
    status String
    The description of the route entry.

    Import

    Route entry can be imported using the route_table_id:route_entry_id, e.g.

     $ pulumi import volcengine:vpc/routeEntry:RouteEntry default vtb-274e19skkuhog7fap8u4i8ird:rte-274e1g9ei4k5c7fap8sp974fq
    

    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.24 published on Tuesday, Jun 25, 2024 by Volcengine