Updated on 2025-05-29 GMT+08:00
Querying Deployed Resources

Querying Deployed Resources

Function

Query the resources deployed for the issued and uploaded non-SM series cryptographic algorithm certificates.

URI

POST /v3/scm/deployed-resources

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

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

Minimum: 32

Maximum: 2097152

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

certificate_ids

Yes

Array of strings

Certificate ID list.

Minimum: 16

Maximum: 16

Array Length: 1 - 50

service_names

Yes

Array of strings

Service name list.

  • WAF: Query WAF resources associated with a certificate.

  • CDN: Query the CDN resources associated with a certificate.

  • ELB: Query the resources associated with ELB (classic) of a certificate.

  • ALL: Query the resources of the preceding four services.

Minimum: 0

Maximum: 5

Array Length: 1 - 50

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

results

Array of ResultDetail objects

Request result list. For details, see data structure of the ResultDetail field.

Array Length: 1 - 50

Table 4 ResultDetail

Parameter

Type

Description

certificate_id

String

Certificate ID.

Minimum: 16

Maximum: 16

total_num

Integer

Number of resources deployed for the certificate in the current service.

Minimum: 0

Maximum: 1000

deployed_resources

Array of DeployedResourceDetail objects

List of resources deployed under the current certificate. For details, see data structure of the DeployedResourceDetail field.

Array Length: 0 - 100

Table 5 DeployedResourceDetail

Parameter

Type

Description

service

String

Name of the resource service where the certificate has been deployed.

  • WAF: The certificate is associated with WAF resources.

  • CDN: The certificate is associated with the resources of the content delivery network.

  • ELB: The certificate is associated with ELB (classic) resources.

Minimum: 0

Maximum: 5

resource_num

Integer

Number of resources deployed for the certificate in the current service.

Minimum: 0

Maximum: 1000

resource_location

String

Global service or region-level service.

Minimum: 0

Maximum: 63

region_resources

Array of RegionResourceDetail objects

Region resource list. For details, see data structure description of the RegionResourceDetail field.

Array Length: 0 - 100

Table 6 RegionResourceDetail

Parameter

Type

Description

region_id

String

Region ID. If the service is a global service, set region_id to global. Other services are named based on the IAM.

Minimum: 0

Maximum: 63

is_error

Boolean

Indicates whether an exception occurs in the response when the resource information of the current region is requested.

  • true: An exception occurs. The statistics of the current region are inaccurate.

  • false: No exception occurs. The statistics of the current region are correct.

resources

Array of ResourceDetail objects

Resource set. The identifier of each resource is in the format of resource ID + : + resource name. For details, see the data structure description of the ResourceDetail field.

Array Length: 0 - 100

Table 7 ResourceDetail

Parameter

Type

Description

resource_id

String

Resource ID.

Minimum: 0

Maximum: 63

resource_name

String

Resource name. Options:

Minimum: 0

Maximum: 63

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code returned for an error request.

Minimum: 3

Maximum: 36

error_msg

String

Error information returned for an error request.

Minimum: 0

Maximum: 1024

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code returned for an error request.

Minimum: 3

Maximum: 36

error_msg

String

Error information returned for an error request.

Minimum: 0

Maximum: 1024

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code returned for an error request.

Minimum: 3

Maximum: 36

error_msg

String

Error information returned for an error request.

Minimum: 0

Maximum: 1024

Example Requests

{
  "certificate_ids" : [ "scs1665472591541" ],
  "service_names" : [ "WAF" ]
}

Example Responses

Status code: 200

Normal response.

{
  "results" : [ {
    "certificate_id" : "scs1665472591541",
    "total_num" : 1,
    "deployed_resources" : [ {
      "service" : "ELB",
      "resource_num" : 1,
      "resource_location" : "region",
      "region_resources" : [ {
        "region_id" : "cn-north-7",
        "is_error" : false,
        "resources" : [ {
          "resource_id" : "d93c9fe40959468eb2baf32590a1140a",
          "resource_name" : "xxxx"
        } ]
      } ]
    } ]
  } ]
}

Status code: 401

Authentication failed.

{
  "error_code" : "SCM.XXX",
  "error_msg" : "XXX"
}

Status code: 403

Access denied.

{
  "error_code" : "SCM.XXX",
  "error_msg" : "XXX"
}

Status code: 500

Failed to complete the request because of an internal server error.

{
  "error_code" : "SCM.XXX",
  "error_msg" : "XXX"
}

Status Codes

Status Code

Description

200

Normal response.

401

Authentication failed.

403

Access denied.

404

Access page not found.

500

Failed to complete the request because of an internal server error.

Error Codes

See Error Codes.