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

alicloud.ga.getAcls

Explore with Pulumi AI

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

This data source provides the Ga Acls of the current Alibaba Cloud user.

NOTE: Available since v1.150.0.

Example Usage

Basic Usage

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

const ids = alicloud.ga.getAcls({});
export const gaAclId1 = ids.then(ids => ids.acls?.[0]?.id);
const nameRegex = alicloud.ga.getAcls({
    nameRegex: "^my-Acl",
});
export const gaAclId2 = nameRegex.then(nameRegex => nameRegex.acls?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.ga.get_acls()
pulumi.export("gaAclId1", ids.acls[0].id)
name_regex = alicloud.ga.get_acls(name_regex="^my-Acl")
pulumi.export("gaAclId2", name_regex.acls[0].id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := ga.GetAcls(ctx, &ga.GetAclsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("gaAclId1", ids.Acls[0].Id)
		nameRegex, err := ga.GetAcls(ctx, &ga.GetAclsArgs{
			NameRegex: pulumi.StringRef("^my-Acl"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("gaAclId2", nameRegex.Acls[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Ga.GetAcls.Invoke();

    var nameRegex = AliCloud.Ga.GetAcls.Invoke(new()
    {
        NameRegex = "^my-Acl",
    });

    return new Dictionary<string, object?>
    {
        ["gaAclId1"] = ids.Apply(getAclsResult => getAclsResult.Acls[0]?.Id),
        ["gaAclId2"] = nameRegex.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.ga.GaFunctions;
import com.pulumi.alicloud.ga.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 = GaFunctions.getAcls();

        ctx.export("gaAclId1", ids.applyValue(getAclsResult -> getAclsResult.acls()[0].id()));
        final var nameRegex = GaFunctions.getAcls(GetAclsArgs.builder()
            .nameRegex("^my-Acl")
            .build());

        ctx.export("gaAclId2", nameRegex.applyValue(getAclsResult -> getAclsResult.acls()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:ga:getAcls
      arguments: {}
  nameRegex:
    fn::invoke:
      function: alicloud:ga:getAcls
      arguments:
        nameRegex: ^my-Acl
outputs:
  gaAclId1: ${ids.acls[0].id}
  gaAclId2: ${nameRegex.acls[0].id}
Copy

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(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,
             status: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetAclsResult
def get_acls_output(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,
             status: Optional[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:ga/getAcls:getAcls
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AclName Changes to this property will trigger replacement. string
The name of the acl.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. List<string>
A list of Acl IDs.
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).
Status Changes to this property will trigger replacement. string
The status of the resource. Valid values: active, configuring, deleting, init.
AclName Changes to this property will trigger replacement. string
The name of the acl.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. []string
A list of Acl IDs.
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).
Status Changes to this property will trigger replacement. string
The status of the resource. Valid values: active, configuring, deleting, init.
aclName Changes to this property will trigger replacement. String
The name of the acl.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Acl IDs.
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).
status Changes to this property will trigger replacement. String
The status of the resource. Valid values: active, configuring, deleting, init.
aclName Changes to this property will trigger replacement. string
The name of the acl.
enableDetails boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. string[]
A list of Acl IDs.
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).
status Changes to this property will trigger replacement. string
The status of the resource. Valid values: active, configuring, deleting, init.
acl_name Changes to this property will trigger replacement. str
The name of the acl.
enable_details bool
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Acl IDs.
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).
status Changes to this property will trigger replacement. str
The status of the resource. Valid values: active, configuring, deleting, init.
aclName Changes to this property will trigger replacement. String
The name of the acl.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Acl IDs.
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).
status Changes to this property will trigger replacement. String
The status of the resource. Valid values: active, configuring, deleting, init.

getAcls Result

The following output properties are available:

Acls List<Pulumi.AliCloud.Ga.Outputs.GetAclsAcl>
A list of Ga Acls. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
A list of Acl names.
AclName string
The name of the acl.
EnableDetails bool
NameRegex string
OutputFile string
Status string
The status of the resource.
Acls []GetAclsAcl
A list of Ga Acls. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
A list of Acl names.
AclName string
The name of the acl.
EnableDetails bool
NameRegex string
OutputFile string
Status string
The status of the resource.
acls List<GetAclsAcl>
A list of Ga Acls. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Acl names.
aclName String
The name of the acl.
enableDetails Boolean
nameRegex String
outputFile String
status String
The status of the resource.
acls GetAclsAcl[]
A list of Ga Acls. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
A list of Acl names.
aclName string
The name of the acl.
enableDetails boolean
nameRegex string
outputFile string
status string
The status of the resource.
acls Sequence[GetAclsAcl]
A list of Ga Acls. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
A list of Acl names.
acl_name str
The name of the acl.
enable_details bool
name_regex str
output_file str
status str
The status of the resource.
acls List<Property Map>
A list of Ga Acls. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Acl names.
aclName String
The name of the acl.
enableDetails Boolean
nameRegex String
outputFile String
status String
The status of the resource.

Supporting Types

GetAclsAcl

AclEntries This property is required. List<Pulumi.AliCloud.Ga.Inputs.GetAclsAclAclEntry>
The entries of the Acl.
AclId This property is required. string
The ID of the Acl.
AclName This property is required. string
The name of the acl.
AddressIpVersion This property is required. string
The address ip version.
Id This property is required. string
The ID of the Acl. Its value is same as acl_id.
Status This property is required. string
The status of the resource. Valid values: active, configuring, deleting, init.
AclEntries This property is required. []GetAclsAclAclEntry
The entries of the Acl.
AclId This property is required. string
The ID of the Acl.
AclName This property is required. string
The name of the acl.
AddressIpVersion This property is required. string
The address ip version.
Id This property is required. string
The ID of the Acl. Its value is same as acl_id.
Status This property is required. string
The status of the resource. Valid values: active, configuring, deleting, init.
aclEntries This property is required. List<GetAclsAclAclEntry>
The entries of the Acl.
aclId This property is required. String
The ID of the Acl.
aclName This property is required. String
The name of the acl.
addressIpVersion This property is required. String
The address ip version.
id This property is required. String
The ID of the Acl. Its value is same as acl_id.
status This property is required. String
The status of the resource. Valid values: active, configuring, deleting, init.
aclEntries This property is required. GetAclsAclAclEntry[]
The entries of the Acl.
aclId This property is required. string
The ID of the Acl.
aclName This property is required. string
The name of the acl.
addressIpVersion This property is required. string
The address ip version.
id This property is required. string
The ID of the Acl. Its value is same as acl_id.
status This property is required. string
The status of the resource. Valid values: active, configuring, deleting, init.
acl_entries This property is required. Sequence[GetAclsAclAclEntry]
The entries of the Acl.
acl_id This property is required. str
The ID of the Acl.
acl_name This property is required. str
The name of the acl.
address_ip_version This property is required. str
The address ip version.
id This property is required. str
The ID of the Acl. Its value is same as acl_id.
status This property is required. str
The status of the resource. Valid values: active, configuring, deleting, init.
aclEntries This property is required. List<Property Map>
The entries of the Acl.
aclId This property is required. String
The ID of the Acl.
aclName This property is required. String
The name of the acl.
addressIpVersion This property is required. String
The address ip version.
id This property is required. String
The ID of the Acl. Its value is same as acl_id.
status This property is required. String
The status of the resource. Valid values: active, configuring, deleting, init.

GetAclsAclAclEntry

Entry This property is required. string
The IP entry that you want to add to the ACL.
EntryDescription This property is required. string
The description of the IP entry.
Entry This property is required. string
The IP entry that you want to add to the ACL.
EntryDescription This property is required. string
The description of the IP entry.
entry This property is required. String
The IP entry that you want to add to the ACL.
entryDescription This property is required. String
The description of the IP entry.
entry This property is required. string
The IP entry that you want to add to the ACL.
entryDescription This property is required. string
The description of the IP entry.
entry This property is required. str
The IP entry that you want to add to the ACL.
entry_description This property is required. str
The description of the IP entry.
entry This property is required. String
The IP entry that you want to add to the ACL.
entryDescription This property is required. String
The description of the IP entry.

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