Creating an IP Address Group
Function
This API is used to create an IP address group.
This API is an asynchronous API. After you request to create an IP address group, an IP address group ID will be returned. However, the IP address group cannot be created immediately. You can call the API for querying the IP address group details to check whether the creation is complete. If the IP address group status is ACTIVE, the IP address group has been created.
Calling Method
For details, see Calling APIs.
URI
POST /v1/ip-groups
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ip_group |
Yes |
CreateIpGroupOption object |
Describes the IP address group to be created. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Specifies the name of the IP address group. The name can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. |
description |
No |
String |
Describes the IP address group. The value can contain 0 to 255 characters and cannot contain <>. |
ip_list |
No |
Array of CreateIpGroupIpOption objects |
Specifies the CIDR blocks in the IP address group. A maximum of 20 CIDR blocks can be added at a time. |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID. |
ip_group |
IpGroupDetail object |
Specifies the details of the IP address group. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the IP address group. |
name |
String |
Specifies the name of the IP address group. |
description |
String |
Describes the IP address group. |
status |
String |
Specifies the provisioning status. The value can be one of the following:
|
ip_list |
Array of IpInfo objects |
Specifies the CIDR blocks in the IP address group. |
associated_listeners |
Array of ListenerAccessControlPolicy objects |
Specifies the access control policy used by the listener. |
created_at |
String |
Specifies the time when the resource was created. |
updated_at |
String |
Specifies the time when the resource was updated. |
Example Requests
Creating an IP address group whose CIDR block is 127.0.0.0/24
POST https://{ga_endpoint}/v1/ip-groups { "ip_group" : { "name" : "ip-group-name", "description" : "ip-group description", "ip_list" : [ { "cidr" : "127.0.0.0/24", "description" : "cidr description" } ] } }
Example Responses
Status code: 201
Created.
{ "request_id" : "ac1bf54f-6a23-4074-af77-800648d25bc8", "ip_group" : { "id" : "e8996cd6-28cf-4ff2-951e-fa8ac895a6cd", "name" : "ip-group-name", "description" : "ip-group description", "status" : "ACTIVE", "ip_list" : [ { "cidr" : "127.0.0.0/24", "description" : "cidr description", "created_at" : "2019-01-08T01:21:37.151Z" } ], "created_at" : "2019-01-08T01:21:37.151Z", "updated_at" : "2019-01-08T01:21:37.151Z" } }
Status Codes
Status Code |
Description |
---|---|
201 |
Created. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot