Modifying Policy Group Attributes
Function
This API is used to modify policy group attributes.
URI
PUT /v1/{project_id}/pe/policy/config
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ResourceType |
Yes |
String |
Resource type. Default value: app, indicating that the policy group attributes of an application are modified. Enumeration values:
|
Cluster-Id |
Yes |
String |
Cluster ID. |
Namespace |
Yes |
String |
Namespace. |
Deployment-Name |
Yes |
String |
Application name. |
X-Auth-Token |
Yes |
String |
Project-level token obtained from IAM. |
Content-Type |
Yes |
String |
Content type, which is application/json. Enumeration values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
max_instances |
No |
Integer |
Maximum number of instances, indicating the upper limit for capacity expansion. |
min_instances |
No |
Integer |
Minimum number of instances, indicating the lower limit for capacity expansion. |
cooldown_time |
No |
Integer |
Cooldown period (unit: s). After an applied policy is executed, the next policy can be executed only after the cooldown period expires. |
deployment_name |
No |
String |
Application name. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Details. |
Example Requests
Modify policy group attributes.
PUT https://{Endpoint}/v1/{project_id}/pe/policy/config { "max_instances" : 100, "min_instances" : 1, "cooldown_time" : 60, "deployment_name" : "test01" }
Example Responses
Status code: 200
OK
The request is successful.
{ "errorCode" : "SVCSTG.PE.0", "errorMessage" : "" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK The request is successful. |
400 |
Bad Request Invalid request. The client should not repeat the request without modifications. |
401 |
Unauthorized The authorization information is incorrect or invalid. |
403 |
ForbiddenThe request is rejected. The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications. |
500 |
Internal Server Error The server is able to receive the request but unable to understand the request. |
503 |
Service Unavailable The requested service is invalid. The client should not repeat the request without modifications. |
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