获取单条 SaaS 域名的详细配置信息,包括域名验证 TXT 名称、域名验证 TXT 内容、证书过期时间(开启 SSL)等。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| HostnameId |
integer |
是 |
SaaS 域名的 ID,可通过调用 ListCustomHostnames 接口获取。 |
1234567890123 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID,阿里云为该请求生成的唯一标识符。 |
7C414690-9D7B-5D66-9CD9-AD0B3F25ED49 |
| CustomHostnameModel |
object |
查询到的单个 SaaS 域名信息。 |
|
| HostnameId |
integer |
SaaS 域名的 ID。 |
1234567890123 |
| Hostname |
string |
SaaS 域名。 |
custom.site.com |
| SiteId |
integer |
站点 ID。 |
890601022130656 |
| SiteName |
string |
站点名称。 |
example.com |
| RecordId |
integer |
记录 ID。 |
4042843419650112 |
| RecordName |
string |
记录名称。 |
origin.example.com |
| Status |
string |
SaaS 域名状态。
|
active |
| VerifyHost |
string |
域名验证 TXT 名称。 |
_esa_custom_hostname.custom.site.com |
| VerifyCode |
string |
域名验证 TXT 内容。 |
verify_16ab7f4d389d4dff6655f995c6a997bd |
| SslFlag |
string |
SSL 开关。
|
on |
| CertType |
string |
证书类型。
|
free |
| CasId |
integer |
云盾证书 ID。 |
30000478 |
| CertId |
string |
证书 ID。 |
baba2c9e90e840b3b55698cedf02b308 |
| Certificate |
string |
证书内容。 |
-----BEGIN CERTIFICATE----- |
| CertStatus |
string |
证书状态。
|
OK |
| CertTxtKey |
string |
证书验证 TXT 名称。 |
_acme-challenge.custom.site.com |
| CertTxtValue |
string |
证书验证 TXT 内容。 |
lcKYad3UQXgrZLvMm_6TBUYKK4xTkGmninV0Mzx4gjM |
| CertHttpKey |
string |
证书验证 HTTP 地址。 |
http://custom.site.com/.well-known/acme-challenge/jLmMHlEaZ3jb352Qo3ciaSoAC8KZ5Hk0F-4_1xLQtgc |
| CertHttpValue |
string |
证书验证 HTTP 内容。 |
jLmMHlEaZ3jb352Qo3ciaSoAC8KZ5Hk0F-4_1xLQtgc.GridYdfJJB5PgFEL-t89XfaFvMPB4f2-I9fwLpKl6e0 |
| CertNotAfter |
string |
证书过期时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2026-04-19T11:15:20Z |
| CertApplyMessage |
string |
免费证书申请错误说明。 |
canceled |
| CertApplyCode |
integer |
免费证书申请错误码。 |
2 |
| CreateTime |
string |
SaaS 域名的创建时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2026-04-19T11:15:20Z |
| UpdateTime |
string |
SaaS 域名的更新时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2026-04-19T11:15:20Z |
| OfflineReason |
string |
SaaS 域名被下线的原因。
|
missing_icp |
| ConflictWith |
string |
SaaS 域名被占用的原因。
|
existing_custom_hostname |
| PrivateKey |
string |
证书私钥。 |
-----BEGIN RSA PRIVATE KEY----- |
示例
正常返回示例
JSON格式
{
"RequestId": "7C414690-9D7B-5D66-9CD9-AD0B3F25ED49",
"CustomHostnameModel": {
"HostnameId": 1234567890123,
"Hostname": "custom.site.com",
"SiteId": 890601022130656,
"SiteName": "example.com",
"RecordId": 4042843419650112,
"RecordName": "origin.example.com",
"Status": "active",
"VerifyHost": "_esa_custom_hostname.custom.site.com",
"VerifyCode": "verify_16ab7f4d389d4dff6655f995c6a997bd",
"SslFlag": "on",
"CertType": "free",
"CasId": 30000478,
"CertId": "baba2c9e90e840b3b55698cedf02b308",
"Certificate": "-----BEGIN CERTIFICATE-----",
"CertStatus": "OK",
"CertTxtKey": "_acme-challenge.custom.site.com",
"CertTxtValue": "lcKYad3UQXgrZLvMm_6TBUYKK4xTkGmninV0Mzx4gjM",
"CertHttpKey": "http://custom.site.com/.well-known/acme-challenge/jLmMHlEaZ3jb352Qo3ciaSoAC8KZ5Hk0F-4_1xLQtgc",
"CertHttpValue": "jLmMHlEaZ3jb352Qo3ciaSoAC8KZ5Hk0F-4_1xLQtgc.GridYdfJJB5PgFEL-t89XfaFvMPB4f2-I9fwLpKl6e0",
"CertNotAfter": "2026-04-19T11:15:20Z",
"CertApplyMessage": "canceled",
"CertApplyCode": 2,
"CreateTime": "2026-04-19T11:15:20Z",
"UpdateTime": "2026-04-19T11:15:20Z",
"OfflineReason": "missing_icp",
"ConflictWith": "existing_custom_hostname",
"PrivateKey": "-----BEGIN RSA PRIVATE KEY-----"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | InvalidParameter | The specified parameter is invalid. | 输入参数规范校验失败。 |
| 404 | CustomHostname.NotFound | The custom hostname does not exist. Modify it and try again. | 该自定义主机名不存在,请调整后重试。 |
| 404 | CustomHostname.ApplyCertFailed | Fail to apply a free cert for custom hostname. Please try again later. | |
| 404 | CustomHostname.SetCertFailed | Fail to deploy a cert for custom hostname. Please try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。