• 文档
  • 控制台
  • 登录
  • 立即注册
    目前不支持用户自主注册,如需注册账号,请联系400-080-1100
负载均衡SLB API参考手册
最近更新时间:2023-04-16 17:00:00

7 证书

7.1 GetCAList

调用 GetCAList 接口查询证书列表。

7.1.1 使用说明

GET /slb/v1.0/certificates

7.1.2 请求参数

1.png

7.1.3 返回数据

1.png

2.png


7.1.4 示例

1. 请求示例

GET /slb/v1.0/healthmonitors?PageNumber=10&PageSize=1

2. 正常返回示例

{

     "RequestId": "8bff553b-a8d0-4765-9051-0eaccc936fd0",

    "PageNumber": 10,

    "PageSize": 1,

     "TotalCount": 6,

     "Certificates": null

}


7.2 GetCADetail

调用 GetCADetail 接口查询证书详情。

7.2.1 使用说明

GET /slb/v1.0/certificates/{CertificateId}

7.2.2 请求参数

1.png

7.2.3 返回数据

2.png

3.png

7.2.4 示例

1. 请求示例

GET /slb/v1.0/certificates/cert-vz8n1mesbif3

2. 正常返回示例

{

    "RequestId": "28c83ff6-6a86-4109-9ed7-1d258b78482e",

    "CertificateId": "cert-vz8n1mesbif3",

    "CertificateName": "open_test222",

     "CreateAt": "2022-09-26 14:19:38",

    "Type": "SERVER",

    "ExpireTime": "2031-08-29 03:23:59",

     "Listeners": null,

    "Description": "open",

    "ServerCertificate": "-----BEGIN CERTIFICATE-----

\nMIIDBjCCAe6gAwIBAgIUWR2TzK6lnAwWP8nYPbORcvua5+swDQYJKoZIhvcNAQEL\nBQAw

GDEWMBQGA1UEAwwNd3d3LnRlc3QxLmNvbTAeFw0yMTA4MzAxMTIzNTlaFw0z\nMTA4Mjgx

MTIzNTlaMBgxFjAUBgNVBAMMDXd3dy50ZXN0MS5jb20wggEiMA0GCSqG\nSIb3DQEBAQUA

A4IBDwAwggEKAoIBAQCVAyt7HDZPdX3TBBWVjIzKZ3BXZYrq8JUk\nqS2hTwsNtdQ13j6QercL

IUpPLHCW69xrZEKhNEF+T5fDnEOXBSKai42BrFOwUacU\naJx4aIgfAt3F4ACtiW0LBx2A3QiTo

2t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WVGV+F27+MDr1SJRX+dJbZYTGXidPH8\nHwHkg+vj9VdjOFq5x9hDiAO5y

oJ9PhKtWQUms7GKofquJ4nL7qX4TW5urqHyzK+V\nr3HLKQKBgD8ilrcgDYiQZPW9jEDn0gMg

D6n9Ou3laoYF9WmQWa47zQBKaENIOr/K\nVDwpy5BkPepXnbADr8WJIbtswS0RRcPuHOktn9

bq9zWUIRxdzQZ43Fm/y75s2Su6\nCtKREp9xqFppyh9s4IcU8fVFzr0i3j29ECFqg7NBy9D9CCVJ

NnGN\n-----END RSA PRIVATE KEY-----"

}


7.3 AddCA

调用 AddCA 接口创建证书。

7.3.1 使用说明

POST /slb/v1.0/certificates

7.3.2 请求参数

1.png

2.png


7.3.3 返回数据

3.png

7.3.4 示例

1. 请求示例

{

     "CertificateName": "open_test",

     "ServerCertificate": "-----BEGIN CERTIFICATE-----

\nMIIDBjCCAe6gAwIBAgIUWR2TzK6lnAwWP8nYPbORcvua5+swDQYJKoZIhvcNAQEL\nBQAw

GDEWMBQGA1UEAwwNd3d3LnRlc3QxLmNvbTAeFw0yMTA4MzAxMTIzNTlaFw0z\nMTA4Mjgx

MTIzNTlaMBgxFjAUBgNVBAMMDXd3dy50ZXN0MS5jb20wggEiMA0GCSqG\nSIb3DQEBAQUA

A4IBDwAwggEKAoIBAQCVAyt7HDZPdX3TBBWVjIzKZ3BXZYrq8JUk\nqS2hTwsNtdQ13j6QercL

IUpPLHCW69xrZEKhNEF+T5fDnEOXBSKai42BrFOwUacU\naJx4aIgfAt3F4ACtiW0LBx2A3QiTo

2tM7RiqwdK896C/4QvKpiXpd6yikZ+nvBGs\n6nXUUiytoA7cOxMsKy8SiuMLcvulRGsSJEilc1z1i

XBMifnpj/iok4+ZPqO/Bo/v\nIHfUKg7apIpP2ge/CZl0Ncon29lPoN31erwTcA0kzBlUSAfyNI0w/Nsn

XK+4dhVG\nNLMAj/hDxPNdDJpEUzcNSJcJwmK03M816U2pamaUgy0K3Vjrui4xAgMBAAGjSD

BG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\nCtKREp9xqFppyh9s4IcU8fVFzr0i3j29ECFqg7NBy9D9CCVJ

NnGN\n-----END RSA PRIVATE KEY-----",

    "Type": "SERVER"

}

2. 正常返回示例

{

     "RequestId": "ef7dabb5-7d6c-48b2-8f77-f144a1fa23fd",

     "CertificateId": "cert-vz8n1mesbif3"

}


7.4 ModifyCA

调用 ModifyCA 接口修改证书。

7.4.1 使用说明

PUT /slb/v1.0/certificates/{CertificateId}

7.4.2 请求参数

1.png

7.4.3 返回数据

2.png

7.4.4 示例

1. 请求示例

{

    "CertificateName": "open_test222",

    "Description": "open"

}

2. 正常返回示例

{

    "RequestId": "477b6612-14c3-4b6e-a4f8-3f2627e349b0",

     "CertificateId": "cert-vz8n1mesbif3"

}


7.5 DeleteCA

调用 DeleteCA 接口删除证书。

7.5.1 使用说明

DELETE /slb/v1.0/certificates/{CertificateId}

7.5.2 请求参数

1.png

2.png


7.5.3 返回数据

3.png

7.5.4 示例

1. 请求示例

DELETE /slb/v1.0/certificates/cert-h0rdzfc3495t

2. 正常返回示例

{

    "RequestId": "3eed1155-9a6a-4292-899c-e721808824da"

}


意见反馈

文档内容是否对您有帮助?

如您有其他疑问,您也可以通过在线客服来与我们联系探讨 在线客服

联系我们
回到顶部