添加阿里云DCDN 废弃SetDomainServerCertificate接口 改为SetCdnDomainSSLCertificate

This commit is contained in:
w
2024-09-02 19:33:17 +08:00
parent ea775adae1
commit 35a3603c41
3 changed files with 106 additions and 4 deletions
@@ -75,11 +75,11 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
return {
RegionId: 'cn-hangzhou',
DomainName: this.domainName,
ServerCertificateStatus: 'on',
SSLProtocol: 'on',
CertName: CertName,
CertType: 'upload',
ServerCertificate: cert.crt,
PrivateKey: cert.key,
SSLPub: cert.crt,
SSLPri: cert.key,
};
}
@@ -87,7 +87,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
const requestOption = {
method: 'POST',
};
const ret: any = await client.request('SetDomainServerCertificate', params, requestOption);
const ret: any = await client.request('SetCdnDomainSSLCertificate', params, requestOption);
this.checkRet(ret);
this.logger.info('设置cdn证书成功:', ret.RequestId);
}