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

tencentcloud.getDbbrainTopSpaceTables

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 dbbrain top_space_tables

    Example Usage

    Sort by PhysicalFileSize

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const topSpaceTables = tencentcloud.getDbbrainTopSpaceTables({
        instanceId: "%s",
        product: "mysql",
        sortBy: "PhysicalFileSize",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    top_space_tables = tencentcloud.get_dbbrain_top_space_tables(instance_id="%s",
        product="mysql",
        sort_by="PhysicalFileSize")
    
    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.GetDbbrainTopSpaceTables(ctx, &tencentcloud.GetDbbrainTopSpaceTablesArgs{
    			InstanceId: "%s",
    			Product:    pulumi.StringRef("mysql"),
    			SortBy:     pulumi.StringRef("PhysicalFileSize"),
    		}, 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 topSpaceTables = Tencentcloud.GetDbbrainTopSpaceTables.Invoke(new()
        {
            InstanceId = "%s",
            Product = "mysql",
            SortBy = "PhysicalFileSize",
        });
    
    });
    
    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.GetDbbrainTopSpaceTablesArgs;
    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 topSpaceTables = TencentcloudFunctions.getDbbrainTopSpaceTables(GetDbbrainTopSpaceTablesArgs.builder()
                .instanceId("%s")
                .product("mysql")
                .sortBy("PhysicalFileSize")
                .build());
    
        }
    }
    
    variables:
      topSpaceTables:
        fn::invoke:
          function: tencentcloud:getDbbrainTopSpaceTables
          arguments:
            instanceId: '%s'
            product: mysql
            sortBy: PhysicalFileSize
    

    Sort by TotalLength

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const topSpaceTables = tencentcloud.getDbbrainTopSpaceTables({
        instanceId: "%s",
        product: "mysql",
        sortBy: "PhysicalFileSize",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    top_space_tables = tencentcloud.get_dbbrain_top_space_tables(instance_id="%s",
        product="mysql",
        sort_by="PhysicalFileSize")
    
    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.GetDbbrainTopSpaceTables(ctx, &tencentcloud.GetDbbrainTopSpaceTablesArgs{
    			InstanceId: "%s",
    			Product:    pulumi.StringRef("mysql"),
    			SortBy:     pulumi.StringRef("PhysicalFileSize"),
    		}, 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 topSpaceTables = Tencentcloud.GetDbbrainTopSpaceTables.Invoke(new()
        {
            InstanceId = "%s",
            Product = "mysql",
            SortBy = "PhysicalFileSize",
        });
    
    });
    
    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.GetDbbrainTopSpaceTablesArgs;
    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 topSpaceTables = TencentcloudFunctions.getDbbrainTopSpaceTables(GetDbbrainTopSpaceTablesArgs.builder()
                .instanceId("%s")
                .product("mysql")
                .sortBy("PhysicalFileSize")
                .build());
    
        }
    }
    
    variables:
      topSpaceTables:
        fn::invoke:
          function: tencentcloud:getDbbrainTopSpaceTables
          arguments:
            instanceId: '%s'
            product: mysql
            sortBy: PhysicalFileSize
    

    Using getDbbrainTopSpaceTables

    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 getDbbrainTopSpaceTables(args: GetDbbrainTopSpaceTablesArgs, opts?: InvokeOptions): Promise<GetDbbrainTopSpaceTablesResult>
    function getDbbrainTopSpaceTablesOutput(args: GetDbbrainTopSpaceTablesOutputArgs, opts?: InvokeOptions): Output<GetDbbrainTopSpaceTablesResult>
    def get_dbbrain_top_space_tables(id: Optional[str] = None,
                                     instance_id: Optional[str] = None,
                                     limit: Optional[float] = None,
                                     product: Optional[str] = None,
                                     result_output_file: Optional[str] = None,
                                     sort_by: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetDbbrainTopSpaceTablesResult
    def get_dbbrain_top_space_tables_output(id: Optional[pulumi.Input[str]] = None,
                                     instance_id: Optional[pulumi.Input[str]] = None,
                                     limit: Optional[pulumi.Input[float]] = None,
                                     product: Optional[pulumi.Input[str]] = None,
                                     result_output_file: Optional[pulumi.Input[str]] = None,
                                     sort_by: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetDbbrainTopSpaceTablesResult]
    func GetDbbrainTopSpaceTables(ctx *Context, args *GetDbbrainTopSpaceTablesArgs, opts ...InvokeOption) (*GetDbbrainTopSpaceTablesResult, error)
    func GetDbbrainTopSpaceTablesOutput(ctx *Context, args *GetDbbrainTopSpaceTablesOutputArgs, opts ...InvokeOption) GetDbbrainTopSpaceTablesResultOutput

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

    public static class GetDbbrainTopSpaceTables 
    {
        public static Task<GetDbbrainTopSpaceTablesResult> InvokeAsync(GetDbbrainTopSpaceTablesArgs args, InvokeOptions? opts = null)
        public static Output<GetDbbrainTopSpaceTablesResult> Invoke(GetDbbrainTopSpaceTablesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbbrainTopSpaceTablesResult> getDbbrainTopSpaceTables(GetDbbrainTopSpaceTablesArgs args, InvokeOptions options)
    public static Output<GetDbbrainTopSpaceTablesResult> getDbbrainTopSpaceTables(GetDbbrainTopSpaceTablesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDbbrainTopSpaceTables:getDbbrainTopSpaceTables
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    instance id.
    Id string
    Limit double
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    Product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    ResultOutputFile string
    Used to save results.
    SortBy string
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.
    InstanceId string
    instance id.
    Id string
    Limit float64
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    Product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    ResultOutputFile string
    Used to save results.
    SortBy string
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.
    instanceId String
    instance id.
    id String
    limit Double
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    product String
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile String
    Used to save results.
    sortBy String
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.
    instanceId string
    instance id.
    id string
    limit number
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile string
    Used to save results.
    sortBy string
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.
    instance_id str
    instance id.
    id str
    limit float
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    product str
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    result_output_file str
    Used to save results.
    sort_by str
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.
    instanceId String
    instance id.
    id String
    limit Number
    The number of Top tables returned, the maximum value is 100, and the default is 20.
    product String
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile String
    Used to save results.
    sortBy String
    The sorting field used to filter the Top table. The optional fields include DataLength, IndexLength, TotalLength, DataFree, FragRatio, TableRows, and PhysicalFileSize (only supported by ApsaraDB for MySQL instances). The default for ApsaraDB for MySQL instances is PhysicalFileSize, and the default for other product instances is TotalLength.

    getDbbrainTopSpaceTables Result

    The following output properties are available:

    Id string
    InstanceId string
    Timestamp double
    The timestamp (in seconds) of collecting tablespace data.
    TopSpaceTables List<GetDbbrainTopSpaceTablesTopSpaceTable>
    The list of Top tablespace statistics returned.
    Limit double
    Product string
    ResultOutputFile string
    SortBy string
    Id string
    InstanceId string
    Timestamp float64
    The timestamp (in seconds) of collecting tablespace data.
    TopSpaceTables []GetDbbrainTopSpaceTablesTopSpaceTable
    The list of Top tablespace statistics returned.
    Limit float64
    Product string
    ResultOutputFile string
    SortBy string
    id String
    instanceId String
    timestamp Double
    The timestamp (in seconds) of collecting tablespace data.
    topSpaceTables List<GetDbbrainTopSpaceTablesTopSpaceTable>
    The list of Top tablespace statistics returned.
    limit Double
    product String
    resultOutputFile String
    sortBy String
    id string
    instanceId string
    timestamp number
    The timestamp (in seconds) of collecting tablespace data.
    topSpaceTables GetDbbrainTopSpaceTablesTopSpaceTable[]
    The list of Top tablespace statistics returned.
    limit number
    product string
    resultOutputFile string
    sortBy string
    id str
    instance_id str
    timestamp float
    The timestamp (in seconds) of collecting tablespace data.
    top_space_tables Sequence[GetDbbrainTopSpaceTablesTopSpaceTable]
    The list of Top tablespace statistics returned.
    limit float
    product str
    result_output_file str
    sort_by str
    id String
    instanceId String
    timestamp Number
    The timestamp (in seconds) of collecting tablespace data.
    topSpaceTables List<Property Map>
    The list of Top tablespace statistics returned.
    limit Number
    product String
    resultOutputFile String
    sortBy String

    Supporting Types

    GetDbbrainTopSpaceTablesTopSpaceTable

    DataFree double
    Fragmentation space (MB).
    DataLength double
    data space (MB).
    Engine string
    Storage engine for database tables.
    FragRatio double
    Fragmentation rate (%).
    IndexLength double
    Index space (MB).
    PhysicalFileSize double
    The independent physical file size (MB) corresponding to the table.
    TableName string
    table name.
    TableRows double
    Number of lines.
    TableSchema string
    database name.
    TotalLength double
    Total space used (MB).
    DataFree float64
    Fragmentation space (MB).
    DataLength float64
    data space (MB).
    Engine string
    Storage engine for database tables.
    FragRatio float64
    Fragmentation rate (%).
    IndexLength float64
    Index space (MB).
    PhysicalFileSize float64
    The independent physical file size (MB) corresponding to the table.
    TableName string
    table name.
    TableRows float64
    Number of lines.
    TableSchema string
    database name.
    TotalLength float64
    Total space used (MB).
    dataFree Double
    Fragmentation space (MB).
    dataLength Double
    data space (MB).
    engine String
    Storage engine for database tables.
    fragRatio Double
    Fragmentation rate (%).
    indexLength Double
    Index space (MB).
    physicalFileSize Double
    The independent physical file size (MB) corresponding to the table.
    tableName String
    table name.
    tableRows Double
    Number of lines.
    tableSchema String
    database name.
    totalLength Double
    Total space used (MB).
    dataFree number
    Fragmentation space (MB).
    dataLength number
    data space (MB).
    engine string
    Storage engine for database tables.
    fragRatio number
    Fragmentation rate (%).
    indexLength number
    Index space (MB).
    physicalFileSize number
    The independent physical file size (MB) corresponding to the table.
    tableName string
    table name.
    tableRows number
    Number of lines.
    tableSchema string
    database name.
    totalLength number
    Total space used (MB).
    data_free float
    Fragmentation space (MB).
    data_length float
    data space (MB).
    engine str
    Storage engine for database tables.
    frag_ratio float
    Fragmentation rate (%).
    index_length float
    Index space (MB).
    physical_file_size float
    The independent physical file size (MB) corresponding to the table.
    table_name str
    table name.
    table_rows float
    Number of lines.
    table_schema str
    database name.
    total_length float
    Total space used (MB).
    dataFree Number
    Fragmentation space (MB).
    dataLength Number
    data space (MB).
    engine String
    Storage engine for database tables.
    fragRatio Number
    Fragmentation rate (%).
    indexLength Number
    Index space (MB).
    physicalFileSize Number
    The independent physical file size (MB) corresponding to the table.
    tableName String
    table name.
    tableRows Number
    Number of lines.
    tableSchema String
    database name.
    totalLength Number
    Total space used (MB).

    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