get Gateway Vpn Attachments
suspend fun getGatewayVpnAttachments(argument: GetGatewayVpnAttachmentsPlainArgs): GetGatewayVpnAttachmentsResult
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());
}
}
Content copied to clipboard
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.
name Regex
A regex string to filter results by Vpn Attachment name.
output File
File name where to save data source results (after running pulumi preview
).
page Number
page Size
status
The status of the resource.
vpn Gateway Id
The parameter 'vpn_gateway_id' has been deprecated from 1.194.0.
suspend fun getGatewayVpnAttachments(argument: suspend GetGatewayVpnAttachmentsPlainArgsBuilder.() -> Unit): GetGatewayVpnAttachmentsResult
Return
A collection of values returned by getGatewayVpnAttachments.
See also
Parameters
argument
Builder for com.pulumi.alicloud.vpn.kotlin.inputs.GetGatewayVpnAttachmentsPlainArgs.