Ipv4GatewayArgs

data class Ipv4GatewayArgs(val dryRun: Output<Boolean>? = null, val enabled: Output<Boolean>? = null, val ipv4GatewayDescription: Output<String>? = null, val ipv4GatewayName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<Ipv4GatewayArgs>

Provides a Vpc Ipv4 Gateway resource. For information about Vpc Ipv4 Gateway and how to use it, see What is Ipv4 Gateway.

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.resourcemanager.ResourceGroup;
import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Ipv4Gateway;
import com.pulumi.alicloud.vpc.Ipv4GatewayArgs;
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("tf-testacc-example");
var defaultResourceGroup = new ResourceGroup("defaultResourceGroup", ResourceGroupArgs.builder()
.displayName("tf-testAcc-rg665")
.resourceGroupName(name)
.build());
var modify = new ResourceGroup("modify", ResourceGroupArgs.builder()
.displayName("tf-testAcc-rg298")
.resourceGroupName(String.format("%s1", name))
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(String.format("%s2", name))
.cidrBlock("10.0.0.0/8")
.build());
var defaultIpv4Gateway = new Ipv4Gateway("defaultIpv4Gateway", Ipv4GatewayArgs.builder()
.ipv4GatewayName(name)
.ipv4GatewayDescription("tf-testAcc-Ipv4Gateway")
.resourceGroupId(defaultResourceGroup.id())
.vpcId(defaultNetwork.id())
.build());
}
}

Import

Vpc Ipv4 Gateway can be imported using the id, e.g.

$ pulumi import alicloud:vpc/ipv4Gateway:Ipv4Gateway example <id>

Constructors

Link copied to clipboard
fun Ipv4GatewayArgs(dryRun: Output<Boolean>? = null, enabled: Output<Boolean>? = null, ipv4GatewayDescription: Output<String>? = null, ipv4GatewayName: Output<String>? = null, resourceGroupId: Output<String>? = null, tags: Output<Map<String, Any>>? = null, vpcId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): Ipv4GatewayArgs

Properties

Link copied to clipboard
val dryRun: Output<Boolean>? = null

Whether to PreCheck only this request. Value:-true: The check request is sent without creating an IPv4 Gateway. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.-false (default): Sends a normal request, returns an HTTP 2xx status code and directly creates an IPv4 Gateway.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether the IPv4 gateway is active or not. Valid values are true and false.

Link copied to clipboard
val ipv4GatewayDescription: Output<String>? = null

The description of the IPv4 gateway. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

Link copied to clipboard
val ipv4GatewayName: Output<String>? = null

The name of the IPv4 gateway. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group to which the instance belongs.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tags of the current resource.

Link copied to clipboard
val vpcId: Output<String>? = null

The ID of the virtual private cloud (VPC) where you want to create the IPv4 gateway. You can create only one IPv4 gateway in a VPC.