tencentcloud.CcnRoutes
Explore with Pulumi AI
Provides a resource to create a vpc ccn_routes switch
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CcnRoutes("example", {
ccnId: "ccn-gr7nynbd",
routeId: "ccnr-5uhewx1s",
"switch": "off",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CcnRoutes("example",
ccn_id="ccn-gr7nynbd",
route_id="ccnr-5uhewx1s",
switch="off")
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.NewCcnRoutes(ctx, "example", &tencentcloud.CcnRoutesArgs{
CcnId: pulumi.String("ccn-gr7nynbd"),
RouteId: pulumi.String("ccnr-5uhewx1s"),
Switch: pulumi.String("off"),
})
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.CcnRoutes("example", new()
{
CcnId = "ccn-gr7nynbd",
RouteId = "ccnr-5uhewx1s",
Switch = "off",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CcnRoutes;
import com.pulumi.tencentcloud.CcnRoutesArgs;
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 CcnRoutes("example", CcnRoutesArgs.builder()
.ccnId("ccn-gr7nynbd")
.routeId("ccnr-5uhewx1s")
.switch_("off")
.build());
}
}
resources:
example:
type: tencentcloud:CcnRoutes
properties:
ccnId: ccn-gr7nynbd
routeId: ccnr-5uhewx1s
switch: off
Create CcnRoutes Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CcnRoutes(name: string, args: CcnRoutesArgs, opts?: CustomResourceOptions);
@overload
def CcnRoutes(resource_name: str,
args: CcnRoutesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CcnRoutes(resource_name: str,
opts: Optional[ResourceOptions] = None,
ccn_id: Optional[str] = None,
route_id: Optional[str] = None,
switch: Optional[str] = None,
ccn_routes_id: Optional[str] = None)
func NewCcnRoutes(ctx *Context, name string, args CcnRoutesArgs, opts ...ResourceOption) (*CcnRoutes, error)
public CcnRoutes(string name, CcnRoutesArgs args, CustomResourceOptions? opts = null)
public CcnRoutes(String name, CcnRoutesArgs args)
public CcnRoutes(String name, CcnRoutesArgs args, CustomResourceOptions options)
type: tencentcloud:CcnRoutes
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 CcnRoutesArgs
- 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 CcnRoutesArgs
- 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 CcnRoutesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CcnRoutesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CcnRoutesArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CcnRoutes 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 CcnRoutes resource accepts the following input properties:
- Ccn
Id string - CCN Instance ID.
- Route
Id string - CCN Route Id List.
- Switch string
on
: Enable,off
: Disable.- Ccn
Routes stringId - ID of the resource.
- Ccn
Id string - CCN Instance ID.
- Route
Id string - CCN Route Id List.
- Switch string
on
: Enable,off
: Disable.- Ccn
Routes stringId - ID of the resource.
- ccn
Id String - CCN Instance ID.
- route
Id String - CCN Route Id List.
- switch_ String
on
: Enable,off
: Disable.- ccn
Routes StringId - ID of the resource.
- ccn
Id string - CCN Instance ID.
- route
Id string - CCN Route Id List.
- switch string
on
: Enable,off
: Disable.- ccn
Routes stringId - ID of the resource.
- ccn_
id str - CCN Instance ID.
- route_
id str - CCN Route Id List.
- switch str
on
: Enable,off
: Disable.- ccn_
routes_ strid - ID of the resource.
- ccn
Id String - CCN Instance ID.
- route
Id String - CCN Route Id List.
- switch String
on
: Enable,off
: Disable.- ccn
Routes StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CcnRoutes 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 CcnRoutes Resource
Get an existing CcnRoutes 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?: CcnRoutesState, opts?: CustomResourceOptions): CcnRoutes
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ccn_id: Optional[str] = None,
ccn_routes_id: Optional[str] = None,
route_id: Optional[str] = None,
switch: Optional[str] = None) -> CcnRoutes
func GetCcnRoutes(ctx *Context, name string, id IDInput, state *CcnRoutesState, opts ...ResourceOption) (*CcnRoutes, error)
public static CcnRoutes Get(string name, Input<string> id, CcnRoutesState? state, CustomResourceOptions? opts = null)
public static CcnRoutes get(String name, Output<String> id, CcnRoutesState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CcnRoutes 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.
- Ccn
Id string - CCN Instance ID.
- Ccn
Routes stringId - ID of the resource.
- Route
Id string - CCN Route Id List.
- Switch string
on
: Enable,off
: Disable.
- Ccn
Id string - CCN Instance ID.
- Ccn
Routes stringId - ID of the resource.
- Route
Id string - CCN Route Id List.
- Switch string
on
: Enable,off
: Disable.
- ccn
Id String - CCN Instance ID.
- ccn
Routes StringId - ID of the resource.
- route
Id String - CCN Route Id List.
- switch_ String
on
: Enable,off
: Disable.
- ccn
Id string - CCN Instance ID.
- ccn
Routes stringId - ID of the resource.
- route
Id string - CCN Route Id List.
- switch string
on
: Enable,off
: Disable.
- ccn_
id str - CCN Instance ID.
- ccn_
routes_ strid - ID of the resource.
- route_
id str - CCN Route Id List.
- switch str
on
: Enable,off
: Disable.
- ccn
Id String - CCN Instance ID.
- ccn
Routes StringId - ID of the resource.
- route
Id String - CCN Route Id List.
- switch String
on
: Enable,off
: Disable.
Import
vpc ccn_routes can be imported using the id, e.g.
$ pulumi import tencentcloud:index/ccnRoutes:CcnRoutes ccn_routes ccn-gr7nynbd#ccnr-5uhewx1s
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.