Lists k8s resources.
Operation description
Add the enhancement plugin
Add the enhancement plugin to your pom.xml file to extend the Executor's capabilities.
Note: Place this plugin above the xxl-job-core dependency in your pom.xml file.
For more information: Plugin version release notes
Try it now
Test
RAM authorization
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The Cluster ID. |
xxljob-b6ec1xxxx |
| K8sClusterId |
string |
No |
The ID of the Kubernetes cluster used for synchronizing namespaces. The cluster is added to the service mesh specified by ServiceMeshId. This parameter is required when you query a k8s namespace or a k8s service. |
cadb451ed7af04b0297f4be396a2196fc |
| K8sNamespace |
string |
No |
The name of the namespace in the k8s cluster. This parameter is required when you query a k8s service. |
default |
| ResourceType |
string |
Yes |
The resource type. |
cluster |
| VpcId |
string |
No |
The VPC ID. This parameter is required if ResourceType is set to 'cluster'. |
vpc-aa1a18236n90rqhuhhnhh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The Request ID. |
2ECA6FC9-7557-5576-AF5F-FC3E7BCC9C21 |
| Code |
integer |
The response code. |
200 |
| Message |
string |
The error message. |
Parameter error: content is null. |
| Success |
boolean |
Indicates whether the request was successful.
|
true |
| Data |
array<object> |
|
|
|
object |
|
||
| ResourceName |
string |
The name of the k8s resource. |
q_ecs_enterprise_spot_c |
| ResourceId |
string |
The ID of the k8s resource. |
xxljob-01632622cda2f |
Examples
Success response
JSON format
{
"RequestId": "2ECA6FC9-7557-5576-AF5F-FC3E7BCC9C21",
"Code": 200,
"Message": "Parameter error: content is null.",
"Success": true,
"Data": [
{
"ResourceName": "q_ecs_enterprise_spot_c",
"ResourceId": "xxljob-01632622cda2f"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | Parameter error: %s. | Parameter error: %s |
| 401 | IllegalRequest | IllegalRequest: %s. | Illegal request:%s |
| 500 | InternalError | InternalError: %s. | System Internal Error: %s |
| 403 | NoPermission | No permission to perform this operation: %s. | No permission to perform this operation: %s |
| 404 | NotFound | Not found: %s. | The resource does not exist: %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.