1. Packages
  2. Alicloud Provider
  3. API Docs
  4. sag
  5. getAcls
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.sag.getAcls

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides Sag Acls available to the user.

    NOTE: Available in 1.60.0+

    NOTE: Only the following regions support create Cloud Connect Network. [cn-shanghai, cn-shanghai-finance-1, cn-hongkong, ap-southeast-1, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1]

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.sag.getAcls({
        ids: [defaultAlicloudSagAcls.id],
        nameRegex: "^tf-testAcc.*",
    });
    const defaultAcl = new alicloud.rocketmq.Acl("default", {name: "tf-testAccSagAclName"});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.sag.get_acls(ids=[default_alicloud_sag_acls["id"]],
        name_regex="^tf-testAcc.*")
    default_acl = alicloud.rocketmq.Acl("default", name="tf-testAccSagAclName")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rocketmq"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sag"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := sag.GetAcls(ctx, &sag.GetAclsArgs{
    Ids: interface{}{
    defaultAlicloudSagAcls.Id,
    },
    NameRegex: pulumi.StringRef("^tf-testAcc.*"),
    }, nil);
    if err != nil {
    return err
    }
    _, err = rocketmq.NewAcl(ctx, "default", &rocketmq.AclArgs{
    Name: pulumi.String("tf-testAccSagAclName"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Sag.GetAcls.Invoke(new()
        {
            Ids = new[]
            {
                defaultAlicloudSagAcls.Id,
            },
            NameRegex = "^tf-testAcc.*",
        });
    
        var defaultAcl = new AliCloud.RocketMQ.Acl("default", new()
        {
            Name = "tf-testAccSagAclName",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.sag.SagFunctions;
    import com.pulumi.alicloud.sag.inputs.GetAclsArgs;
    import com.pulumi.alicloud.rocketmq.Acl;
    import com.pulumi.alicloud.rocketmq.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 = SagFunctions.getAcls(GetAclsArgs.builder()
                .ids(defaultAlicloudSagAcls.id())
                .nameRegex("^tf-testAcc.*")
                .build());
    
            var defaultAcl = new Acl("defaultAcl", AclArgs.builder()
                .name("tf-testAccSagAclName")
                .build());
    
        }
    }
    
    resources:
      defaultAcl:
        type: alicloud:rocketmq:Acl
        name: default
        properties:
          name: tf-testAccSagAclName
    variables:
      default:
        fn::invoke:
          Function: alicloud:sag:getAcls
          Arguments:
            ids:
              - ${defaultAlicloudSagAcls.id}
            nameRegex: ^tf-testAcc.*
    

    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(ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[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,
                 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:sag/getAcls:getAcls
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Sag Acl IDs.
    NameRegex string
    A regex string to filter Sag Acl instances by name.
    OutputFile string
    Ids []string
    A list of Sag Acl IDs.
    NameRegex string
    A regex string to filter Sag Acl instances by name.
    OutputFile string
    ids List<String>
    A list of Sag Acl IDs.
    nameRegex String
    A regex string to filter Sag Acl instances by name.
    outputFile String
    ids string[]
    A list of Sag Acl IDs.
    nameRegex string
    A regex string to filter Sag Acl instances by name.
    outputFile string
    ids Sequence[str]
    A list of Sag Acl IDs.
    name_regex str
    A regex string to filter Sag Acl instances by name.
    output_file str
    ids List<String>
    A list of Sag Acl IDs.
    nameRegex String
    A regex string to filter Sag Acl instances by name.
    outputFile String

    getAcls Result

    The following output properties are available:

    Acls List<Pulumi.AliCloud.Sag.Outputs.GetAclsAcl>
    A list of Sag Acls. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Sag Acl IDs.
    Names List<string>
    A list of Sag Acls names.
    NameRegex string
    OutputFile string
    Acls []GetAclsAcl
    A list of Sag Acls. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Sag Acl IDs.
    Names []string
    A list of Sag Acls names.
    NameRegex string
    OutputFile string
    acls List<GetAclsAcl>
    A list of Sag Acls. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Sag Acl IDs.
    names List<String>
    A list of Sag Acls names.
    nameRegex String
    outputFile String
    acls GetAclsAcl[]
    A list of Sag Acls. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Sag Acl IDs.
    names string[]
    A list of Sag Acls names.
    nameRegex string
    outputFile string
    acls Sequence[GetAclsAcl]
    A list of Sag Acls. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Sag Acl IDs.
    names Sequence[str]
    A list of Sag Acls names.
    name_regex str
    output_file str
    acls List<Property Map>
    A list of Sag Acls. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Sag Acl IDs.
    names List<String>
    A list of Sag Acls names.
    nameRegex String
    outputFile String

    Supporting Types

    GetAclsAcl

    Id string
    The ID of the ACL. For example "acl-xxx".
    Name string
    The name of the Acl.
    Id string
    The ID of the ACL. For example "acl-xxx".
    Name string
    The name of the Acl.
    id String
    The ID of the ACL. For example "acl-xxx".
    name String
    The name of the Acl.
    id string
    The ID of the ACL. For example "acl-xxx".
    name string
    The name of the Acl.
    id str
    The ID of the ACL. For example "acl-xxx".
    name str
    The name of the Acl.
    id String
    The ID of the ACL. For example "acl-xxx".
    name String
    The name of the Acl.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi