alicloud.alb.getAcls
Explore with Pulumi AI
This data source provides the Application Load Balancer (ALB) Acls of the current Alibaba Cloud user.
NOTE: Available in v1.133.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Alb.GetAcls.Invoke();
var nameRegex = AliCloud.Alb.GetAcls.Invoke(new()
{
NameRegex = "^my-Acl",
});
return new Dictionary<string, object?>
{
["albAclId1"] = ids.Apply(getAclsResult => getAclsResult.Acls[0]?.Id),
["albAclId2"] = nameRegex.Apply(getAclsResult => getAclsResult.Acls[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := alb.GetAcls(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("albAclId1", ids.Acls[0].Id)
nameRegex, err := alb.GetAcls(ctx, &alb.GetAclsArgs{
NameRegex: pulumi.StringRef("^my-Acl"),
}, nil)
if err != nil {
return err
}
ctx.Export("albAclId2", nameRegex.Acls[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.alb.AlbFunctions;
import com.pulumi.alicloud.alb.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 ids = AlbFunctions.getAcls();
ctx.export("albAclId1", ids.applyValue(getAclsResult -> getAclsResult.acls()[0].id()));
final var nameRegex = AlbFunctions.getAcls(GetAclsArgs.builder()
.nameRegex("^my-Acl")
.build());
ctx.export("albAclId2", nameRegex.applyValue(getAclsResult -> getAclsResult.acls()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.alb.get_acls()
pulumi.export("albAclId1", ids.acls[0].id)
name_regex = alicloud.alb.get_acls(name_regex="^my-Acl")
pulumi.export("albAclId2", name_regex.acls[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.alb.getAcls({});
export const albAclId1 = ids.then(ids => ids.acls?.[0]?.id);
const nameRegex = alicloud.alb.getAcls({
nameRegex: "^my-Acl",
});
export const albAclId2 = nameRegex.then(nameRegex => nameRegex.acls?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:alb:getAcls
Arguments: {}
nameRegex:
fn::invoke:
Function: alicloud:alb:getAcls
Arguments:
nameRegex: ^my-Acl
outputs:
albAclId1: ${ids.acls[0].id}
albAclId2: ${nameRegex.acls[0].id}
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>
def get_acls(acl_ids: Optional[Sequence[str]] = None,
acl_name: Optional[str] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAclsResult
def get_acls_output(acl_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
acl_name: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
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,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAclsResult]
func GetAcls(ctx *Context, args *GetAclsArgs, opts ...InvokeOption) (*GetAclsResult, error)
func GetAclsOutput(ctx *Context, args *GetAclsOutputArgs, opts ...InvokeOption) GetAclsResultOutput
> 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)
}
public static CompletableFuture<GetAclsResult> getAcls(GetAclsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:alb/getAcls:getAcls
arguments:
# arguments dictionary
The following arguments are supported:
- Acl
Ids List<string> The acl ids.
- Acl
Name string The ACL Name.
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids List<string>
A list of Acl IDs.
- Name
Regex string A regex string to filter results by Acl name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId Resource Group to Which the Number.
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- Acl
Ids []string The acl ids.
- Acl
Name string The ACL Name.
- Enable
Details bool Default to
false
. Set it totrue
can output more details about resource attributes.- Ids []string
A list of Acl IDs.
- Name
Regex string A regex string to filter results by Acl name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId Resource Group to Which the Number.
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Ids List<String> The acl ids.
- acl
Name String The ACL Name.
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Acl IDs.
- name
Regex String A regex string to filter results by Acl name.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId Resource Group to Which the Number.
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Ids string[] The acl ids.
- acl
Name string The ACL Name.
- enable
Details boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids string[]
A list of Acl IDs.
- name
Regex string A regex string to filter results by Acl name.
- output
File string File name where to save data source results (after running
pulumi preview
).- resource
Group stringId Resource Group to Which the Number.
- status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl_
ids Sequence[str] The acl ids.
- acl_
name str The ACL Name.
- enable_
details bool Default to
false
. Set it totrue
can output more details about resource attributes.- ids Sequence[str]
A list of Acl IDs.
- name_
regex 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_ strid Resource Group to Which the Number.
- status str
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Ids List<String> The acl ids.
- acl
Name String The ACL Name.
- enable
Details Boolean Default to
false
. Set it totrue
can output more details about resource attributes.- ids List<String>
A list of Acl IDs.
- name
Regex String A regex string to filter results by Acl name.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId Resource Group to Which the Number.
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
getAcls Result
The following output properties are available:
- Acls
List<Pulumi.
Ali Cloud. Alb. Outputs. Get Acls Acl> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Acl
Ids List<string> - Acl
Name string - Enable
Details bool - Name
Regex string - Output
File string - Resource
Group stringId - Status string
- Acls
[]Get
Acls Acl - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Acl
Ids []string - Acl
Name string - Enable
Details bool - Name
Regex string - Output
File string - Resource
Group stringId - Status string
- acls
List<Get
Acls Acl> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- acl
Ids List<String> - acl
Name String - enable
Details Boolean - name
Regex String - output
File String - resource
Group StringId - status String
- acls
Get
Acls Acl[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- acl
Ids string[] - acl
Name string - enable
Details boolean - name
Regex string - output
File string - resource
Group stringId - status string
- acls
Sequence[Get
Acls Acl] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- acl_
ids Sequence[str] - acl_
name str - enable_
details bool - name_
regex str - output_
file str - resource_
group_ strid - status str
- acls List<Property Map>
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- acl
Ids List<String> - acl
Name String - enable
Details Boolean - name
Regex String - output
File String - resource
Group StringId - status String
Supporting Types
GetAclsAcl
- Acl
Entries List<Pulumi.Ali Cloud. Alb. Inputs. Get Acls Acl Acl Entry> ACL Entries.
- Acl
Id string Access Control Policy ID.
- Acl
Name string The ACL Name.
- Address
Ip stringVersion Address Protocol Version.
- Id string
The ID of the Acl.
- Resource
Group stringId Resource Group to Which the Number.
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- Acl
Entries []GetAcls Acl Acl Entry ACL Entries.
- Acl
Id string Access Control Policy ID.
- Acl
Name string The ACL Name.
- Address
Ip stringVersion Address Protocol Version.
- Id string
The ID of the Acl.
- Resource
Group stringId Resource Group to Which the Number.
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Entries List<GetAcls Acl Acl Entry> ACL Entries.
- acl
Id String Access Control Policy ID.
- acl
Name String The ACL Name.
- address
Ip StringVersion Address Protocol Version.
- id String
The ID of the Acl.
- resource
Group StringId Resource Group to Which the Number.
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Entries GetAcls Acl Acl Entry[] ACL Entries.
- acl
Id string Access Control Policy ID.
- acl
Name string The ACL Name.
- address
Ip stringVersion Address Protocol Version.
- id string
The ID of the Acl.
- resource
Group stringId Resource Group to Which the Number.
- status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl_
entries Sequence[GetAcls Acl Acl Entry] ACL Entries.
- acl_
id str Access Control Policy ID.
- acl_
name str The ACL Name.
- address_
ip_ strversion Address Protocol Version.
- id str
The ID of the Acl.
- resource_
group_ strid Resource Group to Which the Number.
- status str
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- acl
Entries List<Property Map> ACL Entries.
- acl
Id String Access Control Policy ID.
- acl
Name String The ACL Name.
- address
Ip StringVersion Address Protocol Version.
- id String
The ID of the Acl.
- resource
Group StringId Resource Group to Which the Number.
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
GetAclsAclAclEntry
- Description string
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- Entry string
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- Description string
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- Entry string
- Status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- description String
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- entry String
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- description string
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- entry string
- status string
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- description str
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- entry str
- status str
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
- description String
Access Control Entries Note Description Length Is Limited to 1 to 256 Characters, Letters, digital, the Dash (-), a Forward Slash (/), Half a Period (.) and Underscores (_), Support Chinese Characters.
- entry String
- status String
The state of the ACL. Valid values:
Provisioning
,Available
andConfiguring
.Provisioning
: The ACL is being created.Available
: The ACL is available.Configuring
: The ACL is being configured.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.