<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<gh_stars>0// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Nas
{
    public static class GetAccessGroups
    {
        /// <summary>
        /// This data source provides user-available access groups. Use when you can create mount points
        /// 
        /// &gt; NOTE: Available in 1.35.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Nas.GetAccessGroups.Invoke(new()
        ///     {
        ///         NameRegex = "^foo",
        ///         AccessGroupType = "Classic",
        ///         Description = "tf-testAccAccessGroupsdatasource",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["alicloudNasAccessGroupsId"] = example.Apply(getAccessGroupsResult =&gt; getAccessGroupsResult.Groups[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAccessGroupsResult> InvokeAsync(GetAccessGroupsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAccessGroupsResult>("alicloud:nas/getAccessGroups:getAccessGroups", args ?? new GetAccessGroupsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides user-available access groups. Use when you can create mount points
        /// 
        /// &gt; NOTE: Available in 1.35.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = AliCloud.Nas.GetAccessGroups.Invoke(new()
        ///     {
        ///         NameRegex = "^foo",
        ///         AccessGroupType = "Classic",
        ///         Description = "tf-testAccAccessGroupsdatasource",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["alicloudNasAccessGroupsId"] = example.Apply(getAccessGroupsResult =&gt; getAccessGroupsResult.Groups[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAccessGroupsResult> Invoke(GetAccessGroupsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAccessGroupsResult>("alicloud:nas/getAccessGroups:getAccessGroups", args ?? new GetAccessGroupsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAccessGroupsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of access group.
        /// </summary>
        [Input("accessGroupName")]
        public string? AccessGroupName { get; set; }

        /// <summary>
        /// Filter results by a specific AccessGroupType.
        /// </summary>
        [Input("accessGroupType")]
        public string? AccessGroupType { get; set; }

        /// <summary>
        /// Filter results by a specific Description.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// The type of file system. Valid values: `standard` and `extreme`. Default to `standard`.
        /// </summary>
        [Input("fileSystemType")]
        public string? FileSystemType { get; set; }

        /// <summary>
        /// A regex string to filter AccessGroups by name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// Field `type` has been deprecated from version 1.95.0. Use `access_group_type` instead.
        /// </summary>
        [Input("type")]
        public string? Type { get; set; }

        /// <summary>
        /// Specifies whether the time to return is in UTC. Valid values: true and false.
        /// </summary>
        [Input("useutcDateTime")]
        public bool? UseutcDateTime { get; set; }

        public GetAccessGroupsArgs()
        {
        }
        public static new GetAccessGroupsArgs Empty => new GetAccessGroupsArgs();
    }

    public sealed class GetAccessGroupsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of access group.
        /// </summary>
        [Input("accessGroupName")]
        public Input<string>? AccessGroupName { get; set; }

        /// <summary>
        /// Filter results by a specific AccessGroupType.
        /// </summary>
        [Input("accessGroupType")]
        public Input<string>? AccessGroupType { get; set; }

        /// <summary>
        /// Filter results by a specific Description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The type of file system. Valid values: `standard` and `extreme`. Default to `standard`.
        /// </summary>
        [Input("fileSystemType")]
        public Input<string>? FileSystemType { get; set; }

        /// <summary>
        /// A regex string to filter AccessGroups by name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        /// <summary>
        /// Field `type` has been deprecated from version 1.95.0. Use `access_group_type` instead.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        /// <summary>
        /// Specifies whether the time to return is in UTC. Valid values: true and false.
        /// </summary>
        [Input("useutcDateTime")]
        public Input<bool>? UseutcDateTime { get; set; }

        public GetAccessGroupsInvokeArgs()
        {
        }
        public static new GetAccessGroupsInvokeArgs Empty => new GetAccessGroupsInvokeArgs();
    }


    [OutputType]
    public sealed class GetAccessGroupsResult
    {
        /// <summary>
        /// (Available in 1.95.0+) The name of the AccessGroup.
        /// </summary>
        public readonly string? AccessGroupName;
        /// <summary>
        /// (Available in 1.95.0+) The type of the AccessGroup.
        /// </summary>
        public readonly string? AccessGroupType;
        /// <summary>
        /// Description of the AccessGroup.
        /// </summary>
        public readonly string? Description;
        public readonly string? FileSystemType;
        /// <summary>
        /// A list of AccessGroups. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAccessGroupsGroupResult> Groups;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of AccessGroup IDs, the value is set to `names`. After version 1.95.0 the item value as `&lt;access_group_id&gt;:&lt;file_system_type&gt;`.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of AccessGroup names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// (Deprecated in v1.95.0+) AccessGroupType of the AccessGroup. The Field replace by `access_group_type` after version 1.95.0.
        /// </summary>
        public readonly string? Type;
        public readonly bool? UseutcDateTime;

        [OutputConstructor]
        private GetAccessGroupsResult(
            string? accessGroupName,

            string? accessGroupType,

            string? description,

            string? fileSystemType,

            ImmutableArray<Outputs.GetAccessGroupsGroupResult> groups,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? type,

            bool? useutcDateTime)
        {
            AccessGroupName = accessGroupName;
            AccessGroupType = accessGroupType;
            Description = description;
            FileSystemType = fileSystemType;
            Groups = groups;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Type = type;
            UseutcDateTime = useutcDateTime;
        }
    }
}
