Uploads a server certificate.
You can upload only one server certificate and its private key in each request.
The request is successful only when the server certificate and its private key are both uploaded. If the server certificate or its private key is not uploaded, the request fails. After a server certificate and its private key are uploaded, the fingerprints of all server certificates that belong to your account are returned.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UploadServerCertificate |
The operation that you want to perform. Set the value to UploadServerCertificate. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the server certificate is created. You can call the DescribeRegions operation to query region IDs. |
AliCloudCertificateId | String | No | 730912673xxxxxx_15d97e7709a_71445759hr_7892****** |
The ID of the certificate from Alibaba Cloud SSL Certificates Service. This parameter is required if you use a server certificate from Alibaba Cloud SSL Certificates Service. |
AliCloudCertificateName | String | No | cloudcertificate****** |
The name of the server certificate from Alibaba Cloud SSL Certificates Service. |
AliCloudCertificateRegionId | String | No | cn-hangzhou |
The ID of the region where the certificate from Alibaba Cloud SSL Certificates Service is created. |
ServerCertificate | String | No | servercertifictetest |
The public key certificate that you want to upload. Note This parameter is required if you use a server certificate from a third-party service
provider.
|
PrivateKey | String | No | wmsa***** |
The private key that you want to upload. Note This parameter is required if you use a server certificate from a third-party service
provider.
|
ServerCertificateName | String | No | mycert01 |
The name of the server certificate that you want to upload. The name must be 1 to 80 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
ResourceGroupId | String | No | rg-atstuj3rto**** |
The ID of the enterprise resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ServerCertificateId | String | xxxxidkp-123-cn-test****** |
The ID of the server certificate. |
ServerCertificateName | String | mycert01 |
The name of the server certificate. |
Fingerprint | String | 01:DF:AB:** |
The fingerprint of the server certificate. |
AliCloudCertificateId | String | 730912xxxxx_15d97e7709a_71445759hr_7******* |
The ID of the server certificate if the server certificate is from Alibaba Cloud SSL Certificates Service. |
AliCloudCertificateName | String | cloudcertificate****** |
The name of the server certificate if the server certificate is from Alibaba Cloud SSL Certificates Service. |
CommonName | String | www.example.com |
The domain name in the Common Name field of the server certificate. |
CreateTime | String | 2017-08-31T02:49:05Z |
The time when the server certificate was created. |
CreateTimeStamp | Long | 1504147745000 |
The timestamp generated when the server certificate was created. |
ExpireTime | String | 2018-08-31T02:49:05Z |
The time when the server certificate expires. |
ExpireTimeStamp | Long | 1504147745000 |
The timestamp generated when the server certificate expires. |
IsAliCloudCertificate | Integer | 0 |
Indicates whether the server certificate is from Alibaba Cloud SSL Certificates Service. Valid values:
|
RegionId | String | cn-hangzhou |
The ID of the region where the server certificate is created. |
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
The ID of the request. |
ResourceGroupId | String | rg-atstuj3rt****** |
The ID of the enterprise resource group. |
SubjectAlternativeNames | List | test |
The list of alternative domain names of the certificate. The alternative domain names are specified in the Subject Alternative Name field of the certificate. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UploadServerCertificate
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
<UploadServerCertificateResponse>
<Fingerprint>01:DF:AB:**</Fingerprint>
<ExpireTimeStamp>1504147745000</ExpireTimeStamp>
<ResourceGroupId>rg-atstuj3rt******</ResourceGroupId>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<CreateTime>2017-08-31T02:49:05Z</CreateTime>
<SubjectAlternativeNames>
<SubjectAlternativeName>test</SubjectAlternativeName>
</SubjectAlternativeNames>
<AliCloudCertificateId>730912xxxxx_15d97e7709a_71445759hr_7*******</AliCloudCertificateId>
<AliCloudCertificateName>cloudcertificate******</AliCloudCertificateName>
<IsAliCloudCertificate>0</IsAliCloudCertificate>
<ServerCertificateName>mycert01</ServerCertificateName>
<ServerCertificateId>xxxxidkp-123-cn-test******</ServerCertificateId>
<RegionId>cn-hangzhou</RegionId>
<ExpireTime>2018-08-31T02:49:05Z</ExpireTime>
<CreateTimeStamp>1504147745000</CreateTimeStamp>
<CommonName>www.example.com</CommonName>
</UploadServerCertificateResponse>
JSON
format
{"Fingerprint":"01:DF:AB:**",
"ExpireTimeStamp":"1504147745000",
"ResourceGroupId":"rg-atstuj3rt******",
"RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
"CreateTime":"2017-08-31T02:49:05Z",
"SubjectAlternativeNames":
{
"SubjectAlternativeName":"test"
},
"AliCloudCertificateId":"730912xxxxx_15d97e7709a_71445759hr_7*******",
"AliCloudCertificateName":"cloudcertificate******",
"IsAliCloudCertificate":"0",
"ServerCertificateName":"mycert01",
"ServerCertificateId":"xxxxidkp-123-cn-test******",
"RegionId":"cn-hangzhou",
"ExpireTime":"2018-08-31T02:49:05Z",
"CreateTimeStamp":"1504147745000",
"CommonName":"www.example.com"}
Error codes
For a list of error codes, visit the API Error Center.