1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getRedisInstanceShards
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getRedisInstanceShards

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of redis instance_shards

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const instanceShards = tencentcloud.getRedisInstanceShards({
        filterSlave: false,
        instanceId: "crs-c1nl9rpv",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    instance_shards = tencentcloud.get_redis_instance_shards(filter_slave=False,
        instance_id="crs-c1nl9rpv")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetRedisInstanceShards(ctx, &tencentcloud.GetRedisInstanceShardsArgs{
    			FilterSlave: pulumi.BoolRef(false),
    			InstanceId:  "crs-c1nl9rpv",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceShards = Tencentcloud.GetRedisInstanceShards.Invoke(new()
        {
            FilterSlave = false,
            InstanceId = "crs-c1nl9rpv",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetRedisInstanceShardsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var instanceShards = TencentcloudFunctions.getRedisInstanceShards(GetRedisInstanceShardsArgs.builder()
                .filterSlave(false)
                .instanceId("crs-c1nl9rpv")
                .build());
    
        }
    }
    
    variables:
      instanceShards:
        fn::invoke:
          function: tencentcloud:getRedisInstanceShards
          arguments:
            filterSlave: false
            instanceId: crs-c1nl9rpv
    

    Using getRedisInstanceShards

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRedisInstanceShards(args: GetRedisInstanceShardsArgs, opts?: InvokeOptions): Promise<GetRedisInstanceShardsResult>
    function getRedisInstanceShardsOutput(args: GetRedisInstanceShardsOutputArgs, opts?: InvokeOptions): Output<GetRedisInstanceShardsResult>
    def get_redis_instance_shards(filter_slave: Optional[bool] = None,
                                  id: Optional[str] = None,
                                  instance_id: Optional[str] = None,
                                  result_output_file: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetRedisInstanceShardsResult
    def get_redis_instance_shards_output(filter_slave: Optional[pulumi.Input[bool]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  instance_id: Optional[pulumi.Input[str]] = None,
                                  result_output_file: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetRedisInstanceShardsResult]
    func GetRedisInstanceShards(ctx *Context, args *GetRedisInstanceShardsArgs, opts ...InvokeOption) (*GetRedisInstanceShardsResult, error)
    func GetRedisInstanceShardsOutput(ctx *Context, args *GetRedisInstanceShardsOutputArgs, opts ...InvokeOption) GetRedisInstanceShardsResultOutput

    > Note: This function is named GetRedisInstanceShards in the Go SDK.

    public static class GetRedisInstanceShards 
    {
        public static Task<GetRedisInstanceShardsResult> InvokeAsync(GetRedisInstanceShardsArgs args, InvokeOptions? opts = null)
        public static Output<GetRedisInstanceShardsResult> Invoke(GetRedisInstanceShardsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRedisInstanceShardsResult> getRedisInstanceShards(GetRedisInstanceShardsArgs args, InvokeOptions options)
    public static Output<GetRedisInstanceShardsResult> getRedisInstanceShards(GetRedisInstanceShardsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getRedisInstanceShards:getRedisInstanceShards
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The ID of instance.
    FilterSlave bool
    Whether to filter out slave information.
    Id string
    ResultOutputFile string
    Used to save results.
    InstanceId string
    The ID of instance.
    FilterSlave bool
    Whether to filter out slave information.
    Id string
    ResultOutputFile string
    Used to save results.
    instanceId String
    The ID of instance.
    filterSlave Boolean
    Whether to filter out slave information.
    id String
    resultOutputFile String
    Used to save results.
    instanceId string
    The ID of instance.
    filterSlave boolean
    Whether to filter out slave information.
    id string
    resultOutputFile string
    Used to save results.
    instance_id str
    The ID of instance.
    filter_slave bool
    Whether to filter out slave information.
    id str
    result_output_file str
    Used to save results.
    instanceId String
    The ID of instance.
    filterSlave Boolean
    Whether to filter out slave information.
    id String
    resultOutputFile String
    Used to save results.

    getRedisInstanceShards Result

    The following output properties are available:

    id string
    instanceId string
    instanceShards GetRedisInstanceShardsInstanceShard[]
    Instance shard list information.
    filterSlave boolean
    resultOutputFile string
    id String
    instanceId String
    instanceShards List<Property Map>
    Instance shard list information.
    filterSlave Boolean
    resultOutputFile String

    Supporting Types

    GetRedisInstanceShardsInstanceShard

    Connected double
    Service status: 0-down;1-on.
    Keys double
    Number of keys.
    Role double
    role.
    Runid string
    The node ID of the instance runtime.
    ShardId string
    Shard node ID.
    ShardName string
    Shard node name.
    Slots string
    Slot information.
    Storage double
    Used capacity.
    StorageSlope double
    Capacity tilt.
    Connected float64
    Service status: 0-down;1-on.
    Keys float64
    Number of keys.
    Role float64
    role.
    Runid string
    The node ID of the instance runtime.
    ShardId string
    Shard node ID.
    ShardName string
    Shard node name.
    Slots string
    Slot information.
    Storage float64
    Used capacity.
    StorageSlope float64
    Capacity tilt.
    connected Double
    Service status: 0-down;1-on.
    keys Double
    Number of keys.
    role Double
    role.
    runid String
    The node ID of the instance runtime.
    shardId String
    Shard node ID.
    shardName String
    Shard node name.
    slots String
    Slot information.
    storage Double
    Used capacity.
    storageSlope Double
    Capacity tilt.
    connected number
    Service status: 0-down;1-on.
    keys number
    Number of keys.
    role number
    role.
    runid string
    The node ID of the instance runtime.
    shardId string
    Shard node ID.
    shardName string
    Shard node name.
    slots string
    Slot information.
    storage number
    Used capacity.
    storageSlope number
    Capacity tilt.
    connected float
    Service status: 0-down;1-on.
    keys float
    Number of keys.
    role float
    role.
    runid str
    The node ID of the instance runtime.
    shard_id str
    Shard node ID.
    shard_name str
    Shard node name.
    slots str
    Slot information.
    storage float
    Used capacity.
    storage_slope float
    Capacity tilt.
    connected Number
    Service status: 0-down;1-on.
    keys Number
    Number of keys.
    role Number
    role.
    runid String
    The node ID of the instance runtime.
    shardId String
    Shard node ID.
    shardName String
    Shard node name.
    slots String
    Slot information.
    storage Number
    Used capacity.
    storageSlope Number
    Capacity tilt.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack