All Products
Search
Document Center

Alibaba Cloud Service Mesh:CreateServiceMesh

Last Updated:Oct 14, 2024

Creates a Service Mesh (ASM) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
servicemesh:CreateServiceMeshcreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region in which the ASM instance resides.

cn-hangzhou
IstioVersionstringNo

The Istio version of the ASM instance.

v1.5.4.1-g5960ec40-aliyun
VpcIdstringYes

The ID of the virtual private cloud (VPC) in which the ASM instance resides.

vpc-xzelac2tw4ic7wz31****
ApiServerPublicEipbooleanNo

Specifies whether to expose the API server to the Internet. Valid values:

  • true
  • false

Default value: false.

Note If you set this parameter to false, the API server cannot be accessed over the Internet.
false
TracingbooleanNo

Specifies whether to enable the Tracing Analysis feature. Valid values:

  • true
  • false

Default value: false.

false
NamestringNo

The name of the ASM instance.

mesh1
VSwitchesstringYes

The ID of the vSwitch to which the ASM instance is connected.

["vsw-xzegf5dndkbf4m6eg****"]
TraceSamplingfloatNo

The sampling percentage of Tracing Analysis.

100
CustomizedZipkinbooleanNo

Specifies whether to use a self-managed Zipkin system to collect tracing data. Valid values:

  • true: uses a self-managed Zipkin system to collect tracing data.
  • false: uses Alibaba Cloud Tracing Analysis to collect tracing data.

Default value: false.

false
LocalityLoadBalancingbooleanNo

Specifies whether to route traffic to the nearest instance. Valid values:

  • true
  • false

Default value: false.

false
LocalityLBConfstringNo

The configurations for the access to the nearest instance.

{"failover":[{"from":"cn-hangzhou","to":"cn-shanghai"}]}
TelemetrybooleanNo

Specifies whether to enable Prometheus monitoring. We recommend that you use Prometheus Service of Application Real-Time Monitoring Service (ARMS). Valid values:

  • true
  • false

Default value: false.

false
OpenAgentPolicybooleanNo

Specifies whether to install the Open Policy Agent (OPA) plug-in. Valid values:

  • true
  • false

Default value: false.

false
OPALogLevelstringNo

The log level of the OPA container.

info
OPARequestCPUstringNo

The minimum number of CPU cores that are required by the OPA container. You can specify the parameter value in the standard representation form of CPUs in Kubernetes. For example, if you set the value to 1, one CPU core is required.

1
OPARequestMemorystringNo

The minimum size of the memory that is required by the OPA container. You can specify the parameter value in the standard quantity representation form used by Kubernetes. 1 Mi equals 1,024 KB.

512Mi
OPALimitCPUstringNo

The maximum number of CPU cores that are available to the OPA container.

2
OPALimitMemorystringNo

The maximum size of the memory that is available to the OPA container. You can specify the parameter value in the standard quantity representation form used by Kubernetes. 1 Mi equals 1,024 KB.

1024Mi
EnableAuditbooleanNo

Specifies whether to enable the mesh audit feature. To enable this feature, make sure that you have activated Log Service. Valid values:

  • true
  • false

Default value: false.

false
AuditProjectstringNo

The name of the Log Service project that is used for mesh audit.

Default value: mesh-log-{ASM instance ID}.

mesh-log-xxxx
ClusterDomainstringNo

ASM cluster domain.

cluster.local
ProxyRequestCPUstringNo

The minimum number of CPU cores that are required by the proxy container.

100m
ProxyRequestMemorystringNo

The minimum size of the memory that is required by the proxy container.

128Mi
ProxyLimitCPUstringNo

The maximum number of CPU cores that are available to the proxy container.

2000m
ProxyLimitMemorystringNo

The maximum size of the memory that is available to the proxy container.

1024Mi
IncludeIPRangesstringNo

The IP ranges in CIDR form for which traffic is to be redirected to the sidecar proxy in the ASM instance.

*
ExcludeIPRangesstringNo

The IP ranges in CIDR form to be excluded from redirection to the sidecar proxy in the ASM instance.

100.100.10*.***
ExcludeOutboundPortsstringNo

