All Products
Search
Document Center

Certificate Management Service:Encrypt

Last Updated:Jan 14, 2026

You can call this operation to encrypt certificates in a certificate repository.

Operation description

The queries per second (QPS) limit for a single user is 10. If you exceed this limit, API calls are throttled, which may affect your business. To prevent this, call this operation at a reasonable rate.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cert:Encrypt

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Plaintext

string

Yes

The data to encrypt. The data can be plaintext or Base64-encoded plaintext. For more information, see the MessageType parameter. If you use Base64 encoding, for example, if the hexadecimal content of the data to be encrypted is [0x31, 0x32, 0x33, 0x34], the corresponding Base64-encoded string is MTIzNA==. The maximum size of Plaintext depends on the Algorithm:

  • RSAES_OAEP_SHA_1: 214 bytes.

  • RSAES_OAEP_SHA_256: 190 bytes.

  • SM2PKE: 6047 bytes.

1234***

CertIdentifier

string

No

The unique identifier of the certificate. To obtain this parameter, call the ListCert operation.

  • The identifier of an SSL certificate is usually in the {Certificate ID}-cn-hangzhou format.

  • For a private certificate authority (PCA) certificate, this is the value of the Identifier field of the private certificate.

1ef1da5f-38ed-69b3-****-037781890265

Algorithm

string

Yes

The encryption algorithm. Valid values:

  • RSAES_OAEP_SHA_1

  • RSAES_OAEP_SHA_256

  • SM2PKE

RSAESOAEPSHA_1

MessageType

string

No

The message type. Valid values:

  • RAW (default): Directly encrypts the value of Plaintext.

  • Base64: Decodes the Base64-encoded value of Plaintext and then encrypts the decoded data.

Valid values:

  • Base64 :

    Base64

  • RAW :

    RAW

RAW

CustomIdentifier

string

No

The custom identifier, which serves as a unique key.

****6bb538d538c70c01f81dg3****

WarehouseId

integer

No

The repository ID.

Note

To obtain this ID, call the ListCertWarehouse operation.

12

Response elements

Element

Type

Description

Example

object

Object

CertIdentifier

string

The unique identifier of the certificate.

1ef1da5f-38ed-69b3-****-037781890265

RequestId

string

The request ID.

5979d897-d69f-4fc9-87dd-f3bb73c40b80

CiphertextBlob

string

The encrypted data. The data is Base64-encoded.

ZOyIygCyaOW6Gj****MlNKiuyjfzw=

Examples

Success response

JSON format

{
  "CertIdentifier": "1ef1da5f-38ed-69b3-****-037781890265",
  "RequestId": "5979d897-d69f-4fc9-87dd-f3bb73c40b80",
  "CiphertextBlob": "ZOyIygCyaOW6Gj****MlNKiuyjfzw="
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.