Adds a non-containerized application to an Alibaba Cloud Service Mesh (ASM) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Ips String Yes 192.1**. *. *,192.1**. *. *

The IP addresses of the application. Separate multiple IP addresses with commas (,).

Labels String Yes app=http-workload

The tags of the application. Separate multiple tags with commas (,).

Namespace String Yes hello

The namespace of the application.

Ports String Yes http:8000,http:8001

The information about the ports of the application. Set the value in the following format: Port name:Port number.Separate multiple ports with commas (,).

ServiceMeshId String Yes cb8963379255149cb98c8686f274****

The ID of the ASM instance.

ServiceName String Yes http-service

The name of the application.

Annotations String No env=staging,group=0001

The annotation of the application. Separate multiple annotations with commas (,).

ServiceAccount String No http-sa

The account of the application.

Force Boolean No false

Specifies whether to forcibly skip items that failed to be created. Default value: false.

Response parameters

Parameter Type Example Description
Data String ...

The returned information.

RequestId String BD65C0AD-D3C6-48D3-8D93-38D2015C****

The ID of the request.


 {
  "RequestId": "9522f7c9-63a1-4603-b850-37d12a1e****",
  "Data": {
    "mesh-expansion-http-service": {
      "metadata": {
        "generation": 1,
        "uid": "95717103-d4b2-4c2d-b771-3acecc97****",
        "resourceVersion": "124747****",
        "creationTimestamp": "2020-08-11T09:14:45Z",
        "name": "mesh-expansion-http-service",
        "namespace": "hello",
        "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/hello/serviceentries/mesh-expansion-http-service"
      },
      "apiVersion": "networking.istio.io/v1alpha3",
      "kind": "ServiceEntry",
      "spec": {
        "workloadSelector": {
          "labels": {
            "app": "http-workload"
          }
        },
        "hosts": [
          "http-service.hello.svc.cluster.local"
        ],
        "location": "MESH_INTERNAL",
        "ports": [
          {
            "number": 8000,
            "protocol": "HTTP",
            "name": "http-8000"
          },
          {
            "number": 8001,
            "protocol": "HTTP",
            "name": "http-8001"
          }
        ],
        "resolution": "STATIC"
      }
    },
    "http-service": [
      {
        "metadata": {
          "uid": "b447f308-2adf-4da6-99c3-f08ad1d8****",
          "resourceVersion": "114104****",
          "name": "http-service",
          "namespace": "hello",
          "creationTimestamp": "2020-08-11T09:14:45Z",
          "annotations": {
            "env": "staging",
            "group": "0001",
            "kubernetes.io/service-account.name": "http-sa"
          },
          "selfLink": "/api/v1/namespaces/hello/services/http-service",
          "labels": {
            "app": "http-workload"
          }
        },
        "spec": {
          "sessionAffinity": "None",
          "ports": [
            {
              "protocol": "TCP",
              "port": 8000,
              "name": "http-8000",
              "targetPort": 8000
            },
            {
              "protocol": "TCP",
              "port": 8001,
              "name": "http-8001",
              "targetPort": 8001
            }
          ],
          "type": "ClusterIP",
          "clusterIP": "172.21. **.**"
        },
        "status": {
          "loadBalancer": {}
        }
      }
    ],
    "mesh-expansion-http-service-2": {
      "metadata": {
        "generation": 1,
        "uid": "067a9df8-806c-4614-9683-12b5404****",
        "resourceVersion": "1247474706",
        "creationTimestamp": "2020-08-11T09:14:45Z",
        "name": "mesh-expansion-http-service-2",
        "namespace": "hello",
        "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/hello/workloadentries/mesh-expansion-http-service-2"
      },
      "apiVersion": "networking.istio.io/v1alpha3",
      "kind": "WorkloadEntry",
      "spec": {
        "address": "192.168.0.3",
        "labels": {
          "app": "http-workload"
        }
      }
    },
    "mesh-expansion-http-service-1": {
      "metadata": {
        "generation": 1,
        "uid": "2b47a7e7-76f4-4a69-9988-5145e8a****",
        "resourceVersion": "12474****",
        "creationTimestamp": "2020-08-11T09:14:45Z",
        "name": "mesh-expansion-http-service-1",
        "namespace": "hello",
        "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/hello/workloadentries/mesh-expansion-http-service-1"
      },
      "apiVersion": "networking.istio.io/v1alpha3",
      "kind": "WorkloadEntry",
      "spec": {
        "address": "192.168.0.2",
        "labels": {
          "app": "http-workload"
        }
      }
    }
  }
}

Examples

Sample requests

http(s)://[Endpoint]/? Action=AddVmAppToMesh
&<Common request parameters>

Sample success responses

XML format

<RequestId>BD65C0AD-D3C6-48D3-8D93-38D2015C****</RequestId>
<Data>... </Data>

JSON format

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

Error codes

HttpCode Error code Error message Description
404 ServiceMesh.NotFound The Service Mesh cluster does not exist. The ASM instance does not exist.

For a list of error codes, visit the API Error Center.