Querying a Service Mesh

Function

This API is used to obtain details about a service mesh.

URI

GET /v1/meshes/{mesh_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

mesh_id

Yes

String

Service mesh ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

X-Apply-ProjectID

Yes

String

ID of the project that the service mesh belongs to.

Response Parameters

Status code: 200

Table 3 Parameters in the response body

Parameter

Type

Description

apiVersion

String

API version. The value is fixed at v1 and cannot be changed.

kind

String

API type. The value is fixed at Mesh or mesh and cannot be changed.

metadata

Table4 MeshMetadata object

Basic information about the service mesh. Metadata is a collection of attributes.

spec

Table 5 MeshSpec object

Detailed description of the service mesh. ASM creates or updates the service mesh by spec.

status

Table 8 MeshStatus object

Service mesh status,

which is automatically generated by ASM.

Table 4 MeshMetadata

Parameter

Type

Description

name

String

Service mesh name.

uid

String

Service mesh ID, which is unique and automatically generated after the service mesh is created.

creationTimestamp

String

Time when the service mesh was created.

Table 5 MeshSpec

Parameter

Type

Description

region

String

Region where the control plane components of the service mesh are located.

type

String

Service mesh type.

InCluster: service mesh with an in-cluster control plane. The value is InCluster for the service mesh of the Basic edition.

version

String

Service mesh version.

extendParams

Table 6 MeshExtendParams object

Extensions of the service mesh.

Table 6 MeshExtendParams

Parameter

Type

Description

clusters

Array of Table 7 MeshCluster objects

Information about clusters in service meshes (only for the Basic edition).

Table 7 MeshCluster

Parameter

Type

Description

clusterID

String

Cluster ID, which is unique and can be used to query the cluster to be added.

projectID

String

ID of the project that the cluster belongs to.

Table 8 MeshStatus

Parameter

Type

Description

phase

String

Service mesh status. The options are as follows:

  • Running: The service mesh is running.

  • Creating: The service mesh is being created.

  • CreateFailed: The service mesh fails to be created.

  • Deleting: The service mesh is being deleted.

  • DeleteFailed: The service mesh fails to be deleted.

  • Upgrading: The service mesh is being upgraded.

  • UpgradeFailed: The service mesh fails to be upgraded.

  • RollingBack: The service mesh is being rolled back.

  • RollbackFailed: The service mesh fails to be rolled back.

updateTimestamp

String

Time when the service mesh was updated.

Status code: 400

Table 9 Parameters in the response body

Parameter

Type

Description

errorCode

String

Error code.

Minimum length: 8

Maximum length: 36

errorMsg

String

Error message.

Minimum length: 2

Maximum length: 512

Status code: 404

Table 10 Parameters in the response body

Parameter

Type

Description

errorCode

String

Error code.

Minimum length: 8

Maximum length: 36

errorMsg

String

Error message.

Minimum length: 2

Maximum length: 512

Status code: 500

Table 11 Parameters in the response body

Parameter

Type

Description

errorCode

String

Error code.

Minimum length: 8

Maximum length: 36

errorMsg

String

Error message.

Minimum length: 2

Maximum length: 512

Example Request

None

Example Response

Status code: 200

The details about the service mesh are obtained.

{
  "kind" : "Mesh",
  "apiVersion" : "v1",
  "metadata" : {
    "name" : "mesh-test-api1",
    "uid" : "b0906529-5871-xxxx-xxxx-8f93784d267c",
    "creationTimestamp" : "2024-12-10T07:29:37Z"
  },
  "spec" : {
    "domainID": "06e6bafb794746xxxxxxxx536497ea95",
    "region" : "eu-de-01",
    "type" : "InCluster",
    "version" : "1.15.7-r4",
    "extendParams" : {
      "clusters" : [ {
        "clusterID" : "8df4c986-b052-xxxx-xxxx-0255ac101231",
        "meshID": "729f4f96-5790-xxxx-xxxx-f9afaac38726",
        "region": "eu-de-01",
        "projectID" : "719217bc273743xxxxxxxxae8bc34480"
        "provider": "CCE",
        "proxyMode": "sidecar"
      } ]
    }
  },
  "status" : {
    "phase" : "Running",
    "updateTimestamp" : "2024-12-10T07:36:42Z"
  }
}

Status Codes

Status Code

Description

200

The details about the service mesh are obtained.

400

Verification failed due to incorrect parameters for obtaining the details about the service mesh.

404

The specified service mesh is not found.

500

An error occurs during the service mesh query.