<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<filename>sdk/dotnet/Cassandra/GetDataCenters.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.Cassandra
{
    public static class GetDataCenters
    {
        /// <summary>
        /// The `alicloud.cassandra.getDataCenters` data source provides a collection of Cassandra Data Centers available in Alicloud account.
        /// Filters support regular expression for the cluster name or ids.
        /// 
        /// &gt; **NOTE:**  Available in 1.88.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var cassandra = AliCloud.Cassandra.GetDataCenters.Invoke(new()
        ///     {
        ///         ClusterId = "cds-xxxxx",
        ///         NameRegex = "tf_testAccCassandra_dc",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDataCentersResult> InvokeAsync(GetDataCentersArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDataCentersResult>("alicloud:cassandra/getDataCenters:getDataCenters", args ?? new GetDataCentersArgs(), options.WithDefaults());

        /// <summary>
        /// The `alicloud.cassandra.getDataCenters` data source provides a collection of Cassandra Data Centers available in Alicloud account.
        /// Filters support regular expression for the cluster name or ids.
        /// 
        /// &gt; **NOTE:**  Available in 1.88.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var cassandra = AliCloud.Cassandra.GetDataCenters.Invoke(new()
        ///     {
        ///         ClusterId = "cds-xxxxx",
        ///         NameRegex = "tf_testAccCassandra_dc",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDataCentersResult> Invoke(GetDataCentersInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDataCentersResult>("alicloud:cassandra/getDataCenters:getDataCenters", args ?? new GetDataCentersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDataCentersArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The cluster id of dataCenters belongs to.
        /// </summary>
        [Input("clusterId", required: true)]
        public string ClusterId { get; set; } = null!;

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

        /// <summary>
        /// The list of Cassandra data center ids.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

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

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

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

    public sealed class GetDataCentersInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The cluster id of dataCenters belongs to.
        /// </summary>
        [Input("clusterId", required: true)]
        public Input<string> ClusterId { get; set; } = null!;

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

        /// <summary>
        /// The list of Cassandra data center ids.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

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

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

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


    [OutputType]
    public sealed class GetDataCentersResult
    {
        /// <summary>
        /// A list of Cassandra data centers. Its every element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDataCentersCenterResult> Centers;
        /// <summary>
        /// The ID of the Cassandra cluster.
        /// </summary>
        public readonly string ClusterId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// The list of Cassandra data center ids.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly string? NameRegex;
        /// <summary>
        /// The name list of Cassandra data centers.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;

        [OutputConstructor]
        private GetDataCentersResult(
            ImmutableArray<Outputs.GetDataCentersCenterResult> centers,

            string clusterId,

            string id,

            ImmutableArray<string> ids,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile)
        {
            Centers = centers;
            ClusterId = clusterId;
            Id = id;
            Ids = ids;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
        }
    }
}
