跳到主要内容

创建证书

创建负载均衡器证书,证书可单独创建,创建监听器时可使用证书。

该请求可以是POST请求,如果秘钥内容和证书内容太长,必须要用POST请求。

请求参数

参数名参数类型是否必填参数说明
ActionString操作方法:CreateLBPem
RegionString机房标识,取值参见地域列表
PrivateKeyString私钥内容
CertificateString证书内容
NameString名称
DescriptionString描述
RelatedIdString相关的SSL证书ID

返回参数

名称类型说明
ActionString执行的操作
TaskIdString请求标识
PemIdStringPEM ID
RelatedIdString相关的SSL证书ID

请求示例

http://api.chinac.com/v2/?Action=CreateLBPem
&Region=cn-wuxi
&<公共请求参数>
{
"PrivateKey":
"-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA4SDxevI9hl+Vhb5r/rlL7qOOGpet3GOIwnm/ziotaAf2oAO0
UEHIqVx4T8TJ4SCOq9rMmQZV4uJCNEwnAKcyqlw+j1NHRrwk3n1MowRYhISvLlUK
7Pnk1QYQILgZHaf2vdXp9+JDMA8BgVBefReb1Ra8VnJMCT24hpxHyZNg2dlbtf6m
fm0e2uPt/WWbKHdyfB7MNCjrg+3Ob2WjOj5LfRjn6s3H9Auzge9ar22hzUwtycfG
fSE9e8JYv2zmrIsQHEG1h7e86UuZG/j30MSQJSukJk5yxqJor0fQjXRvGKdGqVML
G29RIRLYt4mZqzNXfTRwX4sxQQhYnCPo85hgjQIDAQABAoIBAQCJ86TloNDgqWu3
U9NbeHI2HlTyqKVqGjfwa6iEDcZbLB4NOZfhYh4y4a37u2u1nzytxFqBHqe8ascE
DF+D+5owjCVRymDjsOXUMCpkXQA+z0AfY7ep9DFEfdTEOLCiWCMvtXTTAoGBAOwO
vSzL1puShf6wC+9tONC6DDHRgW4rreqMZECChbP63t9rimFEYOeko11VplE0zIml
Hk1JCG/jnh3kXtA6ubKhLB1h/MUabF4tAKKIkmqJymkayJ4grTrtFNlTnu86aMIf
AjwgnfHvmQQcHGbd3TdYiiJa03E6seJKD1LnfgzQUYRoYX6eSBF9p75dFJ2GSTfI
jbe67Cxo5912YjzNJNtdHUM0wZkKdsfHVpaXrUYDKwMQZpP96zLx
-----END RSA PRIVATE KEY-----
",
"Certificate":
"-----BEGIN CERTIFICATE-----
adfadfvafdva
-----END CERTIFICATE-----",
"Name":"adads"
}

返回示例

{
"code": 10000,
"message": "",
"data": {
"TaskId": "bb112c20170506133720502",
"Action": "CreateLBPem",
"PemId":"lbp-sdsd",
"RelatedId":"ssl-sss"
}
}