文档首页> 内容分发网络 CDN> API参考> API> 域名配置> 查询所有绑定HTTPS证书的域名信息
更新时间:2024-05-30 GMT+08:00

查询所有绑定HTTPS证书的域名信息

功能介绍

查询所有绑定HTTPS证书的域名信息

调用方法

请参见如何调用API

URI

GET /v1.0/cdn/domains/https-certificate-info

表1 Query参数

参数

是否必选

参数类型

描述

page_size

Integer

每页的数量,取值范围1-10000,不设值时默认值为30。

page_number

Integer

查询的页码。取值范围1-65535,不设值时默认值为1。

domain_name

String

加速域名。

user_domain_id

String

域名所属用户的domain_id。

enterprise_project_id

String

当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,"all"表示所有项目。注意:当使用子账号调用接口时,该参数必传。您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

total

Integer

查询结果总数

https

Array of HttpsDetail objects

https配置。

表4 HttpsDetail

参数

参数类型

描述

domain_id

String

域名id。

domain_name

String

绑定该证书的域名。

cert_name

String

证书名字。

certificate

String

证书内容。

private_key

String

私钥内容。

certificate_type

Integer

0:自有证书 1:云托管证书。

expiration_time

Long

证书过期时间。

https_status

Integer

HTTPS证书是否启用,取值0:不启用;1:启用HTTPS加速并协议跟随回源;2:启用HTTPS加速并HTTP回源。

force_redirect_https

Integer

客户端请求是否强制重定向。1是,0否。(如果为2,表示强制跳转HTTP)

force_redirect_config

ForceRedirect object

强制跳转。

http2

Integer

是否使用HTTP2.0。(1是,0否。)

表5 ForceRedirect

参数

参数类型

描述

switch

Integer

强制跳转开关。1打开。0关闭。

redirect_type

String

强制跳转类型。http:强制跳转HTTP。https:强制跳转HTTPS。

请求示例

GET https://cdn.myhuaweicloud.com/v1.0/cdn/domains/https-certificate-info?domain_name=www.example.com&page_size=10&page_number=1

响应示例

状态码: 200

OK

{
  "total" : 1,
  "https" : [ {
    "https_status" : 1,
    "force_redirect_https" : 2,
    "force_redirect_config" : {
      "redirect_type" : "http",
      "switch" : 1
    },
    "http2" : 0,
    "cert_name" : "cdn_test",
    "certificate" : "-----BEGIN CERTIFICATE-----XX-----END CERTIFICATE-----",
    "private_key" : null,
    "certificate_type" : 0,
    "expiration_time" : 1606187416000,
    "domain_id" : "3e****************************63",
    "domain_name" : "www.example.com"
  } ]
}

状态码

状态码

描述

200

OK

错误码

请参见错误码