1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. getTransitRouterVpcAttachments
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cen.getTransitRouterVpcAttachments

Explore with Pulumi AI

This data source provides the CEN Transit Router VPC Attachments of the current Alibaba Cloud user.

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 _default = alicloud.getZones({});
const defaultGetNetworks = alicloud.vpc.getNetworks({
    nameRegex: "^default-NODELETING$",
});
const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
    vpcId: defaultGetNetworks.ids?.[0],
    zoneId: _default.ids?.[0],
}));
const defaultMaster = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
    vpcId: defaultGetNetworks.ids?.[0],
    zoneId: _default.ids?.[1],
}));
const defaultInstance = new alicloud.cen.Instance("default", {
    cenInstanceName: name,
    protectionLevel: "REDUCED",
});
const defaultTransitRouter = new alicloud.cen.TransitRouter("default", {cenId: defaultInstance.id});
const defaultTransitRouterVpcAttachment = new alicloud.cen.TransitRouterVpcAttachment("default", {
    cenId: defaultInstance.id,
    vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
    transitRouterId: defaultTransitRouter.transitRouterId,
    transitRouterAttachmentName: name,
    transitRouterAttachmentDescription: name,
    zoneMappings: [
        {
            vswitchId: defaultMaster.then(defaultMaster => defaultMaster.vswitches?.[0]?.id),
            zoneId: defaultMaster.then(defaultMaster => defaultMaster.vswitches?.[0]?.zoneId),
        },
        {
            vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.vswitches?.[0]?.id),
            zoneId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.vswitches?.[0]?.zoneId),
        },
    ],
});
const ids = alicloud.cen.getTransitRouterVpcAttachmentsOutput({
    ids: [defaultTransitRouterVpcAttachment.id],
    cenId: defaultInstance.id,
});
export const cenTransitRouterVpcAttachmentsId0 = ids.apply(ids => ids.attachments?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.get_zones()
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
    zone_id=default.ids[0])
default_master = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
    zone_id=default.ids[1])
default_instance = alicloud.cen.Instance("default",
    cen_instance_name=name,
    protection_level="REDUCED")
default_transit_router = alicloud.cen.TransitRouter("default", cen_id=default_instance.id)
default_transit_router_vpc_attachment = alicloud.cen.TransitRouterVpcAttachment("default",
    cen_id=default_instance.id,
    vpc_id=default_get_networks.ids[0],
    transit_router_id=default_transit_router.transit_router_id,
    transit_router_attachment_name=name,
    transit_router_attachment_description=name,
    zone_mappings=[
        {
            "vswitch_id": default_master.vswitches[0].id,
            "zone_id": default_master.vswitches[0].zone_id,
        },
        {
            "vswitch_id": default_get_switches.vswitches[0].id,
            "zone_id": default_get_switches.vswitches[0].zone_id,
        },
    ])
ids = alicloud.cen.get_transit_router_vpc_attachments_output(ids=[default_transit_router_vpc_attachment.id],
    cen_id=default_instance.id)
