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

alicloud.slb.getAcls

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the acls in the region.

Example Usage

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

const sampleDs = alicloud.slb.getAcls({});
export const firstSlbAclId = sampleDs.then(sampleDs => sampleDs.acls?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

sample_ds = alicloud.slb.get_acls()
pulumi.export("firstSlbAclId", sample_ds.acls[0].id)
Copy
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 {
		sampleDs, err := slb.GetAcls(ctx, &slb.GetAclsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstSlbAclId", sampleDs.Acls[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var sampleDs = AliCloud.Slb.GetAcls.Invoke();

    return new Dictionary<string, object?>
    {
        ["firstSlbAclId"] = sampleDs.Apply(getAclsResult => getAclsResult.Acls[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetAclsArgs;
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 sampleDs = SlbFunctions.getAcls();

        ctx.export("firstSlbAclId", sampleDs.applyValue(getAclsResult -> getAclsResult.acls()[0].id()));
    }
}
Copy
variables:
  sampleDs:
    fn::invoke:
      function: alicloud:slb:getAcls
      arguments: {}
outputs:
  firstSlbAclId: ${sampleDs.acls[0].id}
Copy

Entry Block

The entry mapping supports the following:

  • entry - An IP addresses or CIDR blocks.
  • comment - the comment of the entry.

Listener Block

The Listener mapping supports the following:

  • load_balancer_id - the id of load balancer instance, the listener belongs to.
  • frontend_port - the listener port.
  • protocol - the listener protocol (such as tcp/udp/http/https, etc).
  • acl_type - the type of acl (such as white/black).

Using getAcls

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAcls(args: GetAclsArgs, opts?: InvokeOptions): Promise<GetAclsResult>
function getAclsOutput(args: GetAclsOutputArgs, opts?: InvokeOptions): Output<GetAclsResult>
Copy
def get_acls(ids: Optional[Sequence[str]] = None,
             name_regex: Optional[str] = None,
             output_file: Optional[str] = None,
             resource_group_id: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetAclsResult
def get_acls_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             name_regex: Optional[pulumi.Input[str]] = None,
             output_file: Optional[pulumi.Input[str]] = None,
             resource_group_id: Optional[pulumi.Input[str]] = None,
             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetAclsResult]
Copy
func GetAcls(ctx *Context, args *GetAclsArgs, opts ...InvokeOption) (*GetAclsResult, error)
func GetAclsOutput(ctx *Context, args *GetAclsOutputArgs, opts ...InvokeOption) GetAclsResultOutput
Copy

> Note: This function is named GetAcls in the Go SDK.

public static class GetAcls 
{
    public static Task<GetAclsResult> InvokeAsync(GetAclsArgs args, InvokeOptions? opts = null)
    public static Output<GetAclsResult> Invoke(GetAclsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAclsResult> getAcls(GetAclsArgs args, InvokeOptions options)
public static Output<GetAclsResult> getAcls(GetAclsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:slb/getAcls:getAcls
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of acls IDs to filter results.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by acl name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ResourceGroupId Changes to this property will trigger replacement. string
The Id of resource group which acl belongs.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Ids Changes to this property will trigger replacement. []string
A list of acls IDs to filter results.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by acl name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ResourceGroupId Changes to this property will trigger replacement. string
The Id of resource group which acl belongs.
Tags map[string]string
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. List<String>
A list of acls IDs to filter results.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by acl name.
outputFile String
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. String
The Id of resource group which acl belongs.
tags Map<String,String>
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. string[]
A list of acls IDs to filter results.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by acl name.
outputFile string
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. string
The Id of resource group which acl belongs.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. Sequence[str]
A list of acls IDs to filter results.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by acl name.
output_file str
File name where to save data source results (after running pulumi preview).
resource_group_id Changes to this property will trigger replacement. str
The Id of resource group which acl belongs.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. List<String>
A list of acls IDs to filter results.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by acl name.
outputFile String
File name where to save data source results (after running pulumi preview).
resourceGroupId Changes to this property will trigger replacement. String
The Id of resource group which acl belongs.
tags Map<String>
A mapping of tags to assign to the resource.

getAcls Result

The following output properties are available:

Acls List<Pulumi.AliCloud.Slb.Outputs.GetAclsAcl>
A list of SLB acls. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of SLB acls IDs.
Names List<string>
A list of SLB acls names.
NameRegex string
OutputFile string
ResourceGroupId string
Resource group ID.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Acls []GetAclsAcl
A list of SLB acls. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of SLB acls IDs.
Names []string
A list of SLB acls names.
NameRegex string
OutputFile string
ResourceGroupId string
Resource group ID.
Tags map[string]string
A mapping of tags to assign to the resource.
acls List<GetAclsAcl>
A list of SLB acls. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of SLB acls IDs.
names List<String>
A list of SLB acls names.
nameRegex String
outputFile String
resourceGroupId String
Resource group ID.
tags Map<String,String>
A mapping of tags to assign to the resource.
acls GetAclsAcl[]
A list of SLB acls. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of SLB acls IDs.
names string[]
A list of SLB acls names.
nameRegex string
outputFile string
resourceGroupId string
Resource group ID.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
acls Sequence[GetAclsAcl]
A list of SLB acls. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of SLB acls IDs.
names Sequence[str]
A list of SLB acls names.
name_regex str
output_file str
resource_group_id str
Resource group ID.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
acls List<Property Map>
A list of SLB acls. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of SLB acls IDs.
names List<String>
A list of SLB acls names.
nameRegex String
outputFile String
resourceGroupId String
Resource group ID.
tags Map<String>
A mapping of tags to assign to the resource.

Supporting Types

GetAclsAcl

EntryLists This property is required. List<Pulumi.AliCloud.Slb.Inputs.GetAclsAclEntryList>
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
Id This property is required. string
Acl ID.
IpVersion This property is required. string
Name This property is required. string
Acl name.
RelatedListeners This property is required. List<Pulumi.AliCloud.Slb.Inputs.GetAclsAclRelatedListener>
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
ResourceGroupId This property is required. string
The Id of resource group which acl belongs.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
EntryLists This property is required. []GetAclsAclEntryList
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
Id This property is required. string
Acl ID.
IpVersion This property is required. string
Name This property is required. string
Acl name.
RelatedListeners This property is required. []GetAclsAclRelatedListener
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
ResourceGroupId This property is required. string
The Id of resource group which acl belongs.
Tags map[string]string
A mapping of tags to assign to the resource.
entryLists This property is required. List<GetAclsAclEntryList>
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
id This property is required. String
Acl ID.
ipVersion This property is required. String
name This property is required. String
Acl name.
relatedListeners This property is required. List<GetAclsAclRelatedListener>
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
resourceGroupId This property is required. String
The Id of resource group which acl belongs.
tags Map<String,String>
A mapping of tags to assign to the resource.
entryLists This property is required. GetAclsAclEntryList[]
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
id This property is required. string
Acl ID.
ipVersion This property is required. string
name This property is required. string
Acl name.
relatedListeners This property is required. GetAclsAclRelatedListener[]
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
resourceGroupId This property is required. string
The Id of resource group which acl belongs.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
entry_lists This property is required. Sequence[GetAclsAclEntryList]
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
id This property is required. str
Acl ID.
ip_version This property is required. str
name This property is required. str
Acl name.
related_listeners This property is required. Sequence[GetAclsAclRelatedListener]
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
resource_group_id This property is required. str
The Id of resource group which acl belongs.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
entryLists This property is required. List<Property Map>
A list of entry (IP addresses or CIDR blocks). Each entry contains two sub-fields as Entry Block follows.
id This property is required. String
Acl ID.
ipVersion This property is required. String
name This property is required. String
Acl name.
relatedListeners This property is required. List<Property Map>
A list of listener are attached by the acl. Each listener contains four sub-fields as Listener Block follows.
resourceGroupId This property is required. String
The Id of resource group which acl belongs.
tags Map<String>
A mapping of tags to assign to the resource.

GetAclsAclEntryList

Comment This property is required. string
Entry This property is required. string
Comment This property is required. string
Entry This property is required. string
comment This property is required. String
entry This property is required. String
comment This property is required. string
entry This property is required. string
comment This property is required. str
entry This property is required. str
comment This property is required. String
entry This property is required. String

GetAclsAclRelatedListener

AclType This property is required. string
FrontendPort This property is required. int
LoadBalancerId This property is required. string
Protocol This property is required. string
AclType This property is required. string
FrontendPort This property is required. int
LoadBalancerId This property is required. string
Protocol This property is required. string
aclType This property is required. String
frontendPort This property is required. Integer
loadBalancerId This property is required. String
protocol This property is required. String
aclType This property is required. string
frontendPort This property is required. number
loadBalancerId This property is required. string
protocol This property is required. string
acl_type This property is required. str
frontend_port This property is required. int
load_balancer_id This property is required. str
protocol This property is required. str
aclType This property is required. String
frontendPort This property is required. Number
loadBalancerId This property is required. String
protocol This property is required. String

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi