tencent cloud

Feedback

DescribeDbAssets

Last updated: 2024-07-22 10:39:03

    1. API Description

    Domain name for API request: csip.tencentcloudapi.com.

    This API is used to list database assets.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeDbAssets.
    Version Yes String Common Params. The value used for this API: 2022-11-21.
    Region No String Common Params. This parameter is not required.
    Filter No Filter u200c-
    AssetTypes.N No Array of String Asset types. Values: MYSQL/MARIADB/REDIS/MONGODB/POSTGRES/CTS/ES/KAFKA/COS/CBS/CFS

    3. Output Parameters

    Parameter Name Type Description
    Total Integer Total number of results
    Note: This field may return·null, indicating that no valid values can be obtained.
    Data Array of DBAssetVO Total of assets
    Note: This field may return·null, indicating that no valid values can be obtained.
    RegionList Array of FilterDataObject List of regions
    Note: This field may return·null, indicating that no valid values can be obtained.
    AssetTypeList Array of FilterDataObject List of asset types
    Note: This field may return·null, indicating that no valid values can be obtained.
    VpcList Array of FilterDataObject List of VPCs
    Note: This field may return·null, indicating that no valid values can be obtained.
    AppIdList Array of FilterDataObject List of users (AppId)
    Note: This field may return·null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of all database assets

    This example shows you how to query the list of all database assets.

    Input Example

    POST / HTTP/1.1
    Host: csip.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDbAssets
    <Common request parameters>
    
    {}
    

    Output Example

    {
        "Response": {
            "AppIdList": [
                {
                    "Text": "1300846651",
                    "Value": "1300846651"
                }
            ],
            "AssetTypeList": [
                {
                    "Text": "COS",
                    "Value": "COS"
                },
                {
                    "Text": "MySQL",
                    "Value": "MYSQL"
                },
                {
                    "Text": "CFS",
                    "Value": "CFS"
                },
                {
                    "Text": "CBS",
                    "Value": "CBS"
                }
            ],
            "Data": [
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2023-08-31 19:37:18",
                    "AssetId": "cdb-pxwani6r",
                    "AssetName": "cdb115086",
                    "AssetType": "MYSQL",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 1,
                    "IsNewAsset": 0,
                    "LastScanTime": "-",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "10.25.25.2:3306",
                    "PublicIp": "",
                    "Region": "ap-chongqing",
                    "ScanTask": 0,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "vpc-h2i9m8xh",
                    "VpcName": "fengqqian"
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2023-08-31 10:15:36",
                    "AssetId": "disk-51a0diaa",
                    "AssetName": "Unname_SYSDisk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "-",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-chongqing",
                    "ScanTask": 0,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2020-10-09 16:46:52",
                    "AssetId": "disk-jckoxu4h",
                    "AssetName": "NAT_VPC autotest,Do not delete_system disk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-shanghai",
                    "ScanTask": 14,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2022-12-05 10:39:35",
                    "AssetId": "disk-hq4yircx",
                    "AssetName": "Data disk vulnerability scan test",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-beijing",
                    "ScanTask": 14,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2020-10-16 17:30:35",
                    "AssetId": "disk-haamhu15",
                    "AssetName": "VPC-autotest2,Do not delete_system disk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-shanghai",
                    "ScanTask": 14,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2023-08-31 19:15:48",
                    "AssetId": "disk-g3lx4gh0",
                    "AssetName": "VPC_Guangzhou_Zone3_v_tximtantest__SYSDisk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "-",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-guangzhou",
                    "ScanTask": 0,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2023-06-30 15:06:08",
                    "AssetId": "disk-dh874mht",
                    "AssetName": "Unname_SYSDisk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-beijing",
                    "ScanTask": 12,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2023-08-30 18:10:46",
                    "AssetId": "disk-dcyyxrhk",
                    "AssetName": " v_tximtantest_System Disk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "-",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-guangzhou",
                    "ScanTask": 0,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2020-10-16 17:20:32",
                    "AssetId": "disk-d5emuwa3",
                    "AssetName": "VPC-autotest,Do not delete_system disk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-shanghai",
                    "ScanTask": 14,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                },
                {
                    "Access": 0,
                    "AppId": 1300846651,
                    "AssetCreateTime": "2020-06-18 17:24:02",
                    "AssetId": "disk-8ve9yxot",
                    "AssetName": "Unname_SYSDisk",
                    "AssetType": "CBS",
                    "Attack": 0,
                    "ConfigurationRisk": 0,
                    "Domain": "",
                    "IsCore": 2,
                    "IsNewAsset": 0,
                    "LastScanTime": "2023-09-04 16:59:17",
                    "NickName": "Test 2",
                    "Port": 0,
                    "PrivateIp": "",
                    "PublicIp": "",
                    "Region": "ap-shanghai",
                    "ScanTask": 14,
                    "Status": 1,
                    "Tag": null,
                    "Uin": "100011949846",
                    "VpcId": "",
                    "VpcName": ""
                }
            ],
            "RegionList": [
                {
                    "Text": "Shanghai",
                    "Value": "ap-shanghai"
                },
                {
                    "Text": "Chongqing",
                    "Value": "ap-chongqing"
                },
                {
                    "Text": "Guangzhou",
                    "Value": "ap-guangzhou"
                },
                {
                    "Text": "Hong Kong (China)",
                    "Value": "ap-hongkong"
                },
                {
                    "Text": "Beijing",
                    "Value": "ap-beijing"
                },
                {
                    "Text": "Nanjing",
                    "Value": "ap-nanjing"
                }
            ],
            "RequestId": "7899491b-9407-4bca-8363-ddddbbb3486c",
            "Total": 29,
            "VpcList": [
                {
                    "Text": "fengqqian",
                    "Value": "vpc-h2i9m8xh"
                }
            ]
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    There is no error code related to the API business logic. For other error codes, please see Common Error Codes.