// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Cam
{
    public static class GetGroups
    {
        /// <summary>
        /// Use this data source to query detailed information of CAM groups
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Cam.GetGroups.InvokeAsync(new Tencentcloud.Cam.GetGroupsArgs
        ///         {
        ///             GroupId = tencentcloud_cam_group.Foo.Id,
        ///         }));
        ///         var bar = Output.Create(Tencentcloud.Cam.GetGroups.InvokeAsync(new Tencentcloud.Cam.GetGroupsArgs
        ///         {
        ///             Name = "cam-group-test",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetGroupsResult>("tencentcloud:Cam/getGroups:getGroups", args ?? new GetGroupsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of CAM groups
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Cam.GetGroups.InvokeAsync(new Tencentcloud.Cam.GetGroupsArgs
        ///         {
        ///             GroupId = tencentcloud_cam_group.Foo.Id,
        ///         }));
        ///         var bar = Output.Create(Tencentcloud.Cam.GetGroups.InvokeAsync(new Tencentcloud.Cam.GetGroupsArgs
        ///         {
        ///             Name = "cam-group-test",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetGroupsResult> Invoke(GetGroupsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetGroupsResult>("tencentcloud:Cam/getGroups:getGroups", args ?? new GetGroupsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetGroupsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of CAM group to be queried.
        /// </summary>
        [Input("groupId")]
        public string? GroupId { get; set; }

        /// <summary>
        /// Name of the CAM group to be queried.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// Description of the cam group to be queried.
        /// </summary>
        [Input("remark")]
        public string? Remark { get; set; }

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        public GetGroupsArgs()
        {
        }
    }

    public sealed class GetGroupsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// ID of CAM group to be queried.
        /// </summary>
        [Input("groupId")]
        public Input<string>? GroupId { get; set; }

        /// <summary>
        /// Name of the CAM group to be queried.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Description of the cam group to be queried.
        /// </summary>
        [Input("remark")]
        public Input<string>? Remark { get; set; }

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        public GetGroupsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetGroupsResult
    {
        /// <summary>
        /// ID of the CAM group.
        /// </summary>
        public readonly string? GroupId;
        /// <summary>
        /// A list of CAM groups. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetGroupsGroupListResult> GroupLists;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Name of CAM group.
        /// </summary>
        public readonly string? Name;
        /// <summary>
        /// Description of CAM group.
        /// </summary>
        public readonly string? Remark;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetGroupsResult(
            string? groupId,

            ImmutableArray<Outputs.GetGroupsGroupListResult> groupLists,

            string id,

            string? name,

            string? remark,

            string? resultOutputFile)
        {
            GroupId = groupId;
            GroupLists = groupLists;
            Id = id;
            Name = name;
            Remark = remark;
            ResultOutputFile = resultOutputFile;
        }
    }
}
