getGatewayVpnAttachments

This data source provides the Vpn Gateway Vpn Attachments of the current Alibaba Cloud user.

NOTE: Available in v1.181.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpn.VpnFunctions;
import com.pulumi.alicloud.vpn.inputs.GetGatewayVpnAttachmentsArgs;
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 = VpnFunctions.getGatewayVpnAttachments();
ctx.export("vpnGatewayVpnAttachmentId1", ids.applyValue(getGatewayVpnAttachmentsResult -> getGatewayVpnAttachmentsResult.attachments()[0].id()));
final var nameRegex = VpnFunctions.getGatewayVpnAttachments(GetGatewayVpnAttachmentsArgs.builder()
.nameRegex("^my-VpnAttachment")
.build());
ctx.export("vpnGatewayVpnAttachmentId2", nameRegex.applyValue(getGatewayVpnAttachmentsResult -> getGatewayVpnAttachmentsResult.attachments()[0].id()));
ctx.export("localId", data.alicloud_vpn_gateway_vpn_attachments().vpn_attachments().attachments()[0].ike_config()[0].local_id());
ctx.export("internetIp", data.alicloud_vpn_gateway_vpn_attachments().vpn_attachments().attachments()[0].internet_ip());
}
}

Return

A collection of values returned by getGatewayVpnAttachments.

Parameters

argument

A collection of arguments for invoking getGatewayVpnAttachments.


suspend fun getGatewayVpnAttachments(ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, status: String? = null, vpnGatewayId: String? = null): GetGatewayVpnAttachmentsResult

Return

A collection of values returned by getGatewayVpnAttachments.

See also

Parameters

ids

A list of Vpn Attachment IDs.

nameRegex

A regex string to filter results by Vpn Attachment name.

outputFile
pageNumber
pageSize
status

The status of the resource.

vpnGatewayId

The parameter 'vpn_gateway_id' has been deprecated from 1.194.0.


Return

A collection of values returned by getGatewayVpnAttachments.

See also

Parameters

argument

Builder for com.pulumi.alicloud.vpn.kotlin.inputs.GetGatewayVpnAttachmentsPlainArgs.