CreateSecurityGroup
CreateSecurityGroup
1. API Description
This API is used to create a security group.
Note
Security group quota is limited. If you need more, please contact Zenlayer Support.
The upper limit of quantity of security group rules is 40, including 20 inbound rules and 20 outbound rules.
Rules cannot be duplicated in one rule direction.
2. Input Parameters
The following request parameter list only provides API request parameters.
securityGroupName
Yes
String
Security group name to be displayed.
This parameter can contain up to 64 characters. Only letters, numbers, - and periods (.) are supported.
description
No
String
Security group description. This parameter must contain 2 to 255 characters.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
securityGroupId
String
Security group ID.
4. Code Example
Create a security group.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
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.
403
OPERATION_DENIED_SECURITY_GROUP_RULE_EXCEED_LIMIT
Rule quantity exceeds limit.
403
OPERATION_DENIED_SECURITY_GROUP_TEAM_EXCEED_LIMIT
Security group quantity exceeds limit.
Last updated