Updated on 2023-06-28 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 describes the parameters.

Table 1 Parameters

Parameter

Mandatory

Description

project_id

Yes

Project ID.

Request

Request headers

Table 2 describes the request headers.

Table 2 Request headers

Parameter

Description

Mandatory

Example

ResourceType

Resource type.

Yes

Default value: app, indicates querying the policy group attributes of an application.

Content-Type

Content type,

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

Yes

application/json;charset=utf-8

Cluster-Id

Cluster ID.

Yes

-

Namespace

Namespace.

Yes

-

Deployment-Name

Application name.

Yes

-

Response

Response parameters

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error details.

config

See Table 4.

Set of policy group attributes.

Table 4 config parameters

Parameter

Type

Description

id

String

ID of a policy group attribute.

max_instances

Integer

Maximum number of instances.

min_instances

Integer

Minimum number of instances.

cooldown_time

Integer

Cooldown period (unit: s).

Example response

{
     "errorCode": "SVCSTG.PE.0",
      "errorMessage": "",
      "config": {
          "id":"f9c7f57e-b1dc-4ef0-a009-ff2848776803",
          "max_instances": 100,//Maximum number of instances
          "min_instances": 1,//Minimum number of instances
          "cooldown_time": 60//Cooldown period, which is the execution interval between two policies.
      }
}

Error Code

Table 5 Error codes

Error Code

Message

Solution

SVCSTG.PE.4031012

Failed to verify the project ID.

Check whether the parameter meets requirements.

SVCSTG.PE.5001203

Query error.

Contact technical support.