跳到主要内容

建立證書

建立負載均衡器證書,證書可單獨建立,建立監聽器時可使用證書。

該請求可以是POST請求,如果秘鑰內容和證書內容太長,必須要用POST請求。

請求引數

引數名引數型別是否必填引數說明
ActionString操作方法:CreateLBPem
RegionString機房標識,取值參見地域列表
PrivateKeyString私鑰內容
CertificateString證書內容
NameString名稱
DescriptionString描述
RelatedIdString相關的SSL證書ID

返回引數

名稱型別說明
ActionString執行的操作
TaskIdString請求標識
PemIdStringPEM ID
RelatedIdString相關的SSL證書ID

請求示例

http://api.yunpanel.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"
}
}