All Products
Search
Document Center

Cloud Control API:Manage Cloud Resources with the Cloud Control API in OpenAPI Explorer

Last Updated:Feb 27, 2026

This guide demonstrates how to use OpenAPI Explorer to manage cloud resources through the Cloud Control API. Using Virtual Private Cloud (VPC) as an example, you will learn to perform the complete lifecycle of operations—create, retrieve, update, list, and delete—on a resource.

Prerequisites

  • RAM user: For security, we recommend using a Resource Access Management (RAM) user instead of your Alibaba Cloud account. For more information, see Create a RAM user.

  • Required permissions: Attach the following policies to your RAM user:

Understand API operations

The Cloud Control API uses standardized operations to manage resources. This tutorial covers the following core operations for a VPC, which has the product code VPC and resource type VPC:

  • CreateResource: Creates a new resource.

  • GetResource: Retrieves the details of a specific resource.

  • UpdateResource: Modifies an existing resource.

  • ListResources: Lists all resources of a specific type in a region.

  • DeleteResource: Deletes a resource.

Synchronous and asynchronous operations

The Cloud Control API can respond in two ways:

  • Synchronous (Status 200): The operation is completed immediately, and the response body contains the result.

  • Asynchronous (Status 202): The operation has been accepted and will run in the background. The response returns a taskId, which you must use to call the GetTask operation to check the final status of the task.

Procedure

Step 1: Create a VPC

  1. Log on to OpenAPI Explorer as your RAM user and navigate to the CreateResource page for VPCs. In the parameters section, specify the regionId and define the resource properties in the body. Then, click Initiate Call.

    创建vpc.png

  2. Review the response in the Response tab.

    If the call fails, click Diagnose or use the common error codes to troubleshoot. You can also contact us for support.

    A successful call returns a status code of 200 (synchronous operation) or 202 (asynchronous operation). From the response body, copy the taskId and resourceId for the next steps.

    创建vpc返回.png

  3. In this example, the status code is 202, which indicates an asynchronous operation. Record the taskId and click Query task to navigate to the task query page.

    点击查询任务.png

Step 2: Check the creation task status

  1. Navigate to the GetTask page. Paste the taskId from the previous step into the taskId field and click Initiate Call. Verify that the task status is Succeeded.

    任务查询.png

  2. You can also verify the creation by navigating to the VPC console.

    控制台查看.png

Step 3: Retrieve VPC details

Navigate to the GetResource page. Enter the resourceId you copied in Step 1 and the correct regionId. Click Initiate Call to retrieve the details of your new VPC.

资源查询.png

Step 4: Update the VPC

Navigate to the UpdateResource page. Provide the resourceId and regionId. In the body, specify the properties you want to change (for example, the Description). Click Initiate Call and verify the update in the VPC console.

资源更新.png

Step 5: List VPCs

Navigate to the GetResources page. Select a regionId and click Initiate Call. The response will include the VPC you created in the list of resources.

资源列举.png

Step 6: Delete the VPC

  1. To clean up the resource, navigate to the DeleteResource page. Enter the resourceId and regionId of the VPC you created, and click Initiate Call.

    资源删除.png

  2. The successful call returns a status code of 202 and a new taskId.

    Use the GetTask operation again to check the status of this deletion task. A status of Succeeded confirms that the VPC has been deleted.

    删除任务查询.png

Sample code

Explore the official code samples on GitHub to learn more about how to use the Cloud Control API programmatically: Cloud Control API Demo Repository.