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

volcengine.vpc.RouteTable

Explore with Pulumi AI

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

    Provides a resource to manage route table

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Vpc.RouteTable("foo", new()
        {
            Description = "tf-test1",
            ProjectName = "yuwao",
            RouteTableName = "tf-project-1",
            VpcId = "vpc-2feppmy1ugt1c59gp688n1fld",
        });
    
    });
    
    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.NewRouteTable(ctx, "foo", &vpc.RouteTableArgs{
    			Description:    pulumi.String("tf-test1"),
    			ProjectName:    pulumi.String("yuwao"),
    			RouteTableName: pulumi.String("tf-project-1"),
    			VpcId:          pulumi.String("vpc-2feppmy1ugt1c59gp688n1fld"),
    		})
    		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.RouteTable;
    import com.pulumi.volcengine.vpc.RouteTableArgs;
    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 RouteTable("foo", RouteTableArgs.builder()        
                .description("tf-test1")
                .projectName("yuwao")
                .routeTableName("tf-project-1")
                .vpcId("vpc-2feppmy1ugt1c59gp688n1fld")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vpc.RouteTable("foo",
        description="tf-test1",
        project_name="yuwao",
        route_table_name="tf-project-1",
        vpc_id="vpc-2feppmy1ugt1c59gp688n1fld")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.vpc.RouteTable("foo", {
        description: "tf-test1",
        projectName: "yuwao",
        routeTableName: "tf-project-1",
        vpcId: "vpc-2feppmy1ugt1c59gp688n1fld",
    });
    
    resources:
      foo:
        type: volcengine:vpc:RouteTable
        properties:
          description: tf-test1
          projectName: yuwao
          routeTableName: tf-project-1
          vpcId: vpc-2feppmy1ugt1c59gp688n1fld
    

    Create RouteTable Resource

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

    Constructor syntax

    new RouteTable(name: string, args: RouteTableArgs, opts?: CustomResourceOptions);
    @overload
    def RouteTable(resource_name: str,
                   args: RouteTableArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def RouteTable(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   vpc_id: Optional[str] = None,
                   description: Optional[str] = None,
                   project_name: Optional[str] = None,
                   route_table_name: Optional[str] = None)
    func NewRouteTable(ctx *Context, name string, args RouteTableArgs, opts ...ResourceOption) (*RouteTable, error)
    public RouteTable(string name, RouteTableArgs args, CustomResourceOptions? opts = null)
    public RouteTable(String name, RouteTableArgs args)
    public RouteTable(String name, RouteTableArgs args, CustomResourceOptions options)
    
    type: volcengine:vpc:RouteTable
    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 RouteTableArgs
    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 RouteTableArgs
    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 RouteTableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteTableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouteTableArgs
    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 volcengineRouteTableResource = new Volcengine.Vpc.RouteTable("volcengineRouteTableResource", new()
    {
        VpcId = "string",
        Description = "string",
        ProjectName = "string",
        RouteTableName = "string",
    });
    
    example, err := vpc.NewRouteTable(ctx, "volcengineRouteTableResource", &vpc.RouteTableArgs{
    	VpcId:          pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	ProjectName:    pulumi.String("string"),
    	RouteTableName: pulumi.String("string"),
    })
    
    var volcengineRouteTableResource = new RouteTable("volcengineRouteTableResource", RouteTableArgs.builder()
        .vpcId("string")
        .description("string")
        .projectName("string")
        .routeTableName("string")
        .build());
    
    volcengine_route_table_resource = volcengine.vpc.RouteTable("volcengineRouteTableResource",
        vpc_id="string",
        description="string",
        project_name="string",
        route_table_name="string")
    
    const volcengineRouteTableResource = new volcengine.vpc.RouteTable("volcengineRouteTableResource", {
        vpcId: "string",
        description: "string",
        projectName: "string",
        routeTableName: "string",
    });
    
    type: volcengine:vpc:RouteTable
    properties:
        description: string
        projectName: string
        routeTableName: string
        vpcId: string
    

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

    VpcId string
    The id of the VPC.
    Description string
    The description of the route table.
    ProjectName string
    The ProjectName of the route table.
    RouteTableName string
    The name of the route table.
    VpcId string
    The id of the VPC.
    Description string
    The description of the route table.
    ProjectName string
    The ProjectName of the route table.
    RouteTableName string
    The name of the route table.
    vpcId String
    The id of the VPC.
    description String
    The description of the route table.
    projectName String
    The ProjectName of the route table.
    routeTableName String
    The name of the route table.
    vpcId string
    The id of the VPC.
    description string
    The description of the route table.
    projectName string
    The ProjectName of the route table.
    routeTableName string
    The name of the route table.
    vpc_id str
    The id of the VPC.
    description str
    The description of the route table.
    project_name str
    The ProjectName of the route table.
    route_table_name str
    The name of the route table.
    vpcId String
    The id of the VPC.
    description String
    The description of the route table.
    projectName String
    The ProjectName of the route table.
    routeTableName String
    The name of the route table.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RouteTable Resource

    Get an existing RouteTable 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?: RouteTableState, opts?: CustomResourceOptions): RouteTable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            project_name: Optional[str] = None,
            route_table_name: Optional[str] = None,
            vpc_id: Optional[str] = None) -> RouteTable
    func GetRouteTable(ctx *Context, name string, id IDInput, state *RouteTableState, opts ...ResourceOption) (*RouteTable, error)
    public static RouteTable Get(string name, Input<string> id, RouteTableState? state, CustomResourceOptions? opts = null)
    public static RouteTable get(String name, Output<String> id, RouteTableState 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 table.
    ProjectName string
    The ProjectName of the route table.
    RouteTableName string
    The name of the route table.
    VpcId string
    The id of the VPC.
    Description string
    The description of the route table.
    ProjectName string
    The ProjectName of the route table.
    RouteTableName string
    The name of the route table.
    VpcId string
    The id of the VPC.
    description String
    The description of the route table.
    projectName String
    The ProjectName of the route table.
    routeTableName String
    The name of the route table.
    vpcId String
    The id of the VPC.
    description string
    The description of the route table.
    projectName string
    The ProjectName of the route table.
    routeTableName string
    The name of the route table.
    vpcId string
    The id of the VPC.
    description str
    The description of the route table.
    project_name str
    The ProjectName of the route table.
    route_table_name str
    The name of the route table.
    vpc_id str
    The id of the VPC.
    description String
    The description of the route table.
    projectName String
    The ProjectName of the route table.
    routeTableName String
    The name of the route table.
    vpcId String
    The id of the VPC.

    Import

    Route table can be imported using the id, e.g.

     $ pulumi import volcengine:vpc/routeTable:RouteTable default vtb-274e0syt9av407fap8tle16kb
    

    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