Queries the namespaces of a Kubernetes cluster that is added to an Alibaba Cloud Service Mesh (ASM) instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeGuestClusterNamespaces |
The operation that you want to perform. Set the value to DescribeGuestClusterNamespaces. |
| ServiceMeshId | String | Yes | ce134b0727aa2492db69f6c3880e**** |
The ID of the ASM instance. |
| GuestClusterID | String | Yes | c584d805c7bd442b8bac421f9849f**** |
The ID of the Kubernetes cluster that is added to the ASM instance. |
| ShowNsLabels | Boolean | No | true |
Specifies whether to return the labels of the namespaces. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 31d3a0f0-07ed-4f6e-9004-1804498c**** |
The ID of the request. |
| NsList | Array of String | default |
The names of the namespaces. |
| NsLabels | Map |
The labels of the namespaces. Labels are returned only when the |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeGuestClusterNamespaces
&ServiceMeshId=ce134b0727aa2492db69f6c3880e****
&GuestClusterID=c584d805c7bd442b8bac421f9849f****
&ShowNsLabels=true
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeGuestClusterNamespacesResponse>
<RequestId>31d3a0f0-07ed-4f6e-9004-1804498c****</RequestId>
<NsList>default</NsList>
<NsLabels>
<default>
<istio-injection>enabled</istio-injection>
<kubernetes.io/metadata.name>default</kubernetes.io/metadata.name>
</default>
</NsLabels>
</DescribeGuestClusterNamespacesResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "31d3a0f0-07ed-4f6e-9004-1804498c****",
"NsList" : [ "default" ],
"NsLabels" : {
"default" : {
"istio-injection" : "enabled",
"kubernetes.io/metadata.name" : "default"
}
}
}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 404 | ERR404 | Not found | The error message returned because the requested resource does not exist. |
For a list of error codes, visit the Error Center.