Querying the Basic DaemonSets Information List
Function
This API is used to query the basic information list of daemonsets.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v5/{project_id}/kubernetes/daemonsets
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
enterprise_project_id | No | String | Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
offset | No | Integer | Definition Offset, which specifies the start position of the record to be returned. Constraints N/A Range The value range is 0 to 2,000,000. Default Value The default value is 0. |
daemonset_name | No | String | Definition DaemonSet name, which is used as a query parameter. Constraints N/A Range The value can contain 0 to 256 characters. Default Value None |
namespace_name | No | String | Definition Namespace name, which is used as a query parameter. Constraints N/A Range The value can contain 0 to 256 characters. Default Value None |
cluster_name | No | String | Definition Name of the cluster that a resource belongs to, which is used as a query parameter. Constraints N/A Range The value can contain 0 to 256 characters. Default Value None |
limit | Yes | Integer | Definition Number of records displayed on each page. Constraints N/A Range Value range: 10 to 200 Default Value 10 |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
total_num | Integer | Total DaemonSets |
data_list | Array of DaemonSetInfo objects | Basic information list of DaemonSet |
Parameter | Type | Description |
|---|---|---|
name | String | Definition DaemonSet name. Range The value can contain 0 to 256 characters. |
namespace_name | String | Definition Namespace name. Range The value can contain 0 to 256 characters. |
cluster_id | String | Definition Unique ID of a cluster, which is used to identify a cluster instance that a DaemonSet belongs to. Range The value is a 36-bit string that complies with the UUID format. |
cluster_type | String | Definition Deployment type of the cluster that the DaemonSet belongs to. It is used to distinguish the clusters of different cloud vendors or deployment modes. Range Kubernetes (native cluster), cce (CCE cluster), ali (Alibaba Cloud cluster), tencent (Tencent Cloud cluster), azure (Microsoft Cloud cluster), aws (Amazon cluster), self_built_hw (Huawei Cloud on-premises cluster), and self_built_idc (IDC on-premises cluster) |
cluster_name | String | Definition Cluster name Range The value is a string of 0 to 256 characters. |
status | String | Definition DaemonSet status, which is used to identify the health of the current instance. Range Running (normal), Failed (abnormal) |
pods_num | Integer | Definition Total number of pod instances corresponding to a DaemonSet. Range Non-negative integer. The minimum value is 0 and the upper limit depends on cluster resources. |
image_name | String | Definition Full name of the container image used by the DaemonSet instance, including the image repository, image name, and tag. Range A string that complies with the naming rules of the container image, containing 1 to 256 characters. |
match_labels | Array of LabelInfo objects | Definition The set of tags used to match pods. The Kubernetes associates DaemonSets with pods through the tags. Range The number of array elements is greater than or equal to 0. The key of each element is the tag name, and the value of each element is the tag value. The key and value contain 1 to 63 characters. |
create_time | Long | Definition Time when a DaemonSet resource was created. Range The value is a non-negative long integer in millisecond-level timestamp format, corresponding to the number of milliseconds since UTC time 1970-01-01 00:00:00. |
Example Requests
Query the basic information list of daemonsets.
GET https://{endpoint}/v5/{project_id}/kubernetes/daemonsets?offset=0&limit=200&enterprise_project_id=all_granted_eps Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"name" : "cceaddon-npd",
"namespace_name" : "kube-system",
"pods_num" : 7,
"status" : "Running",
"create_time" : 1720765124000,
"cluster_name" : "glz-2451",
"cluster_id" : "a03efb0c-xxxx-xxxx-xxxx-0255ac100b0b",
"cluster_type" : "cce",
"image_name" : "base-node-problem-detector:1.19.8",
"match_labels" : [ {
"key" : "app.kubernetes.io/name",
"val" : "npd"
}, {
"key" : "app.kubernetes.io/instance",
"val" : "cceaddon-npd"
} ]
} ]
} Status Codes
Status Code | Description |
|---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