pulumi.export("cenTransitRouterVpcAttachmentsId0", ids.attachments[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"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
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{}, nil)
		if err != nil {
			return err
		}
		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
			NameRegex: pulumi.StringRef("^default-NODELETING$"),
		}, nil)
		if err != nil {
			return err
		}
		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
			ZoneId: pulumi.StringRef(_default.Ids[0]),
		}, nil)
		if err != nil {
			return err
		}
		defaultMaster, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
			ZoneId: pulumi.StringRef(_default.Ids[1]),
		}, nil)
		if err != nil {
			return err
		}
		defaultInstance, err := cen.NewInstance(ctx, "default", &cen.InstanceArgs{
			CenInstanceName: pulumi.String(name),
			ProtectionLevel: pulumi.String("REDUCED"),
		})
		if err != nil {
			return err
		}
		defaultTransitRouter, err := cen.NewTransitRouter(ctx, "default", &cen.TransitRouterArgs{
			CenId: defaultInstance.ID(),
		})
		if err != nil {
			return err
		}
		defaultTransitRouterVpcAttachment, err := cen.NewTransitRouterVpcAttachment(ctx, "default", &cen.TransitRouterVpcAttachmentArgs{
			CenId:                              defaultInstance.ID(),
			VpcId:                              pulumi.String(defaultGetNetworks.Ids[0]),
			TransitRouterId:                    defaultTransitRouter.TransitRouterId,
			TransitRouterAttachmentName:        pulumi.String(name),
			TransitRouterAttachmentDescription: pulumi.String(name),
			ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
					VswitchId: pulumi.String(defaultMaster.Vswitches[0].Id),
					ZoneId:    pulumi.String(defaultMaster.Vswitches[0].ZoneId),
				},
				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
					VswitchId: pulumi.String(defaultGetSwitches.Vswitches[0].Id),
					ZoneId:    pulumi.String(defaultGetSwitches.Vswitches[0].ZoneId),
				},
			},
		})
		if err != nil {
			return err
		}
		ids := cen.GetTransitRouterVpcAttachmentsOutput(ctx, cen.GetTransitRouterVpcAttachmentsOutputArgs{
			Ids: pulumi.StringArray{
				defaultTransitRouterVpcAttachment.ID(),
			},
			CenId: defaultInstance.ID(),
		}, nil)
		ctx.Export("cenTransitRouterVpcAttachmentsId0", ids.ApplyT(func(ids cen.GetTransitRouterVpcAttachmentsResult) (*string, error) {
			return &ids.Attachments[0].Id, nil
		}).(pulumi.StringPtrOutput))
		return nil
	})
}
Copy
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 @default = AliCloud.GetZones.Invoke();

    var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
    {
        NameRegex = "^default-NODELETING$",
    });

    var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
    {
        VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[0]),
    });

    var defaultMaster = AliCloud.Vpc.GetSwitches.Invoke(new()
    {
        VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[1]),
    });

    var defaultInstance = new AliCloud.Cen.Instance("default", new()
    {
        CenInstanceName = name,
        ProtectionLevel = "REDUCED",
    });

    var defaultTransitRouter = new AliCloud.Cen.TransitRouter("default", new()
    {
        CenId = defaultInstance.Id,
    });

    var defaultTransitRouterVpcAttachment = new AliCloud.Cen.TransitRouterVpcAttachment("default", new()
    {
        CenId = defaultInstance.Id,
        VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        TransitRouterId = defaultTransitRouter.TransitRouterId,
        TransitRouterAttachmentName = name,
        TransitRouterAttachmentDescription = name,
        ZoneMappings = new[]
        {
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                VswitchId = defaultMaster.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.Id),
                ZoneId = defaultMaster.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.ZoneId),
            },
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.Id),
                ZoneId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.ZoneId),
            },
        },
    });

    var ids = AliCloud.Cen.GetTransitRouterVpcAttachments.Invoke(new()
    {
        Ids = new[]
        {
            defaultTransitRouterVpcAttachment.Id,
        },
        CenId = defaultInstance.Id,
    });

    return new Dictionary<string, object?>
    {
        ["cenTransitRouterVpcAttachmentsId0"] = ids.Apply(getTransitRouterVpcAttachmentsResult => getTransitRouterVpcAttachmentsResult.Attachments[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
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 com.pulumi.alicloud.cen.TransitRouterVpcAttachment;
import com.pulumi.alicloud.cen.TransitRouterVpcAttachmentArgs;
import com.pulumi.alicloud.cen.inputs.TransitRouterVpcAttachmentZoneMappingArgs;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRouterVpcAttachmentsArgs;
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");
        final var default = AlicloudFunctions.getZones();

        final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
            .nameRegex("^default-NODELETING$")
            .build());

        final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
            .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .zoneId(default_.ids()[0])
            .build());

        final var defaultMaster = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
            .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .zoneId(default_.ids()[1])
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .cenInstanceName(name)
            .protectionLevel("REDUCED")
            .build());

        var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()
            .cenId(defaultInstance.id())
            .build());

        var defaultTransitRouterVpcAttachment = new TransitRouterVpcAttachment("defaultTransitRouterVpcAttachment", TransitRouterVpcAttachmentArgs.builder()
            .cenId(defaultInstance.id())
            .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .transitRouterId(defaultTransitRouter.transitRouterId())
            .transitRouterAttachmentName(name)
            .transitRouterAttachmentDescription(name)
            .zoneMappings(            
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .vswitchId(defaultMaster.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].id()))
                    .zoneId(defaultMaster.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].zoneId()))
                    .build(),
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].id()))
                    .zoneId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].zoneId()))
                    .build())
            .build());

        final var ids = CenFunctions.getTransitRouterVpcAttachments(GetTransitRouterVpcAttachmentsArgs.builder()
            .ids(defaultTransitRouterVpcAttachment.id())
            .cenId(defaultInstance.id())
            .build());

        ctx.export("cenTransitRouterVpcAttachmentsId0", ids.applyValue(getTransitRouterVpcAttachmentsResult -> getTransitRouterVpcAttachmentsResult).applyValue(ids -> ids.applyValue(getTransitRouterVpcAttachmentsResult -> getTransitRouterVpcAttachmentsResult.attachments()[0].id())));
    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultInstance:
    type: alicloud:cen:Instance
    name: default
    properties:
      cenInstanceName: ${name}
      protectionLevel: REDUCED
  defaultTransitRouter:
    type: alicloud:cen:TransitRouter
    name: default
    properties:
      cenId: ${defaultInstance.id}
  defaultTransitRouterVpcAttachment:
    type: alicloud:cen:TransitRouterVpcAttachment
    name: default
    properties:
      cenId: ${defaultInstance.id}
      vpcId: ${defaultGetNetworks.ids[0]}
      transitRouterId: ${defaultTransitRouter.transitRouterId}
      transitRouterAttachmentName: ${name}
      transitRouterAttachmentDescription: ${name}
      zoneMappings:
        - vswitchId: ${defaultMaster.vswitches[0].id}
          zoneId: ${defaultMaster.vswitches[0].zoneId}
        - vswitchId: ${defaultGetSwitches.vswitches[0].id}
          zoneId: ${defaultGetSwitches.vswitches[0].zoneId}
