Purchases, applies for, and issues a domain validated (DV) certificate by using a custom certificate signing request (CSR) file. You can use extended certificate services to purchase and apply for a DV certificate with a few clicks.
Operation description
- You can call the CreateCertificateWithCsrRequest operation to apply only for DV certificates. We recommend that you call the CreateCertificateForPackageRequest operation to submit a certificate application. This operation allows you to apply for certificates of all specifications and specify the method to generate a CSR file.
- Before you call this operation, make sure that you have purchased a certificate resource plan of the required specifications. For more information about how to purchase a certificate resource plan, see Purchase a certificate resource plan. You can call the DescribePackageState operation to query the usage of certificate resource plans of specified specifications. The usage information includes the total number of purchased certificate resource plans of the specified specifications, the number of times that certificate applications are submitted, and the number of times that certificates are issued.
- When you call this operation, you can use the ProductCode parameter to specify the specifications of the certificate.
- After you call this operation to submit a certificate application, the certificate quota of the required specifications that you purchased is consumed. After you call this operation, you also need to call the DescribeCertificateState operation to obtain the information that is required to complete domain name verification, and manually complete the verification. If you use the DNS verification method, you must complete the verification on the management platform of the domain name. If you use the file verification method, you must complete the verification on your DNS server. The certificate authority (CA) starts to review your certificate application only after the domain name verification is complete.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-cert:CreateCertificateWithCsrRequest | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Csr | string | Yes | The content of the existing CSR file. Note
The CN field in the CSR file specifies the domain name that is bound to the certificate.
| -----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST----- |
ProductCode | string | No | The specifications of the certificate. Valid values:
| symantec-free-1-free |
Username | string | Yes | The name of the applicant. | Tom |
Phone | string | Yes | The phone number of the applicant. | 1390000**** |
string | Yes | The contact email address of the applicant. | username@example.com | |
ValidateType | string | Yes | The method to verify the ownership of a domain name. Valid values:
For more information about the verification methods, see Verify the ownership of a domain name. | DNS |
Response parameters
Examples
Sample success responses
JSON
format
{
"OrderId": 98987582437920960,
"RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D"
}
Error codes
For a list of error codes, visit the Service error codes.
HTTP status code | Error code | Description |
---|---|---|
404 | NotFoundPackage | The error message returned because no certificate resource plans were purchased. |
404 | NotRemainCount | The error message returned because the certificate quota is insufficient. |
403 | CreateCertificateRequestFailed | The error message returned because the request failed to be created. |
404 | NotFoundOrder | The error message returned because the specified certificate order was not found. |
403 | OrderStateError | The error message returned because the status of the certificate order is invalid. |
403 | DeleteFail | The error message returned because the certificate application order failed to be deleted. |
500 | Error | The error message returned because an error occurred. |