Call DescribeGuestClusterNamespaces to retrieve a list of namespaces in a Kubernetes cluster added to a service mesh.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
servicemesh:DescribeGuestClusterNamespaces |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ServiceMeshId |
string |
Yes |
The service mesh ID. |
ce134b0727aa2492db69f6c3880e**** |
| GuestClusterID |
string |
Yes |
The ID of the Kubernetes cluster added to the service mesh. |
c584d805c7bd442b8bac421f9849f**** |
| ShowNsLabels |
boolean |
No |
Specifies whether to return the labels of the namespaces. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
31d3a0f0-07ed-4f6e-9004-1804498c**** |
| NsList |
array |
A list of namespace names. |
|
|
string |
The namespace name. |
default |
|
| NsLabels |
object |
The labels of the namespaces. This parameter is returned only when the |
{"default":{"istio-injection":"enabled"}} |
Examples
Success response
JSON format
{
"RequestId": "31d3a0f0-07ed-4f6e-9004-1804498c****",
"NsList": [
"default"
],
"NsLabels": {
"default": {
"istio-injection": "enabled"
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | ERR404 | Not found |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.