Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.
Querying Your Subscriptions
Function
This API is used to query your subscriptions to cloud and dedicated WAF instances billed on a yearly/monthly or pay-per-use basis.
URI
GET /v1/{project_id}/waf/subscription
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain the value, go to the Cloud management console first. Then, click your username, select My Credentials, and view the Project ID column in the Projects area. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Content-Type |
Yes |
String |
Content type. Default: application/json;charset=utf8 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
type |
Integer |
The edition for the cloud WAF instance.
|
resources |
Array of ResourceResponse objects |
The resource list. |
isNewUser |
Boolean |
New user or not. |
premium |
Premium object |
Information about subscriptions to dedicated WAF instances |
Parameter |
Type |
Description |
---|---|---|
resourceId |
String |
Resource ID. |
cloudServiceType |
String |
Cloud service type |
resourceType |
Object |
Cloud service resource type.
|
resourceSpecCode |
String |
Cloud resource specifications. |
status |
Integer |
Resource status. The value can be:
|
expireTime |
String |
Resource expiration time. |
resourceSize |
Integer |
Resource quantity. |
Parameter |
Type |
Description |
---|---|---|
purchased |
Boolean |
Whether the dedicated mode is enabled. |
total |
Integer |
The number of dedicated WAF instances, including load-balancing instances. |
elb |
Integer |
The number of load-balancing WAF instances (ELB mode). |
dedicated |
Integer |
The number of the dedicated WAF instances |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
The following example shows how to query the subscriptions in a project. The project ID is specified by project_id.
GET https://{Endpoint}/v1/{project_id}/waf/subscription?
Example Responses
Status code: 200
Request succeeded.
{ "type" : 3, "resources" : [ { "resourceId" : "d2759a06ed844b9c9837bb76326ca656", "cloudServiceType" : "hws.service.type.waf", "resourceType" : "hws.resource.type.waf", "resourceSpecCode" : "waf.enterprise", "resourceSize" : null, "expireTime" : "2022-12-07T15:59:59Z", "status" : 0 }, { "resourceId" : "6a5a4b06dbcd4cc5be6ff88bcd988046", "cloudServiceType" : "hws.service.type.waf", "resourceType" : "hws.resource.type.waf.rule", "resourceSpecCode" : "waf.expack.rule.enterprise", "resourceSize" : 5, "expireTime" : "2022-12-07T15:59:59Z", "status" : 0 }, { "resourceId" : "a9202ca8704740b6a1e0481c80bd4255", "cloudServiceType" : "hws.service.type.waf", "resourceType" : "hws.resource.type.waf.domain", "resourceSpecCode" : "waf.expack.domain.enterprise", "resourceSize" : 10, "expireTime" : "2022-12-07T15:59:59Z", "status" : 0 } ], "isNewUser" : false, "premium" : { "purchased" : true, "total" : 8, "elb" : 0, "dedicated" : 8 } }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Request failed. |
401 |
The token does not have required permissions. |
500 |
Internal 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.