应用防火墙-GrantSecurityGroup(即将下线)

—— 需使用 GrantFirewall 替换

将防火墙应用到资源上

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域, 参见 地域和可用区列表Yes
GroupIdstring防火墙资源IDYes
ResourceTypestring所应用资源类型,如UHostYes
ResourceIdstring所应用资源IDYes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes

Request Example

http(s)://api.auto-ai.com.cn/?Action=GrantSecurityGroup
&Region=cn-bj2
&GroupId=6583
&ResourceType=UHost
&ResourceId=uhost-w4d53b

Response Example

{
    "Action": "GrantSecrityGroupResponse",
    "RetCode": 0
}