880
魔獸
撤銷出方向安全組規則__安全組相關接口_API 參考_雲服務器 ECS-阿裏雲
撤銷安全組Out方向的訪問規則
描述
撤銷安全組出方向的訪問規則。支持兩種方式:一是本Region(經典網絡)/本VPC(VPC)內采用指定協議通過指定端口訪問其他安全組;二是采用指定協議通過指定端口訪問IP地址範圍,隻有調用授權接口授權的權限條目才可以刪除(參數值跟授權時的參數相同)。
安全組規則由兩組可選參數中的一組組成:DestGroupOwnerAccount
、DestGroupId
、IpProtocol
、PortRange
、NicType
、Policy
或者DestCidrIp
、IpProtocol
、PortRange
、NicType
、Policy
。如匹配的規則找不到將會報錯。
請求參數
名稱 | 類型 | 是否必須 | 描述 |
---|---|---|---|
Action | String | 是 | 係統規定參數,取值:RevokeSecurityGroupEgress |
SecurityGroupId | String | 是 | 源安全組ID |
RegionId | String | 是 | 源安全組所屬Region ID |
IpProtocol | String | 是 | IP協議,取值:tcp | udp | icmp | gre | all; all表示同時支持四種協議 |
PortRange | String | 是 | IP協議相關的端口號範圍
|
DestGroupId | String | 否 | 授權同一Region內的目標安全組,SourceGroupId或者SourceCidrIp參數必須設置一項,如果兩項都設置,則默認對SourceCidrIp授權。可以同時指定多個Group(最多10個),但必須采用逗號“,”分隔 |
DestGroupOwnerAccount | String | 否 | 希望跨用戶撤銷安全組規則的目標安全組所屬用戶阿裏雲賬號。該參數可選,如果該參數及DestGroupOwnerId均未設置,則默認為同一賬戶安全組間撤銷。DestCidrIp如果已經被設置,則該參數無效。 |
DestGroupOwnerId | String | 否 | 跨用戶安全組授權時,目標安全組所屬用戶阿裏雲賬號ID。該參數可選,如果該參數及DestGroupOwnerAccount均未設置,則默認為同一賬戶安全組間授權。DestCidrIp如果已經被設置,則該參數無效。 |
DestCidrIp | String | 否 | 授權的目標IP地址範圍,必須采用CIDR格式來指定IP地址範圍,默認值為0.0.0.0/0(表示不受限製),其他支持的格式如10.159.6.18/12。僅支持IPV4。 |
Policy | String | 否 | 授權策略,參數值可為:accept(接受訪問),drop (拒絕訪問) 默認值為:accept |
NicType | String | 否 | 網絡類型,取值:
當對安全組進行相互授權時(即指定了DestGroupId且沒有指定DestCidrIp),必須指定NicType為intranet |
返回參數
全是公共返回參數,詳見公共返回參數
錯誤碼
錯誤代碼 | 描述 | Http 狀態碼 | 語義 |
---|---|---|---|
InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 404 | 指定的RegionId不存在 |
MissingParameter | The input parameter “RegionId” that is mandatory for processing this request is not supplied. | 400 | RegionId參數未指定 |
InvalidSecurityGroupId.NotFound | The SecurityGroupId provided does not exist in our records. | 404 | 指定的SecurityGroupId不存在 |
MissingParameter | The input parameter “SecurityGroupId” that is mandatory for processing this request is not supplied. | 400 | SecurityGroupId參數未指定 |
InvalidIpProtocol.ValueNotSupported | The specified IpProtocol does not exist. | 400 | IpProtocol參數指定的值不支持 |
MissingParameter | The input parameter “IpProtocol” that is mandatory for processing this request is not supplied. | 400 | IpProtocol參數未指定 |
InvalidPriority.Malformed | The specified parameter “Priority” is not valid. | 400 | Priority參數格式不正確 |
InvalidIpPortRange.Malformed | The specified parameter “PortRange” is not valid. | 400 | PortRange格式不正確 |
MissingParameter | The input parameter “PortRange” that is mandatory for processing this request is not supplied. | 400 | PortRange參數未指定 |
InvalidDestGroupId.NotFound | The DestGroupId provided does not exist in our records. | 404 | 指定的DestGroupId不存在 |
InvalidDestGroupId.Mismatch | NicType is required or NicType expects intrnet. | 403 | 需要明確NicType參數或者NicType必須為intranet |
InvalidDestCidrIp.Malformed | The specified parameter “DestCidrIp” is not valid. | 400 | DestCidrIp參數格式不正確 |
MissingParameter | The input parameter “DestGroupId” or “DestCidrIp” cannot be both blank. | 400 | DestGroupId或者DestCidrIp參數未指定 |
InvalidPolicy.Malformed | The specified parameter “Policy” is not valid. | 400 | Policy參數格式不正確 |
InvalidNicType.ValueNotSupported | The specified NicType does not exist. | 400 | NicType指定的值不支持 |
InvalidDestGroupId.Mismatch | DestGroupOwnerAccount is required | 403 | 指定的其他用戶的DestGroup但是沒有指定DestGroupOwnerUserAccount |
InvalidDestGroupOwnerUserAccount.Mismatch | The specified DestGroupId is not belong to the DestGroupOwnerAccount | 403 | 指定的DestGroup不屬於DestGroupOwnerUserAccount指定的用戶 |
示例
請求示例
- 授權對其他安全組的訪問權限
https://ecs.aliyuncs.com/?Action=RevokeSecurityGroupEgress
&SecurityGroupId=sg-94n63e80l
&IpProtocol=all
&DestGroupId=sg-94oi1r1bp
&IpProtocol=tcp
&PortRange=1/65535
&<公共請求參數>
- 授權對指定的IP地址範圍的訪問權限
https://ecs.aliyuncs.com/?Action=RevokeSecurityGroupEgress
&SecurityGroupId=sg-94n63e80l
&IpProtocol=all
&DestCidrIp=10.0.0.0/8
&IpProtocol=tcp
&PortRange=1/65535
&<公共請求參數>
返回示例
XML
格式
<RevokeSecurityGroupEgressResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</RevokeSecurityGroupEgressResponse>
JSON
格式
{
"RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
最後更新:2016-12-12 16:38:03
上一篇:
授權出方向安全組權限__安全組相關接口_API 參考_雲服務器 ECS-阿裏雲
下一篇:
新建專有網絡__專有網絡相關接口_API 參考_雲服務器 ECS-阿裏雲
申請流程__快速入門_雲數據庫 PetaData-阿裏雲
獲取域名操作日誌__域名管理接口_API文檔_雲解析-阿裏雲
網絡選擇__loghub-采集_用戶指南_日誌服務-阿裏雲
重置APP密鑰__應用管理相關接口_API_API 網關-阿裏雲
UpdateLogstore__日誌庫相關接口_API-Reference_日誌服務-阿裏雲
設置解析記錄狀態__解析管理接口_API文檔_雲解析-阿裏雲
修改數據庫參數列表__參數管理_API 參考_雲數據庫 RDS 版-阿裏雲
RowExistenceExpectation__DataType_API 參考_表格存儲-阿裏雲
客戶端錯誤__錯誤代碼表_API參考_彈性伸縮-阿裏雲
ECS 數據源 (1/3): ECS 管理和 Agent 部署__準備數據源_用戶指南_業務實時監控服務 ARMS-阿裏雲
相關內容
常見錯誤說明__附錄_大數據計算服務-阿裏雲
發送短信接口__API使用手冊_短信服務-阿裏雲
接口文檔__Android_安全組件教程_移動安全-阿裏雲
運營商錯誤碼(聯通)__常見問題_短信服務-阿裏雲
設置短信模板__使用手冊_短信服務-阿裏雲
OSS 權限問題及排查__常見錯誤及排除_最佳實踐_對象存儲 OSS-阿裏雲
消息通知__操作指南_批量計算-阿裏雲
設備端快速接入(MQTT)__快速開始_阿裏雲物聯網套件-阿裏雲
查詢API調用流量數據__API管理相關接口_API_API 網關-阿裏雲
使用STS訪問__JavaScript-SDK_SDK 參考_對象存儲 OSS-阿裏雲