CreateExternalCACertificate
Creates and issues an external subordinate CA certificate based on a CSR and API parameters.
Operation description
Operation description
This operation creates an external subordinate CA certificate based on the provided certificate signing request (CSR) and optional API pass-through parameters.
InstanceIdis required and specifies the instance ID of the external subordinate CA to be enabled.The
Csrfield must contain valid certificate signing request content.The
Validityparameter defines the certificate validity period and supports both relative time and absolute time formats.You can use
ApiPassthroughto overwrite specific information in the CSR or add additional certificate extensions, such as the subject and extensions.Note: For EndEntity CA certificates, the pathLenConstraint must be set to 0.
Try it now
Test
RAM authorization
|
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 instance ID of the external subordinate CA to be enabled. |
cas_deposit-cn-1234abcd |
| Csr |
string |
No |
The certificate signing request. It can include the SubjectDN of the CA certificate and custom extensions for the CA certificate. The SubjectKeyIdentifier, AuthorityKeyIdentifier, and CRLDistributionPoints certificate extensions are generated by the CA, and their values in the CSR are ignored. |
-----BEGIN CERTIFICATE REQUEST----- MIIBczCCARgCAQAwgYoxFDASBgNVBAMMC2FsaXl1bi50ZXN0MQ0wCwYDVQQ ... vbIgMQIhAKHDWD6/WAMbtezAt4bysJ/BZIDz1jPWuUR5GV4TJ/mS -----END CERTIFICATE REQUEST----- |
| Validity |
string |
No |
The certificate validity period. Both relative time and absolute time are supported. Note
Relative time: The supported units are years, months, and days.
Note
Absolute time: GMT time is used. Format:
|
10y |
| ApiPassthrough |
object |
No |
Overrides the CSR content or adds content to the CA certificate by using API parameters. |
|
| Subject |
object |
No |
The subject information of the CA certificate. If this value is specified, it overrides the SubjectDN in the CSR. |
|
| Country |
string |
No |
The country. Use the ISO 3166-1 alpha-2 country code. |
CN |
| State |
string |
No |
The state or province. |
Zhejiang |
| Locality |
string |
No |
The locality. |
Hangzhou |
| Organization |
string |
No |
The organization or company. |
Alibaba |
| OrganizationUnit |
string |
No |
The sub-unit within the organization, such as a department, team, project group, or branch. |
Cloud Security |
| CommonName |
string |
No |
The name of the current CA certificate. |
Testing CA |
| Extensions |
object |
No |
The extensions of the CA certificate. If this value is specified, it overrides the extension values in the CSR or adds extensions to the CA certificate. |
|
| PathLenConstraint |
integer |
No |
The certificate path length constraint. For an EndEntity CA, this value must be set to 0, which indicates that the current CA certificate is used to issue end entity certificates. |
0 |
| ExtendedKeyUsages |
array |
No |
The extended key usages. |
|
|
string |
No |
Valid values:
Valid values:
|
serverAuth |
|
| Tags |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key. |
database |
| Value |
string |
No |
The tag value. |
1 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
test |
| CertMaxTime |
integer |
No |
The maximum validity period for issued certificates, which is specified by the certMaxTime parameter of the CA. Unit: days. |
30 |
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 certificate content. |
-----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.