全部产品
Search
文档中心

:GetVmMeta - 获取VM网格化所需的元数据信息

更新时间:Apr 21, 2023

获取VM网格化所需的元数据信息。

调试

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

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ServiceMeshIdstring

服务网格ID

ce51a7de4a5144db88a864ed91****
TrustDomainstring

信任域。在同时填写命名空间和服务账号时,默认值为cluster.local;否则将被忽略。

cluster.local
Namespacestring

命名空间。在同时填写命名空间和服务账号时生效,否则将被忽略。

hello
ServiceAccountstring

服务账号。在同时填写命名空间和服务账号时生效,否则将被忽略。

http-sa

返回参数

名称类型描述示例值
object
RequestIdstring

请求ID

9522f7c9-63a1-4603-b850-37d12a****
VmMetaInfoobject

VM网格化所需的元数据信息

TokenPathstring

Token路径

/.../token
HostsContentstring

Hosts内容

....
EnvoyEnvPathstring

EnvoyEnv文件路径

/.../cluster.env
TokenContentstring

Token内容

....
CertChainPathstring

CertChain文件路径

/.../cert-chain.pem
RootCertContentstring

RootCert内容

....
KeyContentstring

Key内容

....
RootCertPathstring

RootCert路径

/.../root-cert.pem
CertChainContentstring

CertChain内容

....
HostsPathstring

Hosts路径

/.../hosts
KeyPathstring

Key文件路径

/.../key.pem
EnvoyEnvContentstring

EnvoyEnv内容

....

示例

正常返回示例

JSON格式

{
  "RequestId": "9522f7c9-63a1-4603-b850-37d12a****",
  "VmMetaInfo": {
    "TokenPath": "/.../token",
    "HostsContent": "....",
    "EnvoyEnvPath": "/.../cluster.env",
    "TokenContent": "....",
    "CertChainPath": "/.../cert-chain.pem",
    "RootCertContent": "....",
    "KeyContent": "....",
    "RootCertPath": "/.../root-cert.pem",
    "CertChainContent": "....",
    "HostsPath": "/.../hosts",
    "KeyPath": "/.../key.pem",
    "EnvoyEnvContent": "...."
  }
}

错误码

HTTP status code错误码错误信息描述
404ServiceMesh.NotFoundThe Service Mesh cluster does not exist.服务网格实例不存在

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