UpdateAutoGroupingRule - 更新自动转组规则

调用UpdateAutoGroupingRule更新自动转组规则。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
resourcemanager:UpdateAutoGroupingRuleupdate
*全部资源
*

请求参数

名称类型必填描述示例值
RuleIdstring

规则 ID。

gr-acfo******hy6a
RuleNamestring

规则名称。

A项目线上资源自动转组规则
RuleDescstring

规则描述。

带有标签 {"env": "online"} 和 {"project": "A"} 的资源转移到资源组rg-aek2********qcy
RuleContentsarray<object>

规则内容列表。

object

规则内容。

AutoGroupingScopeConditionstring

自动转组范围条件,用于指定需要自动转组的资源范围。

{"children":[{"desired":"{\"env\":\"online\", \"project\":\"A\"}","featurePath":"$.tags","featureSource":"RESOURCE","operator":"TagMatchAll"}],"operator":"and"}
RuleContentIdstring

规则内容 ID。

grc-acfo******fwybpq
TargetResourceGroupConditionstring

目标资源组条件,用于指定自动转组的目标资源组。

{"children":[{"desired":"rg-aek2********qcy","featurePath":"$.resourceGroupId","featureSource":"RESOURCE","operator":"StringEquals"}],"operator":"and"}
ResourceGroupIdsScopestring

资源组 ID 范围,多个资源组 ID 用半角逗号(,)分隔。

rg-aekz******4b5ea,rg-aek2******fxykq
ExcludeResourceGroupIdsScopestring

资源组 ID 排除范围,多个资源组 ID 用半角逗号(,)分隔。

rg-aekz******zj2oi,rg-aekz******r62ua
RegionIdsScopestring

地域 ID 范围,多个地域 ID 用半角逗号(,)分隔。

cn-hangzhou,cn-shanghai
ExcludeRegionIdsScopestring

地域 ID 排除范围,多个地域 ID 用半角逗号(,)分隔。

cn-beijing,cn-guangzhou
ResourceIdsScopestring

资源 ID 范围,多个资源 ID 用半角逗号(,)分隔。

i-2zee******ym49kfmwis,vpc-5ts6******fnw493g849a
ExcludeResourceIdsScopestring

资源 ID 排除范围,多个资源 ID 用半角逗号(,)分隔。

pc-uf6p******4h784y,rmq-cn-******ny0y
ResourceTypesScopestring

资源类型范围,多个资源类型用半角逗号(,)分隔。

rds.dbinstance,oss.bucket
ExcludeResourceTypesScopestring

资源类型排除范围,多个资源类型用半角逗号(,)分隔。

mse.cluster,slb.loadbalancer

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

7B8A4E7D-6CFF-471D-84DF-195A7A241ECB

示例

正常返回示例

JSON格式

{
  "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB"
}

错误码

HTTP status code错误码错误信息描述
400Invalid.AssociatedTransferRule.NotSupportedThe associated transfer rule is not supported for this operation.关联转组规则不支持更新操作。
400InvalidParameter.ResourceTypesScopeThe parameter ResourceTypesScope is invalid.参数ResourceTypesScope无效。
400InvalidParameter.ExcludeResourceTypesScopeThe parameter ExcludeResourceTypesScope is invalid.参数ExcludeResourceTypesScope无效。
400InvalidParameter.ResourceGroupIdsScopeThe parameter ResourceGroupIdsScope is invalid.参数ResourceGroupIdsScope无效。
400InvalidParameter.ExcludeResourceGroupIdsScopeThe parameter ExcludeResourceGroupIdsScope is invalid.参数ExcludeResourceGroupIdsScope无效。
400InvalidParameterCombination.BothRegionIdScopesThe combination of parameters RegionIdsScope and ExcludeRegionIdsScope is not allowed. Please select only one of these parameters.RegionIdsScopeExcludeRegionIdsScope是互斥的。同一个请求中只能指定其中一个参数。
400InvalidParameterCombination.BothResourceGroupIdScopesThe combination of parameters ResourceGroupIdsScope and ExcludeResourceGroupIdsScope is not allowed. Please select only one of these parameters.ResourceGroupIdsScopeExcludeResourceGroupIdsScope是互斥的。同一个请求中只能指定其中一个参数。
400InvalidParameterCombination.BothResourceIdScopesThe combination of parameters ResourceIdsScope and ExcludeResourceIdsScope is not allowed. Please select only one of these parameters.ResourceIdsScopeExcludeResourceIdsScope是互斥的。同一个请求中只能指定其中一个参数。
400InvalidParameterCombination.BothResourceTypeScopesThe combination of parameters ResourceTypesScope and ExcludeResourceTypesScope is not allowed. Please select only one of these parameters.ResourceTypesScopeExcludeResourceTypesScope是互斥的。同一个请求中只能指定其中一个参数。
400InvalidParameter.RuleContentsThe parameter RuleContents is invalid.RuleContents 参数非法。
400MissingParameter.RuleContentsThe parameter RuleContents is required.RuleContents是必要参数。
404EntityNotExists.AutoGroupingRuleThe specified rule is not found.指定的规则不存在。
409AutoGroupingNotEnabledThe auto grouping is disabled.自动转组已禁用。
409QuotaExceeded.RuleContentThe number of rule contents exceeds the quota.创建的分组条件内容数量超过限制。

访问错误中心查看更多错误码。