// *** 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.Redis
{
    public static class GetInstanceShards
    {
        /// <summary>
        /// Use this data source to query detailed information of redis instance_shards
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceShards = Output.Create(Tencentcloud.Redis.GetInstanceShards.InvokeAsync(new Tencentcloud.Redis.GetInstanceShardsArgs
        ///         {
        ///             FilterSlave = false,
        ///             InstanceId = "crs-c1nl9rpv",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetInstanceShardsResult> InvokeAsync(GetInstanceShardsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetInstanceShardsResult>("tencentcloud:Redis/getInstanceShards:getInstanceShards", args ?? new GetInstanceShardsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of redis instance_shards
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceShards = Output.Create(Tencentcloud.Redis.GetInstanceShards.InvokeAsync(new Tencentcloud.Redis.GetInstanceShardsArgs
        ///         {
        ///             FilterSlave = false,
        ///             InstanceId = "crs-c1nl9rpv",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetInstanceShardsResult> Invoke(GetInstanceShardsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetInstanceShardsResult>("tencentcloud:Redis/getInstanceShards:getInstanceShards", args ?? new GetInstanceShardsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetInstanceShardsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Whether to filter out slave information.
        /// </summary>
        [Input("filterSlave")]
        public bool? FilterSlave { get; set; }

        /// <summary>
        /// The ID of instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

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

        public GetInstanceShardsArgs()
        {
        }
    }

    public sealed class GetInstanceShardsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Whether to filter out slave information.
        /// </summary>
        [Input("filterSlave")]
        public Input<bool>? FilterSlave { get; set; }

        /// <summary>
        /// The ID of instance.
        /// </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; }

        public GetInstanceShardsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetInstanceShardsResult
    {
        public readonly bool? FilterSlave;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        /// <summary>
        /// Instance shard list information.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetInstanceShardsInstanceShardResult> RedisInstanceShards;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetInstanceShardsResult(
            bool? filterSlave,

            string id,

            string instanceId,

            ImmutableArray<Outputs.GetInstanceShardsInstanceShardResult> instanceShards,

            string? resultOutputFile)
        {
            FilterSlave = filterSlave;
            Id = id;
            InstanceId = instanceId;
            RedisInstanceShards = instanceShards;
            ResultOutputFile = resultOutputFile;
        }
    }
}
