Creates a Software as a Service (SaaS) domain name for a site.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Hostname |
string |
Yes |
The Software as a Service (SaaS) domain name. |
custom.site.com |
| SiteId |
integer |
Yes |
The ID of the site. To obtain the site ID, call the ListSites operation. |
1234567890123 |
| RecordId |
integer |
Yes |
The ID of the record to attach. To obtain the record ID, call the ListRecords operation. |
1234567890123 |
| SslFlag |
string |
Yes |
The SSL switch.
|
on |
| CertType |
string |
No |
The certificate type. This parameter is required when SslFlag is set to on.
|
free |
| Certificate |
string |
No |
The content of the certificate. This parameter is required when CertType is set to upload. |
-----BEGIN CERTIFICATE----- |
| PrivateKey |
string |
No |
The private key of the certificate. This parameter is required when CertType is set to upload. |
-----BEGIN PRIVATE KEY----- |
| CasId |
integer |
No |
The ID of the Alibaba Cloud Security certificate. This parameter is required when CertType is set to cas. |
30000478 |
| CasRegion |
string |
No |
The region of the Alibaba Cloud Security certificate. This parameter is required when CertType is set to cas.
|
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique request ID, generated by Alibaba Cloud. |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
| HostnameId |
integer |
The ID of the SaaS domain name. |
1234567890123 |
| Hostname |
string |
The SaaS domain name. |
custom.site.com |
Examples
Success response
JSON format
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9",
"HostnameId": 1234567890123,
"Hostname": "custom.site.com"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | Your plan is unavailable due to an overdue payment. Complete the payment first. |
| 400 | Site.ServiceBusy | This website is being configured. Try again later. | This website is being configured. Try again later. |
| 400 | CustomHostname.ConflictWithExistingResource | The custom hostname conflicts with existing resources, such as sites, records, load balancers, source address pools, custom hostnames and Layer 4 proxy records. | The custom hostname conflicts with existing resources, such as sites, records, load balancers, source address pools, custom hostnames and Layer 4 proxy records. |
| 400 | CustomHostname.ApplyCertFailed | Fail to apply a free cert for custom hostname. Please try again later. | Fail to apply a free cert for custom hostname. Please try again later. |
| 400 | CustomHostname.SetCertFailed | Fail to deploy a cert for custom hostname. Please try again later. | Fail to deploy a cert for custom hostname. Please try again later. |
| 400 | CustomHostname.CheckQuotaFailed | Fail to check quota for custom hostname. Please try again later. | |
| 400 | CustomHostname.OfflineForMultiReason | Unable to activate the custom hostname because it is offline due to multiple reasons. | |
| 400 | CustomHostname.WildcardDomainRequireEnterprisePlan | Wildcard custom hostnames require an Enterprise plan. | |
| 400 | CustomHostname.QueryCasCertFailed | Fail to query CAS certificate details. Please try again later. | |
| 400 | QuotaExceed.CustomHostname | The number of custom hostnames exceeds the plan quota. Contact the sales team to increase your quota. | The number of custom hostnames exceeds the plan quota. Contact the sales team to increase your quota. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.