Alibaba Cloud

v3.15.0 published on Thursday, Jan 13, 2022 by Pulumi

getAcls

This data source provides the Application Load Balancer (ALB) Acls of the current Alibaba Cloud user.

NOTE: Available in v1.133.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Alb.GetAcls.InvokeAsync());
        this.AlbAclId1 = ids.Apply(ids => ids.Acls?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.Alb.GetAcls.InvokeAsync(new AliCloud.Alb.GetAclsArgs
        {
            NameRegex = "^my-Acl",
        }));
        this.AlbAclId2 = nameRegex.Apply(nameRegex => nameRegex.Acls?[0]?.Id);
    }

    [Output("albAclId1")]
    public Output<string> AlbAclId1 { get; set; }
    [Output("albAclId2")]
    public Output<string> AlbAclId2 { get; set; }
}
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)
		opt0 := "^my-Acl"
		nameRegex, err := alb.GetAcls(ctx, &alb.GetAclsArgs{
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("albAclId2", nameRegex.Acls[0].Id)
		return nil
	})
}
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);

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)
}

The following arguments are supported:

AclIds List<string>
The acl ids.
AclName string
The ACL Name.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids List<string>
A list of Acl IDs.
NameRegex string
A regex string to filter results by Acl name.
OutputFile string
ResourceGroupId string
Resource Group to Which the Number.
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.
AclIds []string
The acl ids.
AclName string
The ACL Name.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids []string
A list of Acl IDs.
NameRegex string
A regex string to filter results by Acl name.
OutputFile string
ResourceGroupId string
Resource Group to Which the Number.
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.
aclIds string[]
The acl ids.
aclName string
The ACL Name.
enableDetails boolean
Default to false. Set it to true can output more details about resource attributes.
ids string[]
A list of Acl IDs.
nameRegex string
A regex string to filter results by Acl name.
outputFile string
resourceGroupId string
Resource Group to Which the Number.
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.
acl_ids Sequence[str]
The acl ids.
acl_name str
The ACL Name.
enable_details bool
Default to false. Set it to true 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
resource_group_id str
Resource Group to Which the Number.
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.

getAcls Result

The following output properties are available:

Acls List<Pulumi.AliCloud.Alb.Outputs.GetAclsAcl>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
AclIds List<string>
AclName string
EnableDetails bool
NameRegex string
OutputFile string
ResourceGroupId string
Status string
Acls []GetAclsAcl
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
AclIds []string
AclName string
EnableDetails bool
NameRegex string
OutputFile string
ResourceGroupId string
Status string
acls GetAclsAcl[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
aclIds string[]
aclName string
enableDetails boolean
nameRegex string
outputFile string
resourceGroupId string
status string
acls Sequence[GetAclsAcl]
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_id str
status str

Supporting Types

GetAclsAcl

AclEntries List<Pulumi.AliCloud.Alb.Inputs.GetAclsAclAclEntry>
ACL Entries.
AclId string
Access Control Policy ID.
AclName string
The ACL Name.
AddressIpVersion string
Address Protocol Version.
Id string
The ID of the Acl.
ResourceGroupId string
Resource Group to Which the Number.
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.
AclEntries []GetAclsAclAclEntry
ACL Entries.
AclId string
Access Control Policy ID.
AclName string
The ACL Name.
AddressIpVersion string
Address Protocol Version.
Id string
The ID of the Acl.
ResourceGroupId string
Resource Group to Which the Number.
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.
aclEntries GetAclsAclAclEntry[]
ACL Entries.
aclId string
Access Control Policy ID.
aclName string
The ACL Name.
addressIpVersion string
Address Protocol Version.
id string
The ID of the Acl.
resourceGroupId string
Resource Group to Which the Number.
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.
acl_entries Sequence[GetAclsAclAclEntry]
ACL Entries.
acl_id str
Access Control Policy ID.
acl_name str
The ACL Name.
address_ip_version str
Address Protocol Version.
id str
The ID of the Acl.
resource_group_id str
Resource Group to Which the Number.
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.

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 and Configuring. 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 and Configuring. 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 and Configuring. 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 and Configuring. Provisioning: The ACL is being created. Available: The ACL is available. Configuring: The ACL is being configured.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.