Updating the Service Mesh Configuration - UpdateMeshConfig
Function
This API is used to update the service mesh configuration.
Call Method
For details, see How to Call an API.
Authorization Information
Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
URI
PUT /v1/{project_id}/meshes/{mesh_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| mesh_id | Yes | String | Service mesh ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. |
| Content-Type | Yes | String | Message body type (or format). Range: |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| config | Yes | UpdateMeshConfig object | Service mesh update configuration |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| telemetryConfig | No | TelemetryConfig object |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| metrics | No | Metric object | Application metric configuration, which is used to report service mesh metrics. To enable this configuration, you need to install the Cloud Native Cluster Monitoring add-on in the cluster. |
| accessLogging | No | AccessLogging object | Access log configuration, which is used to report access logs of Istio proxies in the service mesh. To enable this configuration, you need to install the Cloud Native Log Collection add-on in the cluster. |
| tracing | No | Tracing object | Tracing configuration, which is used to report traces in the service mesh |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| aom | No | Array of Aom objects | AOM instance configuration |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| lts | No | Array of LtsConfig objects | LTS configuration |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| logGroupID | No | String | Log group ID of access logs |
| logStreamID | No | String | Log stream ID of access logs |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| randomSamplingPercentage | No | Float | Trace sampling rate |
| defaultProviders | No | Array of strings | Name of the default provider that tracing reports data to, which must match the name field in extensionProviders or use the preset provider apm-otel of ASM. If apm-otel is used, ensure that APM 2.0 is supported in the current region and the service mesh version is later than 1.18. |
| extensionProviders | No | Array of TracingExtensionProvider objects | User-defined provider. Currently, Zipkin is supported. If you configure the Zipkin provider, ensure that the service mesh version is 1.15 or later. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | No | String | Provider name |
| zipkin | No | ZipkinTracingProvider object | Provider's Zipkin configuration |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| - | String | The service mesh is updated. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
| errorMsg | String | Error message |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
| errorMsg | String | Error message |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
| errorMsg | String | Error message |
Example Request
Disabling tracing for a service mesh
PUT /v1/719217bc273743xxxxxxxxae8bc34480/meshes/217719bc273743xxxxxxxxae4808bc34
{
"config" : {
"telemetryConfig" : {
"tracing" : {
"defaultProviders" : [ ]
}
}
}
} Example Response
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | The service mesh configuration is updated. |
| 400 | Verification failed due to incorrect parameters for querying the specified service mesh. |
| 404 | The service mesh was not found. |
| 500 | Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot