Creating an Audit Instance in Yearly/Monthly Billing Mode
Function
Creating an Audit Instance in Yearly/Monthly Billing Mode
URI
POST /v2/{project_id}/audit/charge/period/order
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID You can obtain the value by calling the IAM API for querying the project list of a specified IAM user. ** Restrictions**: N/A Range: The value is subject to the return value of the IAM service interface. The value contains 32 to 64 characters. ** Default value**: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
** Parameter description**: User token. You can obtain the token by calling the IAM API used to query the user token. The token is the value of X-Subject-Token in the response header. ** Restrictions**: N/A ** Value range**: Used by the IAM service to query the user token. ** Default value**: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Instance name Range:
|
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 |
Enterprise project ID. 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 |
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:
-3: year |
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 |
Yes |
Integer |
Auto-renewal
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
subnet_id |
Yes |
String |
ID of the subnet on which the NIC works. |
ip_address |
No |
String |
IP address. If this parameter is left blank or is set to an empty string, the IP address is automatically allocated. |
Parameter |
Mandatory |
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 |
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:
|
product_spec_desc |
No |
String |
Product specification description. JSON character string format: {"specDesc":{"zh-cn":{"key1":"value1"},"en-us":{"key1":"value1"}}} |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
description |
String |
Description |
code |
String |
Return code |
order_id |
String |
Order ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
details |
Array of DbssErrorDetail objects |
PDP5 authentication exception information |
encoded_authorization_message |
String |
PDP5 authentication exception information |
error_code |
String |
Error Codes |
error_msg |
String |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
PDP5 error information |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
details |
Array of DbssErrorDetail objects |
PDP5 authentication exception information |
encoded_authorization_message |
String |
PDP5 authentication exception information |
error_code |
String |
Error Codes |
error_msg |
String |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
PDP5 error information |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
details |
Array of DbssErrorDetail objects |
PDP5 authentication exception information |
encoded_authorization_message |
String |
PDP5 authentication exception information |
error_code |
String |
Error Codes |
error_msg |
String |
Error message. |
Example Requests
/v2/{project_id}/audit/charge/period/order { "flavor_ref" : "st6.xlarge.4", "name" : "DBSS-acc3", "vpc_id" : "4c035747-f77b-4c6d-b23b-cb3a2b96c7e6", "availability_zone" : "cn-north-7c", "comment" : "", "region" : "cn-north-7", "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" } ] }
Example Responses
Status code: 200
Success
{ "description" : "Success", "code" : "0", "order_id" : "CS1710190909OGQIS" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Failed |
403 |
Authorization failed. |
500 |
Server error. |
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