Updated on 2024-04-15 GMT+08:00

Querying Policy Group Attributes

Function

This API is used to query policy group attributes.

URI

GET /v1/{project_id}/pe/policy/config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

ResourceType

Yes

String

Resource type.

Content-Type

Yes

String

Content type, which is application/json;charset=utf-8.

Enumeration values:

  • application/json;charset=utf-8

  • application/json

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.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Details.

config

PolicyConfig object

Set of policy group attributes.

Table 4 PolicyConfig

Parameter

Type

Description

id

String

ID of a policy group attribute.

max_instances

Integer

Maximum number of instances, indicating the upper limit for capacity expansion.

min_instances

Integer

Minimum number of instances, indicating the lower limit for capacity expansion.

cooldown_time

Integer

Cooldown period (unit: s). After an applied policy is executed, the next policy can be executed only after the cooldown period expires.

Example Requests

None

Example Responses

Status code: 200

OK

The request is successful.

{
  "errorCode" : "SVCSTG.PE.0",
  "errorMessage" : "",
  "config" : {
    "id" : "f9c7f57e-b1dc-4ef0-a009-ff2848776803",
    "max_instances" : 100,
    "min_instances" : 1,
    "cooldown_time" : 60
  }
}

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.