The outbound ports to be excluded from redirection to the sidecar proxy in the ASM instance. Separate multiple port numbers with commas (,).

80,81
ExcludeInboundPortsstringNo

The inbound ports to be excluded from redirection to the sidecar proxy in the ASM instance. Separate multiple port numbers with commas (,).

80,81
OpaEnabledbooleanNo

Specifies whether to enable the OPA plug-in. Valid values:

  • true
  • false

Default value: false.

false
KialiEnabledbooleanNo

Specifies whether to enable the mesh topology feature. To enable this feature, make sure that you have enabled Prometheus monitoring. If Prometheus monitoring is disabled, you must set this parameter to false.`` Valid values:

  • true
  • false

Default value: false.

false
AccessLogEnabledbooleanNo

Specifies whether to enable access log collection. Valid values:

  • true
  • false

Default value: false.

false
CustomizedPrometheusbooleanNo

Specifies whether to use a custom Prometheus instance. Valid values:

  • true
  • false

Default value: false.

false
PrometheusUrlstringNo

The endpoint of the custom Prometheus instance.

http://prometheus:9090
RedisFilterEnabledbooleanNo

Specifies whether to enable Redis Filter. Valid values:

  • true
  • false

Default value: false.

true
MysqlFilterEnabledbooleanNo

Specifies whether to enable MySQL Filter. Valid values:

  • true
  • false

Default value: false.

false
ThriftFilterEnabledbooleanNo

Specifies whether to enable Thrift Filter. Valid values:

  • true
  • false

Default value: false.

false
WebAssemblyFilterEnabledbooleanNo

Specifies whether to enable WebAssembly Filter. Valid values:

  • true
  • false

Default value: false.

false
MSEEnabledbooleanNo

Specifies whether to enable Microservices Engine (MSE). Valid values:

  • true
  • false

Default value: false.

false
DNSProxyingEnabledbooleanNo

Specifies whether to enable the DNS proxy feature. Valid values:

  • true
  • false

Default value: false.

false
EditionstringNo

The edition of the ASM instance.

Pro
ConfigSourceEnabledbooleanNo

Specifies whether to enable the external service registry. Valid values:

  • true
  • false

Default value: false.

false
ConfigSourceNacosIDstringNo

The instance ID of the Nacos registry.

mse-cn-tl326******
DubboFilterEnabledbooleanNo

Specifies whether to enable Dubbo Filter. Valid values:

  • true
  • false

Default value: false.

false
FilterGatewayClusterConfigbooleanNo

Specifies whether to enable gateway configuration filtering. Valid values:

  • true
  • false

Default value: false.

false
EnableSDSServerbooleanNo

Specifies whether to enable Secret Discovery Service (SDS). Valid values:

  • true
  • false

Default value: false.

false
AccessLogServiceEnabledbooleanNo

Specifies whether to enable gRPC Access Log Service (ALS) of Envoy. gRPC is short for Google Remote Procedure Call. Valid values:

  • true
  • false

Default value: false.

false
AccessLogServiceHoststringNo

The endpoint of Envoy's gRPC ALS.

0.0.0.0
AccessLogServicePortintegerNo

The port of Envoy's gRPC ALS.

9999
GatewayAPIEnabledbooleanNo

Specifies whether to enable Gateway API. Valid values:

  • true
  • false

Default value: false.

false
ControlPlaneLogEnabledbooleanNo

Specifies whether to enable the collection of control plane logs. Valid values:

  • true
  • false

Default value: false.

false
ControlPlaneLogProjectstringNo

The name of the Log Service project that is used to collect the logs of the control plane.

mesh-log-cf245a429b6ff4b6e97f20797758*****
AccessLogFormatstringNo

Custom fields of access logs. To set this parameter, you must enable access log collection. Otherwise, you cannot set this parameter. The value must be a JSON string. The following key values must be contained: authority_for, bytes_received, bytes_sent, downstream_local_address, downstream_remote_address, duration, istio_policy_status, method, path, protocol, requested_server_name, response_code, response_flags, route_name, start_time, trace_id, upstream_cluster, upstream_host, upstream_local_address, upstream_service_time, upstream_transport_failure_reason, user_agent, and x_forwarded_for.

