Querying the Capacity Data of an Application
Function
Cloud Operations Center (COC) allows you to view the capacity details of resources associated with applications, sub-applications, components, or groups, and displays core resource data by resource type.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
coc:application:getCapacity
List
application *
-
-
-
URI
POST /v1/capacity
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group_id |
No |
String |
Definition: Select the ID of the current group. Constraints: Application, component, and group ID. An ID is unique. Value Range: The value is a string with 24 characters. Default value: N/A |
|
component_id |
No |
String |
Definition: Select the ID of the current component. Constraints: Application, component, and group ID. An ID is unique. Value Range: The value is a string with 24 characters. Default value: N/A |
|
application_id |
No |
String |
Definition: ID of the current application. Constraints: Application, component, and group ID. The ID is unique. Value Range: The value is a string with 24 characters. Default value: N/A |
|
domain_id |
No |
String |
Definition: Account ID of the tenant to which a user logs in, that is, the tenant ID. Constraints: N/A Value Range: N/A Default value: No/A |
|
provider_obj |
Yes |
Array of provider_obj objects |
Definition: Resource object Constraints: N/A Value Range: The value is a string. Service resources such as ECSs, CCE instances, and RDS DB instances are available. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
provider |
No |
String |
Definition: Cloud service name Constraints: N/A Value Range: The value is a string with 1 to 64 characters. You can select service resources such as ECSs, CCE instances, and RDS DB instances. Default value: N/A |
|
type |
No |
String |
Definition: Resource type. Constraints: N/A Value Range: There are many resource types. Select a resource type based on the actual service. The common resource types are as follows: Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Array of data objects |
Definition: Capacity data list. Value Range: List of cloud service capacity data of the selected application. The value ranges from 0 to 500. |
|
Parameter |
Type |
Description |
|---|---|---|
|
sum_size |
String |
Definition: Total disk size. Value Range: Total memory of the cloud service. |
|
sum_cpu |
String |
Definition: Total number of allocated CPUs. Value Range: N/A |
|
sum_mem |
String |
Definition: Total allocated memory. Value Range: N/A |
|
provider |
String |
Definition: Type of a cloud service. Value Range: The value is a character string. Service resources such as ECSs, CCE instances, and RDS DB instances are available. |
|
type |
String |
Definition: Resource type. Value Range: There are many resource types. Select a resource type based on the actual service. The common resource types are as follows: -instances: cloud database instances |
Example Requests
Query the capacity data of an application.
POST https://{Endpoint}/v1/capacity
{
"application_id" : "660557b2dc48844adc49eaa5",
"provider_obj" : [ {
"provider" : "ecs",
"type" : "cloudservers"
}, {
"provider" : "bms",
"type" : "servers"
}, {
"provider" : "evs",
"type" : "volumes"
}, {
"provider" : "rds",
"type" : "instances"
}, {
"provider" : "dcs",
"type" : "redis"
}, {
"provider" : "dds",
"type" : "instances"
}, {
"provider" : "cci",
"type" : "pods"
} ]
}
Example Responses
Status code: 200
The application capacity information is queried.
{
"data" : [ {
"sum_mem" : "39936",
"sum_cpu" : "17",
"provider" : "ecs",
"type" : "cloudservers"
}, {
"sum_mem" : "0",
"sum_cpu" : "0",
"provider" : "bms",
"type" : "servers"
}, {
"sum_size" : "1670",
"provider" : "evs",
"type" : "volumes"
}, {
"sum_mem" : "32",
"sum_cpu" : "16",
"sum_size" : "370",
"provider" : "rds",
"type" : "instances"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The application capacity information is queried. |
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