Updated on 2023-12-06 GMT+08:00

Querying Endpoint Groups

Function

This API is used to query endpoint groups.

Calling Method

For details, see Calling APIs.

URI

GET /v1/endpoint-groups

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Specifies the number of resources on each page. If this parameter is not specified, the default value is 500.

Minimum: 1

Maximum: 2000

Default: 500

marker

No

String

Specifies the ID of the resource from which pagination query starts, that is, the ID of the last resource on the previous page. If the parameter is not specified, only resources on the first page are queried. This parameter must be used together with limit.

Minimum: 1

Maximum: 36

page_reverse

No

Boolean

Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link.

Default: false

id

No

String

Specifies the resource ID.

Minimum: 0

Maximum: 36

name

No

String

Specifies the resource name. The name can contain 0 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

Minimum: 0

Maximum: 64

status

No

String

Specifies the resource status. The value can be one of the following:

  • ACTIVE: The resource is running.

  • PENDING: The status is to be determined.

  • ERROR: Failed to create the resource.

  • DELETING: The resource is being deleted.

Minimum: 1

Maximum: 10

Enumeration values:

  • ACTIVE

  • PENDING

  • ERROR

  • DELETING

listener_id

No

String

Specifies the listener ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

endpoint_groups

Array of EndpointGroupDetail objects

Specifies the endpoint groups.

page_info

PageInfo object

Specifies the pagination query information.

request_id

String

Specifies the request ID.

Table 4 EndpointGroupDetail

Parameter

Type

Description

id

String

Specifies the endpoint group ID.

name

String

Specifies the endpoint group name. The name can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

Minimum: 1

Maximum: 64

description

String

Specifies the information about the endpoint group. The value can contain 0 to 255 characters. The following characters are not allowed: <>

Minimum: 0

Maximum: 255

status

String

Specifies the provisioning status. The value can be one of the following:

  • ACTIVE: The resource is running.

  • PENDING: The status is to be determined.

  • ERROR: Failed to create the resource.

  • DELETING: The resource is being deleted.

Enumeration values:

  • ACTIVE

  • PENDING

  • ERROR

  • DELETING

traffic_dial_percentage

Integer

Specifies the percentage of traffic distributed to the endpoint group.

Minimum: 0

Maximum: 100

region_id

String

Specifies the region where the endpoint group belongs.

Minimum: 1

Maximum: 36

listeners

Array of Id objects

Specifies the listeners associated with the endpoint group.

Array Length: 1 - 1

created_at

String

Specifies when the endpoint group was added.

updated_at

String

Specifies when the endpoint group was updated.

domain_id

String

Specifies the tenant ID.

frozen_info

FrozenInfo object

Specifies the frozen details of cloud services or resources.

Table 5 Id

Parameter

Type

Description

id

String

Specifies the ID of the associated listener.

Minimum: 0

Maximum: 36

Table 6 FrozenInfo

Parameter

Type

Description

status

Integer

Specifies the status of a cloud service or resource. The value can be one of the following:

  • 0: unfrozen/normal (The cloud service will recover after being unfrozen.)

  • 1: frozen (Resources and data will be retained, but the cloud service cannot be used.)

  • 2: deleted/terminated (Both resources and data will be cleared.)

Minimum: 0

Maximum: 2

effect

Integer

Specifies the status of the resource after being frozen. The value can be one of the following:

  • 1 (default): The resource is frozen and can be released.

  • 2: The resource is frozen and cannot be released.

  • 3: The resource is frozen and cannot be renewed.

Minimum: 1

Maximum: 3

Default: 1

scene

Array of strings

Specifies the service scenario. The value can be one of the following:

  • ARREAR: The cloud service is in arrears, including expiration of yearly/monthly resources and fee deduction failure of pay-per-use resources.

  • POLICE: The cloud service is frozen for public security.

  • ILLEGAL: The cloud service is frozen due to violation of laws and regulations.

  • VERIFY: The cloud service is frozen because the user fails to pass the real-name authentication.

  • PARTNER: A partner freezes their customer's resources.

Maximum: 16

Table 7 PageInfo

Parameter

Type

Description

next_marker

String

Specifies the marker of the next page. If this parameter is left empty, the resource is on the last page.

current_count

Integer

Specifies the number of resources on the current list.

Example Requests

Querying endpoint groups

GET https://{ga_endpoint}/v1/endpoint-groups

Example Responses

Status code: 200

Operation succeeded.

{
  "endpoint_groups" : [ {
    "id" : "3a9f50bb-f041-4eac-a117-82472d8a0007",
    "name" : "endpoint-group-name",
    "description" : "endpoint-group description",
    "status" : "ACTIVE",
    "traffic_dial_percentage" : 10,
    "region_id" : "ap-southeast-1",
    "listeners" : [ {
      "id" : "1b11747a-b139-492f-9692-2df0b1c87193"
    } ],
    "created_at" : "2019-01-08T01:21:37.151Z",
    "updated_at" : "2019-01-08T01:21:37.151Z",
    "domain_id" : "99a3fff0d03c428eac3678da6a7d0f24",
    "frozen_info" : {
      "status" : 2,
      "effect" : 1,
      "scene" : [ "ARREAR", "POLICE" ]
    }
  } ],
  "page_info" : {
    "next_marker" : "3a9f50bb-f041-4eac-a117-82472d8a0007",
    "current_count" : 1
  },
  "request_id" : "915a14a6-867b-4af7-83d1-70efceb146f9"
}

Status Codes

Status Code

Description

200

Operation succeeded.

Error Codes

See Error Codes.