1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. TransitRouter
Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi

alicloud.cen.TransitRouter

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi

    Provides a Cloud Enterprise Network (CEN) Transit Router resource.

    For information about Cloud Enterprise Network (CEN) Transit Router and how to use it, see What is Transit Router.

    NOTE: Available since v1.126.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const example = new alicloud.cen.Instance("example", {
        cenInstanceName: name,
        description: name,
    });
    const exampleTransitRouter = new alicloud.cen.TransitRouter("example", {
        cenId: example.id,
        transitRouterName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    example = alicloud.cen.Instance("example",
        cen_instance_name=name,
        description=name)
    example_transit_router = alicloud.cen.TransitRouter("example",
        cen_id=example.id,
        transit_router_name=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		example, err := cen.NewInstance(ctx, "example", &cen.InstanceArgs{
    			CenInstanceName: pulumi.String(name),
    			Description:     pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cen.NewTransitRouter(ctx, "example", &cen.TransitRouterArgs{
    			CenId:             example.ID(),
    			TransitRouterName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var example = new AliCloud.Cen.Instance("example", new()
        {
            CenInstanceName = name,
            Description = name,
        });
    
        var exampleTransitRouter = new AliCloud.Cen.TransitRouter("example", new()
        {
            CenId = example.Id,
            TransitRouterName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.Instance;
    import com.pulumi.alicloud.cen.InstanceArgs;
    import com.pulumi.alicloud.cen.TransitRouter;
    import com.pulumi.alicloud.cen.TransitRouterArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var example = new Instance("example", InstanceArgs.builder()
                .cenInstanceName(name)
                .description(name)
                .build());
    
            var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()
                .cenId(example.id())
                .transitRouterName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      example:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: ${name}
          description: ${name}
      exampleTransitRouter:
        type: alicloud:cen:TransitRouter
        name: example
        properties:
          cenId: ${example.id}
          transitRouterName: ${name}
    

    Create TransitRouter Resource

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

    Constructor syntax

    new TransitRouter(name: string, args: TransitRouterArgs, opts?: CustomResourceOptions);
    @overload
    def TransitRouter(resource_name: str,
                      args: TransitRouterArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def TransitRouter(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cen_id: Optional[str] = None,
                      dry_run: Optional[bool] = None,
                      support_multicast: Optional[bool] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      transit_router_description: Optional[str] = None,
                      transit_router_name: Optional[str] = None)
    func NewTransitRouter(ctx *Context, name string, args TransitRouterArgs, opts ...ResourceOption) (*TransitRouter, error)
    public TransitRouter(string name, TransitRouterArgs args, CustomResourceOptions? opts = null)
    public TransitRouter(String name, TransitRouterArgs args)
    public TransitRouter(String name, TransitRouterArgs args, CustomResourceOptions options)
    
    type: alicloud:cen:TransitRouter
    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 TransitRouterArgs
    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 TransitRouterArgs
    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 TransitRouterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TransitRouterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TransitRouterArgs
    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 transitRouterResource = new AliCloud.Cen.TransitRouter("transitRouterResource", new()
    {
        CenId = "string",
        DryRun = false,
        SupportMulticast = false,
        Tags = 
        {
            { "string", "string" },
        },
        TransitRouterDescription = "string",
        TransitRouterName = "string",
    });
    
    example, err := cen.NewTransitRouter(ctx, "transitRouterResource", &cen.TransitRouterArgs{
    	CenId:            pulumi.String("string"),
    	DryRun:           pulumi.Bool(false),
    	SupportMulticast: pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TransitRouterDescription: pulumi.String("string"),
    	TransitRouterName:        pulumi.String("string"),
    })
    
    var transitRouterResource = new TransitRouter("transitRouterResource", TransitRouterArgs.builder()
        .cenId("string")
        .dryRun(false)
        .supportMulticast(false)
        .tags(Map.of("string", "string"))
        .transitRouterDescription("string")
        .transitRouterName("string")
        .build());
    
    transit_router_resource = alicloud.cen.TransitRouter("transitRouterResource",
        cen_id="string",
        dry_run=False,
        support_multicast=False,
        tags={
            "string": "string",
        },
        transit_router_description="string",
        transit_router_name="string")
    
    const transitRouterResource = new alicloud.cen.TransitRouter("transitRouterResource", {
        cenId: "string",
        dryRun: false,
        supportMulticast: false,
        tags: {
            string: "string",
        },
        transitRouterDescription: "string",
        transitRouterName: "string",
    });
    
    type: alicloud:cen:TransitRouter
    properties:
        cenId: string
        dryRun: false
        supportMulticast: false
        tags:
            string: string
        transitRouterDescription: string
        transitRouterName: string
    

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

    CenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    DryRun bool
    The dry run.
    SupportMulticast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    Tags Dictionary<string, string>
    The tag of the resource
    TransitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    TransitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    CenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    DryRun bool
    The dry run.
    SupportMulticast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    Tags map[string]string
    The tag of the resource
    TransitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    TransitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    cenId String
    The ID of the Cloud Enterprise Network (CEN) instance.
    dryRun Boolean
    The dry run.
    supportMulticast Boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Map<String,String>
    The tag of the resource
    transitRouterDescription String
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterName String
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    cenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    dryRun boolean
    The dry run.
    supportMulticast boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags {[key: string]: string}
    The tag of the resource
    transitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    cen_id str
    The ID of the Cloud Enterprise Network (CEN) instance.
    dry_run bool
    The dry run.
    support_multicast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Mapping[str, str]
    The tag of the resource
    transit_router_description str
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transit_router_name str
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    cenId String
    The ID of the Cloud Enterprise Network (CEN) instance.
    dryRun Boolean
    The dry run.
    supportMulticast Boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Map<String>
    The tag of the resource
    transitRouterDescription String
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterName String
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.

    Outputs

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

    CreateTime string
    (Available since v1.247.0) The time when the transit router was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    Status string
    The status of the transit router.
    TransitRouterId string
    The ID of the transit router.
    Type string
    The edition of the transit router.
    CreateTime string
    (Available since v1.247.0) The time when the transit router was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    Status string
    The status of the transit router.
    TransitRouterId string
    The ID of the transit router.
    Type string
    The edition of the transit router.
    createTime String
    (Available since v1.247.0) The time when the transit router was created.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status String
    The status of the transit router.
    transitRouterId String
    The ID of the transit router.
    type String
    The edition of the transit router.
    createTime string
    (Available since v1.247.0) The time when the transit router was created.
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status string
    The status of the transit router.
    transitRouterId string
    The ID of the transit router.
    type string
    The edition of the transit router.
    create_time str
    (Available since v1.247.0) The time when the transit router was created.
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status str
    The status of the transit router.
    transit_router_id str
    The ID of the transit router.
    type str
    The edition of the transit router.
    createTime String
    (Available since v1.247.0) The time when the transit router was created.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status String
    The status of the transit router.
    transitRouterId String
    The ID of the transit router.
    type String
    The edition of the transit router.

    Look up Existing TransitRouter Resource

    Get an existing TransitRouter 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?: TransitRouterState, opts?: CustomResourceOptions): TransitRouter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cen_id: Optional[str] = None,
            create_time: Optional[str] = None,
            dry_run: Optional[bool] = None,
            region_id: Optional[str] = None,
            status: Optional[str] = None,
            support_multicast: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            transit_router_description: Optional[str] = None,
            transit_router_id: Optional[str] = None,
            transit_router_name: Optional[str] = None,
            type: Optional[str] = None) -> TransitRouter
    func GetTransitRouter(ctx *Context, name string, id IDInput, state *TransitRouterState, opts ...ResourceOption) (*TransitRouter, error)
    public static TransitRouter Get(string name, Input<string> id, TransitRouterState? state, CustomResourceOptions? opts = null)
    public static TransitRouter get(String name, Output<String> id, TransitRouterState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:cen:TransitRouter    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.
    The following state arguments are supported:
    CenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    CreateTime string
    (Available since v1.247.0) The time when the transit router was created.
    DryRun bool
    The dry run.
    RegionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    Status string
    The status of the transit router.
    SupportMulticast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    Tags Dictionary<string, string>
    The tag of the resource
    TransitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    Type string
    The edition of the transit router.
    CenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    CreateTime string
    (Available since v1.247.0) The time when the transit router was created.
    DryRun bool
    The dry run.
    RegionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    Status string
    The status of the transit router.
    SupportMulticast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    Tags map[string]string
    The tag of the resource
    TransitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    Type string
    The edition of the transit router.
    cenId String
    The ID of the Cloud Enterprise Network (CEN) instance.
    createTime String
    (Available since v1.247.0) The time when the transit router was created.
    dryRun Boolean
    The dry run.
    regionId String
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status String
    The status of the transit router.
    supportMulticast Boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Map<String,String>
    The tag of the resource
    transitRouterDescription String
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterId String
    The ID of the transit router.
    transitRouterName String
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    type String
    The edition of the transit router.
    cenId string
    The ID of the Cloud Enterprise Network (CEN) instance.
    createTime string
    (Available since v1.247.0) The time when the transit router was created.
    dryRun boolean
    The dry run.
    regionId string
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status string
    The status of the transit router.
    supportMulticast boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags {[key: string]: string}
    The tag of the resource
    transitRouterDescription string
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterId string
    The ID of the transit router.
    transitRouterName string
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    type string
    The edition of the transit router.
    cen_id str
    The ID of the Cloud Enterprise Network (CEN) instance.
    create_time str
    (Available since v1.247.0) The time when the transit router was created.
    dry_run bool
    The dry run.
    region_id str
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status str
    The status of the transit router.
    support_multicast bool
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Mapping[str, str]
    The tag of the resource
    transit_router_description str
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transit_router_id str
    The ID of the transit router.
    transit_router_name str
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    type str
    The edition of the transit router.
    cenId String
    The ID of the Cloud Enterprise Network (CEN) instance.
    createTime String
    (Available since v1.247.0) The time when the transit router was created.
    dryRun Boolean
    The dry run.
    regionId String
    (Available since v1.247.0) The ID of the region where the transit router is deployed.
    status String
    The status of the transit router.
    supportMulticast Boolean
    Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
    tags Map<String>
    The tag of the resource
    transitRouterDescription String
    The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    transitRouterId String
    The ID of the transit router.
    transitRouterName String
    The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty.
    type String
    The edition of the transit router.

    Import

    Cloud Enterprise Network (CEN) Transit Router can be imported using the id, e.g.

    $ pulumi import alicloud:cen/transitRouter:TransitRouter example <cen_id>:<transit_router_id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi