Provides a resource to create a VPC route policy
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.VpcRoutePolicy("example", {
routePolicyName: "tf-example",
routePolicyDescription: "remark.",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.VpcRoutePolicy("example",
route_policy_name="tf-example",
route_policy_description="remark.")
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 {
_, err := tencentcloud.NewVpcRoutePolicy(ctx, "example", &tencentcloud.VpcRoutePolicyArgs{
RoutePolicyName: pulumi.String("tf-example"),
RoutePolicyDescription: pulumi.String("remark."),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.VpcRoutePolicy("example", new()
{
RoutePolicyName = "tf-example",
RoutePolicyDescription = "remark.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.VpcRoutePolicy;
import com.pulumi.tencentcloud.VpcRoutePolicyArgs;
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 example = new VpcRoutePolicy("example", VpcRoutePolicyArgs.builder()
.routePolicyName("tf-example")
.routePolicyDescription("remark.")
.build());
}
}
resources:
example:
type: tencentcloud:VpcRoutePolicy
properties:
routePolicyName: tf-example
routePolicyDescription: remark.
Create VpcRoutePolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcRoutePolicy(name: string, args: VpcRoutePolicyArgs, opts?: CustomResourceOptions);@overload
def VpcRoutePolicy(resource_name: str,
args: VpcRoutePolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcRoutePolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
route_policy_description: Optional[str] = None,
route_policy_name: Optional[str] = None,
vpc_route_policy_id: Optional[str] = None)func NewVpcRoutePolicy(ctx *Context, name string, args VpcRoutePolicyArgs, opts ...ResourceOption) (*VpcRoutePolicy, error)public VpcRoutePolicy(string name, VpcRoutePolicyArgs args, CustomResourceOptions? opts = null)
public VpcRoutePolicy(String name, VpcRoutePolicyArgs args)
public VpcRoutePolicy(String name, VpcRoutePolicyArgs args, CustomResourceOptions options)
type: tencentcloud:VpcRoutePolicy
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 VpcRoutePolicyArgs
- 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 VpcRoutePolicyArgs
- 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 VpcRoutePolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcRoutePolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcRoutePolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpcRoutePolicy 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 VpcRoutePolicy resource accepts the following input properties:
- Route
Policy stringDescription - Routing policy description.
- Route
Policy stringName - Specifies the routing strategy name.
- Vpc
Route stringPolicy Id - ID of the resource.
- Route
Policy stringDescription - Routing policy description.
- Route
Policy stringName - Specifies the routing strategy name.
- Vpc
Route stringPolicy Id - ID of the resource.
- route
Policy StringDescription - Routing policy description.
- route
Policy StringName - Specifies the routing strategy name.
- vpc
Route StringPolicy Id - ID of the resource.
- route
Policy stringDescription - Routing policy description.
- route
Policy stringName - Specifies the routing strategy name.
- vpc
Route stringPolicy Id - ID of the resource.
- route_
policy_ strdescription - Routing policy description.
- route_
policy_ strname - Specifies the routing strategy name.
- vpc_
route_ strpolicy_ id - ID of the resource.
- route
Policy StringDescription - Routing policy description.
- route
Policy StringName - Specifies the routing strategy name.
- vpc
Route StringPolicy Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcRoutePolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Route
Policy stringId - Route policy ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Route
Policy stringId - Route policy ID.
- id String
- The provider-assigned unique ID for this managed resource.
- route
Policy StringId - Route policy ID.
- id string
- The provider-assigned unique ID for this managed resource.
- route
Policy stringId - Route policy ID.
- id str
- The provider-assigned unique ID for this managed resource.
- route_
policy_ strid - Route policy ID.
- id String
- The provider-assigned unique ID for this managed resource.
- route
Policy StringId - Route policy ID.
Look up Existing VpcRoutePolicy Resource
Get an existing VpcRoutePolicy 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?: VpcRoutePolicyState, opts?: CustomResourceOptions): VpcRoutePolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
route_policy_description: Optional[str] = None,
route_policy_id: Optional[str] = None,
route_policy_name: Optional[str] = None,
vpc_route_policy_id: Optional[str] = None) -> VpcRoutePolicyfunc GetVpcRoutePolicy(ctx *Context, name string, id IDInput, state *VpcRoutePolicyState, opts ...ResourceOption) (*VpcRoutePolicy, error)public static VpcRoutePolicy Get(string name, Input<string> id, VpcRoutePolicyState? state, CustomResourceOptions? opts = null)public static VpcRoutePolicy get(String name, Output<String> id, VpcRoutePolicyState state, CustomResourceOptions options)resources: _: type: tencentcloud:VpcRoutePolicy get: id: ${id}- 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.
- Route
Policy stringDescription - Routing policy description.
- Route
Policy stringId - Route policy ID.
- Route
Policy stringName - Specifies the routing strategy name.
- Vpc
Route stringPolicy Id - ID of the resource.
- Route
Policy stringDescription - Routing policy description.
- Route
Policy stringId - Route policy ID.
- Route
Policy stringName - Specifies the routing strategy name.
- Vpc
Route stringPolicy Id - ID of the resource.
- route
Policy StringDescription - Routing policy description.
- route
Policy StringId - Route policy ID.
- route
Policy StringName - Specifies the routing strategy name.
- vpc
Route StringPolicy Id - ID of the resource.
- route
Policy stringDescription - Routing policy description.
- route
Policy stringId - Route policy ID.
- route
Policy stringName - Specifies the routing strategy name.
- vpc
Route stringPolicy Id - ID of the resource.
- route_
policy_ strdescription - Routing policy description.
- route_
policy_ strid - Route policy ID.
- route_
policy_ strname - Specifies the routing strategy name.
- vpc_
route_ strpolicy_ id - ID of the resource.
- route
Policy StringDescription - Routing policy description.
- route
Policy StringId - Route policy ID.
- route
Policy StringName - Specifies the routing strategy name.
- vpc
Route StringPolicy Id - ID of the resource.
Import
VPC route policy can be imported using the id, e.g.
$ pulumi import tencentcloud:index/vpcRoutePolicy:VpcRoutePolicy example rrp-lpv8rjp8
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
tencentcloudTerraform Provider.
