Learn about the key terms used in Cloud Control API, including resource metadata, parent and child resources, and synchronous and asynchronous operations.
Resource metadata
Resource metadata describes the attributes, types, relationships, and behaviors of resources. All resource management operations are based on resource metadata. You can call GetResourceType to obtain the metadata of a specified resource and interpret the metadata in response parameters.
Resource metadata consists of three parts: basic information, attributes, and extended information.
-
Basic information: the name, associated service, description, deployment level, and billing method of a resource.
-
Attributes: the description of specific resource attributes, private operation parameters, and sensitive attributes.
-
Extended information: authorization and resource capacity details, such as the authorization policy, throttling policy, and quota.
Parent resources and child resources
Parent and child resources are logical concepts that describe the dependencies between resources within the same product. A parent resource contains child resources, and child resources belong to parent resources. This hierarchical relationship helps you manage child resources.
-
How to determine whether a resource belongs to a parent resource
If the resourceType of a resource is in the ****/**** format, the resource belongs to a parent resource. For example, ApsaraDB for Redis contains an instance named DBInstance and a database account named DBInstance/Account. Because the resourceType of the database account is DBInstance/Account, it belongs to the parent resource DBInstance, which is an ApsaraDB for Redis instance.
-
How to manage a resource that belongs to a parent resource
When you call an API operation to manage a child resource, you must include the parent resource information in the request path. For more information, see the requestPath of API request parameters in API Directory.
Synchronous and asynchronous operations
Synchronous and asynchronous operations are two modes of task execution. A synchronous operation returns a response after the task is completed, while an asynchronous operation returns immediately without waiting for the task to finish.
In most cases, Cloud Control API processes operations such as resource querying, listing, updating, and metadata querying synchronously. Time-consuming tasks such as resource creation and deletion are processed asynchronously to improve service stability.
If status code 202 is returned when you call a Cloud Control API operation to create an asynchronous task, you can call the GetTask operation to query the task status.