{"authority_for":"%REQ(:AUTHORITY)%","bytes_received":"%BYTES_RECEIVED%","bytes_sent":"%BYTES_SENT%","downstream_local_address":"%DOWNSTREAM_LOCAL_ADDRESS%","downstream_remote_address":"%DOWNSTREAM_REMOTE_ADDRESS%","duration":"%DURATION%","istio_policy_status":"%DYNAMIC_METADATA(istio.mixer:status)%","method":"%REQ(:METHOD)%","path":"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%","protocol":"%PROTOCOL%","request_id":"%REQ(X-REQUEST-ID)%","requested_server_name":"%REQUESTED_SERVER_NAME%","response_code":"%RESPONSE_CODE%","response_flags":"%RESPONSE_FLAGS%","route_name":"%ROUTE_NAME%","start_time":"%START_TIME%","trace_id":"%REQ(X-B3-TRACEID)%","upstream_cluster":"%UPSTREAM_CLUSTER%","upstream_host":"%UPSTREAM_HOST%","upstream_local_address":"%UPSTREAM_LOCAL_ADDRESS%","upstream_service_time":"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%","upstream_transport_failure_reason":"%UPSTREAM_TRANSPORT_FAILURE_REASON%","user_agent":"%REQ(USER-AGENT)%","x_forwarded_for":"%REQ(X-FORWARDED-FOR)%"}
AccessLogFilestringNo

Specifies whether to enable access log collection. Valid values:

  • "": disables access log collection.
  • /dev/stdout: enables access log collection. Access logs are written to /dev/stdout.
/dev/stdout
AccessLogProjectstringNo

The SLS project from which access logs are collected.

mesh-log-cf245a429b6ff4b6e97f20797758*****
EnableCRHistorybooleanNo

Specifies whether to enable the rollback feature for Istio resources. Valid values:

  • true
  • false

Default value: false.

false
CRAggregationEnabledbooleanNo

Specifies whether to allow the Kubernetes API of clusters on the data plane to access Istio resources. The version of the ASM instance must be V1.9.7.93 or later. Valid values:

  • true
  • false

Default value: false.

false
ApiServerLoadBalancerSpecstringNo

The type of the Classic Load Balancer (CLB) instance that is bound to the API server. Valid values: slb.s1.small, slb.s2.small, slb.s2.medium, slb.s3.small, slb.s3.medium, and slb.s3.large.

slb.s1.small
PilotLoadBalancerSpecstringNo

The type of the CLB instance that is bound to Istio Pilot. Valid values: slb.s1.small, slb.s2.small, slb.s2.medium, slb.s3.small, slb.s3.medium, and slb.s3.large.

slb.s1.small
ChargeTypestringNo

The billing method of the CLB instance. Valid values:

  • PayOnDemand: pay-as-you-go
  • PrePay: subscription
PrePay
PeriodintegerNo

The subscription period of the CLB instance. This parameter is valid only if ChargeType is set to PrePay. The value of this parameter indicates the subscription period of the CLB instance. Unit: month. For example, if the subscription period is one year, set this parameter to 12.

3
AutoRenewbooleanNo

Specifies whether to enable auto-renewal for the CLB instance if the CLB instance uses the subscription billing method. Valid values:

  • true
  • false
true
AutoRenewPeriodintegerNo

The auto-renewal period of the subscription CLB instance. This parameter is valid only if ChargeType is set to PrePay. If the original subscription period of the CLB instance is less than one year, the value of this parameter indicates the number of months for auto-renewal. If the original subscription period of the CLB instance is more than one year, the value of this parameter indicates the number of years for auto-renewal.

3
ClusterSpecstringNo

The edition of the ASM instance. Valid values:

  • standard: Standard Edition

  • enterprise: Enterprise Edition

  • ultimate: Ultimate Edition

standard
MultiBufferEnabledbooleanNo

Specifies whether to enable MultiBuffer-based Transport Layer Security (TLS) acceleration. Valid values:

  • true

  • false

Default value: true

true
MultiBufferPollDelaystringNo

The pull-request latency. Default value: 30. Unit: seconds.

30s
UseExistingCAbooleanNo

