1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. nas
  5. getAccessGroups
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.nas.getAccessGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    This data source provides user-available access groups. Use when you can create mount points

    NOTE: Available in 1.35.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.nas.getAccessGroups({
        nameRegex: "^foo",
        accessGroupType: "Classic",
        description: "tf-testAccAccessGroupsdatasource",
    });
    export const alicloudNasAccessGroupsId = example.then(example => example.groups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.nas.get_access_groups(name_regex="^foo",
        access_group_type="Classic",
        description="tf-testAccAccessGroupsdatasource")
    pulumi.export("alicloudNasAccessGroupsId", example.groups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := nas.GetAccessGroups(ctx, &nas.GetAccessGroupsArgs{
    			NameRegex:       pulumi.StringRef("^foo"),
    			AccessGroupType: pulumi.StringRef("Classic"),
    			Description:     pulumi.StringRef("tf-testAccAccessGroupsdatasource"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("alicloudNasAccessGroupsId", example.Groups[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Nas.GetAccessGroups.Invoke(new()
        {
            NameRegex = "^foo",
            AccessGroupType = "Classic",
            Description = "tf-testAccAccessGroupsdatasource",
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudNasAccessGroupsId"] = example.Apply(getAccessGroupsResult => getAccessGroupsResult.Groups[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.nas.NasFunctions;
    import com.pulumi.alicloud.nas.inputs.GetAccessGroupsArgs;
    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 example = NasFunctions.getAccessGroups(GetAccessGroupsArgs.builder()
                .nameRegex("^foo")
                .accessGroupType("Classic")
                .description("tf-testAccAccessGroupsdatasource")
                .build());
    
            ctx.export("alicloudNasAccessGroupsId", example.applyValue(getAccessGroupsResult -> getAccessGroupsResult.groups()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:nas:getAccessGroups
          Arguments:
            nameRegex: ^foo
            accessGroupType: Classic
            description: tf-testAccAccessGroupsdatasource
    outputs:
      alicloudNasAccessGroupsId: ${example.groups[0].id}
    

    Using getAccessGroups

    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 getAccessGroups(args: GetAccessGroupsArgs, opts?: InvokeOptions): Promise<GetAccessGroupsResult>
    function getAccessGroupsOutput(args: GetAccessGroupsOutputArgs, opts?: InvokeOptions): Output<GetAccessGroupsResult>
    def get_access_groups(access_group_name: Optional[str] = None,
                          access_group_type: Optional[str] = None,
                          description: Optional[str] = None,
                          file_system_type: Optional[str] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          type: Optional[str] = None,
                          useutc_date_time: Optional[bool] = None,
                          opts: Optional[InvokeOptions] = None) -> GetAccessGroupsResult
    def get_access_groups_output(access_group_name: Optional[pulumi.Input[str]] = None,
                          access_group_type: Optional[pulumi.Input[str]] = None,
                          description: Optional[pulumi.Input[str]] = None,
                          file_system_type: Optional[pulumi.Input[str]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          useutc_date_time: Optional[pulumi.Input[bool]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetAccessGroupsResult]
    func GetAccessGroups(ctx *Context, args *GetAccessGroupsArgs, opts ...InvokeOption) (*GetAccessGroupsResult, error)
    func GetAccessGroupsOutput(ctx *Context, args *GetAccessGroupsOutputArgs, opts ...InvokeOption) GetAccessGroupsResultOutput

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

    public static class GetAccessGroups 
    {
        public static Task<GetAccessGroupsResult> InvokeAsync(GetAccessGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetAccessGroupsResult> Invoke(GetAccessGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccessGroupsResult> getAccessGroups(GetAccessGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:nas/getAccessGroups:getAccessGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccessGroupName string
    The name of access group.
    AccessGroupType string
    Filter results by a specific AccessGroupType.
    Description string
    Filter results by a specific Description.
    FileSystemType string
    The type of file system. Valid values: standard and extreme. Default to standard.
    NameRegex string
    A regex string to filter AccessGroups by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    UseutcDateTime bool
    Specifies whether the time to return is in UTC. Valid values: true and false.
    AccessGroupName string
    The name of access group.
    AccessGroupType string
    Filter results by a specific AccessGroupType.
    Description string
    Filter results by a specific Description.
    FileSystemType string
    The type of file system. Valid values: standard and extreme. Default to standard.
    NameRegex string
    A regex string to filter AccessGroups by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    UseutcDateTime bool
    Specifies whether the time to return is in UTC. Valid values: true and false.
    accessGroupName String
    The name of access group.
    accessGroupType String
    Filter results by a specific AccessGroupType.
    description String
    Filter results by a specific Description.
    fileSystemType String
    The type of file system. Valid values: standard and extreme. Default to standard.
    nameRegex String
    A regex string to filter AccessGroups by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    type String
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime Boolean
    Specifies whether the time to return is in UTC. Valid values: true and false.
    accessGroupName string
    The name of access group.
    accessGroupType string
    Filter results by a specific AccessGroupType.
    description string
    Filter results by a specific Description.
    fileSystemType string
    The type of file system. Valid values: standard and extreme. Default to standard.
    nameRegex string
    A regex string to filter AccessGroups by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime boolean
    Specifies whether the time to return is in UTC. Valid values: true and false.
    access_group_name str
    The name of access group.
    access_group_type str
    Filter results by a specific AccessGroupType.
    description str
    Filter results by a specific Description.
    file_system_type str
    The type of file system. Valid values: standard and extreme. Default to standard.
    name_regex str
    A regex string to filter AccessGroups by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    type str
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutc_date_time bool
    Specifies whether the time to return is in UTC. Valid values: true and false.
    accessGroupName String
    The name of access group.
    accessGroupType String
    Filter results by a specific AccessGroupType.
    description String
    Filter results by a specific Description.
    fileSystemType String
    The type of file system. Valid values: standard and extreme. Default to standard.
    nameRegex String
    A regex string to filter AccessGroups by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    type String
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime Boolean
    Specifies whether the time to return is in UTC. Valid values: true and false.

    getAccessGroups Result

    The following output properties are available:

    Groups List<Pulumi.AliCloud.Nas.Outputs.GetAccessGroupsGroup>
    A list of AccessGroups. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    Names List<string>
    A list of AccessGroup names.
    AccessGroupName string
    (Available in 1.95.0+) The name of the AccessGroup.
    AccessGroupType string
    (Available in 1.95.0+) The type of the AccessGroup.
    Description string
    Description of the AccessGroup.
    FileSystemType string
    NameRegex string
    OutputFile string
    Type string
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    UseutcDateTime bool
    Groups []GetAccessGroupsGroup
    A list of AccessGroups. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    Names []string
    A list of AccessGroup names.
    AccessGroupName string
    (Available in 1.95.0+) The name of the AccessGroup.
    AccessGroupType string
    (Available in 1.95.0+) The type of the AccessGroup.
    Description string
    Description of the AccessGroup.
    FileSystemType string
    NameRegex string
    OutputFile string
    Type string
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    UseutcDateTime bool
    groups List<GetAccessGroupsGroup>
    A list of AccessGroups. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    names List<String>
    A list of AccessGroup names.
    accessGroupName String
    (Available in 1.95.0+) The name of the AccessGroup.
    accessGroupType String
    (Available in 1.95.0+) The type of the AccessGroup.
    description String
    Description of the AccessGroup.
    fileSystemType String
    nameRegex String
    outputFile String
    type String
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime Boolean
    groups GetAccessGroupsGroup[]
    A list of AccessGroups. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    names string[]
    A list of AccessGroup names.
    accessGroupName string
    (Available in 1.95.0+) The name of the AccessGroup.
    accessGroupType string
    (Available in 1.95.0+) The type of the AccessGroup.
    description string
    Description of the AccessGroup.
    fileSystemType string
    nameRegex string
    outputFile string
    type string
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime boolean
    groups Sequence[GetAccessGroupsGroup]
    A list of AccessGroups. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    names Sequence[str]
    A list of AccessGroup names.
    access_group_name str
    (Available in 1.95.0+) The name of the AccessGroup.
    access_group_type str
    (Available in 1.95.0+) The type of the AccessGroup.
    description str
    Description of the AccessGroup.
    file_system_type str
    name_regex str
    output_file str
    type str
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutc_date_time bool
    groups List<Property Map>
    A list of AccessGroups. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of AccessGroup IDs, the value is set to names. After version 1.95.0 the item value as <access_group_id>:<file_system_type>.
    names List<String>
    A list of AccessGroup names.
    accessGroupName String
    (Available in 1.95.0+) The name of the AccessGroup.
    accessGroupType String
    (Available in 1.95.0+) The type of the AccessGroup.
    description String
    Description of the AccessGroup.
    fileSystemType String
    nameRegex String
    outputFile String
    type String
    (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by access_group_type after version 1.95.0.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'access_group_type' replaces it.

    useutcDateTime Boolean

    Supporting Types

    GetAccessGroupsGroup

    AccessGroupName string
    The name of access group.
    AccessGroupType string
    Filter results by a specific AccessGroupType.
    Description string
    Filter results by a specific Description.
    Id string
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    MountTargetCount int
    MountTargetCount block of the AccessGroup
    RuleCount int
    RuleCount of the AccessGroup.
    Type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.
    AccessGroupName string
    The name of access group.
    AccessGroupType string
    Filter results by a specific AccessGroupType.
    Description string
    Filter results by a specific Description.
    Id string
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    MountTargetCount int
    MountTargetCount block of the AccessGroup
    RuleCount int
    RuleCount of the AccessGroup.
    Type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.
    accessGroupName String
    The name of access group.
    accessGroupType String
    Filter results by a specific AccessGroupType.
    description String
    Filter results by a specific Description.
    id String
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    mountTargetCount Integer
    MountTargetCount block of the AccessGroup
    ruleCount Integer
    RuleCount of the AccessGroup.
    type String
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.
    accessGroupName string
    The name of access group.
    accessGroupType string
    Filter results by a specific AccessGroupType.
    description string
    Filter results by a specific Description.
    id string
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    mountTargetCount number
    MountTargetCount block of the AccessGroup
    ruleCount number
    RuleCount of the AccessGroup.
    type string
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.
    access_group_name str
    The name of access group.
    access_group_type str
    Filter results by a specific AccessGroupType.
    description str
    Filter results by a specific Description.
    id str
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    mount_target_count int
    MountTargetCount block of the AccessGroup
    rule_count int
    RuleCount of the AccessGroup.
    type str
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.
    accessGroupName String
    The name of access group.
    accessGroupType String
    Filter results by a specific AccessGroupType.
    description String
    Filter results by a specific Description.
    id String
    This ID of this AccessGroup. It is formatted to <access_group_id>:<file_system_type>. Before version 1.95.0, the value is access_group_name.
    mountTargetCount Number
    MountTargetCount block of the AccessGroup
    ruleCount Number
    RuleCount of the AccessGroup.
    type String
    Field type has been deprecated from version 1.95.0. Use access_group_type instead.

    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.57.0 published on Saturday, Jun 15, 2024 by Pulumi