Queries the details about containers by group type.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeGroupedContainerInstances |
The operation that you want to perform. Set the value to DescribeGroupedContainerInstances. |
Criteria | String | No | [{"name":"riskStatus","value":"YES"},{"name":"riskLevel","value":"2"}] |
The search conditions. The value of this parameter is in the JSON format. Separate
multiple search conditions with commas (,). Example: Note Supported search conditions include the instance ID, instance name, virtual private
cloud (VPC) ID, region, and public IP address. You can call the DescribeCriteria operation to query the supported search conditions.
|
LogicalExp | String | No | OR |
The logical relationship between search conditions. Valid values:
|
GroupField | String | Yes | pod |
The group type used for the query. Valid values:
|
FieldValue | String | No | cas-adad-qeqwe |
The keyword used for the search. You must specify this parameter based on the value of the GroupField parameter.
Note Fuzzy match is supported.
|
PageSize | Integer | No | 20 |
The number of entries to return on each page. Default value: 20. Note We recommend that you do not leave this parameter empty.
|
CurrentPage | Integer | No | 1 |
The number of the page to return. Default value: 1. |
All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4E5BFDCF-B9DD-430D-9DA4-151BCB581C9D |
The ID of the request, which is used to locate and troubleshoot issues. |
PageInfo | Object |
The pagination information. |
|
CurrentPage | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 20 |
The number of entries returned per page. Default value: 20. |
TotalCount | Integer | 25 |
The total number of entries returned. |
Count | Integer | 20 |
The number of entries returned on the current page. |
GroupedContainerInstanceList | Array of GroupedContainerInstance |
An array that consists of the details about the container. |
|
RiskLevel | String | low |
The risk level. Valid values:
|
HostIp | String | 172.114.XX.XX |
The IP address of the host in the container cluster. |
Pod | String | csi-plugin-2n**** |
The name of the pod. |
RiskStatus | String | NO |
Indicates whether risks were detected. Valid values:
|
CreateTime | Long | 1600076893000 |
The time when the cluster was created. Unit: milliseconds. |
Namespace | String | kube-system |
The namespace of the cluster. |
CusterState | String | running |
The status of the cluster. Valid values:
|
InstanceId | String | i-8vb9ul5xec4tua4q**** |
The ID of the server. |
RegionId | String | cn-hangzhou |
The ID of the region in which the instance resides. |
AppName | String | oss-liveness-probe |
The name of the application. |
InstanceCount | Integer | 9 |
The number of queried pods, applications, clusters, or namespaces. |
ClusterType | String | ManagedKubernetes |
The type of the cluster. Valid values:
|
ClusterName | String | test |
The name of the cluster. |
PodIp | String | 172.114.XX.XX |
The IP address of the pod. |
VulCount | Integer | 1 |
The number of vulnerabilities that are detected on the current pod, application, namespace, or cluster. |
AlarmCount | Integer | 1 |
The number of alerts that are generated on the current pod, application, namespace, or cluster. |
RiskInstanceCount | Integer | 1 |
The number of at-risk instances. |
ClusterId | String | cf3824769c85441b4bf3**** |
The ID of the cluster. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeGroupedContainerInstances
&Criteria=[{"name":"riskStatus","value":"YES"},{"name":"riskLevel","value":"2"}]
&LogicalExp=OR
&GroupField=pod
&FieldValue=cas-adad-qeqwe
&PageSize=20
&CurrentPage=1
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeGroupedContainerInstancesResponse>
<RequestId>4E5BFDCF-B9DD-430D-9DA4-151BCB581C9D</RequestId>
<PageInfo>
<CurrentPage>1</CurrentPage>
<PageSize>20</PageSize>
<TotalCount>25</TotalCount>
<Count>20</Count>
</PageInfo>
<GroupedContainerInstanceList>
<RiskLevel>low</RiskLevel>
<HostIp>172.114.XX.XX</HostIp>
<Pod>csi-plugin-2n****</Pod>
<RiskStatus>NO</RiskStatus>
<CreateTime>1600076893000</CreateTime>
<Namespace>kube-system</Namespace>
<CusterState>running</CusterState>
<InstanceId>i-8vb9ul5xec4tua4q****</InstanceId>
<RegionId>cn-hangzhou</RegionId>
<AppName>oss-liveness-probe</AppName>
<InstanceCount>9</InstanceCount>
<ClusterType>ManagedKubernetes</ClusterType>
<ClusterName>test</ClusterName>
<PodIp>172.114.XX.XX</PodIp>
<VulCount>1</VulCount>
<AlarmCount>1</AlarmCount>
<RiskInstanceCount>1</RiskInstanceCount>
<ClusterId>cf3824769c85441b4bf3****</ClusterId>
</GroupedContainerInstanceList>
</DescribeGroupedContainerInstancesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4E5BFDCF-B9DD-430D-9DA4-151BCB581C9D",
"PageInfo" : {
"CurrentPage" : 1,
"PageSize" : 20,
"TotalCount" : 25,
"Count" : 20
},
"GroupedContainerInstanceList" : [ {
"RiskLevel" : "low",
"HostIp" : "172.114.XX.XX",
"Pod" : "csi-plugin-2n****",
"RiskStatus" : "NO",
"CreateTime" : 1600076893000,
"Namespace" : "kube-system",
"CusterState" : "running",
"InstanceId" : "i-8vb9ul5xec4tua4q****",
"RegionId" : "cn-hangzhou",
"AppName" : "oss-liveness-probe",
"InstanceCount" : 9,
"ClusterType" : "ManagedKubernetes",
"ClusterName" : "test",
"PodIp" : "172.114.XX.XX",
"VulCount" : 1,
"AlarmCount" : 1,
"RiskInstanceCount" : 1,
"ClusterId" : "cf3824769c85441b4bf3****"
} ]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam | Illegal param | The error message returned because the specified parameters are invalid. |
500 | ServerError | ServerError | The error message returned because a server error occurred. |
For a list of error codes, visit the API Error Center.