Specifies whether to use an existing CA certificate and private key.

false
ExistingCaCertstringNo

The existing CA certificate, which is encoded in Base64. This parameter is used in scenarios where you migrate open source Istio to ASM. It specifies the content of the ca-cert.pem file in the istio-ca-secret secret. The secret is in the istio-system namespace of the Kubernetes cluster where the open source Istio is installed.

CA cert content, base64 encoded format.
ExistingCaKeystringNo

The existing CA key, which is encoded in Base64. This parameter is used in scenarios where you migrate open source Istio to ASM. It specifies the content of the ca-key.pem file in the istio-ca-secret secret. The secret is in the istio-system namespace of the Kubernetes cluster where the open source Istio is installed.

CA key content, base64 encoded format.
ExistingCaTypedeprecatedstringNo

The type of the existing CA certificate. Valid values:

  • 1: Self-signed certificate generated by istiod. The certificate corresponds to the secret named istio-ca-secret in the istio-system namespace. If you use this type of certificate, you must set the ExistingCaCert and ExsitingCaKey parameters.
  • 2: Administrator-specified certificate. For more information, see plugin ca cert. In most cases, the certificate corresponds to the secret named cacerts in the istio-system namespace. If you use this type of certificate, you must set the ExisingRootCaCert and ExisingRootCaKey parameters.
1
ExistingRootCaCertstringNo

The existing root certificate, which is encoded in Base64.

Existing CA cert content, base64 encoded format.
ExistingRootCaKeydeprecatedstringNo

The private key that corresponds to the root certificate, which is encoded in Base64.

Existing CA key content, base64 encoded format.
CertChainstringNo

The certificate chain from the CA certificate to the root certificate. At least two certificates are included in the chain.

Base64 encoded PEM certificate chain.
GuestClusterstringNo

When you create an ASM instance, you can add a cluster to the ASM instance. If you do not specify this parameter, no cluster is added to the ASM instance. The cluster and the ASM instance must be in the same vSwitch of the same VPC and have the same domain name.

ACK cluster id
Tagarray<object>No

Tag of the ASM instance. A tag contains the following information:

  • key: the name of the tag
  • value: the value of the tag
objectNo
KeystringNo

The name of the tag.

env
ValuestringNo

The value of the tag.

prod
EnableAmbientbooleanNo

Specifies whether to enable the Ambient Mesh mode for the ASM instance.

false
PlaygroundScenestringNo

The playground scenario. If you specify this parameter, an ASM playground instance is created. Valid values:

  • ewmaLb: the exponentially weighted moving average (EWMA) load balancing algorithm.
ewmaLb
EnableACMGbooleanNo

Specifies whether to enable the ACMG mode for the ASM instance.

false

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

BD65C0AD-D3C6-48D3-8D93-38D2015C****
ServiceMeshIdstring

The ID of the ASM instance.

c08ba3fd1e6484b0f8cc1ad8fe10d****

Examples

Sample success responses

JSONformat

{
  "RequestId": "BD65C0AD-D3C6-48D3-8D93-38D2015C****",
  "ServiceMeshId": "c08ba3fd1e6484b0f8cc1ad8fe10d****"
}

Error codes

HTTP status codeError codeError message
404ERR404Not found

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-12The Error code has changed. The request parameters of the API has changedView Change Details
2024-07-12The Error code has changed. The request parameters of the API has changedView Change Details
2024-02-04The Error code has changed. The request parameters of the API has changedView Change Details
2023-11-13The Error code has changed. The request parameters of the API has changedView Change Details
2023-08-15The Error code has changed. The request parameters of the API has changedView Change Details
2023-08-10The Error code has changed. The request parameters of the API has changedView Change Details
2023-08-09The Error code has changed. The request parameters of the API has changedView Change Details
2023-04-13The Error code has changed. The request parameters of the API has changedView Change Details
2022-11-15The Error code has changed. The request parameters of the API has changedView Change Details
2021-12-31The Error code has changed. The request parameters of the API has changedView Change Details
2021-10-28The Error code has changed. The request parameters of the API has changedView Change Details
2021-09-06The Error code has changed. The request parameters of the API has changedView Change Details