All Products
Search
Document Center

Security Center:DescribeGroupedContainerInstances

Last Updated:Jan 28, 2023

Queries containers by group type.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
CriteriastringNo

The search conditions for assets. Specify the value in the JSON format. Separate multiple search conditions with commas (,). Example: [{"name":"riskStatus","value":"YES"},{"name":"riskLevel","value":"2"}].

NoteSupported 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.
[{"name":"riskStatus","value":"YES"},{"name":"riskLevel","value":"2"}]
LogicalExpstringNo

The logical relationship that you want to use to evaluate multiple search conditions. Valid values:

  • OR: Search conditions are evaluated by using a logical OR.
  • AND: Search conditions are evaluated by using a logical AND.
OR
GroupFieldstringYes

The group type that you want to use to query containers. Valid values:

  • pod
  • appName
  • namespace
  • clusterId
pod
FieldValuestringNo

The keyword that you want to use to query containers. You must specify this parameter based on the value of the GroupField parameter.

  • If the GroupField parameter is set to pod, set this parameter to the name of the pod that you want to query.
  • If the GroupField parameter is set to appName, set this parameter to the name of the application that you want to query.
  • If the GroupField parameter is set to namespace, set this parameter to the namespace that you want to query.
  • If the GroupField parameter is set to clusterId, set this parameter to the ID of the cluster that you want to query.
NoteFuzzy match is supported.
cas-adad-qeqwe
PageSizeintegerNo

The number of entries to return on each page. Default value: 20.

NoteWe recommend that you do not leave this parameter empty.
20
CurrentPageintegerNo

The number of the page to return. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

4E5BFDCF-B9DD-430D-9DA4-151BCB581C9D
PageInfoobject

The pagination information.

CurrentPageinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page. Default value: 20.

20
TotalCountinteger

The total number of container assets returned.

25
Countinteger

The number of container assets returned on the current page.

20
GroupedContainerInstanceListarray

An array that consists of the container assets returned.

object
RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
low
HostIpstring

The IP address of the host in the container cluster.

172.114.XX.XX
Podstring

The name of the pod.

csi-plugin-2n****
RiskStatusstring

Indicates whether risks were detected. Valid values:

  • NO: No risks were detected.
  • YES: Risks were detected.
NO
CreateTimelong

The timestamp when the cluster was created. Unit: milliseconds.

1600076893000
Namespacestring

The namespace of the cluster.

kube-system
CusterStatestring

The status of the cluster. Valid values:

  • running: The cluster is running.
  • stopped: The cluster is stopped.
  • deleted: The cluster is deleted.
  • delete_failed: The cluster fails to be deleted.
  • failed: The cluster fails to be created.
running
InstanceIdstring

The ID of the server.

i-8vb9ul5xec4tua4q****
RegionIdstring

The ID of the region in which the server resides.

cn-hangzhou
AppNamestring

The name of the application.

oss-liveness-probe
InstanceCountinteger

The number of queried pods, applications, clusters, or namespaces.

9
ClusterTypestring

The type of the cluster. Valid values:

  • Kubernetes: dedicated Kubernetes cluster
  • ManagedKubernetes: standard managed cluster (edge cluster)
  • Ask: standard serverless cluster
ManagedKubernetes
ClusterNamestring

The name of the instance.

test
PodIpstring

The IP address of the pod.

172.114.XX.XX
VulCountinteger

The number of vulnerabilities that are detected on the current pod, application, namespace, or cluster.

1
AlarmCountinteger

The number of alerts that are generated on the current pod, application, namespace, or cluster.

1
RiskInstanceCountinteger

The number of at-risk instances.

1
ClusterIdstring

The ID of cluster.

cf3824769c85441b4bf3****
Imagestring

The image of the container.

registry-vpc.ap-southeast-5.aliyuncs.com/log-service-release/sls-connector:1.1.77
ImageRepoNamespacestring

The namespace to which the image repository belongs.

name001
ImageRepoNamestring

The name of the image repository.

test-003
ImageRepoTagstring

The tag that is added to the image repository.

dev-20220512-2
ImageDigeststring

The digest value of the image.

58e58c013f70bbfde140c8a55c1078074b3483479428d4069aa946827fd566cf
ImageUuidstring

The UUID of the image.

e4bdec1d9ba7e0967111a7ea467c****
HcCountinteger

The number of baseline risks that are detected on the current pod, application, namespace, or cluster.

20

Example

Normal return example

JSONFormat

{
  "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****",
      "Image": "registry-vpc.ap-southeast-5.aliyuncs.com/log-service-release/sls-connector:1.1.77",
      "ImageRepoNamespace": "name001",
      "ImageRepoName": "test-003",
      "ImageRepoTag": "dev-20220512-2",
      "ImageDigest": "58e58c013f70bbfde140c8a55c1078074b3483479428d4069aa946827fd566cf",
      "ImageUuid": "e4bdec1d9ba7e0967111a7ea467c****",
      "HcCount": 20
    }
  ]
}

Error codes

Http codeError codeError messageDescription
400IllegalParamIllegal param-
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the API error center.

Change history

Change timeSummary of changesOperate
2021-12-21The error codes of the API operation has changed
Change itemChange content
Error CodesThe error codes of the API operation has changed
    delete Error Codes: 400