1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. alb
  5. Acl
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.alb.Acl

Explore with Pulumi AI

Provides a Application Load Balancer (ALB) Acl resource.

For information about ALB Acl and how to use it, see What is Acl.

NOTE: Available since v1.133.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.resourcemanager.getResourceGroups({});
const defaultAcl = new alicloud.alb.Acl("default", {
    aclName: "tf_example",
    resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.resourcemanager.get_resource_groups()
default_acl = alicloud.alb.Acl("default",
    acl_name="tf_example",
    resource_group_id=default.groups[0].id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = alb.NewAcl(ctx, "default", &alb.AclArgs{
			AclName:         pulumi.String("tf_example"),
			ResourceGroupId: pulumi.String(_default.Groups[0].Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();

    var defaultAcl = new AliCloud.Alb.Acl("default", new()
    {
        AclName = "tf_example",
        ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.alb.Acl;
import com.pulumi.alicloud.alb.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) {
        final var default = ResourcemanagerFunctions.getResourceGroups();

        var defaultAcl = new Acl("defaultAcl", AclArgs.builder()
            .aclName("tf_example")
            .resourceGroupId(default_.groups()[0].id())
            .build());

    }
}
Copy
resources:
  defaultAcl:
    type: alicloud:alb:Acl
    name: default
    properties:
      aclName: tf_example
      resourceGroupId: ${default.groups[0].id}
variables:
  default:
    fn::invoke:
      function: alicloud:resourcemanager:getResourceGroups
      arguments: {}
Copy

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,
        acl_entries: Optional[Sequence[AclAclEntryArgs]] = None,
        acl_name: Optional[str] = None,
        dry_run: Optional[bool] = None,
        resource_group_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = 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:alb:Acl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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 aclResource = new AliCloud.Alb.Acl("aclResource", new()
{
    AclName = "string",
    DryRun = false,
    ResourceGroupId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := alb.NewAcl(ctx, "aclResource", &alb.AclArgs{
	AclName:         pulumi.String("string"),
	DryRun:          pulumi.Bool(false),
	ResourceGroupId: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var aclResource = new Acl("aclResource", AclArgs.builder()
    .aclName("string")
    .dryRun(false)
    .resourceGroupId("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
acl_resource = alicloud.alb.Acl("aclResource",
    acl_name="string",
    dry_run=False,
    resource_group_id="string",
    tags={
        "string": "string",
    })
Copy
const aclResource = new alicloud.alb.Acl("aclResource", {
    aclName: "string",
    dryRun: false,
    resourceGroupId: "string",
    tags: {
        string: "string",
    },
});
Copy
type: alicloud:alb:Acl
properties:
    aclName: string
    dryRun: false
    resourceGroupId: string
    tags:
        string: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Acl resource accepts the following input properties:

AclEntries List<Pulumi.AliCloud.Alb.Inputs.AclAclEntry>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

AclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
DryRun bool
Specifies whether to precheck the API request.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
AclEntries []AclAclEntryArgs
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

AclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
DryRun bool
Specifies whether to precheck the API request.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
Tags map[string]string
A mapping of tags to assign to the resource.
aclEntries List<AclAclEntry>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName String
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun Boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the resource group.
tags Map<String,String>
A mapping of tags to assign to the resource.
aclEntries AclAclEntry[]
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
acl_entries Sequence[AclAclEntryArgs]
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

acl_name str
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dry_run bool
Specifies whether to precheck the API request.
resource_group_id Changes to this property will trigger replacement. str
The ID of the resource group.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
aclEntries List<Property Map>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName String
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun Boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the resource group.
tags Map<String>
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.
Status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
id String
The provider-assigned unique ID for this managed resource.
status String
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
id string
The provider-assigned unique ID for this managed resource.
status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
id str
The provider-assigned unique ID for this managed resource.
status str
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
id String
The provider-assigned unique ID for this managed resource.
status String
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.

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,
        acl_entries: Optional[Sequence[AclAclEntryArgs]] = None,
        acl_name: Optional[str] = None,
        dry_run: Optional[bool] = None,
        resource_group_id: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = 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)
resources:  _:    type: alicloud:alb:Acl    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AclEntries List<Pulumi.AliCloud.Alb.Inputs.AclAclEntry>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

AclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
DryRun bool
Specifies whether to precheck the API request.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
Status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
AclEntries []AclAclEntryArgs
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

AclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
DryRun bool
Specifies whether to precheck the API request.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
Status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
Tags map[string]string
A mapping of tags to assign to the resource.
aclEntries List<AclAclEntry>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName String
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun Boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the resource group.
status String
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
tags Map<String,String>
A mapping of tags to assign to the resource.
aclEntries AclAclEntry[]
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName string
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. string
The ID of the resource group.
status string
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
acl_entries Sequence[AclAclEntryArgs]
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

acl_name str
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dry_run bool
Specifies whether to precheck the API request.
resource_group_id Changes to this property will trigger replacement. str
The ID of the resource group.
status str
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
aclEntries List<Property Map>
The list of the ACL entries. You can add up to 20 entries in each call. See acl_entries below for details. NOTE: "Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.",

Deprecated: Field 'acl_entries' has been deprecated from provider version 1.166.0 and it will be removed in the future version. Please use the new resource 'alicloud_alb_acl_entry_attachment'.

aclName String
The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, hyphens (-) and underscores (_). It must start with a letter.
dryRun Boolean
Specifies whether to precheck the API request.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the resource group.
status String
The state of the ACL. Valid values:Provisioning, Available and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.
tags Map<String>
A mapping of tags to assign to the resource.

Supporting Types

AclAclEntry
, AclAclEntryArgs

Description string
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
Entry string
The IP address for the ACL entry.
Status string
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.
Description string
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
Entry string
The IP address for the ACL entry.
Status string
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.
description String
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
entry String
The IP address for the ACL entry.
status String
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.
description string
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
entry string
The IP address for the ACL entry.
status string
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.
description str
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
entry str
The IP address for the ACL entry.
status str
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.
description String
The description of the ACL entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_). It can also contain Chinese characters.
entry String
The IP address for the ACL entry.
status String
The status of the ACL entry. Valid values:

  • Adding: The ACL entry is being added.
  • Available: The ACL entry is added and available.
  • Removing: The ACL entry is being removed.

Import

ALB Acl can be imported using the id, e.g.

$ pulumi import alicloud:alb/acl:Acl example <id>
Copy

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.