alicloud.ecs.EcsPrefixList
Explore with Pulumi AI
Provides a ECS Prefix List resource.
For information about ECS Prefix List and how to use it, see What is Prefix List..
NOTE: Available in v1.152.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ecs.EcsPrefixList("default", {
addressFamily: "IPv4",
maxEntries: 2,
prefixListName: "tftest",
description: "description",
entries: [{
cidr: "192.168.0.0/24",
description: "description",
}],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ecs.EcsPrefixList("default",
address_family="IPv4",
max_entries=2,
prefix_list_name="tftest",
description="description",
entries=[{
"cidr": "192.168.0.0/24",
"description": "description",
}])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewEcsPrefixList(ctx, "default", &ecs.EcsPrefixListArgs{
AddressFamily: pulumi.String("IPv4"),
MaxEntries: pulumi.Int(2),
PrefixListName: pulumi.String("tftest"),
Description: pulumi.String("description"),
Entries: ecs.EcsPrefixListEntryArray{
&ecs.EcsPrefixListEntryArgs{
Cidr: pulumi.String("192.168.0.0/24"),
Description: pulumi.String("description"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Ecs.EcsPrefixList("default", new()
{
AddressFamily = "IPv4",
MaxEntries = 2,
PrefixListName = "tftest",
Description = "description",
Entries = new[]
{
new AliCloud.Ecs.Inputs.EcsPrefixListEntryArgs
{
Cidr = "192.168.0.0/24",
Description = "description",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsPrefixList;
import com.pulumi.alicloud.ecs.EcsPrefixListArgs;
import com.pulumi.alicloud.ecs.inputs.EcsPrefixListEntryArgs;
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 EcsPrefixList("default", EcsPrefixListArgs.builder()
.addressFamily("IPv4")
.maxEntries(2)
.prefixListName("tftest")
.description("description")
.entries(EcsPrefixListEntryArgs.builder()
.cidr("192.168.0.0/24")
.description("description")
.build())
.build());
}
}
resources:
default:
type: alicloud:ecs:EcsPrefixList
properties:
addressFamily: IPv4
maxEntries: 2
prefixListName: tftest
description: description
entries:
- cidr: 192.168.0.0/24
description: description
Create EcsPrefixList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EcsPrefixList(name: string, args: EcsPrefixListArgs, opts?: CustomResourceOptions);
@overload
def EcsPrefixList(resource_name: str,
args: EcsPrefixListArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EcsPrefixList(resource_name: str,
opts: Optional[ResourceOptions] = None,
address_family: Optional[str] = None,
entries: Optional[Sequence[EcsPrefixListEntryArgs]] = None,
max_entries: Optional[int] = None,
prefix_list_name: Optional[str] = None,
description: Optional[str] = None)
func NewEcsPrefixList(ctx *Context, name string, args EcsPrefixListArgs, opts ...ResourceOption) (*EcsPrefixList, error)
public EcsPrefixList(string name, EcsPrefixListArgs args, CustomResourceOptions? opts = null)
public EcsPrefixList(String name, EcsPrefixListArgs args)
public EcsPrefixList(String name, EcsPrefixListArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsPrefixList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EcsPrefixListArgs
- 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 EcsPrefixListArgs
- 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 EcsPrefixListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EcsPrefixListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EcsPrefixListArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ecsPrefixListResource = new AliCloud.Ecs.EcsPrefixList("ecsPrefixListResource", new()
{
AddressFamily = "string",
Entries = new[]
{
new AliCloud.Ecs.Inputs.EcsPrefixListEntryArgs
{
Cidr = "string",
Description = "string",
},
},
MaxEntries = 0,
PrefixListName = "string",
Description = "string",
});
example, err := ecs.NewEcsPrefixList(ctx, "ecsPrefixListResource", &ecs.EcsPrefixListArgs{
AddressFamily: pulumi.String("string"),
Entries: ecs.EcsPrefixListEntryArray{
&ecs.EcsPrefixListEntryArgs{
Cidr: pulumi.String("string"),
Description: pulumi.String("string"),
},
},
MaxEntries: pulumi.Int(0),
PrefixListName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var ecsPrefixListResource = new EcsPrefixList("ecsPrefixListResource", EcsPrefixListArgs.builder()
.addressFamily("string")
.entries(EcsPrefixListEntryArgs.builder()
.cidr("string")
.description("string")
.build())
.maxEntries(0)
.prefixListName("string")
.description("string")
.build());
ecs_prefix_list_resource = alicloud.ecs.EcsPrefixList("ecsPrefixListResource",
address_family="string",
entries=[{
"cidr": "string",
"description": "string",
}],
max_entries=0,
prefix_list_name="string",
description="string")
const ecsPrefixListResource = new alicloud.ecs.EcsPrefixList("ecsPrefixListResource", {
addressFamily: "string",
entries: [{
cidr: "string",
description: "string",
}],
maxEntries: 0,
prefixListName: "string",
description: "string",
});
type: alicloud:ecs:EcsPrefixList
properties:
addressFamily: string
description: string
entries:
- cidr: string
description: string
maxEntries: 0
prefixListName: string
EcsPrefixList Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The EcsPrefixList resource accepts the following input properties:
- Address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - Entries
List<Pulumi.
Ali Cloud. Ecs. Inputs. Ecs Prefix List Entry> - The Entry. The details see Block
entry
. - Max
Entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- Prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - Description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
- Address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - Entries
[]Ecs
Prefix List Entry Args - The Entry. The details see Block
entry
. - Max
Entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- Prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - Description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
- address
Family String - The IP address family. Valid values:
IPv4
,IPv6
. - entries
List<Ecs
Prefix List Entry> - The Entry. The details see Block
entry
. - max
Entries Integer - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List StringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - description String
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
- address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - entries
Ecs
Prefix List Entry[] - The Entry. The details see Block
entry
. - max
Entries number - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
- address_
family str - The IP address family. Valid values:
IPv4
,IPv6
. - entries
Sequence[Ecs
Prefix List Entry Args] - The Entry. The details see Block
entry
. - max_
entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix_
list_ strname - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - description str
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
- address
Family String - The IP address family. Valid values:
IPv4
,IPv6
. - entries List<Property Map>
- The Entry. The details see Block
entry
. - max
Entries Number - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List StringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). - description String
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
.
Outputs
All input properties are implicitly available as output properties. Additionally, the EcsPrefixList resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing EcsPrefixList Resource
Get an existing EcsPrefixList 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?: EcsPrefixListState, opts?: CustomResourceOptions): EcsPrefixList
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_family: Optional[str] = None,
description: Optional[str] = None,
entries: Optional[Sequence[EcsPrefixListEntryArgs]] = None,
max_entries: Optional[int] = None,
prefix_list_name: Optional[str] = None) -> EcsPrefixList
func GetEcsPrefixList(ctx *Context, name string, id IDInput, state *EcsPrefixListState, opts ...ResourceOption) (*EcsPrefixList, error)
public static EcsPrefixList Get(string name, Input<string> id, EcsPrefixListState? state, CustomResourceOptions? opts = null)
public static EcsPrefixList get(String name, Output<String> id, EcsPrefixListState 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.
- Address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - Description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - Entries
List<Pulumi.
Ali Cloud. Ecs. Inputs. Ecs Prefix List Entry> - The Entry. The details see Block
entry
. - Max
Entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- Prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
- Address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - Description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - Entries
[]Ecs
Prefix List Entry Args - The Entry. The details see Block
entry
. - Max
Entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- Prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
- address
Family String - The IP address family. Valid values:
IPv4
,IPv6
. - description String
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - entries
List<Ecs
Prefix List Entry> - The Entry. The details see Block
entry
. - max
Entries Integer - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List StringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
- address
Family string - The IP address family. Valid values:
IPv4
,IPv6
. - description string
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - entries
Ecs
Prefix List Entry[] - The Entry. The details see Block
entry
. - max
Entries number - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List stringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
- address_
family str - The IP address family. Valid values:
IPv4
,IPv6
. - description str
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - entries
Sequence[Ecs
Prefix List Entry Args] - The Entry. The details see Block
entry
. - max_
entries int - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix_
list_ strname - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
- address
Family String - The IP address family. Valid values:
IPv4
,IPv6
. - description String
- The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with
http://
orhttps://
. - entries List<Property Map>
- The Entry. The details see Block
entry
. - max
Entries Number - The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.
- prefix
List StringName - The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with
http://
,https://
,com.aliyun
, orcom.alibabacloud
. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
Supporting Types
EcsPrefixListEntry, EcsPrefixListEntryArgs
- Cidr string
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- Description string
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
- Cidr string
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- Description string
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
- cidr String
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- description String
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
- cidr string
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- description string
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
- cidr str
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- description str
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
- cidr String
- The CIDR block in entry. This parameter is empty by default. Take note of the following items:
- The total number of entries must not exceed the
max_entries
value. - CIDR block types are determined by the IP address family. You cannot combine
IPv4
andIPv6
CIDR blocks in a single entry. - CIDR blocks must be unique across all entries in a prefix list. For example, you cannot specify 192.168.1.0/24 twice in the entries of the prefix list.
- IP addresses are supported. The system converts IP addresses into CIDR blocks. For example, if you specify 192.168.1.100, the system converts it into the 192.168.1.100/32 CIDR block.
- If an IPv6 CIDR block is used, the system converts it to the zero compression format and changes uppercase letters into lowercase ones. For example, if you specify 2001:0DB8:0000:0000:0000:0000:0000:0000/32, the system converts it into 2001:db8::/32.
- For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. * The total number of entries must not exceed the
max_entries
value.
- The total number of entries must not exceed the
- description String
- The description in entry. The description must be 2 to 32 characters in length and cannot start with
http://
orhttps://
.
Import
ECS Prefix List can be imported using the id, e.g.
$ pulumi import alicloud:ecs/ecsPrefixList:EcsPrefixList example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.