All Products
Search
Document Center

Enterprise Distributed Application Service:Call the EDAS API with Alibaba Cloud CLI

Last Updated:Mar 12, 2026

Use Alibaba Cloud CLI to call Enterprise Distributed Application Service (EDAS) API operations and manage resources such as namespaces, regions, and clusters from the command line, without writing SDK code.

Before you begin

Command structure

All EDAS CLI commands follow this pattern:

aliyun edas <ApiAction> [--<ParamName> <value>]

Component

Description

aliyun

The base CLI program

edas

The target product (EDAS)

<ApiAction>

The API operation to call, such as InsertOrUpdateRegion or DeleteCluster

--<ParamName> <value>

One or more request parameters required by the operation

Some operations also require the --region and --endpoint parameters to specify the target region and service endpoint.

Find available operations

List all EDAS API operations available through the CLI:

aliyun edas --help

View the parameters and usage of a specific operation:

aliyun edas <ApiAction> --help

For example:

aliyun edas InsertOrUpdateRegion --help

To explore and test operations interactively, use OpenAPI Explorer.

Examples

Before you use Alibaba Cloud CLI to call the EDAS API, you must know the EDAS API operations and the information about each API operation, such as request parameters and response parameters. For details on calling RPC and RESTful API operations, see Call RPC API and RESTful API.

Note

Parameters of different data types in the API operations must comply with the parameter format requirements of Alibaba Cloud CLI. For more information, see Parameter format overview.

Create a namespace

aliyun edas InsertOrUpdateRegion \
  --RegionTag cn-beijing:testheng \
  --RegionName testheng \
  --region cn-beijing \
  --endpoint "edas.cn-beijing.aliyuncs.com"

Parameter

Description

--RegionTag

The unique identifier for the namespace, in the format <region-id>:<namespace-name>

--RegionName

The display name of the namespace

--region

The Alibaba Cloud region where the namespace is created

--endpoint

The EDAS service endpoint for the region

Query regions

This operation takes no parameters and returns all available regions for EDAS.

Delete a cluster from a namespace

aliyun edas DeleteCluster \
  --ClusterId f8b3014e-0f61-493a-a602-6f9b63ba**** \
  --logicalRegionId cn-beijing:docNamespace3

Parameter

Description

--ClusterId

The ID of the cluster to delete

--logicalRegionId

The namespace identifier that contains the cluster

Replace f8b3014e-0f61-493a-a602-6f9b63ba**** with your actual cluster ID.

Automate with shell scripts

When you use Alibaba Cloud CLI to call an API operation to perform a complex task, we recommend that you compile the command text into a shell script and then run the shell script to improve efficiency. For example:

#!/bin/bash
# Create a namespace and verify the result

# Step 1: Create the namespace
aliyun edas InsertOrUpdateRegion \
  --RegionTag cn-beijing:<your-namespace-id> \
  --RegionName <your-namespace-name> \
  --region cn-beijing \
  --endpoint "edas.cn-beijing.aliyuncs.com"

# Step 2: Verify that the namespace was created
aliyun edas ListAliyunRegion

Replace the following placeholders with your actual values:

Placeholder

Description

Example

<your-namespace-id>

The namespace identifier

mynamespace

<your-namespace-name>

The display name for the namespace

mynamespace

Note

The examples in this topic use Bash syntax. If you use PowerShell or Command Prompt on Windows, adjust the line continuation characters accordingly (\ in Bash, ` `` in PowerShell).

See also