1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CcnRoutes
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

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",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.CcnRoutes("example",
    ccn_id="ccn-gr7nynbd",
    route_id="ccnr-5uhewx1s",
    switch="off")
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 {
		_, 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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  example:
    type: tencentcloud:CcnRoutes
    properties:
      ccnId: ccn-gr7nynbd
      routeId: ccnr-5uhewx1s
      switch: off
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. CcnRoutesArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. CcnRoutesArgs
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. CcnRoutesArgs
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. 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:

CcnId This property is required. string
CCN Instance ID.
RouteId This property is required. string
CCN Route Id List.
Switch This property is required. string
on: Enable, off: Disable.
CcnRoutesId string
ID of the resource.
CcnId This property is required. string
CCN Instance ID.
RouteId This property is required. string
CCN Route Id List.
Switch This property is required. string
on: Enable, off: Disable.
CcnRoutesId string
ID of the resource.
ccnId This property is required. String
CCN Instance ID.
routeId This property is required. String
CCN Route Id List.
switch_ This property is required. String
on: Enable, off: Disable.
ccnRoutesId String
ID of the resource.
ccnId This property is required. string
CCN Instance ID.
routeId This property is required. string
CCN Route Id List.
switch This property is required. string
on: Enable, off: Disable.
ccnRoutesId string
ID of the resource.
ccn_id This property is required. str
CCN Instance ID.
route_id This property is required. str
CCN Route Id List.
switch This property is required. str
on: Enable, off: Disable.
ccn_routes_id str
ID of the resource.
ccnId This property is required. String
CCN Instance ID.
routeId This property is required. String
CCN Route Id List.
switch This property is required. String
on: Enable, off: Disable.
ccnRoutesId String
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 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:
CcnId string
CCN Instance ID.
CcnRoutesId string
ID of the resource.
RouteId string
CCN Route Id List.
Switch string
on: Enable, off: Disable.
CcnId string
CCN Instance ID.
CcnRoutesId string
ID of the resource.
RouteId string
CCN Route Id List.
Switch string
on: Enable, off: Disable.
ccnId String
CCN Instance ID.
ccnRoutesId String
ID of the resource.
routeId String
CCN Route Id List.
switch_ String
on: Enable, off: Disable.
ccnId string
CCN Instance ID.
ccnRoutesId string
ID of the resource.
routeId string
CCN Route Id List.
switch string
on: Enable, off: Disable.
ccn_id str
CCN Instance ID.
ccn_routes_id str
ID of the resource.
route_id str
CCN Route Id List.
switch str
on: Enable, off: Disable.
ccnId String
CCN Instance ID.
ccnRoutesId String
ID of the resource.
routeId 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
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.