You can use Resource Orchestration Service (ROS) to call Cloud Backup resources. This topic describes how to create an Resource Orchestration Service template and use the template to automatically create a backup vault for Cloud Backup.
Supported resources
ROS is an Alibaba Cloud service that simplifies the management of cloud computing resources. You can create a template to describe the required cloud computing resources such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, as well as the dependencies between the resources. ROS automatically creates and configures all resources based on the template to implement automated deployment and O&M. For more information, see What is ROS?
You can use ROS to call the API operations of Cloud Backup. Resources that can be orchestrated by using ROS include regular resources and data resources.
Regular resources:
ALIYUN::HBR::BackupClients: installs backup clients on ECS instances.
ALIYUN::HBR::RestoreJob: creates a restore job.
ALIYUN::HBR::DbAgent: installs a backup client for a database.
ALIYUN::HBR::DbPlan: creates a backup plan.
ALIYUN::HBR::DbVault: creates a mirror vault.
ALIYUN::HBR::Vault: creates a backup vault.
Data resources:
DATASOURCE::HBR::Vaults: queries the information about backup vaults.
Permissions
In this example, you must create a backup vault. By default, Resource Orchestration Service uses the credentials of the user who logs on to the ROS console. The user must be granted the following permission:
AliyunHBRFullAccess: grants full permissions on Cloud Backup.
An Alibaba Cloud account has permissions on all API operations. Security risks may arise if you use an Alibaba Cloud account to call API operations. We recommend that you call API operations or perform routine O&M as a Resource Access Management (RAM) user. Before you call API operations as a RAM user, grant the required permissions to the RAM user based on your business requirements. The RAM user must have the permissions to manage Cloud Backup resources. For more information, see Create a RAM user and authorize the RAM user to access Cloud Backup.
Procedure
Log on to the ROS console. In the top navigation bar, select a region from the Region drop-down list.
In the left-side navigation pane, click Stacks. On the Stacks page, choose
.Specify Template: Select Select an Existing Template.
Template Import Method: Select Enter Template Content.
Template Content: Select ROS and then enter code.
For more information about the syntax, description, and examples of how to create a backup vault, see ALIYUN::HBR::Vault. In this example, create a backup vault named
test-vault
.Click Create and execute the created stack.
View the result.
After the backup vault named
test-vault
is created, you can view the backup vault by calling API operations, running SDKs, or performing operations in the Cloud Backup console.