Create and manage custom transfer rules

Updated at: 2024-12-09 06:31

You can create custom transfer rules based on conditions such as resource names and tags. The system then identifies existing resources, newly created resources, and resources whose properties such as names and tags are changed, and transfers the resources that meet specific conditions to desired resource groups based on the rules. This improves the efficiency of resource group management.

Prerequisites

The Automatic Resource Transfer feature is enabled. For more information, see Enable the Automatic Resource Transfer feature.

Create a custom transfer rule

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Resource Group > Automatic Resource Transfer.

  3. On the Transfer Based on Custom Rules tab, click Create Rule.

    image

  4. Configure the customer transfer rule.

    Parameter

    Description

    Parameter

    Description

    Rule Name

    The name of the custom transfer rule.

    The name can be up to 128 characters in length and can contain letters, digits, hyphens (-), and underscores (_).

    Rule Description

    The description of the custom transfer rule.

    The description can be up to 512 characters in length.

    Effective Scope

    • All Resources: indicates all resources that support custom rule-based automatic transfer. For information about the supported resource types, see Resource types that support custom rule-based automatic transfer.

    • Custom Resource Scope: You can specify a resource range by resource type, resource group, region, or resource.

    Destination Resource Group

    The resource group to which you want resources to transfer.

    Transfer Conditions

    If a resource meets the transfer conditions, it is automatically transferred to the specified destination resource group.

    Transfer conditions consist of the following parts:

    • Resource property: the condition key used to filter resources. You can filter resources by name or tag.

    • Operator: the comparison logic between resource properties and expected values. The StringEqualsAny, NotStringEqualsAll, and StringMatch operators are supported.

    • Expected value: the specific content used for comparison with the actual properties of resources. The formats of expected values vary based on the operator.

    You can use one of the following methods to configure transfer conditions:

    • Single Condition: This method is suitable for simple resource filtering.

    • Combined Conditions: You can use the and or or logical operator to connect sub-conditions and implement nested conditions. This method is suitable for complex resource filtering.

    Example 1: Enable the system to automatically transfer all resources with the project:project A tag to the Project-A resource group.

    image

    Example 2: Enable the system to automatically transfer the Elastic Compute Service (ECS) instances to which the project:project A tag is added or whose names contain projectA to the Project-A resource group.

    image

    image

  5. Click Query Matching Resources to view the resources that meet the specified conditions, and check whether the resources meet your expectations.

    image

  6. Click OK.

After the custom transfer rule is created, the system scans existing resources and transfers resources that meet conditions to the destination resource group. If you create or modify resources, the system also checks the resources based on the rule to ensure that the resources belong to correct resource groups.

View a custom transfer rule and transfer records

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Resource Group > Automatic Resource Transfer.

  3. On the Transfer Based on Custom Rules tab, find the desired custom transfer rule and click its name in the Rule Name column or View in the Actions column.

  4. View rule details and transfer records.

    • On the Rule Information tab, view the details of the rule, including the basic information, content, and effective scope of the rule.

      image

    • On the Transfer Records tab, view the records of transfer based on the rule.

      image

Modify or delete a custom transfer rule

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Resource Group > Automatic Resource Transfer.

  3. On the Transfer Based on Custom Rules tab, find the desired custom transfer rule. In the Actions column, click Modify, or click the More icon and select Delete.

    image

After the rule is modified or deleted, automatic transfer based on the rule is stopped. This does not change the relationships between resource groups and the resources that have been successfully transferred based on the rule.

Resource types that support custom rule-based automatic transfer

Service name

Resource type name

Resource type code

Service name

Resource type name

Resource type code

ECS

Instance

ACS::ECS::Instance

Object Storage Service (OSS)

Bucket

ACS::OSS::Bucket

Elasticsearch

Cluster

ACS::Elasticsearch::Instance

ApsaraDB for MongoDB

Instance

ACS::MongoDB::DBInstance

Tair (Redis® OSS-compatible)

Instance

ACS::Redis::DBInstance

PolarDB

Cluster

ACS::PolarDB::DBCluster

Application Load Balancer (ALB)

Instance

ACS::ALB::LoadBalancer

Classic Load Balancer (CLB)

Instance

ACS::SLB::LoadBalancer

ApsaraMQ for RocketMQ 5.0

Instance

ACS::RocketMQ::Instance

PolarDB for Xscale (PolarDB-X) 2.0

Instance

ACS::DRDS::PolarDBXInstance

Container Service for Kubernetes (ACK)

Cluster

ACS::ACK::Cluster

ApsaraDB RDS

Instance

ACS::RDS::DBInstance

PolarDB-X 1.0

Instance

ACS::DRDS::DBInstance

Bastionhost

Instance

ACS::Bastionhost::Instance

Microservices Engine (MSE)

Instance

ACS::MSE::Cluster

Network Load Balancer (NLB)

Instance

ACS::NLB::LoadBalancer

Virtual Private Cloud (VPC)

VPC

ACS::VPC::VPC

  • On this page (1, T)
  • Prerequisites
  • Create a custom transfer rule
  • View a custom transfer rule and transfer records
  • Modify or delete a custom transfer rule
  • Resource types that support custom rule-based automatic transfer
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare