1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. VpcNotifyRoutes
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.VpcNotifyRoutes

Explore with Pulumi AI

Provides a resource to create a vpc notify_routes

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const routeTable = new tencentcloud.RouteTable("routeTable", {vpcId: vpc.vpcId});
const example = new tencentcloud.VpcNotifyRoutes("example", {
    routeTableId: routeTable.routeTableId,
    routeItemIds: ["rti-i8bap903"],
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
route_table = tencentcloud.RouteTable("routeTable", vpc_id=vpc.vpc_id)
example = tencentcloud.VpcNotifyRoutes("example",
    route_table_id=route_table.route_table_id,
    route_item_ids=["rti-i8bap903"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		routeTable, err := tencentcloud.NewRouteTable(ctx, "routeTable", &tencentcloud.RouteTableArgs{
			VpcId: vpc.VpcId,
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewVpcNotifyRoutes(ctx, "example", &tencentcloud.VpcNotifyRoutesArgs{
			RouteTableId: routeTable.RouteTableId,
			RouteItemIds: pulumi.StringArray{
				pulumi.String("rti-i8bap903"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var routeTable = new Tencentcloud.RouteTable("routeTable", new()
    {
        VpcId = vpc.VpcId,
    });

    var example = new Tencentcloud.VpcNotifyRoutes("example", new()
    {
        RouteTableId = routeTable.RouteTableId,
        RouteItemIds = new[]
        {
            "rti-i8bap903",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.RouteTable;
import com.pulumi.tencentcloud.RouteTableArgs;
import com.pulumi.tencentcloud.VpcNotifyRoutes;
import com.pulumi.tencentcloud.VpcNotifyRoutesArgs;
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 vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var routeTable = new RouteTable("routeTable", RouteTableArgs.builder()
            .vpcId(vpc.vpcId())
            .build());

        var example = new VpcNotifyRoutes("example", VpcNotifyRoutesArgs.builder()
            .routeTableId(routeTable.routeTableId())
            .routeItemIds("rti-i8bap903")
            .build());

    }
}
Copy
resources:
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  routeTable:
    type: tencentcloud:RouteTable
    properties:
      vpcId: ${vpc.vpcId}
  example:
    type: tencentcloud:VpcNotifyRoutes
    properties:
      routeTableId: ${routeTable.routeTableId}
      routeItemIds:
        - rti-i8bap903
Copy

Create VpcNotifyRoutes Resource

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

Constructor syntax

new VpcNotifyRoutes(name: string, args: VpcNotifyRoutesArgs, opts?: CustomResourceOptions);
@overload
def VpcNotifyRoutes(resource_name: str,
                    args: VpcNotifyRoutesArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def VpcNotifyRoutes(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    route_item_ids: Optional[Sequence[str]] = None,
                    route_table_id: Optional[str] = None,
                    vpc_notify_routes_id: Optional[str] = None)
func NewVpcNotifyRoutes(ctx *Context, name string, args VpcNotifyRoutesArgs, opts ...ResourceOption) (*VpcNotifyRoutes, error)
public VpcNotifyRoutes(string name, VpcNotifyRoutesArgs args, CustomResourceOptions? opts = null)
public VpcNotifyRoutes(String name, VpcNotifyRoutesArgs args)
public VpcNotifyRoutes(String name, VpcNotifyRoutesArgs args, CustomResourceOptions options)
type: tencentcloud:VpcNotifyRoutes
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcNotifyRoutesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcNotifyRoutesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcNotifyRoutesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcNotifyRoutesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcNotifyRoutesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

RouteItemIds This property is required. List<string>
The unique ID of the routing policy.
RouteTableId This property is required. string
The unique ID of the routing table.
VpcNotifyRoutesId string
ID of the resource.
RouteItemIds This property is required. []string
The unique ID of the routing policy.
RouteTableId This property is required. string
The unique ID of the routing table.
VpcNotifyRoutesId string
ID of the resource.
routeItemIds This property is required. List<String>
The unique ID of the routing policy.
routeTableId This property is required. String
The unique ID of the routing table.
vpcNotifyRoutesId String
ID of the resource.
routeItemIds This property is required. string[]
The unique ID of the routing policy.
routeTableId This property is required. string
The unique ID of the routing table.
vpcNotifyRoutesId string
ID of the resource.
route_item_ids This property is required. Sequence[str]
The unique ID of the routing policy.
route_table_id This property is required. str
The unique ID of the routing table.
vpc_notify_routes_id str
ID of the resource.
routeItemIds This property is required. List<String>
The unique ID of the routing policy.
routeTableId This property is required. String
The unique ID of the routing table.
vpcNotifyRoutesId String
ID of the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PublishedToVbc bool
If published to vbc.
Id string
The provider-assigned unique ID for this managed resource.
PublishedToVbc bool
If published to vbc.
id String
The provider-assigned unique ID for this managed resource.
publishedToVbc Boolean
If published to vbc.
id string
The provider-assigned unique ID for this managed resource.
publishedToVbc boolean
If published to vbc.
id str
The provider-assigned unique ID for this managed resource.
published_to_vbc bool
If published to vbc.
id String
The provider-assigned unique ID for this managed resource.
publishedToVbc Boolean
If published to vbc.

Look up Existing VpcNotifyRoutes Resource

Get an existing VpcNotifyRoutes 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?: VpcNotifyRoutesState, opts?: CustomResourceOptions): VpcNotifyRoutes
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        published_to_vbc: Optional[bool] = None,
        route_item_ids: Optional[Sequence[str]] = None,
        route_table_id: Optional[str] = None,
        vpc_notify_routes_id: Optional[str] = None) -> VpcNotifyRoutes
func GetVpcNotifyRoutes(ctx *Context, name string, id IDInput, state *VpcNotifyRoutesState, opts ...ResourceOption) (*VpcNotifyRoutes, error)
public static VpcNotifyRoutes Get(string name, Input<string> id, VpcNotifyRoutesState? state, CustomResourceOptions? opts = null)
public static VpcNotifyRoutes get(String name, Output<String> id, VpcNotifyRoutesState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:VpcNotifyRoutes    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
PublishedToVbc bool
If published to vbc.
RouteItemIds List<string>
The unique ID of the routing policy.
RouteTableId string
The unique ID of the routing table.
VpcNotifyRoutesId string
ID of the resource.
PublishedToVbc bool
If published to vbc.
RouteItemIds []string
The unique ID of the routing policy.
RouteTableId string
The unique ID of the routing table.
VpcNotifyRoutesId string
ID of the resource.
publishedToVbc Boolean
If published to vbc.
routeItemIds List<String>
The unique ID of the routing policy.
routeTableId String
The unique ID of the routing table.
vpcNotifyRoutesId String
ID of the resource.
publishedToVbc boolean
If published to vbc.
routeItemIds string[]
The unique ID of the routing policy.
routeTableId string
The unique ID of the routing table.
vpcNotifyRoutesId string
ID of the resource.
published_to_vbc bool
If published to vbc.
route_item_ids Sequence[str]
The unique ID of the routing policy.
route_table_id str
The unique ID of the routing table.
vpc_notify_routes_id str
ID of the resource.
publishedToVbc Boolean
If published to vbc.
routeItemIds List<String>
The unique ID of the routing policy.
routeTableId String
The unique ID of the routing table.
vpcNotifyRoutesId String
ID of the resource.

Import

vpc notify_routes can be imported using the id, e.g.

$ pulumi import tencentcloud:index/vpcNotifyRoutes:VpcNotifyRoutes notify_routes route_table_id#route_item_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.