ConfigureSecurityGroupRules
ConfigureSecurityGroupRules
Last updated
ConfigureSecurityGroupRules
Last updated
This API is used to configure security group rules.
Note
Status of security group should be Available
.
Rules cannot be duplicated in one rule direction.
The upper limit of quantity of security group rules is 40, including 20 inbound rules and 20 outbound rules.
Call this API to configure full rules in the security group.
Editing is not supported for default security group.
The following request parameter list only provides API request parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Parameter Name | Type | Description |
---|---|---|
Configure security group rules.
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code | Error Code | Description |
---|---|---|
securityGroupId
Yes
String
Security group ID.
ruleInfos
No
Array of RuleInfo
Security group rules.
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
400
INVALID_PARAMETER_SECURITY_GROUP_RULE_ID_NOT_ALLOW
Security group rule ID is not allowed to be passed in.
400
INVALID_PARAMETER_SECURITY_GROUP_POLICY
Invalid value of policy
.
400
INVALID_PARAMETER_SECURITY_GROUP_PORT_RANGE
Invalid value of portRange
.
400
INVALID_PARAMETER_SECURITY_GROUP_PRIORITY
Invalid value of priority
.
400
INVALID_PARAMETER_SECURITY_GROUP_SOURCE_CIDR_IP
Invalid value of source cidrIp
.
403
OPERATION_DENIED_SECURITY_GROUP_EXIST_REPEAT_RULE
Duplicated security group rules.
404
INVALID_SECURITY_GROUP_NOT_FOUND
Security group does not exist.
403
OPERATION_DENIED_SECURITY_GROUP_STATUS_NOT_AVAILABLE
Status of security group should be Available
.
403
OPERATION_DENIED_SECURITY_GROUP_RULE_EXCEED_LIMIT
Rule quantity exceeds limit.
403
OPERATION_DENIED_DEFAULT_SECURITY_GROUP_NOT_SUPPORT
Operations on the default security groups are not supported.