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

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Dcdb
{
    public static class GetShards
    {
        /// <summary>
        /// Use this data source to query detailed information of dcdb shards
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var shards = Output.Create(Tencentcloud.Dcdb.GetShards.InvokeAsync(new Tencentcloud.Dcdb.GetShardsArgs
        ///         {
        ///             InstanceId = "your_instance_id",
        ///             ShardInstanceIds = 
        ///             {
        ///                 "shard1_id",
        ///             },
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetShardsResult> InvokeAsync(GetShardsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetShardsResult>("tencentcloud:Dcdb/getShards:getShards", args ?? new GetShardsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of dcdb shards
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var shards = Output.Create(Tencentcloud.Dcdb.GetShards.InvokeAsync(new Tencentcloud.Dcdb.GetShardsArgs
        ///         {
        ///             InstanceId = "your_instance_id",
        ///             ShardInstanceIds = 
        ///             {
        ///                 "shard1_id",
        ///             },
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetShardsResult> Invoke(GetShardsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetShardsResult>("tencentcloud:Dcdb/getShards:getShards", args ?? new GetShardsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetShardsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// instance id.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

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

        [Input("shardInstanceIds")]
        private List<string>? _shardInstanceIds;

        /// <summary>
        /// shard instance ids.
        /// </summary>
        public List<string> ShardInstanceIds
        {
            get => _shardInstanceIds ?? (_shardInstanceIds = new List<string>());
            set => _shardInstanceIds = value;
        }

        public GetShardsArgs()
        {
        }
    }

    public sealed class GetShardsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// instance id.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

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

        [Input("shardInstanceIds")]
        private InputList<string>? _shardInstanceIds;

        /// <summary>
        /// shard instance ids.
        /// </summary>
        public InputList<string> ShardInstanceIds
        {
            get => _shardInstanceIds ?? (_shardInstanceIds = new InputList<string>());
            set => _shardInstanceIds = value;
        }

        public GetShardsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetShardsResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// instance id.
        /// </summary>
        public readonly string InstanceId;
        /// <summary>
        /// shard list.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetShardsListResult> Lists;
        public readonly string? ResultOutputFile;
        public readonly ImmutableArray<string> ShardInstanceIds;

        [OutputConstructor]
        private GetShardsResult(
            string id,

            string instanceId,

            ImmutableArray<Outputs.GetShardsListResult> lists,

            string? resultOutputFile,

            ImmutableArray<string> shardInstanceIds)
        {
            Id = id;
            InstanceId = instanceId;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
            ShardInstanceIds = shardInstanceIds;
        }
    }
}
