volcengine.transit_router.RouteTable
Explore with Pulumi AI
Provides a resource to manage transit router route table
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooTransitRouter = new Volcengine.Transit_router.TransitRouter("fooTransitRouter", new()
{
TransitRouterName = "test-tf-acc",
Description = "test-tf-acc",
});
var fooRouteTable = new Volcengine.Transit_router.RouteTable("fooRouteTable", new()
{
Description = "tf-test-acc-description",
TransitRouterRouteTableName = "tf-table-test-acc",
TransitRouterId = fooTransitRouter.Id,
Tags = new[]
{
new Volcengine.Transit_router.Inputs.RouteTableTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/transit_router"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooTransitRouter, err := transit_router.NewTransitRouter(ctx, "fooTransitRouter", &transit_router.TransitRouterArgs{
TransitRouterName: pulumi.String("test-tf-acc"),
Description: pulumi.String("test-tf-acc"),
})
if err != nil {
return err
}
_, err = transit_router.NewRouteTable(ctx, "fooRouteTable", &transit_router.RouteTableArgs{
Description: pulumi.String("tf-test-acc-description"),
TransitRouterRouteTableName: pulumi.String("tf-table-test-acc"),
TransitRouterId: fooTransitRouter.ID(),
Tags: transit_router.RouteTableTagArray{
&transit_router.RouteTableTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
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.transit_router.TransitRouter;
import com.pulumi.volcengine.transit_router.TransitRouterArgs;
import com.pulumi.volcengine.transit_router.RouteTable;
import com.pulumi.volcengine.transit_router.RouteTableArgs;
import com.pulumi.volcengine.transit_router.inputs.RouteTableTagArgs;
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 fooTransitRouter = new TransitRouter("fooTransitRouter", TransitRouterArgs.builder()
.transitRouterName("test-tf-acc")
.description("test-tf-acc")
.build());
var fooRouteTable = new RouteTable("fooRouteTable", RouteTableArgs.builder()
.description("tf-test-acc-description")
.transitRouterRouteTableName("tf-table-test-acc")
.transitRouterId(fooTransitRouter.id())
.tags(RouteTableTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_transit_router = volcengine.transit_router.TransitRouter("fooTransitRouter",
transit_router_name="test-tf-acc",
description="test-tf-acc")
foo_route_table = volcengine.transit_router.RouteTable("fooRouteTable",
description="tf-test-acc-description",
transit_router_route_table_name="tf-table-test-acc",
transit_router_id=foo_transit_router.id,
tags=[volcengine.transit_router.RouteTableTagArgs(
key="k1",
value="v1",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
transitRouterName: "test-tf-acc",
description: "test-tf-acc",
});
const fooRouteTable = new volcengine.transit_router.RouteTable("fooRouteTable", {
description: "tf-test-acc-description",
transitRouterRouteTableName: "tf-table-test-acc",
transitRouterId: fooTransitRouter.id,
tags: [{
key: "k1",
value: "v1",
}],
});
resources:
fooTransitRouter:
type: volcengine:transit_router:TransitRouter
properties:
transitRouterName: test-tf-acc
description: test-tf-acc
fooRouteTable:
type: volcengine:transit_router:RouteTable
properties:
description: tf-test-acc-description
transitRouterRouteTableName: tf-table-test-acc
transitRouterId: ${fooTransitRouter.id}
tags:
- key: k1
value: v1
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,
transit_router_id: Optional[str] = None,
description: Optional[str] = None,
tags: Optional[Sequence[RouteTableTagArgs]] = None,
transit_router_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:transit_router: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 routeTableResource = new Volcengine.Transit_router.RouteTable("routeTableResource", new()
{
TransitRouterId = "string",
Description = "string",
Tags = new[]
{
new Volcengine.Transit_router.Inputs.RouteTableTagArgs
{
Key = "string",
Value = "string",
},
},
TransitRouterRouteTableName = "string",
});
example, err := transit_router.NewRouteTable(ctx, "routeTableResource", &transit_router.RouteTableArgs{
TransitRouterId: pulumi.String("string"),
Description: pulumi.String("string"),
Tags: transit_router.RouteTableTagArray{
&transit_router.RouteTableTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
TransitRouterRouteTableName: pulumi.String("string"),
})
var routeTableResource = new RouteTable("routeTableResource", RouteTableArgs.builder()
.transitRouterId("string")
.description("string")
.tags(RouteTableTagArgs.builder()
.key("string")
.value("string")
.build())
.transitRouterRouteTableName("string")
.build());
route_table_resource = volcengine.transit_router.RouteTable("routeTableResource",
transit_router_id="string",
description="string",
tags=[{
"key": "string",
"value": "string",
}],
transit_router_route_table_name="string")
const routeTableResource = new volcengine.transit_router.RouteTable("routeTableResource", {
transitRouterId: "string",
description: "string",
tags: [{
key: "string",
value: "string",
}],
transitRouterRouteTableName: "string",
});
type: volcengine:transit_router:RouteTable
properties:
description: string
tags:
- key: string
value: string
transitRouterId: string
transitRouterRouteTableName: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RouteTable resource accepts the following input properties:
- Transit
Router stringId - Id of the transit router.
- Description string
- Description of the transit router route table.
- List<Route
Table Tag> - Tags.
- Transit
Router stringRoute Table Name - The name of the route table.
- Transit
Router stringId - Id of the transit router.
- Description string
- Description of the transit router route table.
- []Route
Table Tag Args - Tags.
- Transit
Router stringRoute Table Name - The name of the route table.
- transit
Router StringId - Id of the transit router.
- description String
- Description of the transit router route table.
- List<Route
Table Tag> - Tags.
- transit
Router StringRoute Table Name - The name of the route table.
- transit
Router stringId - Id of the transit router.
- description string
- Description of the transit router route table.
- Route
Table Tag[] - Tags.
- transit
Router stringRoute Table Name - The name of the route table.
- transit_
router_ strid - Id of the transit router.
- description str
- Description of the transit router route table.
- Sequence[Route
Table Tag Args] - Tags.
- transit_
router_ strroute_ table_ name - The name of the route table.
- transit
Router StringId - Id of the transit router.
- description String
- Description of the transit router route table.
- List<Property Map>
- Tags.
- transit
Router StringRoute Table Name - 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:
- Creation
Time string - The creation time of the route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the route table.
- Transit
Router stringRoute Table Id - The id of the route table.
- Transit
Router stringRoute Table Type - The type of route table.
- Update
Time string - The update time of the route table.
- Creation
Time string - The creation time of the route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the route table.
- Transit
Router stringRoute Table Id - The id of the route table.
- Transit
Router stringRoute Table Type - The type of route table.
- Update
Time string - The update time of the route table.
- creation
Time String - The creation time of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the route table.
- transit
Router StringRoute Table Id - The id of the route table.
- transit
Router StringRoute Table Type - The type of route table.
- update
Time String - The update time of the route table.
- creation
Time string - The creation time of the route table.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the route table.
- transit
Router stringRoute Table Id - The id of the route table.
- transit
Router stringRoute Table Type - The type of route table.
- update
Time string - The update time of the route table.
- creation_
time str - The creation time of the route table.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the route table.
- transit_
router_ strroute_ table_ id - The id of the route table.
- transit_
router_ strroute_ table_ type - The type of route table.
- update_
time str - The update time of the route table.
- creation
Time String - The creation time of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the route table.
- transit
Router StringRoute Table Id - The id of the route table.
- transit
Router StringRoute Table Type - The type of route table.
- update
Time String - The update time of the route table.
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,
creation_time: Optional[str] = None,
description: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[RouteTableTagArgs]] = None,
transit_router_id: Optional[str] = None,
transit_router_route_table_id: Optional[str] = None,
transit_router_route_table_name: Optional[str] = None,
transit_router_route_table_type: Optional[str] = None,
update_time: 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.
- Creation
Time string - The creation time of the route table.
- Description string
- Description of the transit router route table.
- Status string
- The status of the route table.
- List<Route
Table Tag> - Tags.
- Transit
Router stringId - Id of the transit router.
- Transit
Router stringRoute Table Id - The id of the route table.
- Transit
Router stringRoute Table Name - The name of the route table.
- Transit
Router stringRoute Table Type - The type of route table.
- Update
Time string - The update time of the route table.
- Creation
Time string - The creation time of the route table.
- Description string
- Description of the transit router route table.
- Status string
- The status of the route table.
- []Route
Table Tag Args - Tags.
- Transit
Router stringId - Id of the transit router.
- Transit
Router stringRoute Table Id - The id of the route table.
- Transit
Router stringRoute Table Name - The name of the route table.
- Transit
Router stringRoute Table Type - The type of route table.
- Update
Time string - The update time of the route table.
- creation
Time String - The creation time of the route table.
- description String
- Description of the transit router route table.
- status String
- The status of the route table.
- List<Route
Table Tag> - Tags.
- transit
Router StringId - Id of the transit router.
- transit
Router StringRoute Table Id - The id of the route table.
- transit
Router StringRoute Table Name - The name of the route table.
- transit
Router StringRoute Table Type - The type of route table.
- update
Time String - The update time of the route table.
- creation
Time string - The creation time of the route table.
- description string
- Description of the transit router route table.
- status string
- The status of the route table.
- Route
Table Tag[] - Tags.
- transit
Router stringId - Id of the transit router.
- transit
Router stringRoute Table Id - The id of the route table.
- transit
Router stringRoute Table Name - The name of the route table.
- transit
Router stringRoute Table Type - The type of route table.
- update
Time string - The update time of the route table.
- creation_
time str - The creation time of the route table.
- description str
- Description of the transit router route table.
- status str
- The status of the route table.
- Sequence[Route
Table Tag Args] - Tags.
- transit_
router_ strid - Id of the transit router.
- transit_
router_ strroute_ table_ id - The id of the route table.
- transit_
router_ strroute_ table_ name - The name of the route table.
- transit_
router_ strroute_ table_ type - The type of route table.
- update_
time str - The update time of the route table.
- creation
Time String - The creation time of the route table.
- description String
- Description of the transit router route table.
- status String
- The status of the route table.
- List<Property Map>
- Tags.
- transit
Router StringId - Id of the transit router.
- transit
Router StringRoute Table Id - The id of the route table.
- transit
Router StringRoute Table Name - The name of the route table.
- transit
Router StringRoute Table Type - The type of route table.
- update
Time String - The update time of the route table.
Supporting Types
RouteTableTag, RouteTableTagArgs
Import
transit router route table can be imported using the router id and route table id, e.g.
$ pulumi import volcengine:transit_router/routeTable:RouteTable default tr-2ff4v69tkxji859gp684cm14e:tr-rtb-hy13n2l4c6c0v****
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.