Domain name for API request: cwp.intl.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 | Machine zone type |
| MachineRegion | Yes | String | Machine region, for example, ap-guangzhou or ap-shanghai. For non-Tencent Cloud hosts, use ap-others. |
| Limit | No | Integer | Number of returned results. The default number is 10, and the maximum value is 100. |
| Offset | No | Integer | Offset. Default value: 0. |
| Filters.N | No | Array of Filter | Filter criteria. |
| ProjectIds.N | No | Array of Integer | List of business IDs to which the machines belong |
| MachineAppId | No | Integer | APPID of the machine |
| Parameter Name | Type | Description |
|---|---|---|
| Machines | Array of Machine | Host list |
| 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.intl.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": [
{
"BaselineNum": 0,
"CloudTags": [
{
"TagKey": "Department",
"TagValue": "dev"
}
],
"CyberAttackNum": 0,
"HasAssetScan": 0,
"InstanceId": "ins-111",
"InstanceState": "NORMAL",
"InvasionNum": 3,
"IpList": "1.1.1.1",
"IsAddedOnTheFifteen": 1,
"IsProVersion": false,
"KernelVersion": "3.10.0-1160.88.1.el7.x86_64",
"LicenseStatus": 0,
"MachineExtraInfo": {
"HostName": "demo-instance",
"InstanceID": "ins-111",
"NetworkName": "vpc-111",
"NetworkType": 1,
"PrivateIP": "1.1.1.1",
"WanIP": "1.1.1.1"
},
"MachineIp": "1.1.1.1",
"MachineName": "name01",
"MachineOs": "CentOS 7.6 64-bit",
"MachineStatus": "ONLINE",
"MachineType": "CVM",
"MachineWanIp": "1.1.1.1",
"MalwareNum": 0,
"PayMode": "POSTPAY",
"ProjectId": 0,
"ProtectType": "BASIC_VERSION",
"Quuid": "3377add2-ee61-4c9a-99a3-************",
"RegionInfo": {
"Region": "ap-nanjing",
"RegionCode": "nj",
"RegionId": 33,
"RegionName": "East China (Nanjing)"
"RegionNameEn": "East China (Nanjing)"
},
"Remark": "do not remove",
"SecurityStatus": "RISK",
"Tag": [
{
"Rid": 1001,
"Name": "cwp",
"TagId": 1022
}
],
"Uuid": "3377add2-ee61-4c9a-99a3-************",
"VpcId": "vpc-1dj4***",
"VulNum": 0
}
],
"RequestId": "621b6063-12b2-43fa-809e-************",
"TotalCount": 192
}
}
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. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan