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

tencentcloud.getDcdbShards

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 dcdb shards

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const shards = tencentcloud.getDcdbShards({
        instanceId: "your_instance_id",
        shardInstanceIds: ["shard1_id"],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    shards = tencentcloud.get_dcdb_shards(instance_id="your_instance_id",
        shard_instance_ids=["shard1_id"])
    
    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.GetDcdbShards(ctx, &tencentcloud.GetDcdbShardsArgs{
    			InstanceId: "your_instance_id",
    			ShardInstanceIds: []string{
    				"shard1_id",
    			},
    		}, 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 shards = Tencentcloud.GetDcdbShards.Invoke(new()
        {
            InstanceId = "your_instance_id",
            ShardInstanceIds = new[]
            {
                "shard1_id",
            },
        });
    
    });
    
    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.GetDcdbShardsArgs;
    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 shards = TencentcloudFunctions.getDcdbShards(GetDcdbShardsArgs.builder()
                .instanceId("your_instance_id")
                .shardInstanceIds("shard1_id")
                .build());
    
        }
    }
    
    variables:
      shards:
        fn::invoke:
          function: tencentcloud:getDcdbShards
          arguments:
            instanceId: your_instance_id
            shardInstanceIds:
              - shard1_id
    

    Using getDcdbShards

    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 getDcdbShards(args: GetDcdbShardsArgs, opts?: InvokeOptions): Promise<GetDcdbShardsResult>
    function getDcdbShardsOutput(args: GetDcdbShardsOutputArgs, opts?: InvokeOptions): Output<GetDcdbShardsResult>
    def get_dcdb_shards(id: Optional[str] = None,
                        instance_id: Optional[str] = None,
                        result_output_file: Optional[str] = None,
                        shard_instance_ids: Optional[Sequence[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDcdbShardsResult
    def get_dcdb_shards_output(id: Optional[pulumi.Input[str]] = None,
                        instance_id: Optional[pulumi.Input[str]] = None,
                        result_output_file: Optional[pulumi.Input[str]] = None,
                        shard_instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDcdbShardsResult]
    func GetDcdbShards(ctx *Context, args *GetDcdbShardsArgs, opts ...InvokeOption) (*GetDcdbShardsResult, error)
    func GetDcdbShardsOutput(ctx *Context, args *GetDcdbShardsOutputArgs, opts ...InvokeOption) GetDcdbShardsResultOutput

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

    public static class GetDcdbShards 
    {
        public static Task<GetDcdbShardsResult> InvokeAsync(GetDcdbShardsArgs args, InvokeOptions? opts = null)
        public static Output<GetDcdbShardsResult> Invoke(GetDcdbShardsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDcdbShardsResult> getDcdbShards(GetDcdbShardsArgs args, InvokeOptions options)
    public static Output<GetDcdbShardsResult> getDcdbShards(GetDcdbShardsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDcdbShards:getDcdbShards
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    instance id.
    Id string
    ResultOutputFile string
    Used to save results.
    ShardInstanceIds List<string>
    shard instance ids.
    InstanceId string
    instance id.
    Id string
    ResultOutputFile string
    Used to save results.
    ShardInstanceIds []string
    shard instance ids.
    instanceId String
    instance id.
    id String
    resultOutputFile String
    Used to save results.
    shardInstanceIds List<String>
    shard instance ids.
    instanceId string
    instance id.
    id string
    resultOutputFile string
    Used to save results.
    shardInstanceIds string[]
    shard instance ids.
    instance_id str
    instance id.
    id str
    result_output_file str
    Used to save results.
    shard_instance_ids Sequence[str]
    shard instance ids.
    instanceId String
    instance id.
    id String
    resultOutputFile String
    Used to save results.
    shardInstanceIds List<String>
    shard instance ids.

    getDcdbShards Result

    The following output properties are available:

    Id string
    InstanceId string
    instance id.
    Lists List<GetDcdbShardsList>
    shard list.
    ResultOutputFile string
    ShardInstanceIds List<string>
    Id string
    InstanceId string
    instance id.
    Lists []GetDcdbShardsList
    shard list.
    ResultOutputFile string
    ShardInstanceIds []string
    id String
    instanceId String
    instance id.
    lists List<GetDcdbShardsList>
    shard list.
    resultOutputFile String
    shardInstanceIds List<String>
    id string
    instanceId string
    instance id.
    lists GetDcdbShardsList[]
    shard list.
    resultOutputFile string
    shardInstanceIds string[]
    id String
    instanceId String
    instance id.
    lists List<Property Map>
    shard list.
    resultOutputFile String
    shardInstanceIds List<String>

    Supporting Types

    GetDcdbShardsList

    Cpu double
    cpu cores.
    CreateTime string
    create time.
    InstanceId string
    instance id.
    Memory double
    memory, the unit is GB.
    MemoryUsage double
    memory usage.
    NodeCount double
    node count.
    Paymode string
    pay mode.
    PeriodEndTime string
    expired time.
    ProjectId double
    project id.
    ProxyVersion string
    proxy version.
    Range string
    the range of shard key.
    Region string
    region.
    ShardInstanceId string
    shard instance id.
    ShardMasterZone string
    shard master zone.
    ShardSerialId string
    shard serial id.
    ShardSlaveZones List<string>
    shard slave zones.
    Status double
    status.
    StatusDesc string
    status description.
    Storage double
    memory, the unit is GB.
    StorageUsage double
    storage usage.
    SubnetId string
    subnet id.
    VpcId string
    vpc id.
    Zone string
    zone.
    Cpu float64
    cpu cores.
    CreateTime string
    create time.
    InstanceId string
    instance id.
    Memory float64
    memory, the unit is GB.
    MemoryUsage float64
    memory usage.
    NodeCount float64
    node count.
    Paymode string
    pay mode.
    PeriodEndTime string
    expired time.
    ProjectId float64
    project id.
    ProxyVersion string
    proxy version.
    Range string
    the range of shard key.
    Region string
    region.
    ShardInstanceId string
    shard instance id.
    ShardMasterZone string
    shard master zone.
    ShardSerialId string
    shard serial id.
    ShardSlaveZones []string
    shard slave zones.
    Status float64
    status.
    StatusDesc string
    status description.
    Storage float64
    memory, the unit is GB.
    StorageUsage float64
    storage usage.
    SubnetId string
    subnet id.
    VpcId string
    vpc id.
    Zone string
    zone.
    cpu Double
    cpu cores.
    createTime String
    create time.
    instanceId String
    instance id.
    memory Double
    memory, the unit is GB.
    memoryUsage Double
    memory usage.
    nodeCount Double
    node count.
    paymode String
    pay mode.
    periodEndTime String
    expired time.
    projectId Double
    project id.
    proxyVersion String
    proxy version.
    range String
    the range of shard key.
    region String
    region.
    shardInstanceId String
    shard instance id.
    shardMasterZone String
    shard master zone.
    shardSerialId String
    shard serial id.
    shardSlaveZones List<String>
    shard slave zones.
    status Double
    status.
    statusDesc String
    status description.
    storage Double
    memory, the unit is GB.
    storageUsage Double
    storage usage.
    subnetId String
    subnet id.
    vpcId String
    vpc id.
    zone String
    zone.
    cpu number
    cpu cores.
    createTime string
    create time.
    instanceId string
    instance id.
    memory number
    memory, the unit is GB.
    memoryUsage number
    memory usage.
    nodeCount number
    node count.
    paymode string
    pay mode.
    periodEndTime string
    expired time.
    projectId number
    project id.
    proxyVersion string
    proxy version.
    range string
    the range of shard key.
    region string
    region.
    shardInstanceId string
    shard instance id.
    shardMasterZone string
    shard master zone.
    shardSerialId string
    shard serial id.
    shardSlaveZones string[]
    shard slave zones.
    status number
    status.
    statusDesc string
    status description.
    storage number
    memory, the unit is GB.
    storageUsage number
    storage usage.
    subnetId string
    subnet id.
    vpcId string
    vpc id.
    zone string
    zone.
    cpu float
    cpu cores.
    create_time str
    create time.
    instance_id str
    instance id.
    memory float
    memory, the unit is GB.
    memory_usage float
    memory usage.
    node_count float
    node count.
    paymode str
    pay mode.
    period_end_time str
    expired time.
    project_id float
    project id.
    proxy_version str
    proxy version.
    range str
    the range of shard key.
    region str
    region.
    shard_instance_id str
    shard instance id.
    shard_master_zone str
    shard master zone.
    shard_serial_id str
    shard serial id.
    shard_slave_zones Sequence[str]
    shard slave zones.
    status float
    status.
    status_desc str
    status description.
    storage float
    memory, the unit is GB.
    storage_usage float
    storage usage.
    subnet_id str
    subnet id.
    vpc_id str
    vpc id.
    zone str
    zone.
    cpu Number
    cpu cores.
    createTime String
    create time.
    instanceId String
    instance id.
    memory Number
    memory, the unit is GB.
    memoryUsage Number
    memory usage.
    nodeCount Number
    node count.
    paymode String
    pay mode.
    periodEndTime String
    expired time.
    projectId Number
    project id.
    proxyVersion String
    proxy version.
    range String
    the range of shard key.
    region String
    region.
    shardInstanceId String
    shard instance id.
    shardMasterZone String
    shard master zone.
    shardSerialId String
    shard serial id.
    shardSlaveZones List<String>
    shard slave zones.
    status Number
    status.
    statusDesc String
    status description.
    storage Number
    memory, the unit is GB.
    storageUsage Number
    storage usage.
    subnetId String
    subnet id.
    vpcId String
    vpc id.
    zone String
    zone.

    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