alicloud.cen.TransitRouter
Provides a CEN transit router resource that associate the transitRouter with the CEN instance.What is Cen Transit Router
NOTE: Available in 1.126.0+
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-testAccCenTransitRouter";
var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new()
{
CenInstanceName = name,
Description = "terraform01",
});
var defaultTransitRouter = new AliCloud.Cen.TransitRouter("defaultTransitRouter", new()
{
TransitRouterName = name,
CenId = defaultInstance.Id,
});
});
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 := "tf-testAccCenTransitRouter"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultInstance, err := cen.NewInstance(ctx, "defaultInstance", &cen.InstanceArgs{
CenInstanceName: pulumi.String(name),
Description: pulumi.String("terraform01"),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouter(ctx, "defaultTransitRouter", &cen.TransitRouterArgs{
TransitRouterName: pulumi.String(name),
CenId: defaultInstance.ID(),
})
if err != nil {
return err
}
return nil
})
}
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("tf-testAccCenTransitRouter");
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.cenInstanceName(name)
.description("terraform01")
.build());
var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()
.transitRouterName(name)
.cenId(defaultInstance.id())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-testAccCenTransitRouter"
default_instance = alicloud.cen.Instance("defaultInstance",
cen_instance_name=name,
description="terraform01")
default_transit_router = alicloud.cen.TransitRouter("defaultTransitRouter",
transit_router_name=name,
cen_id=default_instance.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccCenTransitRouter";
const defaultInstance = new alicloud.cen.Instance("defaultInstance", {
cenInstanceName: name,
description: "terraform01",
});
const defaultTransitRouter = new alicloud.cen.TransitRouter("defaultTransitRouter", {
transitRouterName: name,
cenId: defaultInstance.id,
});
configuration:
# Create a new tr-attachment and use it to attach one transit router to a new CEN
name:
type: string
default: tf-testAccCenTransitRouter
resources:
defaultInstance:
type: alicloud:cen:Instance
properties:
cenInstanceName: ${name}
description: terraform01
defaultTransitRouter:
type: alicloud:cen:TransitRouter
properties:
transitRouterName: ${name}
cenId: ${defaultInstance.id}
Create TransitRouter Resource
new TransitRouter(name: string, args: TransitRouterArgs, opts?: CustomResourceOptions);
@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, Any]] = None,
transit_router_description: Optional[str] = None,
transit_router_name: Optional[str] = None)
@overload
def TransitRouter(resource_name: str,
args: TransitRouterArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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
The TransitRouter resource accepts the following input properties:
- Cen
Id string The ID of the CEN.
- Dry
Run bool The dry run.
- Support
Multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Transit
Router stringDescription The description of the transit router.
- Transit
Router stringName The name of the transit router.
- Cen
Id string The ID of the CEN.
- Dry
Run bool The dry run.
- Support
Multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- map[string]interface{}
A mapping of tags to assign to the resource.
- Transit
Router stringDescription The description of the transit router.
- Transit
Router stringName The name of the transit router.
- cen
Id String The ID of the CEN.
- dry
Run Boolean The dry run.
- support
Multicast Boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Map<String,Object>
A mapping of tags to assign to the resource.
- transit
Router StringDescription The description of the transit router.
- transit
Router StringName The name of the transit router.
- cen
Id string The ID of the CEN.
- dry
Run boolean The dry run.
- support
Multicast boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- {[key: string]: any}
A mapping of tags to assign to the resource.
- transit
Router stringDescription The description of the transit router.
- transit
Router stringName The name of the transit router.
- cen_
id str The ID of the CEN.
- dry_
run bool The dry run.
- support_
multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Mapping[str, Any]
A mapping of tags to assign to the resource.
- transit_
router_ strdescription The description of the transit router.
- transit_
router_ strname The name of the transit router.
- cen
Id String The ID of the CEN.
- dry
Run Boolean The dry run.
- support
Multicast Boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Map<Any>
A mapping of tags to assign to the resource.
- transit
Router StringDescription The description of the transit router.
- transit
Router StringName The name of the transit router.
Outputs
All input properties are implicitly available as output properties. Additionally, the TransitRouter resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Status string
The associating status of the Transit Router.
- Transit
Router stringId The transit router id of the transit router.
- Type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- Id string
The provider-assigned unique ID for this managed resource.
- Status string
The associating status of the Transit Router.
- Transit
Router stringId The transit router id of the transit router.
- Type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- id String
The provider-assigned unique ID for this managed resource.
- status String
The associating status of the Transit Router.
- transit
Router StringId The transit router id of the transit router.
- type String
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- id string
The provider-assigned unique ID for this managed resource.
- status string
The associating status of the Transit Router.
- transit
Router stringId The transit router id of the transit router.
- type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- id str
The provider-assigned unique ID for this managed resource.
- status str
The associating status of the Transit Router.
- transit_
router_ strid The transit router id of the transit router.
- type str
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- id String
The provider-assigned unique ID for this managed resource.
- status String
The associating status of the Transit Router.
- transit
Router StringId The transit router id of the transit router.
- type String
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
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,
dry_run: Optional[bool] = None,
status: Optional[str] = None,
support_multicast: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = 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)
Resource lookup is not supported in YAML
- 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.
- Cen
Id string The ID of the CEN.
- Dry
Run bool The dry run.
- Status string
The associating status of the Transit Router.
- Support
Multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Transit
Router stringDescription The description of the transit router.
- Transit
Router stringId The transit router id of the transit router.
- Transit
Router stringName The name of the transit router.
- Type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- Cen
Id string The ID of the CEN.
- Dry
Run bool The dry run.
- Status string
The associating status of the Transit Router.
- Support
Multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- map[string]interface{}
A mapping of tags to assign to the resource.
- Transit
Router stringDescription The description of the transit router.
- Transit
Router stringId The transit router id of the transit router.
- Transit
Router stringName The name of the transit router.
- Type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- cen
Id String The ID of the CEN.
- dry
Run Boolean The dry run.
- status String
The associating status of the Transit Router.
- support
Multicast Boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Map<String,Object>
A mapping of tags to assign to the resource.
- transit
Router StringDescription The description of the transit router.
- transit
Router StringId The transit router id of the transit router.
- transit
Router StringName The name of the transit router.
- type String
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- cen
Id string The ID of the CEN.
- dry
Run boolean The dry run.
- status string
The associating status of the Transit Router.
- support
Multicast boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- {[key: string]: any}
A mapping of tags to assign to the resource.
- transit
Router stringDescription The description of the transit router.
- transit
Router stringId The transit router id of the transit router.
- transit
Router stringName The name of the transit router.
- type string
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- cen_
id str The ID of the CEN.
- dry_
run bool The dry run.
- status str
The associating status of the Transit Router.
- support_
multicast bool Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Mapping[str, Any]
A mapping of tags to assign to the resource.
- transit_
router_ strdescription The description of the transit router.
- transit_
router_ strid The transit router id of the transit router.
- transit_
router_ strname The name of the transit router.
- type str
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
- cen
Id String The ID of the CEN.
- dry
Run Boolean The dry run.
- status String
The associating status of the Transit Router.
- support
Multicast Boolean Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
false
,true
. Default Value:false
. The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.- Map<Any>
A mapping of tags to assign to the resource.
- transit
Router StringDescription The description of the transit router.
- transit
Router StringId The transit router id of the transit router.
- transit
Router StringName The name of the transit router.
- type String
The Type of the Transit Router. Valid values:
Enterprise
,Basic
.
Import
CEN instance can be imported using the id, e.g.
$ pulumi import alicloud:cen/transitRouter:TransitRouter default cen-*****:tr-*******
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.