1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. Acl
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

alicloud.slb.Acl

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi

    An access control list contains multiple IP addresses or CIDR blocks. The access control list can help you to define multiple instance listening dimension, and to meet the multiple usage for single access control list.

    Server Load Balancer allows you to configure access control for listeners. You can configure different whitelists or blacklists for different listeners.

    You can configure access control when you create a listener or change access control configuration after a listener is created.

    NOTE: One access control list can be attached to many Listeners in different load balancer as whitelists or blacklists.

    NOTE: The maximum number of access control lists per region is 50.

    NOTE: The maximum number of IP addresses added each time is 50.

    NOTE: The maximum number of entries per access control list is 300.

    NOTE: The maximum number of listeners that an access control list can be added to is 50.

    For information about slb and how to use it, see What is Server Load Balancer.

    For information about acl and how to use it, see Configure an access control list.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const acl = new alicloud.slb.Acl("acl", {
        name: "terraformslbaclconfig",
        ipVersion: "ipv4",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    acl = alicloud.slb.Acl("acl",
        name="terraformslbaclconfig",
        ip_version="ipv4")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := slb.NewAcl(ctx, "acl", &slb.AclArgs{
    			Name:      pulumi.String("terraformslbaclconfig"),
    			IpVersion: pulumi.String("ipv4"),
    		})
    		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 acl = new AliCloud.Slb.Acl("acl", new()
        {
            Name = "terraformslbaclconfig",
            IpVersion = "ipv4",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.slb.Acl;
    import com.pulumi.alicloud.slb.AclArgs;
    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 acl = new Acl("acl", AclArgs.builder()
                .name("terraformslbaclconfig")
                .ipVersion("ipv4")
                .build());
    
        }
    }
    
    resources:
      acl:
        type: alicloud:slb:Acl
        properties:
          name: terraformslbaclconfig
          ipVersion: ipv4
    

    Entry Block

    The entry mapping supports the following:

    • entry - (Optional, Computed) The CIDR blocks.
    • comment - (Optional, Computed) The comment of the entry.

    Create Acl Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Acl(name: string, args?: AclArgs, opts?: CustomResourceOptions);
    @overload
    def Acl(resource_name: str,
            args: Optional[AclArgs] = None,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Acl(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            entry_lists: Optional[Sequence[AclEntryListArgs]] = None,
            ip_version: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None)
    func NewAcl(ctx *Context, name string, args *AclArgs, opts ...ResourceOption) (*Acl, error)
    public Acl(string name, AclArgs? args = null, CustomResourceOptions? opts = null)
    public Acl(String name, AclArgs args)
    public Acl(String name, AclArgs args, CustomResourceOptions options)
    
    type: alicloud:slb:Acl
    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 AclArgs
    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 AclArgs
    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 AclArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AclArgs
    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 exampleaclResourceResourceFromSlbacl = new AliCloud.Slb.Acl("exampleaclResourceResourceFromSlbacl", new()
    {
        IpVersion = "string",
        Name = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := slb.NewAcl(ctx, "exampleaclResourceResourceFromSlbacl", &slb.AclArgs{
    	IpVersion:       pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var exampleaclResourceResourceFromSlbacl = new Acl("exampleaclResourceResourceFromSlbacl", AclArgs.builder()
        .ipVersion("string")
        .name("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "any"))
        .build());
    
    exampleacl_resource_resource_from_slbacl = alicloud.slb.Acl("exampleaclResourceResourceFromSlbacl",
        ip_version="string",
        name="string",
        resource_group_id="string",
        tags={
            "string": "any",
        })
    
    const exampleaclResourceResourceFromSlbacl = new alicloud.slb.Acl("exampleaclResourceResourceFromSlbacl", {
        ipVersion: "string",
        name: "string",
        resourceGroupId: "string",
        tags: {
            string: "any",
        },
    });
    
    type: alicloud:slb:Acl
    properties:
        ipVersion: string
        name: string
        resourceGroupId: string
        tags:
            string: any
    

    Acl 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 Acl resource accepts the following input properties:

    EntryLists List<Pulumi.AliCloud.Slb.Inputs.AclEntryList>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    IpVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    Name string
    Name of the access control list.
    ResourceGroupId string
    Resource group ID.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    EntryLists []AclEntryListArgs
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    IpVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    Name string
    Name of the access control list.
    ResourceGroupId string
    Resource group ID.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    entryLists List<AclEntryList>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion String
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name String
    Name of the access control list.
    resourceGroupId String
    Resource group ID.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    entryLists AclEntryList[]
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name string
    Name of the access control list.
    resourceGroupId string
    Resource group ID.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    entry_lists Sequence[AclEntryListArgs]
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ip_version str
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name str
    Name of the access control list.
    resource_group_id str
    Resource group ID.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    entryLists List<Property Map>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion String
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name String
    Name of the access control list.
    resourceGroupId String
    Resource group ID.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Acl 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 Acl Resource

    Get an existing Acl 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?: AclState, opts?: CustomResourceOptions): Acl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            entry_lists: Optional[Sequence[AclEntryListArgs]] = None,
            ip_version: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None) -> Acl
    func GetAcl(ctx *Context, name string, id IDInput, state *AclState, opts ...ResourceOption) (*Acl, error)
    public static Acl Get(string name, Input<string> id, AclState? state, CustomResourceOptions? opts = null)
    public static Acl get(String name, Output<String> id, AclState 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:
    EntryLists List<Pulumi.AliCloud.Slb.Inputs.AclEntryList>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    IpVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    Name string
    Name of the access control list.
    ResourceGroupId string
    Resource group ID.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    EntryLists []AclEntryListArgs
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    IpVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    Name string
    Name of the access control list.
    ResourceGroupId string
    Resource group ID.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    entryLists List<AclEntryList>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion String
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name String
    Name of the access control list.
    resourceGroupId String
    Resource group ID.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    entryLists AclEntryList[]
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion string
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name string
    Name of the access control list.
    resourceGroupId string
    Resource group ID.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    entry_lists Sequence[AclEntryListArgs]
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ip_version str
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name str
    Name of the access control list.
    resource_group_id str
    Resource group ID.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    entryLists List<Property Map>
    A list of entry (CIDR blocks) to be added. It contains two sub-fields as Entry Block follows. NOTE: "Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.",

    Deprecated: Field 'entry_list' has been deprecated from provider version 1.162.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_acl_entry_attachment'.

    ipVersion String
    The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".
    name String
    Name of the access control list.
    resourceGroupId String
    Resource group ID.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    Supporting Types

    AclEntryList, AclEntryListArgs

    Comment string
    Entry string
    Comment string
    Entry string
    comment String
    entry String
    comment string
    entry string
    comment str
    entry str
    comment String
    entry String

    Import

    Server Load balancer access control list can be imported using the id, e.g.

    $ pulumi import alicloud:slb/acl:Acl example acl-abc123456
    

    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.
    alicloud logo
    Alibaba Cloud v3.59.0 published on Friday, Jul 12, 2024 by Pulumi