调用UpdateAutoGroupingRule更新自动转组规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
resourcemanager:UpdateAutoGroupingRule | update | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RuleId | string | 是 | 规则 ID。 | gr-acfo******hy6a |
RuleName | string | 是 | 规则名称。 | A项目线上资源自动转组规则 |
RuleDesc | string | 否 | 规则描述。 | 带有标签 {"env": "online"} 和 {"project": "A"} 的资源转移到资源组rg-aek2********qcy |
RuleContents | array<object> | 是 | 规则内容列表。 | |
object | 是 | 规则内容。 | ||
AutoGroupingScopeCondition | string | 否 | 自动转组范围条件,用于指定需要自动转组的资源范围。 | {"children":[{"desired":"{\"env\":\"online\", \"project\":\"A\"}","featurePath":"$.tags","featureSource":"RESOURCE","operator":"TagMatchAll"}],"operator":"and"} |
RuleContentId | string | 否 | 规则内容 ID。 | grc-acfo******fwybpq |
TargetResourceGroupCondition | string | 是 | 目标资源组条件,用于指定自动转组的目标资源组。 | {"children":[{"desired":"rg-aek2********qcy","featurePath":"$.resourceGroupId","featureSource":"RESOURCE","operator":"StringEquals"}],"operator":"and"} |
ResourceGroupIdsScope | string | 否 | 资源组 ID 范围,多个资源组 ID 用半角逗号(,)分隔。 | rg-aekz******4b5ea,rg-aek2******fxykq |
ExcludeResourceGroupIdsScope | string | 否 | 资源组 ID 排除范围,多个资源组 ID 用半角逗号(,)分隔。 | rg-aekz******zj2oi,rg-aekz******r62ua |
RegionIdsScope | string | 否 | 地域 ID 范围,多个地域 ID 用半角逗号(,)分隔。 | cn-hangzhou,cn-shanghai |
ExcludeRegionIdsScope | string | 否 | 地域 ID 排除范围,多个地域 ID 用半角逗号(,)分隔。 | cn-beijing,cn-guangzhou |
ResourceIdsScope | string | 否 | 资源 ID 范围,多个资源 ID 用半角逗号(,)分隔。 | i-2zee******ym49kfmwis,vpc-5ts6******fnw493g849a |
ExcludeResourceIdsScope | string | 否 | 资源 ID 排除范围,多个资源 ID 用半角逗号(,)分隔。 | pc-uf6p******4h784y,rmq-cn-******ny0y |
ResourceTypesScope | string | 否 | 资源类型范围,多个资源类型用半角逗号(,)分隔。 | rds.dbinstance,oss.bucket |
ExcludeResourceTypesScope | string | 否 | 资源类型排除范围,多个资源类型用半角逗号(,)分隔。 | mse.cluster,slb.loadbalancer |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Invalid.AssociatedTransferRule.NotSupported | The associated transfer rule is not supported for this operation. | 关联转组规则不支持更新操作。 |
400 | InvalidParameter.ResourceTypesScope | The parameter ResourceTypesScope is invalid. | 参数ResourceTypesScope无效。 |
400 | InvalidParameter.ExcludeResourceTypesScope | The parameter ExcludeResourceTypesScope is invalid. | 参数ExcludeResourceTypesScope无效。 |
400 | InvalidParameter.ResourceGroupIdsScope | The parameter ResourceGroupIdsScope is invalid. | 参数ResourceGroupIdsScope无效。 |
400 | InvalidParameter.ExcludeResourceGroupIdsScope | The parameter ExcludeResourceGroupIdsScope is invalid. | 参数ExcludeResourceGroupIdsScope无效。 |
400 | InvalidParameterCombination.BothRegionIdScopes | The combination of parameters RegionIdsScope and ExcludeRegionIdsScope is not allowed. Please select only one of these parameters. | RegionIdsScope和ExcludeRegionIdsScope是互斥的。同一个请求中只能指定其中一个参数。 |
400 | InvalidParameterCombination.BothResourceGroupIdScopes | The combination of parameters ResourceGroupIdsScope and ExcludeResourceGroupIdsScope is not allowed. Please select only one of these parameters. | ResourceGroupIdsScope和ExcludeResourceGroupIdsScope是互斥的。同一个请求中只能指定其中一个参数。 |
400 | InvalidParameterCombination.BothResourceIdScopes | The combination of parameters ResourceIdsScope and ExcludeResourceIdsScope is not allowed. Please select only one of these parameters. | ResourceIdsScope和ExcludeResourceIdsScope是互斥的。同一个请求中只能指定其中一个参数。 |
400 | InvalidParameterCombination.BothResourceTypeScopes | The combination of parameters ResourceTypesScope and ExcludeResourceTypesScope is not allowed. Please select only one of these parameters. | ResourceTypesScope和ExcludeResourceTypesScope是互斥的。同一个请求中只能指定其中一个参数。 |
400 | InvalidParameter.RuleContents | The parameter RuleContents is invalid. | RuleContents 参数非法。 |
400 | MissingParameter.RuleContents | The parameter RuleContents is required. | RuleContents是必要参数。 |
404 | EntityNotExists.AutoGroupingRule | The specified rule is not found. | 指定的规则不存在。 |
409 | AutoGroupingNotEnabled | The auto grouping is disabled. | 自动转组已禁用。 |
409 | QuotaExceeded.RuleContent | The number of rule contents exceeds the quota. | 创建的分组条件内容数量超过限制。 |
访问错误中心查看更多错误码。