Updated on 2022-08-09 GMT+08:00

Deleting a Private CA

Function

This API is used to delete a CA as scheduled. The scheduled time range can be 7 to 30 days.

Only the CAs in the Pending activation or Disabled status can be deleted. If a CA certificate is in the Pending activation status, the CA certificate will be deleted immediately, scheduled deletion is not supported.

URI

DELETE /v1/private-certificate-authorities/{ca_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

ca_id

Yes

String

ID of the CA certificate you plan to delete.

Minimum: 36

Maximum: 36

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

pending_days

Yes

String

Delayed deletion time, in days

Minimum: 7

Maximum: 30

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. For details, see Obtaining a User Token.

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Example Requests

When you use this API to delete a CA certificate as scheduled, a token is required in the X-Auth-Token field in the request header. The token must have the permission to access the API.

DELETE https://ccm.ap-southeast-3.myhuaweicloud.com/v1/private-certificate-authorities/4c0e772e-a30c-4029-b929-b7acb04143f7?pending_days=7

Example Responses

Status code: 400

Invalid request parameters.

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

Status code: 401

Token required for the requested page.

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

Status code: 403

Authentication failed.

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

Status code: 404

No resources available or found.

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

Status code: 500

Internal service error.

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

Status Codes

Status Code

Description

204

Request succeeded, but no response body returned.

400

Invalid request parameters.

401

Token required for the requested page.

403

Authentication failed.

404

No resources available or found.

500

Internal service error.

Error Codes

See Error Codes.