<filename>sdk/dotnet/Cddc/GetDedicatedHostGroups.cs// *** 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.Cddc
{
    public static class GetDedicatedHostGroups
    {
        /// <summary>
        /// This data source provides the Cddc Dedicated Host Groups of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.132.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cddc.GetDedicatedHostGroups.Invoke(new()
        ///     {
        ///         Engine = "MongoDB",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["cddcDedicatedHostGroupId"] = @default.Apply(getDedicatedHostGroupsResult =&gt; getDedicatedHostGroupsResult).Apply(@default =&gt; @default.Apply(getDedicatedHostGroupsResult =&gt; getDedicatedHostGroupsResult.Id)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDedicatedHostGroupsResult> InvokeAsync(GetDedicatedHostGroupsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDedicatedHostGroupsResult>("alicloud:cddc/getDedicatedHostGroups:getDedicatedHostGroups", args ?? new GetDedicatedHostGroupsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Cddc Dedicated Host Groups of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.132.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cddc.GetDedicatedHostGroups.Invoke(new()
        ///     {
        ///         Engine = "MongoDB",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["cddcDedicatedHostGroupId"] = @default.Apply(getDedicatedHostGroupsResult =&gt; getDedicatedHostGroupsResult).Apply(@default =&gt; @default.Apply(getDedicatedHostGroupsResult =&gt; getDedicatedHostGroupsResult.Id)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDedicatedHostGroupsResult> Invoke(GetDedicatedHostGroupsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDedicatedHostGroupsResult>("alicloud:cddc/getDedicatedHostGroups:getDedicatedHostGroups", args ?? new GetDedicatedHostGroupsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDedicatedHostGroupsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Database Engine Type.The database engine of the dedicated cluster. Valid values:`Redis`, `SQLServer`, `MySQL`, `PostgreSQL`, `MongoDB`
        /// </summary>
        [Input("engine")]
        public string? Engine { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Dedicated Host Group IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

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

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

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

    public sealed class GetDedicatedHostGroupsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Database Engine Type.The database engine of the dedicated cluster. Valid values:`Redis`, `SQLServer`, `MySQL`, `PostgreSQL`, `MongoDB`
        /// </summary>
        [Input("engine")]
        public Input<string>? Engine { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Dedicated Host Group IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

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

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

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


    [OutputType]
    public sealed class GetDedicatedHostGroupsResult
    {
        public readonly string? Engine;
        public readonly ImmutableArray<Outputs.GetDedicatedHostGroupsGroupResult> Groups;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;

        [OutputConstructor]
        private GetDedicatedHostGroupsResult(
            string? engine,

            ImmutableArray<Outputs.GetDedicatedHostGroupsGroupResult> groups,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile)
        {
            Engine = engine;
            Groups = groups;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
        }
    }
}
