getIpv4Gateways

This data source provides the Vpc Ipv4 Gateways 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.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetIpv4GatewaysArgs;
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 = VpcFunctions.getIpv4Gateways();
ctx.export("vpcIpv4GatewayId1", ids.applyValue(getIpv4GatewaysResult -> getIpv4GatewaysResult.gateways()[0].id()));
final var nameRegex = VpcFunctions.getIpv4Gateways(GetIpv4GatewaysArgs.builder()
.nameRegex("^my-Ipv4Gateway")
.build());
ctx.export("vpcIpv4GatewayId2", nameRegex.applyValue(getIpv4GatewaysResult -> getIpv4GatewaysResult.gateways()[0].id()));
}
}

Return

A collection of values returned by getIpv4Gateways.

Parameters

argument

A collection of arguments for invoking getIpv4Gateways.


suspend fun getIpv4Gateways(ids: List<String>? = null, ipv4GatewayName: String? = null, nameRegex: String? = null, outputFile: String? = null, status: String? = null, vpcId: String? = null): GetIpv4GatewaysResult

Return

A collection of values returned by getIpv4Gateways.

See also

Parameters

ids

A list of Ipv4 Gateway IDs.

ipv4GatewayName

The name of the IPv4 gateway.

nameRegex

A regex string to filter results by Ipv4 Gateway name.

outputFile

File name where to save data source results (after running pulumi preview).

status

The status of the resource.

vpcId

The ID of the VPC associated with the IPv4 Gateway.


Return

A collection of values returned by getIpv4Gateways.

See also

Parameters

argument

Builder for com.pulumi.alicloud.vpc.kotlin.inputs.GetIpv4GatewaysPlainArgs.