tencent cloud

Feedback

DescribeCVMAssets

Last updated: 2023-11-15 19:11:20

    1. API Description

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

    This API is used to query the list of CVM 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: DescribeCVMAssets.
    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-

    3. Output Parameters

    Parameter Name Type Description
    Total Integer u200c-
    Note: This field may return·null, indicating that no valid values can be obtained.
    Data Array of CVMAssetVO u200c-
    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.
    DefenseStatusList Array of FilterDataObject Protection status
    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.
    AssetTypeList Array of FilterDataObject List of asset types
    Note: This field may return·null, indicating that no valid values can be obtained.
    SystemTypeList Array of FilterDataObject List of operating systems
    Note: This field may return·null, indicating that no valid values can be obtained.
    IpTypeList Array of FilterDataObject List of IP types
    Note: This field may return·null, indicating that no valid values can be obtained.
    AppIdList Array of FilterDataObject List of AppIds
    Note: This field may return·null, indicating that no valid values can be obtained.
    ZoneList Array of FilterDataObject List of availability zones
    Note: This field may return·null, indicating that no valid values can be obtained.
    OsList Array of FilterDataObject List of operating systems
    Note: This field may return·null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of CVM assets

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

    Input Example

    POST / HTTP/1.1
    Host: csip.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeCVMAssets
    <Common request parameters>
    
    {
        "Filter": {
            "Limit": 0,
            "Offset": 0,
            "Order": "abc",
            "By": "abc",
            "Filters": [
                {
                    "Name": "abc",
                    "Values": [
                        "abc"
                    ],
                    "OperatorType": 0
                }
            ],
            "StartTime": "abc",
            "EndTime": "abc"
        }
    }
    

    Output Example

    {
        "Response": {
            "AppIdList": [
                {
                    "Text": "1300448058",
                    "Value": "1300448058"
                }
            ],
            "AssetTypeList": [
                {
                    "Text": "Edge Compute Machine (ECM)",
                    "Value": "ECM"
                },
                {
                    "Text": "Tencent Cloud Virtual Machine (CVM)",
                    "Value": "CVM"
                }
            ],
            "Data": [
                {
                    "Access": 0,
                    "AccountCount": "-",
                    "AppCount": "-",
                    "AppId": 1300448058,
                    "AssetCreateTime": "2023-02-16 16:51:34",
                    "AssetId": "ein-b41zgmgq",
                    "AssetName": "test1",
                    "AssetType": "ECM",
                    "Attack": 0,
                    "AvailableArea": "",
                    "CPUInfo": "",
                    "CPULoad": "Low",
                    "CPUSize": 0,
                    "CWPStatus": 1,
                    "ConfigurationRisk": 0,
                    "DiskLoad": "0.00%",
                    "DiskSize": "0GB",
                    "InBandwidth": "0.00bps",
                    "InFlow": "0.00B",
                    "InstanceQUuid": "40b8a793-1e96-4101-b832-1f973b8efdb7",
                    "InstanceUuid": "",
                    "Intercept": 0,
                    "IsCore": 1,
                    "LastScanTime": "2023-03-31 17:40:20",
                    "MemberId": "mem-c957e6a7195c85e0",
                    "MemoryLoad": "0.00%",
                    "MemorySize": "0GB",
                    "NetWorkOut": 0,
                    "NickName": "Test 1",
                    "Os": "CentOS 8.0 64bit",
                    "OsName": "CentOS 8.0 64bit",
                    "OutBandwidth": "0.00bps",
                    "OutFlow": "0.00B",
                    "PartitionCount": 0,
                    "PortCount": 0,
                    "PortRisk": 0,
                    "PrivateIp": "10.212.0.4",
                    "ProcessCount": "-",
                    "PublicIp": "119.147.20.109",
                    "Region": "ap-guangzhou",
                    "ScanTask": 13,
                    "SubnetId": "subnet-0aos839s",
                    "SubnetName": "",
                    "Tag": [
                        {
                            "Name": "TestA",
                            "Value": "TestB"
                        }
                    ],
                    "Uin": "100011616646",
                    "VpcId": "vpc-4c9w05r5",
                    "VpcName": "",
                    "VulnerabilityRisk": 0
                }
            ],
            "DefenseStatusList": [
                {
                    "Text": "Protection not activated",
                    "Value": "1"
                },
                {
                    "Text": "Basic edition not activated",
                    "Value": "2"
                }
            ],
            "IpTypeList": [
                {
                    "Text": "Public network assets",
                    "Value": "1"
                },
                {
                    "Text": "Private network assets",
                    "Value": "0"
                }
            ],
            "OsList": [
                {
                    "Text": "CentOS",
                    "Value": "1"
                },
                {
                    "Text": "Unknown",
                    "Value": "0"
                },
                {
                    "Text": "TencentOS",
                    "Value": "7"
                },
                {
                    "Text": "Ubuntu",
                    "Value": "5"
                }
            ],
            "RegionList": [
                {
                    "Text": "Guangzhou",
                    "Value": "ap-guangzhou"
                },
                {
                    "Text": "Shanghai",
                    "Value": "ap-shanghai"
                },
                {
                    "Text": "Beijing",
                    "Value": "ap-beijing"
                },
                {
                    "Text": "Chengdu",
                    "Value": "ap-chengdu"
                },
                {
                    "Text": "Nanjing",
                    "Value": "ap-nanjing"
                }
            ],
            "RequestId": "71673908-8c7d-41c3-8564-57c741ed3596",
            "SystemTypeList": [
                {
                    "Text": "linux",
                    "Value": "linux"
                }
            ],
            "Total": 29,
            "VpcList": [
                {
                    "Text": "Cross-tenant test 2",
                    "Value": "vpc-f6xj8nho"
                },
                {
                    "Text": "Chengdusdwan",
                    "Value": "vpc-ebfqtnxa"
                },
                {
                    "Text": "Conflictsdwan",
                    "Value": "vpc-dw314am3"
                },
                {
                    "Text": "vpctest",
                    "Value": "vpc-rkm452h0"
                },
                {
                    "Text": "Default-VPCLong231321321321321313",
                    "Value": "vpc-5vcbd7cv"
                }
            ],
            "ZoneList": [
                {
                    "Text": "Guangzhou",
                    "Value": "ap-guangzhou"
                },
                {
                    "Text": "Shanghai",
                    "Value": "ap-shanghai"
                },
                {
                    "Text": "Beijing",
                    "Value": "ap-beijing"
                },
                {
                    "Text": "Chengdu",
                    "Value": "ap-chengdu"
                },
                {
                    "Text": "Nanjing",
                    "Value": "ap-nanjing"
                }
            ]
        }
    }
    

    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.