Updates a transfer rule.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| resourcemanager:UpdateAutoGroupingRule | update | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RuleId | string | Yes | The ID of the rule. | gr-acfo******hy6a |
| RuleName | string | Yes | The name of the rule. | Custom Transfer Rule for Online Resources of Project A |
| RuleDesc | string | No | The description of the rule. | Transfer resources to which the {"env": "online"} and {"project": "A"} tags are added to the resource group rg-aek2********qcy. |
| RuleContents | array<object> | Yes | The content records of the rule. | |
| object | Yes | The content record of the rule. | ||
| AutoGroupingScopeCondition | string | No | The condition for the range of resources that are automatically transferred. | {"children":[{"desired":"{\"env\":\"online\", \"project\":\"A\"}","featurePath":"$.tags","featureSource":"RESOURCE","operator":"TagMatchAll"}],"operator":"and"} |
| RuleContentId | string | No | The ID of the content record. | grc-acfo******fwybpq |
| TargetResourceGroupCondition | string | Yes | The condition for the destination resource group. | {"children":[{"desired":"rg-aek2********qcy","featurePath":"$.resourceGroupId","featureSource":"RESOURCE","operator":"StringEquals"}],"operator":"and"} |
| ResourceGroupIdsScope | string | No | The IDs of resource groups. Separate multiple IDs with commas (,). | rg-aekz******4b5ea,rg-aek2******fxykq |
| ExcludeResourceGroupIdsScope | string | No | The IDs of resource groups to be excluded. Separate multiple IDs with commas (,). | rg-aekz******zj2oi,rg-aekz******r62ua |
| RegionIdsScope | string | No | The IDs of regions. Separate multiple IDs with commas (,). | cn-hangzhou,cn-shanghai |
| ExcludeRegionIdsScope | string | No | The IDs of regions to be excluded. Separate multiple IDs with commas (,). | cn-beijing,cn-guangzhou |
| ResourceIdsScope | string | No | The IDs of resources. Separate multiple IDs with commas (,). | i-2zee******ym49kfmwis,vpc-5ts6******fnw493g849a |
| ExcludeResourceIdsScope | string | No | The IDs of resources to be excluded. Separate multiple IDs with commas (,). | pc-uf6p******4h784y,rmq-cn-******ny0y |
| ResourceTypesScope | string | No | The resource types. Separate multiple resource types with commas (,). | rds.dbinstance,oss.bucket |
| ExcludeResourceTypesScope | string | No | The resource types to be excluded. Separate multiple resource types with commas (,). | mse.cluster,slb.loadbalancer |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Invalid.AssociatedTransferRule.NotSupported | The associated transfer rule is not supported for this operation. | The associated transfer rule is not supported for this operation. |
| 400 | InvalidParameter.ResourceTypesScope | The parameter ResourceTypesScope is invalid. | The parameter ResourceTypesScope is invalid. |
| 400 | InvalidParameter.ExcludeResourceTypesScope | The parameter ExcludeResourceTypesScope is invalid. | The parameter ExcludeResourceTypesScope is invalid. |
| 400 | InvalidParameter.ResourceGroupIdsScope | The parameter ResourceGroupIdsScope is invalid. | The parameter ResourceGroupIdsScope is invalid. |
| 400 | InvalidParameter.ExcludeResourceGroupIdsScope | The parameter ExcludeResourceGroupIdsScope is invalid. | The parameter ExcludeResourceGroupIdsScope is invalid. |
| 400 | InvalidParameterCombination.BothRegionIdScopes | The combination of parameters RegionIdsScope and ExcludeRegionIdsScope is not allowed. Please select only one of these parameters. | RegionIdsScope and ExcludeRegionIdsScope are mutually exclusive. Only one of these parameters can be specified in the same request. |
| 400 | InvalidParameterCombination.BothResourceGroupIdScopes | The combination of parameters ResourceGroupIdsScope and ExcludeResourceGroupIdsScope is not allowed. Please select only one of these parameters. | ResourceGroupIdsScope and ExcludeResourceGroupIdsScope are mutually exclusive. Only one of these parameters can be specified in the same request. |
| 400 | InvalidParameterCombination.BothResourceIdScopes | The combination of parameters ResourceIdsScope and ExcludeResourceIdsScope is not allowed. Please select only one of these parameters. | ResourceIdsScope and ExcludeResourceIdsScope are mutually exclusive. Only one of these parameters can be specified in the same request. |
| 400 | InvalidParameterCombination.BothResourceTypeScopes | The combination of parameters ResourceTypesScope and ExcludeResourceTypesScope is not allowed. Please select only one of these parameters. | ResourceTypesScope and ExcludeResourceTypesScope are mutually exclusive. Only one of these parameters can be specified in the same request. |
| 400 | InvalidParameter.RuleContents | The parameter RuleContents is invalid. | The parameter RuleContents is invalid. |
| 400 | MissingParameter.RuleContents | The parameter RuleContents is required. | The parameter RuleContents is required. |
| 404 | EntityNotExists.AutoGroupingRule | The specified rule is not found. | The specified rule is not found. |
| 409 | AutoGroupingNotEnabled | The auto grouping is disabled. | The auto grouping is disabled. |
| 409 | QuotaExceeded.RuleContent | The number of rule contents exceeds the quota. | The number of rule contents exceeds the quota. |
For a list of error codes, visit the Service error codes.
