Domain name for API request: cwp.tencentcloudapi.com.
This API is used to obtain the list of hosts in a specific region.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeMachines. |
Version | Yes | String | Common Params. The value used for this API: 2018-02-28. |
Region | No | String | Common Params. This parameter is not required. |
MachineType | Yes | String | Type of the machine's zone CVM: Cloud Virtual Machine BM: BMECM: Edge Computing Machine LH: Lighthouse Other: Hybrid Cloud Zone |
MachineRegion | Yes | String | Machine region. For example, ap-guangzhou and ap-shanghai. |
Limit | No | Integer | Number of returns. It is 10 by default, and the maximum value is 100. |
Offset | No | Integer | Offset. Default value: 0. |
Filters.N | No | Array of Filter | Filter criteria Each filter criterion supports only one value. |
ProjectIds.N | No | Array of Integer | ID List of Businesses to which machines belong |
Parameter Name | Type | Description |
---|---|---|
Machines | Array of Machine | List of hosts |
TotalCount | Integer | Number of hosts |
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. |
This example shows you how to get the regional host list by the API (DescribeMachines).
POST / HTTP/1.1
Host: cwp.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeMachines
<Common request parameters>
{
"Limit": 10,
"MachineRegion": "ap-shanghai",
"MachineType": "CVM",
"Filters": [
{
"Values": [
"10.0.1.1"
],
"Name": "Keywords"
}
],
"Offset": 0
}
{
"Response": {
"Machines": [
{
"MachineName": "test",
"MachineOs": "CentOS 7.6 64-bit",
"Uuid": "3377add2-ee61-4c9a-99a3-81d259dfc11a",
"Quuid": "3377add2-ee61-4c9a-99a3-81d259dfc11a",
"MachineIp": "1.1.1.1",
"MachineWanIp": "1.1.1.1",
"InstanceState": "NORMAL",
"InstanceId": "ins-111",
"ProjectId": 0,
"VpcId": "",
"IsProVersion": false,
"MachineStatus": "ONLINE",
"PayMode": "",
"Tag": [],
"CloudTags": null,
"MalwareNum": 0,
"VulNum": 0,
"BaselineNum": 0,
"CyberAttackNum": 0,
"InvasionNum": 3,
"SecurityStatus": "RISK",
"RegionInfo": {
"Region": "ap-nanjing",
"RegionName": "East China (Nanjing)",
"RegionId": 33,
"RegionCode": "nj",
"RegionNameEn": "East China (Nanjing)"
},
"MachineType": "CVM",
"LicenseStatus": 0,
"HasAssetScan": 0,
"KernelVersion": "3.10.0-1160.88.1.el7.x86_64",
"ProtectType": "BASIC_VERSION",
"IsAddedOnTheFifteen": 1,
"IpList": "1.1.1.1",
"Remark": "",
"MachineExtraInfo": {
"WanIP": "1.1.1.1",
"PrivateIP": "1.1.1.1",
"NetworkType": 1,
"NetworkName": "vpc-111",
"InstanceID": "ins-111",
"HostName": ""
}
}
],
"RequestId": "621b6063-12b2-43fa-809e-5481c8374c0a",
"TotalCount": 1
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError | Internal error |
InvalidParameter | Incorrect parameter. |
InvalidParameter.InvalidFormat | Incorrect parameter format. |
InvalidParameter.MissingParameter | Missing parameter. |
InvalidParameter.ParsingError | Incorrect parameter parsing. |
InvalidParameterValue | Invalid parameter value. |
MissingParameter | Missing parameter error. |
Was this page helpful?