You need to enable JavaScript to run this app.
导航
下载私有证书
最近更新时间:2024.06.24 20:30:02首次发布时间:2023.08.11 19:16:09

调用本接口下载已签发的私有证书。

使用说明

  • 通过下载私有证书,您可以获取私有证书的私钥;而在查询私有证书详情时,您无法获取私有证书的私钥。
  • 私有证书只有处于正常运行状态,才允许被下载。

请求说明

  • 接口名称:DownloadLeafInstance
  • 请求方式:POST
  • 请求地址:open.volcengineapi.com

调试

暂不支持。

请求参数

下方表格中的参数包含在请求头(header)中。

参数类型是否必选描述示例值
Regionstring服务地区。该参数的取值是cn-north-1cn-north-1
ServiceNamestring服务名称。该参数的取值是pcapca

Query

下方表格中的参数包含在查询字符串(query string)中。

参数类型是否必选描述示例值
ActionstringAPI名称。该参数的取值是DownloadLeafInstanceDownloadLeafInstance
VersionstringAPI版本。该参数的取值是2023-05-012023-05-01

Body

下方表格中的参数包含在请求体(request body)中。

参数
类型
是否必选
描述
示例值
instance_id
String
要下载的私有证书实例的ID。
您可以调用 ListLeafInstances 接口获取所有私有证书实例的ID。
pca_leaf_3WdHJps3YYB****
download_type
String
下载私有证书为指定的格式。该参数的取值固定为pem
pem
is_tarball
Boolean
是否以压缩包形式下载私有证书。该参数有以下取值:
  • true:只返回以Base64编码后的压缩包文件流
  • false:分别返回证书、证书链、证书私钥等内容
false
password
String
为证书私钥设置一个加密密码。
  • 如果您未设置密码,则私钥将以明文形式返回。
  • 如果您设置了密码,那么私钥内容将基于PKCS#8方式进行加密后再返回给您。您可以使用您设置的密码进行解密,从而获得私钥内容。
123456

返回参数

参数
类型
描述
示例值
certificate
String
私有证书的内容。
-----BEGIN CERTIFICATE----- MIIE……fytY= -----END CERTIFICATE----- "
certificate_chain
String
私有证书的证书链。
证书链由PEM格式的叶子证书、中间根证书和根证书组成。
对于国密证书,该参数表示用于签名的证书链。
-----BEGIN CERTIFICATE----- MIIE……fytY= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIE……tS9Y -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIID……qA== -----END CERTIFICATE-----
private_key
String
证书证书的私钥。
对于国密证书,该参数表示用于签名的证书私钥。
如果您在请求参数中指定了password,那么私钥内容是基于PKCS#8方式进行加密的。
-----BEGIN ENCRYPTED PRIVATE KEY----- MIIF……2Chv -----END ENCRYPTED PRIVATE KEY-----
encrypt_certificate
String
对于国密证书,该参数表示用于加密的证书链。对于非国密证书,该参数值为空。
证书链由PEM格式的叶子证书、中间根证书和根证书组成。
null
encrypt_private_key
String
对于国密证书,该参数表示用于加密的证书私钥。对于非国密证书,该参数值为空。
如果您在请求参数中指定了password,那么私钥内容是基于PKCS#8方式进行加密的。
null
tarball_bytes
String
Base64编码后的压缩包文件流。
null

请求示例

POST https://open.volcengineapi.com/?Action=DownloadLeafInstance&Version=2023-05-01&<其他公共请求参数>

