1. Interface Description
Interface request domain name: vpc.api3.convergecloud.com.
This API is used to reset the outbound and inbound rules of a security group.
- The API deletes all inbound and outbound rules and then adds Egress and Ingress rules. Custom indexes (PolicyIndex) are not supported.
- If SecurityGroupPolicySet.Version is set to 0, all rules will be cleared, but Egress and Ingress rules are skipped.
- The Protocol field supports TCP, UDP, ICMP, ICMPV6, GRE, and ALL.
- The CidrBlock field supports any string conforming to the CIDR format standard (complete form). On a basic network, if the CidrBlock field values contain the private IP addresses of devices other than CVM instances under your account, it does not mean that the rule allows you to access these devices. The tenant network isolation rules have a higher priority than the private network rules of security groups.
- The Ipv6CidrBlock field supports any string conforming to the IPv6 CIDR format standard (complete form). On a basic network, if the Ipv6CidrBlock field values contain the private IPv6 addresses of devices other than CVM instances under your account, it does not mean that the rule allows you to access these devices. The tenant network isolation rules have a higher priority than the private network rules of security groups.
- The SecurityGroupId field supports the ID of a security group in the same project as the security group to be modified and the ID of the security group to be modified. The private IP addresses of all CVM instances associated with the security group are used as source IP addresses. When this field is specified, the network packet matching process of the rule will change as the CVM instance associated with the corresponding security group changes. The source IP addresses do not need to be modified again.
- The Port field supports a single port number or a port range. For example, 80 or 8000-8010. The Port field is valid only when the Protocol field is set to TCP or UDP.
- The Action field supports only ACCEPT and DROP.
- CidrBlock, Ipv6CidrBlock, SecurityGroupId, and AddressTemplate cannot be specified at the same time. ServiceTemplate cannot be specified if Protocol or Port is specified.
Default interface request rate limit: 100 times per second.
Interface update time: 2020-04-01 18:27:23.
The interface only verifies the signature but does not authenticate.
2. Input Parameters
The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.
| Parameter name | Required | Allow NULL | Type | Description |
|---|---|---|---|---|
| Action | Yes | No | String | Public parameter, The value of this interface: ModifySecurityGroupPolicies |
| Version | Yes | No | String | Public parameter, The value of this interface: 2017-03-12 |
| Region | No | No | String | Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface |
| SecurityGroupId | Yes | No | String | Security group instance ID, e.g., sg-33ocnj9n, which can be accessed through DescribeSecurityGroups. Example: sg-ohuuioma |
| SecurityGroupPolicySet | Yes | No | SecurityGroupPolicySet | Security group rule collection. The SecurityGroupPolicySet object must specify both new egress and ingress rules simultaneously. The SecurityGroupPolicy object does not support custom index (PolicyIndex). Example:View |
| SortPolicys | No | No | Bool | Sorted security group identifier. When the value is True, it supports sorting of security groups; if SortPolicys does not exist or SortPolicys is False, it modifies the security group rules. Example: False |
3. Output Parameters
| Parameter name | Type | Description |
|---|---|---|
| RequestId | String | Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem. |
4. Error Code
The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.
| Error Code | Description |
|---|---|
| InvalidParameterValue.Malformed | Invalid input format. |
| ResourceNotFound | The resource does not exist |