Revokes a kubeconfig file of an Alibaba Cloud Service Mesh (ASM) instance and generates a new kubeconfig file.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | RevokeKubeconfig |
The operation that you want to perform. Set the value to RevokeKubeconfig. |
| ServiceMeshId | String | Yes | cf08a11940e8c46c48bc791fcdb3**** |
The ID of the ASM instance for which you want to revoke a kubeconfig file. |
| PrivateIpAddress | Boolean | No | false |
Specifies whether to return the kubeconfig file for private access.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 7CF71C8B-79DD-150F-929E-267C51C5E311 |
The ID of the request. |
| Kubeconfig | String | apiVersion: v1 clusters: - cluster: server: https://121.**.**.**:6443 certificate-authority-data: ***** name: kubernetes contexts: - context: cluster: kubernetes user: "*****" name: ***** current-context: ***** kind: Config preferences: {} users: - name: "*****" user: client-certificate-data: ***** client-key-data: ***** |
The new kubeconfig file generated. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=RevokeKubeconfig
&ServiceMeshId=cf08a11940e8c46c48bc791fcdb3****
&PrivateIpAddress=false
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<RevokeKubeconfigResponse>
<RequestId>7CF71C8B-79DD-150F-929E-267C51C5E311</RequestId>
<Kubeconfig>apiVersion: v1 clusters: - cluster: server: https://121.**.**.**:6443 certificate-authority-data: ***** name: kubernetes contexts: - context: cluster: kubernetes user: "*****" name: ***** current-context: ***** kind: Config preferences: {} users: - name: "*****" user: client-certificate-data: ***** client-key-data: *****</Kubeconfig>
</RevokeKubeconfigResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "7CF71C8B-79DD-150F-929E-267C51C5E311",
"Kubeconfig" : "apiVersion: v1 clusters: - cluster: server: https://121.**.**.**:6443 certificate-authority-data: ***** name: kubernetes contexts: - context: cluster: kubernetes user: \"*****\" name: ***** current-context: ***** kind: Config preferences: {} users: - name: \"*****\" user: client-certificate-data: ***** client-key-data: *****"
}
Error codes
For a list of error codes, visit the API Error Center.