Adding a Device
Function
This API is used to add a new device to a project.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/devices
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
description |
No |
String |
Description. |
|
manage_url |
No |
String |
Management address. |
|
mode |
Yes |
String |
Deployment mode. |
|
name |
Yes |
String |
Device name. |
|
subnet_id |
Yes |
String |
Subnet ID. |
|
type |
Yes |
Integer |
Device type, which can be 0 (application data audit), 1 (application data security gateway), 2 (database firewall), 3 (database encryption), 4 (static data masking instance), or 5 (dynamic database masking instance). |
|
vpc_id |
Yes |
String |
VPC ID. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID |
|
msg |
String |
Message. |
|
status |
String |
Response code. |
Status code: 201
Resource being created.
Example Requests
POST /v1/{project_id}/devices
{
"description" : "string",
"manage_url" : "string",
"mode" : "string",
"name" : "string",
"subnet_id" : "string",
"type" : 0,
"vpc_id" : "string"
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Added. |
|
201 |
Resource being created. |
|
401 |
Unauthorized. The user is not logged in or the token is invalid. |
|
403 |
Unauthorized to access the resource. |
|
404 |
The specified project does not exist. |
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