Creating an Audit Instance in Yearly/Monthly Billing Mode
Function
This API is used to create an audit instance in yearly/monthly billing mode.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/dbss/audit/charge/period/order
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
Request Parameter
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Instance name. The options are as follows:
|
|
flavor_ref |
Yes |
String |
Specifies the ID of the specifications used by the ECS. |
|
vpc_id |
Yes |
String |
VPC ID |
|
availability_zone |
Yes |
String |
Availability zone to which the ECS belongs. (Primary and secondary AZs are separated by commas. Example: az1.dc1,az2.dc2) |
|
enterprise_project_id |
No |
String |
Specifies the ID of the enterprise project Mandatory for interconnecting with EPS. |
|
nics |
Yes |
Array of nics objects |
NIC of the ECS |
|
security_groups |
Yes |
Array of security_groups objects |
Information about the security group to which the ECS belongs. |
|
comment |
No |
String |
Indicates the remarks. |
|
region |
Yes |
String |
ID of the region where the ECS is located. |
|
cloud_service_type |
Yes |
String |
Service type:
|
|
charging_mode |
Yes |
Integer |
Billing mode:
|
|
period_type |
Yes |
Integer |
Subscription period type. The value can be:
|
|
period_num |
Yes |
Integer |
Number of subscription periods |
|
subscription_num |
Yes |
Integer |
Number of subscriptions. Only one set of DBSS can be subscribed to. |
|
product_infos |
Yes |
Array of product_infos objects |
Product list. |
|
tags |
No |
Array of KeyValueBean objects |
Resource tag |
|
promotion_info |
No |
String |
Discount information |
|
is_auto_renew |
No |
Integer |
Auto-Renewal
|
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
subnet_id |
Yes |
String |
ID of the subnet on which the NIC works. |
|
ip_address |
No |
String |
IP address. If the value of this parameter is left blank or is set to an empty string, an IP address is automatically assigned. |
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
Specifies the ID of the security group corresponding to the ECS. This ID takes effect for the NIC configured on the ECS. |
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
product_id |
Yes |
String |
Product ID. |
|
cloud_service_type |
Yes |
String |
Service Type:
|
|
resource_type |
Yes |
String |
Resource type:
|
|
resource_spec_code |
Yes |
String |
Resource specifications: - dbss.bypassaudit.low-dbss.bypassaudit.medium-dbss.bypassaudit.high |
|
product_spec_desc |
No |
String |
Product specification description, including the host name, specifications, VPC, and subnet. JSON string format: {"specDesc":{"zh-cn":{" Host name ":"value1"," Specification ":"value2"," VPC ":"value3"," Subnet ":"value4"},"en-us":{"Instance Name":"value1","Edition":"value2","VPC":"value3","Subnet":"value4"}}} |
Response Parameters
Status code: 200
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
description |
String |
Description |
|
code |
String |
Returned code |
|
order_id |
String |
Specifies an order ID. |
Status code: 400
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 403
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 500
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Example request
/v2/{project_id}/dbss/audit/charge/period/order
{
"flavor_ref" : "st6.xlarge.4",
"name" : "DBSS-acc3",
"vpc_id" : "4c035747-f77b-4c6d-b23b-cb3a2b96c7e6",
"availability_zone" : "xx-xx",
"comment" : "",
"region" : "xx-xx",
"nics" : [ {
"subnet_id" : "6201dcf2-1374-43ec-ae8b-78b4081572d3"
} ],
"security_groups" : [ {
"id" : "04088976-9c63-4e6b-9070-84e6a30c782b"
} ],
"cloud_service_type" : "hws.service.type.dbss",
"charging_mode" : 0,
"period_type" : 2,
"period_num" : 1,
"subscription_num" : 1,
"is_auto_renew" : 0,
"product_infos" : [ {
"product_id" : "00301-xxxxxxx-0--0",
"cloud_service_type" : "hws.service.type.dbss",
"resource_type" : "hws.resource.type.dbss",
"resource_spec_code" : "dbss.bypassaudit.low",
"product_spec_desc" : "{\"specDesc\":{\"zh-cn\":{},\"en-us\":{\"instance Name\":\"DBSS-test\",\"VPC\":\"default_vpc\",\"Subnet\":\"subnet-af32\"}}}"
} ],
"promotion_info" : "",
"enterprise_project_id" : "0",
"tags" : [ {
"key" : "key_test",
"value" : "1"
} ]
}
Response Examples
Status code: 200
Success
{
"description" : "Success",
"code" : "0",
"order_id" : "CS1710190909OGQIS"
}
Status code: 400
Failed
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
Success |
|
400 |
Failed |
|
403 |
Authentication failed. |
|
500 |
Server error. |
Error Codes
For details, 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