调用RevokeKubeconfig吊销ASM实例的Kubeconfig,并重新生成新的Kubeconfig。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String RevokeKubeconfig

系统规定参数。取值:RevokeKubeconfig

ServiceMeshId String cf08a11940e8c46c48bc791fcdb3****

被吊销Kubeconfig的服务网格ID

PrivateIpAddress Boolean false

是否返回私网访问的Kubeconfig,取值:

  • true:返回私网访问的Kubeconfig
  • false:返回公网访问的Kubeconfig

返回数据

名称 类型 示例值 描述
RequestId String 7CF71C8B-79DD-150F-929E-267C51C5E311

请求ID

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: *****

吊销后生成的新Kubeconfig

示例

请求示例

http(s)://[Endpoint]/?Action=RevokeKubeconfig
&ServiceMeshId=cf08a11940e8c46c48bc791fcdb3****
&PrivateIpAddress=false
&公共请求参数

正常返回示例

XML格式

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格式

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: *****"
}

错误码

访问错误中心查看更多错误码。