<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<filename>sdk/dotnet/Emr/GetClusters.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.Emr
{
    public static class GetClusters
    {
        /// <summary>
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "tf-testAccClusters";
        ///     var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
        ///     {
        ///         Status = "OK",
        ///     });
        /// 
        ///     var defaultMainVersions = AliCloud.Emr.GetMainVersions.Invoke();
        /// 
        ///     var defaultInstanceTypes = AliCloud.Emr.GetInstanceTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "InstanceType",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         SupportLocalStorage = false,
        ///         InstanceChargeType = "PostPaid",
        ///         SupportNodeTypes = new[]
        ///         {
        ///             "MASTER",
        ///             "CORE",
        ///             "TASK",
        ///         },
        ///     });
        /// 
        ///     var dataDisk = AliCloud.Emr.GetDiskTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "DataDisk",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         InstanceChargeType = "PostPaid",
        ///         InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var systemDisk = AliCloud.Emr.GetDiskTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "SystemDisk",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         InstanceChargeType = "PostPaid",
        ///         InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        ///     {
        ///         NameRegex = "default-NODELETING",
        ///     });
        /// 
        ///     var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        ///     {
        ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
        ///     });
        /// 
        ///     var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        ///     {
        ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var defaultRole = new AliCloud.Ram.Role("defaultRole", new()
        ///     {
        ///         Document = @"    {
        ///         ""Statement"": [
        ///         {
        ///             ""Action"": ""sts:AssumeRole"",
        ///             ""Effect"": ""Allow"",
        ///             ""Principal"": {
        ///             ""Service"": [
        ///                 ""emr.aliyuncs.com"",
        ///                 ""ecs.aliyuncs.com""
        ///             ]
        ///             }
        ///         }
        ///         ],
        ///         ""Version"": ""1""
        ///     }
        /// ",
        ///         Description = "this is a role test.",
        ///         Force = true,
        ///     });
        /// 
        ///     var defaultCluster = new AliCloud.Emr.Cluster("defaultCluster", new()
        ///     {
        ///         EmrVer = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.EmrVersion),
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         HostGroups = new[]
        ///         {
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "master_group",
        ///                 HostGroupType = "MASTER",
        ///                 NodeCount = "2",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "1",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "core_group",
        ///                 HostGroupType = "CORE",
        ///                 NodeCount = "3",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "4",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "task_group",
        ///                 HostGroupType = "TASK",
        ///                 NodeCount = "2",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "4",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///         },
        ///         HighAvailabilityEnable = true,
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///         SecurityGroupId = defaultSecurityGroup.Id,
        ///         IsOpenPublicIp = true,
        ///         ChargeType = "PostPaid",
        ///         VswitchId = defaultSwitches.Apply(getSwitchesResult =&gt; getSwitchesResult.Ids[0]),
        ///         UserDefinedEmrEcsRole = defaultRole.Name,
        ///         SshEnable = true,
        ///         MasterPwd = "ABCtest1234!",
        ///         Tags = 
        ///         {
        ///             { "Created", "TF" },
        ///             { "For", "acceptance test" },
        ///         },
        ///     });
        /// 
        ///     var ids = AliCloud.Emr.GetClusters.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Emr.GetClusters.Invoke(new()
        ///     {
        ///         NameRegex = defaultCluster.Name,
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["emrClusterId1"] = ids.Apply(getClustersResult =&gt; getClustersResult.Clusters[0]?.Id),
        ///         ["emrClusterId2"] = nameRegex.Apply(getClustersResult =&gt; getClustersResult.Clusters[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetClustersResult> InvokeAsync(GetClustersArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetClustersResult>("alicloud:emr/getClusters:getClusters", args ?? new GetClustersArgs(), options.WithDefaults());

        /// <summary>
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var config = new Config();
        ///     var name = config.Get("name") ?? "tf-testAccClusters";
        ///     var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
        ///     {
        ///         Status = "OK",
        ///     });
        /// 
        ///     var defaultMainVersions = AliCloud.Emr.GetMainVersions.Invoke();
        /// 
        ///     var defaultInstanceTypes = AliCloud.Emr.GetInstanceTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "InstanceType",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         SupportLocalStorage = false,
        ///         InstanceChargeType = "PostPaid",
        ///         SupportNodeTypes = new[]
        ///         {
        ///             "MASTER",
        ///             "CORE",
        ///             "TASK",
        ///         },
        ///     });
        /// 
        ///     var dataDisk = AliCloud.Emr.GetDiskTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "DataDisk",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         InstanceChargeType = "PostPaid",
        ///         InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var systemDisk = AliCloud.Emr.GetDiskTypes.Invoke(new()
        ///     {
        ///         DestinationResource = "SystemDisk",
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         InstanceChargeType = "PostPaid",
        ///         InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        ///     {
        ///         NameRegex = "default-NODELETING",
        ///     });
        /// 
        ///     var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        ///     {
        ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
        ///     });
        /// 
        ///     var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        ///     {
        ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///     });
        /// 
        ///     var defaultRole = new AliCloud.Ram.Role("defaultRole", new()
        ///     {
        ///         Document = @"    {
        ///         ""Statement"": [
        ///         {
        ///             ""Action"": ""sts:AssumeRole"",
        ///             ""Effect"": ""Allow"",
        ///             ""Principal"": {
        ///             ""Service"": [
        ///                 ""emr.aliyuncs.com"",
        ///                 ""ecs.aliyuncs.com""
        ///             ]
        ///             }
        ///         }
        ///         ],
        ///         ""Version"": ""1""
        ///     }
        /// ",
        ///         Description = "this is a role test.",
        ///         Force = true,
        ///     });
        /// 
        ///     var defaultCluster = new AliCloud.Emr.Cluster("defaultCluster", new()
        ///     {
        ///         EmrVer = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.EmrVersion),
        ///         ClusterType = defaultMainVersions.Apply(getMainVersionsResult =&gt; getMainVersionsResult.MainVersions[0]?.ClusterTypes[0]),
        ///         HostGroups = new[]
        ///         {
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "master_group",
        ///                 HostGroupType = "MASTER",
        ///                 NodeCount = "2",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "1",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "core_group",
        ///                 HostGroupType = "CORE",
        ///                 NodeCount = "3",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "4",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///             new AliCloud.Emr.Inputs.ClusterHostGroupArgs
        ///             {
        ///                 HostGroupName = "task_group",
        ///                 HostGroupType = "TASK",
        ///                 NodeCount = "2",
        ///                 InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.Id),
        ///                 DiskType = dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 DiskCapacity = Output.Tuple(dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var dataDisk = values.Item1;
        ///                     var dataDisk1 = values.Item2;
        ///                     return dataDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? dataDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///                 DiskCount = "4",
        ///                 SysDiskType = systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Value),
        ///                 SysDiskCapacity = Output.Tuple(systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult), systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult)).Apply(values =&gt;
        ///                 {
        ///                     var systemDisk = values.Item1;
        ///                     var systemDisk1 = values.Item2;
        ///                     return systemDisk.Apply(getDiskTypesResult =&gt; getDiskTypesResult.Types[0]?.Min) &gt; 160 ? systemDisk1.Types[0]?.Min : 160;
        ///                 }),
        ///             },
        ///         },
        ///         HighAvailabilityEnable = true,
        ///         ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult =&gt; getInstanceTypesResult.Types[0]?.ZoneId),
        ///         SecurityGroupId = defaultSecurityGroup.Id,
        ///         IsOpenPublicIp = true,
        ///         ChargeType = "PostPaid",
        ///         VswitchId = defaultSwitches.Apply(getSwitchesResult =&gt; getSwitchesResult.Ids[0]),
        ///         UserDefinedEmrEcsRole = defaultRole.Name,
        ///         SshEnable = true,
        ///         MasterPwd = "ABCtest1234!",
        ///         Tags = 
        ///         {
        ///             { "Created", "TF" },
        ///             { "For", "acceptance test" },
        ///         },
        ///     });
        /// 
        ///     var ids = AliCloud.Emr.GetClusters.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Emr.GetClusters.Invoke(new()
        ///     {
        ///         NameRegex = defaultCluster.Name,
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["emrClusterId1"] = ids.Apply(getClustersResult =&gt; getClustersResult.Clusters[0]?.Id),
        ///         ["emrClusterId2"] = nameRegex.Apply(getClustersResult =&gt; getClustersResult.Clusters[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetClustersResult>("alicloud:emr/getClusters:getClusters", args ?? new GetClustersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetClustersArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the associated cluster.
        /// </summary>
        [Input("clusterName")]
        public string? ClusterName { get; set; }

        [Input("clusterTypeLists")]
        private List<string>? _clusterTypeLists;

        /// <summary>
        /// The cluster type list.
        /// </summary>
        public List<string> ClusterTypeLists
        {
            get => _clusterTypeLists ?? (_clusterTypeLists = new List<string>());
            set => _clusterTypeLists = value;
        }

        /// <summary>
        /// How to create a cluster.
        /// </summary>
        [Input("createType")]
        public string? CreateType { get; set; }

        /// <summary>
        /// The default status.
        /// </summary>
        [Input("defaultStatus")]
        public bool? DefaultStatus { get; set; }

        /// <summary>
        /// The hosting type of the cluster.
        /// </summary>
        [Input("depositType")]
        public string? DepositType { get; set; }

        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public bool? EnableDetails { get; set; }

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

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

        /// <summary>
        /// The is desc.
        /// </summary>
        [Input("isDesc")]
        public bool? IsDesc { get; set; }

        /// <summary>
        /// The host type of the cluster. The default is ECS.
        /// </summary>
        [Input("machineType")]
        public string? MachineType { get; set; }

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

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

        [Input("pageNumber")]
        public int? PageNumber { get; set; }

        [Input("pageSize")]
        public int? PageSize { get; set; }

        /// <summary>
        /// The Resource Group ID.
        /// </summary>
        [Input("resourceGroupId")]
        public string? ResourceGroupId { get; set; }

        [Input("statusLists")]
        private List<string>? _statusLists;

        /// <summary>
        /// The status list. Valid values: `ABNORMAL`, `CREATE_FAILED`, `CREATING`, `IDLE`, `RELEASED`, `RELEASE_FAILED`, `RELEASING`, `RUNNING`, `WAIT_FOR_PAY`.
        /// </summary>
        public List<string> StatusLists
        {
            get => _statusLists ?? (_statusLists = new List<string>());
            set => _statusLists = value;
        }

        /// <summary>
        /// The VPC ID.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

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

    public sealed class GetClustersInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of the associated cluster.
        /// </summary>
        [Input("clusterName")]
        public Input<string>? ClusterName { get; set; }

        [Input("clusterTypeLists")]
        private InputList<string>? _clusterTypeLists;

        /// <summary>
        /// The cluster type list.
        /// </summary>
        public InputList<string> ClusterTypeLists
        {
            get => _clusterTypeLists ?? (_clusterTypeLists = new InputList<string>());
            set => _clusterTypeLists = value;
        }

        /// <summary>
        /// How to create a cluster.
        /// </summary>
        [Input("createType")]
        public Input<string>? CreateType { get; set; }

        /// <summary>
        /// The default status.
        /// </summary>
        [Input("defaultStatus")]
        public Input<bool>? DefaultStatus { get; set; }

        /// <summary>
        /// The hosting type of the cluster.
        /// </summary>
        [Input("depositType")]
        public Input<string>? DepositType { get; set; }

        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public Input<bool>? EnableDetails { get; set; }

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

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

        /// <summary>
        /// The is desc.
        /// </summary>
        [Input("isDesc")]
        public Input<bool>? IsDesc { get; set; }

        /// <summary>
        /// The host type of the cluster. The default is ECS.
        /// </summary>
        [Input("machineType")]
        public Input<string>? MachineType { get; set; }

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

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

        [Input("pageNumber")]
        public Input<int>? PageNumber { get; set; }

        [Input("pageSize")]
        public Input<int>? PageSize { get; set; }

        /// <summary>
        /// The Resource Group ID.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        [Input("statusLists")]
        private InputList<string>? _statusLists;

        /// <summary>
        /// The status list. Valid values: `ABNORMAL`, `CREATE_FAILED`, `CREATING`, `IDLE`, `RELEASED`, `RELEASE_FAILED`, `RELEASING`, `RUNNING`, `WAIT_FOR_PAY`.
        /// </summary>
        public InputList<string> StatusLists
        {
            get => _statusLists ?? (_statusLists = new InputList<string>());
            set => _statusLists = value;
        }

        /// <summary>
        /// The VPC ID.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

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


    [OutputType]
    public sealed class GetClustersResult
    {
        public readonly string? ClusterName;
        public readonly ImmutableArray<string> ClusterTypeLists;
        public readonly ImmutableArray<Outputs.GetClustersClusterResult> Clusters;
        public readonly string? CreateType;
        public readonly bool? DefaultStatus;
        public readonly string? DepositType;
        public readonly bool? EnableDetails;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly bool? IsDesc;
        public readonly string? MachineType;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly int? PageNumber;
        public readonly int? PageSize;
        public readonly string? ResourceGroupId;
        public readonly ImmutableArray<string> StatusLists;
        public readonly int TotalCount;
        public readonly string? VpcId;

        [OutputConstructor]
        private GetClustersResult(
            string? clusterName,

            ImmutableArray<string> clusterTypeLists,

            ImmutableArray<Outputs.GetClustersClusterResult> clusters,

            string? createType,

            bool? defaultStatus,

            string? depositType,

            bool? enableDetails,

            string id,

            ImmutableArray<string> ids,

            bool? isDesc,

            string? machineType,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            int? pageNumber,

            int? pageSize,

            string? resourceGroupId,

            ImmutableArray<string> statusLists,

            int totalCount,

            string? vpcId)
        {
            ClusterName = clusterName;
            ClusterTypeLists = clusterTypeLists;
            Clusters = clusters;
            CreateType = createType;
            DefaultStatus = defaultStatus;
            DepositType = depositType;
            EnableDetails = enableDetails;
            Id = id;
            Ids = ids;
            IsDesc = isDesc;
            MachineType = machineType;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            PageNumber = pageNumber;
            PageSize = pageSize;
            ResourceGroupId = resourceGroupId;
            StatusLists = statusLists;
            TotalCount = totalCount;
            VpcId = vpcId;
        }
    }
}
