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

Deploying Certificates

Function

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

URI

POST /v3/scm/certificates/{certificate_id}/deploy

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

project_name

No

String

Name of the project where the resource to be deployed is located. If the resource is deployed in the main project, the value is the region ID.

Minimum: 1

Maximum: 255

service_name

Yes

String

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

Minimum: 1

Maximum: 64

resources

Yes

Array of DeployedResource objects

List of resources to be deployed.

Array Length: 1 - 20

Table 4 DeployedResource

Parameter

Mandatory

Type

Description

id

No

String

Resource ID. This parameter is mandatory when WAF or ELB is deployed.

Minimum: 0

Maximum: 63

type

No

String

Resource type. Currently, this parameter is required only when WAF resources are deployed. The value can be cloud for cloud mode or premium for dedicated mode.

Minimum: 0

Maximum: 63

domain_name

No

String

Domain name to be deployed. Currently, this parameter is required only when CDN is deployed, that is, the domain name to be accelerated. The domain name must match the certificate.

Minimum: 0

Maximum: 63

enterprise_project_id

No

String

ID of the enterprise project to which the resource to be deployed belongs. This parameter is mandatory only when WAF resources are deployed.

Minimum: 0

Maximum: 63

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

failure_list

Array of FaiureResource objects

List of resources that fail to be deployed.

Array Length: 1 - 20

Table 6 FaiureResource

Parameter

Type

Description

resource

String

Information about the resource that fails to be deployed. When WAF or ELB is deployed, this field is the resource ID. When CDN is deployed, this field is the acceleration domain name.

Minimum: 0

Maximum: 63

failure_info

String

Failure cause, which is generally the error code returned by the target service.

Minimum: 0

Maximum: 255

Status code: 401

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: 403

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: 500

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

Example Requests

{
  "service_name" : "ELB",
  "project_name" : "cn-north-7",
  "resources" : [ {
    "id" : "982b8a6a6ebc43809d82a46ca99aaeb7"
  } ]
}

Example Responses

Status code: 200

Normal response.

{
  "failure_list" : [ {
    "resource" : "982b8a6a6ebc43809d82a46ca99aaeb7",
    "failure_info" : "ELB.8904:certificate 982b8a6a6ebc43809d82a46ca99aaeb7 does not exist"
  } ]
}

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.