Skip to main content

ModifySecurityGroupEgressRule

Description

call ModifySecurityGroupEgressRule to modify the description information of the security group exit direction rule. This interface can only modify the description information. If you need to modify the policy, port range, authorization object and other information of the security group rule, please modify it in the ECS management console.

Request Method

POST

Request Path

/apsara/route/Ecs/ModifySecurityGroupEgressRule

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
PolicyBODYstringNoacceptaccess rights. Value range: accept: Accept access. drop: deny access and do not send back a deny message. default value: accept.
DescriptionBODYstringNoThisisanewsecuritygroupruledescription information of security group rules. The length is 1~512 characters.
SourcePortRangeBODYstringNo80/80the port range related to the transport layer protocol open by the source security group. Value range: TCP/UDP protocol: the value range is 1~65535. Use a slash (/) to separate the start and end ports. Correct demonstration: 1/200; Error demonstration: 200/1. ICMP protocol:-1/-1. GRE protocol:-1/-1. all:-1/-1.
PriorityBODYstringNo1security group rule priority. Value range: 1~100 default value: 1.
SecurityGroupIdBODYstringYessg-bp67acfmxazb4ph***source security group ID.
Ipv6SourceCidrIpBODYstringNo2001:db8:1234:1a00::***source IP address range. Supports IP address ranges in CIDR format and IPv6 format. default value: 0.0.0.0/0.
NicTypeBODYstringNointernetthe network card type of the classic network type security group rule. Value range: internet: public network card. intranet: intranet network card. VPC type security group rules do not need to set the network card type. The default value is intranet and can only be intranet. When setting mutual access between security groups, that is, DestGroupId is specified and DestCidrIp, only for intranet. default value: internet.
DestGroupIdBODYstringNosg-bp67acfmxazb4pi***destination security group ID.
versionBODYstringNo2016-01-01version of api
PortRangeBODYstringYes80/80the port range related to the transport layer protocol open by the source security group. Value range: TCP/UDP protocol: the value range is 1~65535. Use a forward slash (/) to separate the start and end ports. Correct demonstration: 1/200; Error demonstration: 200/1. ICMP protocol:-1/-1. GRE protocol:-1/-1. all:-1/-1.
DestGroupOwnerAccountBODYstringNoEcsforCloud@Alibaba.comthe account ID of the destination security group, that is, the UID.
regionIdBODYstringYesNo sample value for this parameter.region id
SourceCidrIpBODYstringNo10.0.0.0/8source IP address range. CIDR format and IPv4 format are supported for IP address ranges. default value: 0.0.0.0/0.
DestGroupOwnerIdBODYlongNo155780923770the logon name of the account to which the destination security group belongs.
IpProtocolBODYstringYestcptransport layer protocol. Case insensitive. Value range: icmp icmpv6 gre tcp udp all: supports all protocols
DestCidrIpBODYstringNo10.0.0.0/8destination IP address range. CIDR format and IPv4 format are supported for IP address ranges. default value: 0.0.0.0/0.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID of the source security group. You can call the DescribeRegions to view the latest Alibaba Cloud region list.
Ipv6DestCidrIpBODYstringNo2001:db8:1233:1a00::***destination IP address range. Supports IP address ranges in CIDR format and IPv6 format. default value: 0.0.0.0/0.
ClientTokenBODYstringNo123e4567-e89b-12d3-a456-426655440000Ensure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters. For more details, please refer to the section on how to ensure idempotence in the cloud server ECS development guide.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}