Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Environment/ Querying a Managed Resource Based on the Environment ID
Updated on 2026-04-10 GMT+08:00

Querying a Managed Resource Based on the Environment ID

Function

This API is used to query a managed resource based on the environment ID.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    servicestage:environment:list

    list

    -

    -

    servicestage:app:list

    -

URI

GET /v3/{project_id}/cas/environments/{environment_id}/resources

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Tenant's project ID. See Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

Message body type (or format).

Constraints

N/A

Range

application/json;charset=utf8

Default Value

N/A

X-Auth-Token

Yes

String

Definition

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response

Table 3 Response parameters

Parameter

Type

Description

resources

Array of objects

Definition

Resource object. See Table 4.

Range

N/A

Table 4 schemas

Parameter

Type

Description

id

String

Definition

Resource ID.

Range

N/A

type

String

Definition

Resource type.

Range

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • as
  • cse: ServiceComb engine
  • nacos: registry/configuration center
  • dcs
  • rds
  • subnet
  • acl
  • customServer
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch
  • custom_k8s: custom Kubernetes cluster

parameters

Map<String, String>

Definition

Resource parameters. See Table 5.

alias

String

Definition

Resource alias.

Range

N/A

Table 5 parameters

Parameter

Type

Description

kube_config

String

Definition

Kubernetes connection configuration file.

This parameter is returned when the resource type is custom_k8s.

Range

N/A

Example Request

None

Example Response

{
    "resources": [
        {
            "id": "67835bb3-1235-4cc9-be71-becbb2b4ca0d",
            "type": "ecs",
            "name": "ecs-a5a9"
        }
    ]
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.