variables:
  default:
    fn::invoke:
      function: alicloud:getZones
      arguments: {}
  defaultGetNetworks:
    fn::invoke:
      function: alicloud:vpc:getNetworks
      arguments:
        nameRegex: ^default-NODELETING$
  defaultGetSwitches:
    fn::invoke:
      function: alicloud:vpc:getSwitches
      arguments:
        vpcId: ${defaultGetNetworks.ids[0]}
        zoneId: ${default.ids[0]}
  defaultMaster:
    fn::invoke:
      function: alicloud:vpc:getSwitches
      arguments:
        vpcId: ${defaultGetNetworks.ids[0]}
        zoneId: ${default.ids[1]}
  ids:
    fn::invoke:
      function: alicloud:cen:getTransitRouterVpcAttachments
      arguments:
        ids:
          - ${defaultTransitRouterVpcAttachment.id}
        cenId: ${defaultInstance.id}
outputs:
  cenTransitRouterVpcAttachmentsId0: ${ids.attachments[0].id}
Copy

Using getTransitRouterVpcAttachments

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTransitRouterVpcAttachments(args: GetTransitRouterVpcAttachmentsArgs, opts?: InvokeOptions): Promise<GetTransitRouterVpcAttachmentsResult>
function getTransitRouterVpcAttachmentsOutput(args: GetTransitRouterVpcAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterVpcAttachmentsResult>
Copy
def get_transit_router_vpc_attachments(cen_id: Optional[str] = None,
                                       ids: Optional[Sequence[str]] = None,
                                       name_regex: Optional[str] = None,
                                       output_file: Optional[str] = None,
                                       status: Optional[str] = None,
                                       transit_router_attachment_id: Optional[str] = None,
                                       transit_router_id: Optional[str] = None,
                                       vpc_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTransitRouterVpcAttachmentsResult
def get_transit_router_vpc_attachments_output(cen_id: Optional[pulumi.Input[str]] = None,
                                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                       name_regex: Optional[pulumi.Input[str]] = None,
                                       output_file: Optional[pulumi.Input[str]] = None,
                                       status: Optional[pulumi.Input[str]] = None,
                                       transit_router_attachment_id: Optional[pulumi.Input[str]] = None,
                                       transit_router_id: Optional[pulumi.Input[str]] = None,
                                       vpc_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterVpcAttachmentsResult]
Copy
func GetTransitRouterVpcAttachments(ctx *Context, args *GetTransitRouterVpcAttachmentsArgs, opts ...InvokeOption) (*GetTransitRouterVpcAttachmentsResult, error)
func GetTransitRouterVpcAttachmentsOutput(ctx *Context, args *GetTransitRouterVpcAttachmentsOutputArgs, opts ...InvokeOption) GetTransitRouterVpcAttachmentsResultOutput
Copy

> Note: This function is named GetTransitRouterVpcAttachments in the Go SDK.

public static class GetTransitRouterVpcAttachments 
{
    public static Task<GetTransitRouterVpcAttachmentsResult> InvokeAsync(GetTransitRouterVpcAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetTransitRouterVpcAttachmentsResult> Invoke(GetTransitRouterVpcAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTransitRouterVpcAttachmentsResult> getTransitRouterVpcAttachments(GetTransitRouterVpcAttachmentsArgs args, InvokeOptions options)
public static Output<GetTransitRouterVpcAttachmentsResult> getTransitRouterVpcAttachments(GetTransitRouterVpcAttachmentsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cen/getTransitRouterVpcAttachments:getTransitRouterVpcAttachments
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the CEN instance.
Ids Changes to this property will trigger replacement. List<string>
A list of Transit Router VPC Attachment IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Transit Router VPC Attachment name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
TransitRouterAttachmentId Changes to this property will trigger replacement. string
The ID of the Transit Router VPC Attachment.
TransitRouterId Changes to this property will trigger replacement. string
The ID of the transit router.
VpcId Changes to this property will trigger replacement. string
The ID of the VPC.
CenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the CEN instance.
Ids Changes to this property will trigger replacement. []string
A list of Transit Router VPC Attachment IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Transit Router VPC Attachment name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
TransitRouterAttachmentId Changes to this property will trigger replacement. string
The ID of the Transit Router VPC Attachment.
TransitRouterId Changes to this property will trigger replacement. string
The ID of the transit router.
VpcId Changes to this property will trigger replacement. string
The ID of the VPC.
cenId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the CEN instance.
ids Changes to this property will trigger replacement. List<String>
A list of Transit Router VPC Attachment IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Transit Router VPC Attachment name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentId Changes to this property will trigger replacement. String
The ID of the Transit Router VPC Attachment.
transitRouterId Changes to this property will trigger replacement. String
The ID of the transit router.
vpcId Changes to this property will trigger replacement. String
The ID of the VPC.
cenId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the CEN instance.
ids Changes to this property will trigger replacement. string[]
A list of Transit Router VPC Attachment IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Transit Router VPC Attachment name.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentId Changes to this property will trigger replacement. string
The ID of the Transit Router VPC Attachment.
transitRouterId Changes to this property will trigger replacement. string
The ID of the transit router.
vpcId Changes to this property will trigger replacement. string
The ID of the VPC.
cen_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the CEN instance.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Transit Router VPC Attachment IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Transit Router VPC Attachment name.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transit_router_attachment_id Changes to this property will trigger replacement. str
The ID of the Transit Router VPC Attachment.
transit_router_id Changes to this property will trigger replacement. str
The ID of the transit router.
vpc_id Changes to this property will trigger replacement. str
The ID of the VPC.
cenId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the CEN instance.
ids Changes to this property will trigger replacement. List<String>
A list of Transit Router VPC Attachment IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Transit Router VPC Attachment name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentId Changes to this property will trigger replacement. String
The ID of the Transit Router VPC Attachment.
transitRouterId Changes to this property will trigger replacement. String
The ID of the transit router.
vpcId Changes to this property will trigger replacement. String
The ID of the VPC.

getTransitRouterVpcAttachments Result

The following output properties are available:

Attachments List<Pulumi.AliCloud.Cen.Outputs.GetTransitRouterVpcAttachmentsAttachment>
A list of Transit Router VPC Attachments. Each element contains the following attributes:
CenId string
(Available since v1.224.0) The ID of the CEN instance.
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
A list of Transit Router VPC Attachment names.
NameRegex string
OutputFile string
Status string
The status of the Transit Router VPC Attachment.
TransitRouterAttachmentId string
The ID of the Transit Router VPC Attachment.
TransitRouterId string
(Available since v1.224.0) The ID of the transit router.
VpcId string
The ID of the VPC.
Attachments []GetTransitRouterVpcAttachmentsAttachment
A list of Transit Router VPC Attachments. Each element contains the following attributes:
CenId string
(Available since v1.224.0) The ID of the CEN instance.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
A list of Transit Router VPC Attachment names.
NameRegex string
OutputFile string
Status string
The status of the Transit Router VPC Attachment.
TransitRouterAttachmentId string
The ID of the Transit Router VPC Attachment.
TransitRouterId string
(Available since v1.224.0) The ID of the transit router.
VpcId string
The ID of the VPC.
attachments List<GetTransitRouterVpcAttachmentsAttachment>
A list of Transit Router VPC Attachments. Each element contains the following attributes:
cenId String
(Available since v1.224.0) The ID of the CEN instance.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Transit Router VPC Attachment names.
nameRegex String
outputFile String
status String
The status of the Transit Router VPC Attachment.
transitRouterAttachmentId String
The ID of the Transit Router VPC Attachment.
transitRouterId String
(Available since v1.224.0) The ID of the transit router.
vpcId String
The ID of the VPC.
attachments GetTransitRouterVpcAttachmentsAttachment[]
A list of Transit Router VPC Attachments. Each element contains the following attributes:
cenId string
(Available since v1.224.0) The ID of the CEN instance.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
A list of Transit Router VPC Attachment names.
nameRegex string
outputFile string
status string
The status of the Transit Router VPC Attachment.
transitRouterAttachmentId string
The ID of the Transit Router VPC Attachment.
transitRouterId string
(Available since v1.224.0) The ID of the transit router.
vpcId string
The ID of the VPC.
attachments Sequence[GetTransitRouterVpcAttachmentsAttachment]
A list of Transit Router VPC Attachments. Each element contains the following attributes:
cen_id str
(Available since v1.224.0) The ID of the CEN instance.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
A list of Transit Router VPC Attachment names.
name_regex str
output_file str
status str
The status of the Transit Router VPC Attachment.
transit_router_attachment_id str
The ID of the Transit Router VPC Attachment.
transit_router_id str
(Available since v1.224.0) The ID of the transit router.
vpc_id str
The ID of the VPC.
attachments List<Property Map>
A list of Transit Router VPC Attachments. Each element contains the following attributes:
cenId String
(Available since v1.224.0) The ID of the CEN instance.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Transit Router VPC Attachment names.
nameRegex String
outputFile String
status String
The status of the Transit Router VPC Attachment.
transitRouterAttachmentId String
The ID of the Transit Router VPC Attachment.
transitRouterId String
(Available since v1.224.0) The ID of the transit router.
vpcId String
The ID of the VPC.

Supporting Types

GetTransitRouterVpcAttachmentsAttachment

AutoPublishRouteEnabled This property is required. bool
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
CenId This property is required. string
The ID of the CEN instance.
Id This property is required. string
PaymentType This property is required. string
The payment type of the resource.
ResourceType This property is required. string
The resource type of the Transit Router VPC Attachment.
Status This property is required. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
TransitRouterAttachmentDescription This property is required. string
The description of the Transit Router VPC Attachment.
TransitRouterAttachmentId This property is required. string
The ID of the Transit Router VPC Attachment.
TransitRouterAttachmentName This property is required. string
The name of the Transit Router VPC Attachment.
TransitRouterId This property is required. string
The ID of the transit router.
VpcId This property is required. string
The ID of the VPC.
VpcOwnerId This property is required. string
The Owner ID of the VPC.
ZoneMappings This property is required. List<Pulumi.AliCloud.Cen.Inputs.GetTransitRouterVpcAttachmentsAttachmentZoneMapping>
The list of zone mapping of the VPC.
AutoPublishRouteEnabled This property is required. bool
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
CenId This property is required. string
The ID of the CEN instance.
Id This property is required. string
PaymentType This property is required. string
The payment type of the resource.
ResourceType This property is required. string
The resource type of the Transit Router VPC Attachment.
Status This property is required. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
TransitRouterAttachmentDescription This property is required. string
The description of the Transit Router VPC Attachment.
TransitRouterAttachmentId This property is required. string
The ID of the Transit Router VPC Attachment.
TransitRouterAttachmentName This property is required. string
The name of the Transit Router VPC Attachment.
TransitRouterId This property is required. string
The ID of the transit router.
VpcId This property is required. string
The ID of the VPC.
VpcOwnerId This property is required. string
The Owner ID of the VPC.
ZoneMappings This property is required. []GetTransitRouterVpcAttachmentsAttachmentZoneMapping
The list of zone mapping of the VPC.
autoPublishRouteEnabled This property is required. Boolean
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
cenId This property is required. String
The ID of the CEN instance.
id This property is required. String
paymentType This property is required. String
The payment type of the resource.
resourceType This property is required. String
The resource type of the Transit Router VPC Attachment.
status This property is required. String
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentDescription This property is required. String
The description of the Transit Router VPC Attachment.
transitRouterAttachmentId This property is required. String
The ID of the Transit Router VPC Attachment.
transitRouterAttachmentName This property is required. String
The name of the Transit Router VPC Attachment.
transitRouterId This property is required. String
The ID of the transit router.
vpcId This property is required. String
The ID of the VPC.
vpcOwnerId This property is required. String
The Owner ID of the VPC.
zoneMappings This property is required. List<GetTransitRouterVpcAttachmentsAttachmentZoneMapping>
The list of zone mapping of the VPC.
autoPublishRouteEnabled This property is required. boolean
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
cenId This property is required. string
The ID of the CEN instance.
id This property is required. string
paymentType This property is required. string
The payment type of the resource.
resourceType This property is required. string
The resource type of the Transit Router VPC Attachment.
status This property is required. string
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentDescription This property is required. string
The description of the Transit Router VPC Attachment.
transitRouterAttachmentId This property is required. string
The ID of the Transit Router VPC Attachment.
transitRouterAttachmentName This property is required. string
The name of the Transit Router VPC Attachment.
transitRouterId This property is required. string
The ID of the transit router.
vpcId This property is required. string
The ID of the VPC.
vpcOwnerId This property is required. string
The Owner ID of the VPC.
zoneMappings This property is required. GetTransitRouterVpcAttachmentsAttachmentZoneMapping[]
The list of zone mapping of the VPC.
auto_publish_route_enabled This property is required. bool
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
cen_id This property is required. str
The ID of the CEN instance.
id This property is required. str
payment_type This property is required. str
The payment type of the resource.
resource_type This property is required. str
The resource type of the Transit Router VPC Attachment.
status This property is required. str
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transit_router_attachment_description This property is required. str
The description of the Transit Router VPC Attachment.
transit_router_attachment_id This property is required. str
The ID of the Transit Router VPC Attachment.
transit_router_attachment_name This property is required. str
The name of the Transit Router VPC Attachment.
transit_router_id This property is required. str
The ID of the transit router.
vpc_id This property is required. str
The ID of the VPC.
vpc_owner_id This property is required. str
The Owner ID of the VPC.
zone_mappings This property is required. Sequence[GetTransitRouterVpcAttachmentsAttachmentZoneMapping]
The list of zone mapping of the VPC.
autoPublishRouteEnabled This property is required. Boolean
(Available since v1.224.0) Whether the transit router is automatically published to the VPC instance.
cenId This property is required. String
The ID of the CEN instance.
id This property is required. String
paymentType This property is required. String
The payment type of the resource.
resourceType This property is required. String
The resource type of the Transit Router VPC Attachment.
status This property is required. String
The status of the Transit Router VPC Attachment. Valid Values: Attached, Attaching, Detaching.
transitRouterAttachmentDescription This property is required. String
The description of the Transit Router VPC Attachment.
transitRouterAttachmentId This property is required. String
The ID of the Transit Router VPC Attachment.
transitRouterAttachmentName This property is required. String
The name of the Transit Router VPC Attachment.
transitRouterId This property is required. String
The ID of the transit router.
vpcId This property is required. String
The ID of the VPC.
vpcOwnerId This property is required. String
The Owner ID of the VPC.
zoneMappings This property is required. List<Property Map>
The list of zone mapping of the VPC.

GetTransitRouterVpcAttachmentsAttachmentZoneMapping

VswitchId This property is required. string
The ID of the vSwitch.
ZoneId This property is required. string
The ID of the zone.
VswitchId This property is required. string
The ID of the vSwitch.
ZoneId This property is required. string
The ID of the zone.
vswitchId This property is required. String
The ID of the vSwitch.
zoneId This property is required. String
The ID of the zone.
vswitchId This property is required. string
The ID of the vSwitch.
zoneId This property is required. string
The ID of the zone.
vswitch_id This property is required. str
The ID of the vSwitch.
zone_id This property is required. str
The ID of the zone.
vswitchId This property is required. String
The ID of the vSwitch.
zoneId This property is required. String
The ID of the zone.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.