调用DescribeServiceMeshes接口获取服务网格列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | DescribeServiceMeshes |
系统规定参数。取值:DescribeServiceMeshes。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RequestId | String | BD65C0AD-D3C6-48D3-8D93-38D2015C**** |
请求ID。 |
| ServiceMeshes | Array of ServiceMesh |
服务网格详情。 |
|
| Endpoints | Object |
端点详情。 |
|
| IntranetPilotEndpoint | String | 192.168.xx.xx:15011 |
Istio Pilot地址(内网)。 |
| ReverseTunnelEndpoint | String | ... |
反向通道端点。 |
| PublicPilotEndpoint | String | 182.92.xx.xx:15011 |
Istio Pilot地址(公网)。 |
| IntranetApiServerEndpoint | String | https://192.168.xx.xx:6443 |
API Server地址(内网)。 |
| PublicApiServerEndpoint | String | https://123.56.xx.xx:6443 |
API Server地址(公网)。 |
| ServiceMeshInfo | Object |
服务网格基本信息。 |
|
| Profile | String | Pro |
商业化之前的网格实例规格,取值:
|
| CreationTime | String | 2020-04-21T09:42:20+08:00 |
服务网格创建时间。 |
| UpdateTime | String | 2020-04-21T09:42:20+08:00 |
服务网格最后修改时间。 |
| ErrorMessage | String | error |
异常信息。 |
| Version | String | 1 |
服务网格版本号。 |
| State | String | success |
服务网格状态。 |
| ServiceMeshId | String | cb8963379255149cb98c8686f274x**** |
服务网格ID。 |
| Name | String | test |
服务网格名称。 |
| RegionId | String | cn-beijing |
服务网格所在地域ID。 |
| Spec | Object |
规格信息。 |
|
| Network | Object |
服务网格网络配置信息。 |
|
| VpcId | String | vpc-2zew0rajjkmxy2369**** |
专有网络ID。 |
| SecurityGroupId | String | sg-2ze384sxttxbctnj**** |
安全组ID。 |
| VSwitches | Array of String | ["1","2"] |
虚拟交换机ID列表。 |
| LoadBalancer | Object |
负载均衡信息。 |
|
| PilotPublicEip | Boolean | true |
是否使用公网地址暴露Istio Pilot,取值:
|
| PilotPublicLoadbalancerId | String | lb-2zesa8qs8kbkj9jkl**** |
公网地址暴露Istio Pilot对应的负载均衡ID。 |
| ApiServerLoadbalancerId | String | lb-2zekaak10uxds44vx**** |
公网地址暴露API Server对应的负载均衡ID。 |
| ApiServerPublicEip | Boolean | true |
是否使用公网地址暴露API Server,取值:
|
| MeshConfig | Object |
服务网格配置信息。 |
|
| Telemetry | Boolean | true |
是否开启采集Prometheus 监控指标(建议使用阿里云Prometheus监控),取值:
|
| OutboundTrafficPolicy | String | ALLOW_ANY |
外部流量策略,取值:
|
| Tracing | Boolean | true |
是否启用链路追踪(需要开通阿里云链路追踪服务),取值:
|
| StrictMtls | Boolean | true |
模式。 |
| Pilot | Object |
控制面配置。 |
|
| Http10Enabled | Boolean | true |
是否启用支持HTTP 1.0。取值:
|
| TraceSampling | Float | 0.2 |
启用链路追踪时的采样率。 |
| Mtls | Boolean | true |
是否启用服务就近访问,取值:
|
| SidecarInjector | Object |
Sidecar注入配置。 |
|
| EnableNamespacesByDefault | Boolean | false |
是否为所有命名空间开启自动注入功能。
|
| AutoInjectionPolicyEnabled | Boolean | true |
通过Pod Annotations实现自动注入。 |
| InitCNIConfiguration | Object |
CNI初始化配置。 |
|
| ExcludeNamespaces | String | default,foo |
要从Istio Pod检查中排除的名称空间。 |
| Enabled | Boolean | true |
为istio-proxy进行流量重定向时,是否需要赋予istio-init容器特权,取值:
|
| Clusters | Array of String | ["caf089e56daba4c51a8906fe43ea1****","c80f45444b3da447da60a911390c2****"] |
集群列表。 |
| ClusterSpec | String | standard |
服务网格实例规格,取值:
|
| OwnerType | String | ackone |
创建网格的云产品类型,取值:
|
| OwnerId | String | cc3e96f249d124eb38b72718ec5***** |
创建网格的云产品实例ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeServiceMeshes
&公共请求参数
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeServiceMeshesResponse>
<RequestId>BD65C0AD-D3C6-48D3-8D93-38D2015C****</RequestId>
<ServiceMeshes>
<Endpoints>
<IntranetPilotEndpoint>192.168.xx.xx:15011</IntranetPilotEndpoint>
<ReverseTunnelEndpoint>...</ReverseTunnelEndpoint>
<PublicPilotEndpoint>182.92.xx.xx:15011</PublicPilotEndpoint>
<IntranetApiServerEndpoint>https://192.168.xx.xx:6443</IntranetApiServerEndpoint>
<PublicApiServerEndpoint>https://123.56.xx.xx:6443</PublicApiServerEndpoint>
</Endpoints>
<ServiceMeshInfo>
<Profile>Pro</Profile>
<CreationTime>2020-04-21T09:42:20+08:00</CreationTime>
<UpdateTime>2020-04-21T09:42:20+08:00</UpdateTime>
<ErrorMessage>error</ErrorMessage>
<Version>1</Version>
<State>success</State>
<ServiceMeshId>cb8963379255149cb98c8686f274x****</ServiceMeshId>
<Name>test</Name>
<RegionId>cn-beijing</RegionId>
</ServiceMeshInfo>
<Spec>
<Network>
<VpcId>vpc-2zew0rajjkmxy2369****</VpcId>
<SecurityGroupId>sg-2ze384sxttxbctnj****</SecurityGroupId>
<VSwitches>["1","2"]</VSwitches>
</Network>
<LoadBalancer>
<PilotPublicEip>true</PilotPublicEip>
<PilotPublicLoadbalancerId>lb-2zesa8qs8kbkj9jkl****</PilotPublicLoadbalancerId>
<ApiServerLoadbalancerId>lb-2zekaak10uxds44vx****</ApiServerLoadbalancerId>
<ApiServerPublicEip>true</ApiServerPublicEip>
</LoadBalancer>
<MeshConfig>
<Telemetry>true</Telemetry>
<OutboundTrafficPolicy>xxx</OutboundTrafficPolicy>
<Tracing>true</Tracing>
<StrictMtls>true</StrictMtls>
<Pilot>
<Http10Enabled>true</Http10Enabled>
<TraceSampling>0.2</TraceSampling>
</Pilot>
<Mtls>true</Mtls>
<SidecarInjector>
<EnableNamespacesByDefault>false</EnableNamespacesByDefault>
<AutoInjectionPolicyEnabled>true</AutoInjectionPolicyEnabled>
<InitCNIConfiguration>
<ExcludeNamespaces>default,foo</ExcludeNamespaces>
<Enabled>true</Enabled>
</InitCNIConfiguration>
</SidecarInjector>
</MeshConfig>
</Spec>
<Clusters>["caf089e56daba4c51a8906fe43ea1****","c80f45444b3da447da60a911390c2****"]</Clusters>
<ClusterSpec>standard</ClusterSpec>
<OwnerType>ackone</OwnerType>
<OwnerId>cc3e96f249d124eb38b72718ec5*****</OwnerId>
</ServiceMeshes>
</DescribeServiceMeshesResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "BD65C0AD-D3C6-48D3-8D93-38D2015C****",
"ServiceMeshes" : {
"Endpoints" : {
"IntranetPilotEndpoint" : "192.168.xx.xx:15011",
"ReverseTunnelEndpoint" : "...",
"PublicPilotEndpoint" : "182.92.xx.xx:15011",
"IntranetApiServerEndpoint" : "https://192.168.xx.xx:6443",
"PublicApiServerEndpoint" : "https://123.56.xx.xx:6443"
},
"ServiceMeshInfo" : {
"Profile" : "Pro",
"CreationTime" : "2020-04-21T09:42:20+08:00",
"UpdateTime" : "2020-04-21T09:42:20+08:00",
"ErrorMessage" : "error",
"Version" : 1,
"State" : "success",
"ServiceMeshId" : "cb8963379255149cb98c8686f274x****",
"Name" : "test",
"RegionId" : "cn-beijing"
},
"Spec" : {
"Network" : {
"VpcId" : "vpc-2zew0rajjkmxy2369****",
"SecurityGroupId" : "sg-2ze384sxttxbctnj****",
"VSwitches" : "[\"1\",\"2\"]"
},
"LoadBalancer" : {
"PilotPublicEip" : true,
"PilotPublicLoadbalancerId" : "lb-2zesa8qs8kbkj9jkl****",
"ApiServerLoadbalancerId" : "lb-2zekaak10uxds44vx****",
"ApiServerPublicEip" : true
},
"MeshConfig" : {
"Telemetry" : true,
"OutboundTrafficPolicy" : "xxx",
"Tracing" : true,
"StrictMtls" : true,
"Pilot" : {
"Http10Enabled" : true,
"TraceSampling" : 0.2
},
"Mtls" : true,
"SidecarInjector" : {
"EnableNamespacesByDefault" : false,
"AutoInjectionPolicyEnabled" : true,
"InitCNIConfiguration" : {
"ExcludeNamespaces" : "default,foo",
"Enabled" : true
}
}
}
},
"Clusters" : "[\"caf089e56daba4c51a8906fe43ea1****\",\"c80f45444b3da447da60a911390c2****\"]",
"ClusterSpec" : "standard",
"OwnerType" : "ackone",
"OwnerId" : "cc3e96f249d124eb38b72718ec5*****"
}
}
错误码
访问错误中心查看更多错误码。