{
    "instance_id": "pca_leaf_3WdHJps3YYB****",
    "download_type": "pem",
    "is_tarball": false,
    "password": "12345"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202308101138486CCC0CCDB4D383FD90C2",
        "Action": "DownloadLeafInstance",
        "Version": "2023-05-01",
        "Service": "pca",
        "Region": "cn-beijing"
    },
    "Result": {
        "certificate": "-----BEGIN CERTIFICATE-----\nMIIEADCCAuigAwIBAgIUbe02xg03ewCWysZ9CwdFB22sakUwDQYJKoZIhvcNAQEL\nBQAwWzEYMBYGA1UEAwwPUlNBIERFRkFVTFQgU1VCMQswCQYDVQQKDAJRQzELMAkG\nA1UECwwCUUMxCzAJBgNVBAYTAkNOMQswCQYDVQQIDAJRQzELMAkGA1UEBwwCUUMw\nHhcNMjMwNTExMDMxMDA0WhcNMjMwODE5MDMxMDA0WjBcMRkwFwYDVQQDDBBSU0Eg\nREVGQVVMVCBMRUFGMQswCQYDVQQKDAJRQzELMAkGA1UECwwCUUMxCzAJBgNVBAYT\nAkNOMQswCQYDVQQIDAJRQzELMAkGA1UEBwwCUUMwggEiMA0GCSqGSIb3DQEBAQUA\nA4IBDwAwggEKAoIBAQCjDwkMbyhK8d4NikIQYa+jAd2FnvVGiX3C7ak7Qugx8zIq\nnVThVpDkmzHOWw2K8qF9iyZq1Dh49nizYFza2fNbl3x8KPSim0QEw70WG+dhNW9Y\nqbwYQDx73yW2W4pvLUbZ89fQl0R44rEVilmcP6xecR+uo5CrFuv64wIhjjcSTxBu\nmkVnU0bM+szWhX4nl0SfNPC2BRcD7VAGJY6Gou7awuzwJDe7H4IGHl0x11qUztgE\ntJGo6F2a9JbZot48gfGD4kXpngSsOHvY52t50AmImh1xay12UVtexj1Q5Xg0xtWZ\nDmY9ddzM92xSxSMJDoyReMZ6wqYviEWAh3DCJRvnAgMBAAGjgbowgbcwDgYDVR0P\nAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBSBgNVHR8E\nSzBJMEegRaBDhkFodHRwOi8vY3JsLndlYnBraS5uZXQ/c249M0VDNzRGNjRCRTRD\nODYzMjc3OTk2NjVBNTY0QjE5RDI3MThCQUU5QTAyBggrBgEFBQcBAQQmMCQwIgYI\nKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLndlYnBraS5uZXQwDQYJKoZIhvcNAQELBQAD\nggEBAJ8Ig80zW7vHpfX2In4vLp1pFgcNs4gyBiGjFOcdN575085scDNUMUXx3yYi\n9z51i1VjESPCarm3D18nxbNS8LqHY734EEaql/u15PUCWq6wQooVxF8EoQWa7Ljs\nYg5/Prn5kUHjLMi39OGiiKbWGeelHYjxDpYNoY2+VtIkcux+Q7dfiTjt5VVO6VA9\nPD0oDN4LM96nEA77VohRjQJMmDm9B0uQhq52skHY4rSy8/rgrgpCyJyf/Pmb1kKy\nuZdoy7HsnzqagZf7OXTaXPTQQNdwQHBKQm5cCEdICswSxUB89uuSY3tJFIsIEw4t\nfMHHwsYOmmjR8X7FGCfxWE3fytY=\n-----END CERTIFICATE-----\n",
        "certificate_chain": "-----BEGIN CERTIFICATE-----\nMIIEADCCAuigAwIBAgIUbe02xg03ewCWysZ9CwdFB22sakUwDQYJ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kyrwvyYe67aTt/bXa\nQyUpqay5iJTXcXgYcGnTB1eyr6k2Qg2aWIMI/laVCFHTv+iWfo6IjbVVI/v/bG8I\nQDG/dDmLdfzjfueXHfIPa+Gxjmgl5VAS276X/HElDY37UjiTyoOehle3WbSSfqNC\nqBNaET6LyyGcJDy0AJpD567HiTeEc5fvytc3js8Mxy9IV/MOa8uKYeJ+WDxob/NW\nD9d9bPD3MVFRzN78YlxMI1uR6JupnQ+kTDZbUaUQLl7+tokUH8lfpX+hZxHFPf+a\nWtEfQqYMYHi2EjQ6g1qc+LjlEocr92mywSjBb7FTjdvXIzgUbhRymlyR1g4Du1Bw\npMNJjyONnB9z6ES1AXWImrfRiANBsYICIjZFje6A1q0j+WI6w87BnpJwRrQsEdJZ\nKStIxi2//3Z9oqXxbQ2GCn8L442zFuvhfoudVUfbON4gC8LOWvrtMAFARvSXrskP\n6LBlJ3TvUaQxeH2cH0Sp7eopDBMYeM1wGFNJ9L1lvWZHikyA/bX5VqWLd+QaKcG+\nfURG1xj2aBzjM8N7KxpJSMld+ONTtbzJX3frMeGHkdJH/OQCLVDQdzCJSYsUSVWl\n9v2ttXcHLbv4AhSaJI6UhL3qUuLorgNzV4WChGewcDIN/aaVKOzMsKYrFLWnFpsu\nYOE4QkfbPOwlUyZUQbiDQFoD+hDqhMQbHC9p2Qu/hgHD2JDM3ClRw1KFBKA0l7QD\nj/urDuILtEUR4ocb5gWnObpZCG9rdAcTV4DnMEEN2Chv\n-----END ENCRYPTED PRIVATE KEY-----\n",
        "encrypt_certificate": "",
        "encrypt_private_key": "",
        "tarball_bytes": ""
    }
}

错误码

如果响应正文的ResponseMetadata字段中包含Error字段,则表示API请求失败。您可访问公共错误码,获取更多错误码信息。