Updated on 2025-05-29 GMT+08:00

Pushing Certificates in Batches

Function

This API is used to push an SSL certificate to another Huawei Cloud service in batches, such as Elastic Load Balance (ELB), Web Application Firewall (WAF), and Content Delivery Network (CDN).

URI

POST /v3/scm/certificates/{certificate_id}/batch-push

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

certificate_id

Yes

String

Certificate ID.

Minimum: 16

Maximum: 16

Request Parameters

Table 2 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 3 Request body parameters

Parameter

Mandatory

Type

Description

target_projects

Yes

Array of strings

Region where the service you want to push a certificate to is deployed, for example, CDN, ELB, or WAF.

Minimum: 1

Maximum: 32

Array Length: 1 - 10

target_service

Yes

String

Service to which the certificate is pushed. Currently, certificates can only be pushed to CDN, WAF, and ELB.

Minimum: 1

Maximum: 64

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of results objects

Deployment result

Array Length: 1 - 10

Table 5 results

Parameter

Type

Description

project_name

String

Region name, for example, cn-north-7.

Minimum: 0

Maximum: 63

cert_id

String

Certificate ID.

Minimum: 0

Maximum: 255

message

String

Push result.

Minimum: 0

Maximum: 255

Status code: 401

Table 6 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 7 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 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

Example Requests

{
  "target_service" : "waf",
  "target_projects" : [ "cn-north-7" ]
}

Example Responses

Status code: 200

Normal response.

{
  "results" : [ {
    "project_name" : "cn-north-7",
    "cert_id" : "scs16751254852691",
    "message" : "success"
  } ]
}

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.