PrefixListArgs

data class PrefixListArgs(val entrys: Output<List<PrefixListEntryArgs>>? = null, val ipVersion: Output<String>? = null, val maxEntries: Output<Int>? = null, val prefixListDescription: Output<String>? = null, val prefixListName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val tags: Output<Map<String, Any>>? = null) : ConvertibleToJava<PrefixListArgs>

Provides a Vpc Prefix List resource. This resource is used to create a prefix list. For information about Vpc Prefix List and how to use it, see What is Prefix List.

NOTE: Available in v1.182.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.PrefixList;
import com.pulumi.alicloud.vpc.PrefixListArgs;
import com.pulumi.alicloud.vpc.inputs.PrefixListEntryArgs;
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 defaultRg = new ResourceGroup("defaultRg", ResourceGroupArgs.builder()
.displayName("tf-testacc-chenyi")
.resourceGroupName(name)
.build());
var changeRg = new ResourceGroup("changeRg", ResourceGroupArgs.builder()
.displayName("tf-testacc-chenyi-change")
.resourceGroupName(String.format("%s1", name))
.build());
var default_ = new PrefixList("default", PrefixListArgs.builder()
.maxEntries(50)
.resourceGroupId(defaultRg.id())
.prefixListDescription("test")
.ipVersion("IPV4")
.prefixListName(name)
.entrys(PrefixListEntryArgs.builder()
.cidr("192.168.0.0/16")
.description("test")
.build())
.build());
}
}

Import

Vpc Prefix List can be imported using the id, e.g.

$ pulumi import alicloud:vpc/prefixList:PrefixList example <id>

Constructors

Link copied to clipboard
fun PrefixListArgs(entrys: Output<List<PrefixListEntryArgs>>? = null, ipVersion: Output<String>? = null, maxEntries: Output<Int>? = null, prefixListDescription: Output<String>? = null, prefixListName: Output<String>? = null, resourceGroupId: Output<String>? = null, tags: Output<Map<String, Any>>? = null)

Functions

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

Properties

Link copied to clipboard
val entrys: Output<List<PrefixListEntryArgs>>? = null

The CIDR address block list of the prefix list.See the following Block Entrys.

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

The IP version of the prefix list. Value:-IPV4:IPv4 version.-IPV6:IPv6 version.

Link copied to clipboard
val maxEntries: Output<Int>? = null

The maximum number of entries for CIDR address blocks in the prefix list.

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

The description of the prefix list.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.

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

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

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

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

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

The tags of PrefixList.