alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.vpc.PrefixList

Provides a VPC Prefix List resource.

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

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Vpc.PrefixList("default", new()
    {
        Entrys = new[]
        {
            new AliCloud.Vpc.Inputs.PrefixListEntryArgs
            {
                Cidr = "192.168.0.0/16",
                Description = "description",
            },
        },
        IpVersion = "IPV4",
        MaxEntries = 50,
        PrefixListName = @var.Name,
        PrefixListDescription = "description",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpc.NewPrefixList(ctx, "default", &vpc.PrefixListArgs{
			Entrys: vpc.PrefixListEntryArray{
				&vpc.PrefixListEntryArgs{
					Cidr:        pulumi.String("192.168.0.0/16"),
					Description: pulumi.String("description"),
				},
			},
			IpVersion:             pulumi.String("IPV4"),
			MaxEntries:            pulumi.Int(50),
			PrefixListName:        pulumi.Any(_var.Name),
			PrefixListDescription: pulumi.String("description"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
        var default_ = new PrefixList("default", PrefixListArgs.builder()        
            .entrys(PrefixListEntryArgs.builder()
                .cidr("192.168.0.0/16")
                .description("description")
                .build())
            .ipVersion("IPV4")
            .maxEntries(50)
            .prefixListName(var_.name())
            .prefixListDescription("description")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.vpc.PrefixList("default",
    entrys=[alicloud.vpc.PrefixListEntryArgs(
        cidr="192.168.0.0/16",
        description="description",
    )],
    ip_version="IPV4",
    max_entries=50,
    prefix_list_name=var["name"],
    prefix_list_description="description")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.vpc.PrefixList("default", {
    entrys: [{
        cidr: "192.168.0.0/16",
        description: "description",
    }],
    ipVersion: "IPV4",
    maxEntries: 50,
    prefixListName: _var.name,
    prefixListDescription: "description",
});
resources:
  default:
    type: alicloud:vpc:PrefixList
    properties:
      entrys:
        - cidr: 192.168.0.0/16
          description: description
      ipVersion: IPV4
      maxEntries: 50
      prefixListName: ${var.name}
      prefixListDescription: description

Create PrefixList Resource

new PrefixList(name: string, args?: PrefixListArgs, opts?: CustomResourceOptions);
@overload
def PrefixList(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               entrys: Optional[Sequence[PrefixListEntryArgs]] = None,
               ip_version: Optional[str] = None,
               max_entries: Optional[int] = None,
               prefix_list_description: Optional[str] = None,
               prefix_list_name: Optional[str] = None)
@overload
def PrefixList(resource_name: str,
               args: Optional[PrefixListArgs] = None,
               opts: Optional[ResourceOptions] = None)
func NewPrefixList(ctx *Context, name string, args *PrefixListArgs, opts ...ResourceOption) (*PrefixList, error)
public PrefixList(string name, PrefixListArgs? args = null, CustomResourceOptions? opts = null)
public PrefixList(String name, PrefixListArgs args)
public PrefixList(String name, PrefixListArgs args, CustomResourceOptions options)
type: alicloud:vpc:PrefixList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PrefixListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args PrefixListArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PrefixListArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PrefixListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PrefixListArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

PrefixList Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The PrefixList resource accepts the following input properties:

Entrys List<Pulumi.AliCloud.Vpc.Inputs.PrefixListEntryArgs>

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

IpVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

MaxEntries int

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

PrefixListDescription string

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://.

PrefixListName string

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 (-).

Entrys []PrefixListEntryArgs

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

IpVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

MaxEntries int

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

PrefixListDescription string

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://.

PrefixListName string

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 (-).

entrys List<PrefixListEntryArgs>

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

ipVersion String

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries Integer

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

prefixListDescription String

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://.

prefixListName String

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 (-).

entrys PrefixListEntryArgs[]

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

ipVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries number

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

prefixListDescription string

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://.

prefixListName string

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 (-).

entrys Sequence[PrefixListEntryArgs]

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

ip_version str

The IP version of the prefix list. Valid values: IPV4, IPV6.

max_entries int

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

prefix_list_description str

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://.

prefix_list_name str

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 (-).

entrys List<Property Map>

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

ipVersion String

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries Number

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

prefixListDescription String

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://.

prefixListName String

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 (-).

Outputs

All input properties are implicitly available as output properties. Additionally, the PrefixList resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

(Available in v1.196.0+) The status of the Prefix List.

Id string

The provider-assigned unique ID for this managed resource.

Status string

(Available in v1.196.0+) The status of the Prefix List.

id String

The provider-assigned unique ID for this managed resource.

status String

(Available in v1.196.0+) The status of the Prefix List.

id string

The provider-assigned unique ID for this managed resource.

status string

(Available in v1.196.0+) The status of the Prefix List.

id str

The provider-assigned unique ID for this managed resource.

status str

(Available in v1.196.0+) The status of the Prefix List.

id String

The provider-assigned unique ID for this managed resource.

status String

(Available in v1.196.0+) The status of the Prefix List.

Look up Existing PrefixList Resource

Get an existing PrefixList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PrefixListState, opts?: CustomResourceOptions): PrefixList
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        entrys: Optional[Sequence[PrefixListEntryArgs]] = None,
        ip_version: Optional[str] = None,
        max_entries: Optional[int] = None,
        prefix_list_description: Optional[str] = None,
        prefix_list_name: Optional[str] = None,
        status: Optional[str] = None) -> PrefixList
func GetPrefixList(ctx *Context, name string, id IDInput, state *PrefixListState, opts ...ResourceOption) (*PrefixList, error)
public static PrefixList Get(string name, Input<string> id, PrefixListState? state, CustomResourceOptions? opts = null)
public static PrefixList get(String name, Output<String> id, PrefixListState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Entrys List<Pulumi.AliCloud.Vpc.Inputs.PrefixListEntryArgs>

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

IpVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

MaxEntries int

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

PrefixListDescription string

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://.

PrefixListName string

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 (-).

Status string

(Available in v1.196.0+) The status of the Prefix List.

Entrys []PrefixListEntryArgs

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

IpVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

MaxEntries int

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

PrefixListDescription string

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://.

PrefixListName string

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 (-).

Status string

(Available in v1.196.0+) The status of the Prefix List.

entrys List<PrefixListEntryArgs>

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

ipVersion String

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries Integer

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

prefixListDescription String

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://.

prefixListName String

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 (-).

status String

(Available in v1.196.0+) The status of the Prefix List.

entrys PrefixListEntryArgs[]

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

ipVersion string

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries number

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

prefixListDescription string

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://.

prefixListName string

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 (-).

status string

(Available in v1.196.0+) The status of the Prefix List.

entrys Sequence[PrefixListEntryArgs]

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

ip_version str

The IP version of the prefix list. Valid values: IPV4, IPV6.

max_entries int

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

prefix_list_description str

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://.

prefix_list_name str

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 (-).

status str

(Available in v1.196.0+) The status of the Prefix List.

entrys List<Property Map>

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

ipVersion String

The IP version of the prefix list. Valid values: IPV4, IPV6.

maxEntries Number

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

prefixListDescription String

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://.

prefixListName String

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 (-).

status String

(Available in v1.196.0+) The status of the Prefix List.

Supporting Types

PrefixListEntry

Cidr string

The CIDR address block of the prefix list.

Description string

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

Cidr string

The CIDR address block of the prefix list.

Description string

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

cidr String

The CIDR address block of the prefix list.

description String

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

cidr string

The CIDR address block of the prefix list.

description string

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

cidr str

The CIDR address block of the prefix list.

description str

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

cidr String

The CIDR address block of the prefix list.

description String

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

Import

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

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.