All Products
Search
Document Center

Certificate Management Service:CreateExternalCACertificate

Last Updated:Oct 30, 2025

Creates and issues an external intermediate CA certificate using a Certificate Signing Request (CSR) and API parameters.

Operation description

Description

  • This API operation creates an external intermediate CA certificate using a provided CSR and optional API pass-through parameters.

  • The InstanceId parameter is required. This parameter specifies the ID of the external intermediate CA instance that you want to use.

  • The Csr parameter must contain a valid CSR.

  • The Validity parameter specifies the certificate validity period. You can set this parameter to a value in a relative or absolute time format.

  • You can use the ApiPassthrough parameter to overwrite information in the CSR or add certificate extensions, such as subject information.

  • Note: For end-entity CA certificates, set the pathLenConstraint parameter to 0.

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

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

The ID of the external intermediate CA instance to enable.

cas_deposit-cn-1234abcd

Csr

string

No

Certificate Signing Request. The CSR can contain information such as the SubjectDN and custom extensions for the CA certificate. The CA generates the SubjectKeyIdentifier, AuthorityKeyIdentifier, and CRLDistributionPoints extensions. Any values for these extensions in the CSR are ignored.

-----BEGIN CERTIFICATE REQUEST----- MIIBczCCARgCAQAwgYoxFDASBgNVBAMMC2FsaXl1bi50ZXN0MQ0wCwYDVQQ ... vbIgMQIhAKHDWD6/WAMbtezAt4bysJ/BZIDz1jPWuUR5GV4TJ/mS -----END CERTIFICATE REQUEST-----

Validity

string

No

The certificate validity period. Supports relative and absolute time.

Note

Relative time: Supports units of year, month, and day.

  • Year - y

  • Month - m

  • Day - d

Note

Absolute time: Uses GMT. Format: yyyy-MM-dd'T'HH:mm:ss'Z'

  • Specify expiration time - $NotAfter

  • Specify start and expiration times - $NotBefore/$NotAfter

10y

ApiPassthrough

object

No

Use API parameters to overwrite CSR content or add it to the CA certificate.

Subject

object

No

The subject information for the CA certificate. If this value is specified, it overwrites the SubjectDN in the CSR.

Country

string

No

The country. Use the two-letter country code from ISO 3166-1.

CN

State

string

No

The state or province.

Zhejiang

Locality

string

No

The city or region.

Hangzhou

Organization

string

No

The organization or company.

Alibaba

OrganizationUnit

string

No

The subdivision within the organization, such as a department, team, project group, or branch.

Cloud Security

CommonName

string

No

The name of the CA certificate.

Testing CA

Extensions

object

No

CA certificate extensions. If this value is specified, it overwrites the extension values in the CSR or adds them to the CA certificate extensions.

PathLenConstraint

integer

No

The certificate path length constraint. For an EndEntity CA, this value must be 0. This indicates that the CA certificate is used to issue end-entity certificates.

0

ExtendedKeyUsages

array

No

Extended key usages.

string

No

Allowed values:

  • any - No restrictions

  • serverAuth - Server authentication

  • clientAuth - Client authentication

  • codeSigning - Code signing

  • emailProtection - Email protection

  • timeStamping - Timestamping

  • OCSPSigning - OCSP signing

  • Other extended key usage OIDs

Valid values:

  • codeSigning :

    codeSigning

  • emailProtection :

    emailProtection

  • serverAuth :

    serverAuth

  • timeStamping :

    timeStamping

  • any :

    any

  • clientAuth :

    clientAuth

  • OCSPSigning :

    OCSPSigning

serverAuth

Tags

array<object>

No

object

No

Key

string

No

database

Value

string

No

1

ResourceGroupId

string

No

test

Response elements

Element

Type

Description

Example

object

OpenApiResponse

RequestId

string

The ID of the request.

12345678-1234-1234-1234-123456789ABC

Identifier

string

The unique identifier of the certificate.

1ed4068c-6f1b-6deb-8e32-3f8439a851cb

Certificate

string

The content of the certificate.

-----BEGIN CERTIFICATE----- MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ ... ... ... KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== -----END CERTIFICATE-----

CertificateChain

string

The CA certificate chain.

-----BEGIN CERTIFICATE----- ... ... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- ... ... -----END CERTIFICATE-----

Examples

Success response

JSON format

{
  "RequestId": "12345678-1234-1234-1234-123456789ABC",
  "Identifier": "1ed4068c-6f1b-6deb-8e32-3f8439a851cb",
  "Certificate": "-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\n...\n...\n...\nKOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n-----END CERTIFICATE-----\n",
  "CertificateChain": "-----BEGIN CERTIFICATE-----\n...\n...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n...\n...\n-----END CERTIFICATE-----\n"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.