You need to enable JavaScript to run this app.
导航

RevokeSecurityGroupIngress

最近更新时间2024.04.10 18:58:25

首次发布时间2021.07.29 14:11:53

调用 RevokeSecurityGroupIngress 接口,删除一条安全组入方向规则。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringRevokeSecurityGroupIngress系统规定参数。取值:RevokeSecurityGroupIngress。
VersionString2020-04-01API版本信息,取值为:2020-04-01。

SecurityGroupId

String

sg-bp67acfmxazb4p****

安全组ID。
您可以调用 DescribeSecurityGroups 接口,查询安全组的ID。

Protocol

String

all

传输层协议。取值如下:

  • tcp:TCP协议。
  • udp:UDP协议。
  • icmp:ICMP协议。
  • icmpv6:ICMPV6协议。
  • all:支持所有协议。

PortStart

Integer

22

端口范围开始值。

  • Protocol 传入tcp或udp时,取值范围为1~65535。
  • Protocol 传入icmp、icmpv6或all时,仅支持传入-1,表示不限制端口。

PortEnd

Integer

22

端口范围结束值。

  • Protocol 传入tcp或udp时,取值范围为1~65535。
  • Protocol 传入icmp、icmpv6或all时,仅支持传入-1,表示不限制端口。

CidrIp

String

10.XX.XX.0/8

源地址的IPv4 CIDR或IPv6 CIDR。

说明

参数CidrIpSourceGroupIdPrefixListId,三者必须传入一个。若传入多个,仅生效一个,生效的优先级为CidrIp > SourceGroupId > PrefixListId

SourceGroupId

String

sg-bp67acfmxazb4p****

源地址安全组ID。即该安全组中的所有网卡的地址作为源地址。

说明

参数CidrIpSourceGroupIdPrefixListId,三者必须传入一个。若传入多个,仅生效一个,生效的优先级为CidrIp > SourceGroupId > PrefixListId

PrefixListId

String

pl-bp1fg655nh68xyz9****

源地址前缀列表的ID。即前缀列表中的CIDR均为源地址。
您可以调用 DescribePrefixLists 接口,查询前缀列表的ID。

说明

  • 当前安全组还可添加入方向安全组规则的数量不小于前缀列表最大条目数。
    参数CidrIpSourceGroupIdPrefixListId,三者必须传入一个。若传入多个,仅生效一个,生效的优先级为CidrIp > SourceGroupId > PrefixListId
  • 前缀列表正在邀测中,如需试用,请联系客户经理申请。

Policy

String

accept

访问策略。即CidrIpSourceGroupIdPrefixListId 对应的资源访问安全组内的网卡。取值如下:

  • accept:允许。
  • drop:拒绝。

Priority

Integer

1

安全组规则优先级,数字越小,代表优先级越高。

  • 取值范围:1 ~ 100。
  • 不填默认值为1。

    说明

    若待删除安全组规则的优先级不为1,则必须传入本参数。

DescriptionStrings_g_ingress_1安全组规则的描述信息。

返回数据

参数名称
类型
示例值
描述
RequestIdString2021062415303301022514515207C4****请求ID。

请求示例

GET /?Action=RevokeSecurityGroupIngress&Version=2020-04-01&SecurityGroupId=sg-bp67acfmxazb4p****&Protocol=tcp&PortStart=22&PortEnd=22&CidrIp=10.XX.XX.0/8&Policy=accept&Priority=1 HTTP/1.1
Host: open.volcengineapi.com
Service: vpc
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "RevokeSecurityGroupIngress",
        "Version": "2020-04-01",
        "Service": "vpc",
        "Region": "cn-beijing"
    },
   "Result": {
        "RequestId": "2021062415303301022514515207C4****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode
错误码
错误信息
描述
400InvalidCidr.MalformedThe specified cidr block is malformed.指定的网段格式不合法。
400InvalidCidr.ProtocolMismatchThe specified cidr block mismatch the protocol type.指定的网段格式和协议类型不匹配。
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400InvalidPrefixList.InvalidStatusThe specified prefix list is not in the correct status for the request.指定的前缀列表所处状态无法响应该请求。
400InvalidRouteCidr.MalformedThe specified CIDR is malformed.指定的网段不合法。
400InvalidSecurityGroup.InvalidStatusThe specified security group is not in the correct status for the request.指定的安全组所处的状态无法响应该请求。
400InvalidSecurityGroup.VpcMismatchThe specified source security group is not in the specified VPC.指定的引用安全组不在指定的VPC中。
400InvalidSecurityRule.InvalidStatusThe specified security rule is not in the correct status for the request.指定的安全组规则所处状态无法响应该请求。
400InvalidSecurityRulePolicy.MalformedThe specified security rule policy is malformed.指定的安全组规则的行为不合法。
400InvalidSecurityRulePort.MalformedThe specified security rule port is malformed.指定的安全组规则的端口不合法。
400InvalidSecurityRulePriority.MalformedThe specified security rule priority is malformed.指定的安全组规则的优先级不合法。
400InvalidSecurityRuleProtocol.MalformedThe specified security rule protocol is malformed.指定的安全组规则的协议不合法。
400ForbiddenYou are not authorized to access the prefix list.您无权限访问前缀列表。
403ForbiddenYou are not authorized to perform operations on the specified security group. The specified security group is a service-managed security group.无权限对指定安全组进行操作。指定的安全组为云产品托管的安全组。
404InvalidPrefixList.NotFoundThe specified prefix list does not exist.指定的前缀列表不存在。
404InvalidPrefixListAssociation.NotFoundThe specified prefix list is not associated with the specified resource.指定的前缀列表未被该资源引用。
404InvalidSecurityGroupId.NotFoundThe specified security group does not exist.指定的安全组不存在。
404InvalidSecurityRule.NotFoundThe specified security rule does not exist.指定的安全组规则不存在。