alicloud.cen.getTransitRouterVpnAttachments

This data source provides the Cen Transit Router Vpn Attachments of the current Alibaba Cloud user.

NOTE: Available in v1.183.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Cen.GetTransitRouterVpnAttachments.Invoke(new()
    {
        CenId = "example_value",
    });

    return new Dictionary<string, object?>
    {
        ["cenTransitRouterVpnAttachmentId1"] = ids.Apply(getTransitRouterVpnAttachmentsResult => getTransitRouterVpnAttachmentsResult.Attachments[0]?.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := cen.GetTransitRouterVpnAttachments(ctx, &cen.GetTransitRouterVpnAttachmentsArgs{
			CenId: "example_value",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cenTransitRouterVpnAttachmentId1", ids.Attachments[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRouterVpnAttachmentsArgs;
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 ids = CenFunctions.getTransitRouterVpnAttachments(GetTransitRouterVpnAttachmentsArgs.builder()
            .cenId("example_value")
            .build());

        ctx.export("cenTransitRouterVpnAttachmentId1", ids.applyValue(getTransitRouterVpnAttachmentsResult -> getTransitRouterVpnAttachmentsResult.attachments()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cen.get_transit_router_vpn_attachments(cen_id="example_value")
pulumi.export("cenTransitRouterVpnAttachmentId1", ids.attachments[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cen.getTransitRouterVpnAttachments({
    cenId: "example_value",
});
export const cenTransitRouterVpnAttachmentId1 = ids.then(ids => ids.attachments?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:cen:getTransitRouterVpnAttachments
      Arguments:
        cenId: example_value
outputs:
  cenTransitRouterVpnAttachmentId1: ${ids.attachments[0].id}

Using getTransitRouterVpnAttachments

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 getTransitRouterVpnAttachments(args: GetTransitRouterVpnAttachmentsArgs, opts?: InvokeOptions): Promise<GetTransitRouterVpnAttachmentsResult>
function getTransitRouterVpnAttachmentsOutput(args: GetTransitRouterVpnAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterVpnAttachmentsResult>
def get_transit_router_vpn_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_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTransitRouterVpnAttachmentsResult
def get_transit_router_vpn_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_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterVpnAttachmentsResult]
func GetTransitRouterVpnAttachments(ctx *Context, args *GetTransitRouterVpnAttachmentsArgs, opts ...InvokeOption) (*GetTransitRouterVpnAttachmentsResult, error)
func GetTransitRouterVpnAttachmentsOutput(ctx *Context, args *GetTransitRouterVpnAttachmentsOutputArgs, opts ...InvokeOption) GetTransitRouterVpnAttachmentsResultOutput

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

public static class GetTransitRouterVpnAttachments 
{
    public static Task<GetTransitRouterVpnAttachmentsResult> InvokeAsync(GetTransitRouterVpnAttachmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetTransitRouterVpnAttachmentsResult> Invoke(GetTransitRouterVpnAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTransitRouterVpnAttachmentsResult> getTransitRouterVpnAttachments(GetTransitRouterVpnAttachmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:cen/getTransitRouterVpnAttachments:getTransitRouterVpnAttachments
  arguments:
    # arguments dictionary

The following arguments are supported:

CenId string

The id of the cen.

Ids List<string>

A list of Transit Router Vpn Attachment IDs.

NameRegex string
OutputFile string
Status string

The status of the transit router attachment.

TransitRouterId string

The ID of the forwarding router instance.

CenId string

The id of the cen.

Ids []string

A list of Transit Router Vpn Attachment IDs.

NameRegex string
OutputFile string
Status string

The status of the transit router attachment.

TransitRouterId string

The ID of the forwarding router instance.

cenId String

The id of the cen.

ids List<String>

A list of Transit Router Vpn Attachment IDs.

nameRegex String
outputFile String
status String

The status of the transit router attachment.

transitRouterId String

The ID of the forwarding router instance.

cenId string

The id of the cen.

ids string[]

A list of Transit Router Vpn Attachment IDs.

nameRegex string
outputFile string
status string

The status of the transit router attachment.

transitRouterId string

The ID of the forwarding router instance.

cen_id str

The id of the cen.

ids Sequence[str]

A list of Transit Router Vpn Attachment IDs.

name_regex str
output_file str
status str

The status of the transit router attachment.

transit_router_id str

The ID of the forwarding router instance.

cenId String

The id of the cen.

ids List<String>

A list of Transit Router Vpn Attachment IDs.

nameRegex String
outputFile String
status String

The status of the transit router attachment.

transitRouterId String

The ID of the forwarding router instance.

getTransitRouterVpnAttachments Result

The following output properties are available:

Attachments List<Pulumi.AliCloud.Cen.Outputs.GetTransitRouterVpnAttachmentsAttachment>
CenId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
NameRegex string
OutputFile string
Status string
TransitRouterId string
Attachments []GetTransitRouterVpnAttachmentsAttachment
CenId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
NameRegex string
OutputFile string
Status string
TransitRouterId string
attachments List<GetTransitRouterVpnAttachmentsAttachment>
cenId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
nameRegex String
outputFile String
status String
transitRouterId String
attachments GetTransitRouterVpnAttachmentsAttachment[]
cenId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
nameRegex string
outputFile string
status string
transitRouterId string
attachments Sequence[GetTransitRouterVpnAttachmentsAttachment]
cen_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
name_regex str
output_file str
status str
transit_router_id str
attachments List<Property Map>
cenId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
nameRegex String
outputFile String
status String
transitRouterId String

Supporting Types

GetTransitRouterVpnAttachmentsAttachment

AutoPublishRouteEnabled bool

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

CreateTime string

The creation time of the resource.

Id string
ResourceType string

Type of the resource.

Status string

The status of the transit router attachment.

TransitRouterAttachmentDescription string

The description of the VPN connection.

TransitRouterAttachmentId string
TransitRouterAttachmentName string

The name of the VPN connection.

TransitRouterId string

The ID of the forwarding router instance.

VpnId string

The id of the vpn.

VpnOwnerId string

The owner id of vpn.

Zones List<Pulumi.AliCloud.Cen.Inputs.GetTransitRouterVpnAttachmentsAttachmentZone>

The list of zone mapping.

AutoPublishRouteEnabled bool

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

CreateTime string

The creation time of the resource.

Id string
ResourceType string

Type of the resource.

Status string

The status of the transit router attachment.

TransitRouterAttachmentDescription string

The description of the VPN connection.

TransitRouterAttachmentId string
TransitRouterAttachmentName string

The name of the VPN connection.

TransitRouterId string

The ID of the forwarding router instance.

VpnId string

The id of the vpn.

VpnOwnerId string

The owner id of vpn.

Zones []GetTransitRouterVpnAttachmentsAttachmentZone

The list of zone mapping.

autoPublishRouteEnabled Boolean

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

createTime String

The creation time of the resource.

id String
resourceType String

Type of the resource.

status String

The status of the transit router attachment.

transitRouterAttachmentDescription String

The description of the VPN connection.

transitRouterAttachmentId String
transitRouterAttachmentName String

The name of the VPN connection.

transitRouterId String

The ID of the forwarding router instance.

vpnId String

The id of the vpn.

vpnOwnerId String

The owner id of vpn.

zones List<GetTransitRouterVpnAttachmentsAttachmentZone>

The list of zone mapping.

autoPublishRouteEnabled boolean

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

createTime string

The creation time of the resource.

id string
resourceType string

Type of the resource.

status string

The status of the transit router attachment.

transitRouterAttachmentDescription string

The description of the VPN connection.

transitRouterAttachmentId string
transitRouterAttachmentName string

The name of the VPN connection.

transitRouterId string

The ID of the forwarding router instance.

vpnId string

The id of the vpn.

vpnOwnerId string

The owner id of vpn.

zones GetTransitRouterVpnAttachmentsAttachmentZone[]

The list of zone mapping.

auto_publish_route_enabled bool

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

create_time str

The creation time of the resource.

id str
resource_type str

Type of the resource.

status str

The status of the transit router attachment.

transit_router_attachment_description str

The description of the VPN connection.

transit_router_attachment_id str
transit_router_attachment_name str

The name of the VPN connection.

transit_router_id str

The ID of the forwarding router instance.

vpn_id str

The id of the vpn.

vpn_owner_id str

The owner id of vpn.

zones Sequence[GetTransitRouterVpnAttachmentsAttachmentZone]

The list of zone mapping.

autoPublishRouteEnabled Boolean

Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.

createTime String

The creation time of the resource.

id String
resourceType String

Type of the resource.

status String

The status of the transit router attachment.

transitRouterAttachmentDescription String

The description of the VPN connection.

transitRouterAttachmentId String
transitRouterAttachmentName String

The name of the VPN connection.

transitRouterId String

The ID of the forwarding router instance.

vpnId String

The id of the vpn.

vpnOwnerId String

The owner id of vpn.

zones List<Property Map>

The list of zone mapping.

GetTransitRouterVpnAttachmentsAttachmentZone

ZoneId string

The id of the zone.

ZoneId string

The id of the zone.

zoneId String

The id of the zone.

zoneId string

The id of the zone.

zone_id str

The id of the zone.

zoneId 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.