On-Demand Subscription of SecMaster
Function
Enable the on-demand SecMaster.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/subscriptions/orders
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Tenant project ID. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
X-Language | Yes | String | Current language environment zh-cn or en-us. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
region_id | Yes | String | Region ID, for example, cn-north-4. |
domain_id | Yes | String | domainId |
tag_list | No | Array of TagInfo objects | Charging tag. |
product_list | No | Array of ProductPostPaid objects | Product list. |
operate_type | No | String | Specifies the operation type. The value can be create or addition. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
key | Yes | String | Identifier. The value is a string of 2 to 36 characters consisting of only letters, digits, underscores (_), and hyphens (-). |
value | Yes | String | Content. The value is a string of 2 to 36 characters consisting of only letters, digits, underscores (_), and hyphens (-). |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
id | Yes | String | Specifies the identifier, which must be unique in each price query and is used for identifying the mappings between requests and responses. |
product_id | Yes | String | Offering ID, which is obtained from the CBC price inquiry. |
cloud_service_type | Yes | String | Cloud service type. The fixed value is hws.service.type.sa. |
resource_type | Yes | String | Specifies the resource type of the purchased product. For example, the resource type for typical scenarios in SecMaster is hws.resource.type.secmaster.typical. |
resource_spec_code | Yes | String | Specifies the resource specifications of the purchased product. For example, the resource specification for the basic edition in SecMaster is secmaster.basic. |
usage_measure_id | Yes | Integer | Specifies the usage measurement unit. This parameter is mandatory for a pay-per-use task. For example, the resources are billed by hour, the usage value is 1, and the usage measurement unit is hour. The options are: 4: Hours 10: GB. The bandwidth usage is measured by traffic (GB). 11: MB. The bandwidth usage is measured by traffic (MB). |
usage_value | Yes | Number | Specifies the usage value. This parameter is mandatory for a pay-per-use task. For example, the resources are billed by hour, the usage value is 1, and the usage measurement unit is hour. |
resource_size | Yes | Integer | Specifies the number of quotas. |
usage_factor | Yes | String | Specifies the usage factor. This parameter is mandatory for a pay-per-use task. The value is the same as the usage factor of SDRs. The mappings between cloud services and usage factors are as follows: Typical configuration: Duration Situation management: duration Security orchestration: count Intelligent analysis: flow |
resource_id | No | String | Resource ID, which is transferred only when the quota is added. |
Response Parameters
None
Example Requests
https://{endpoint}/v1/{projectId}/subscriptions/orders
{
"domain_id" : "abcdef8a41164a2280ec65f1f4c4mlnyz",
"region_id" : "cn-north-4",
"product_list" : [ {
"product_id" : "OFFI908269345109094402",
"cloud_service_type" : "hws.service.type.sa",
"id" : "E52E1A22-9408-459A-9F67-7B5C11B1E71A",
"resource_spec_code" : "secmaster.professional",
"resource_type" : "hws.resource.type.secmaster.typical",
"usage_factor" : "duration",
"usage_value" : 1,
"usage_measure_id" : 4,
"resource_size" : 1
} ]
} Example Responses
Status code: 400
Parameter error.
{
"error_msg" : "You already have [standard edition] package. To use more, upgrade the SecMaster edition you are using or increase the quota.",
"error_code" : "SecMaster.00010201"
} Status Codes
Status Code | Description |
|---|---|
200 | Request successful. |
400 | Parameter error. |
403 | Insufficient permissions. |
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.

