全部产品
Search
文档中心

Edge Security Acceleration:SetDcdnDomainSSLCertificate

更新时间:Dec 14, 2025

Anda dapat memanggil operasi SetDcdnDomainSSLCertificate untuk mengaktifkan atau menonaktifkan fitur SSL Certificate pada sebuah Domain dan memperbarui informasi sertifikatnya.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dcdn:SetDcdnDomainSSLCertificate

none

*Domain

acs:dcdn:*:{#accountId}:domain/{#domainName}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DomainName

string

Yes

Nama domain tempat sertifikat tersebut berlaku. Nama domain harus merupakan nama domain yang dipercepat HTTPS.

example.com

CertName

string

No

Nama sertifikat. Anda hanya dapat menentukan satu nama. Parameter ini hanya berlaku ketika CertType diatur ke upload. Dalam kasus ini, Anda dapat menentukan nama untuk sertifikat baru.

yourCertName

CertId

integer

No

ID sertifikat. Parameter ini wajib ditentukan hanya ketika CertType diatur ke cas. Dalam kasus ini, tentukan ID sertifikat yang sudah ada.

8089870

CertType

string

No

Tipe sertifikat. Nilai yang valid:

  • upload: Sertifikat kustom yang Anda unggah.

  • cas: Sertifikat yang Anda beli dari Alibaba Cloud SSL Certificates Service.

upload

SSLProtocol

string

Yes

Menentukan apakah akan mengaktifkan sertifikat SSL. Nilai yang valid:

  • on: Aktifkan.

  • off: Nonaktifkan.

off

SSLPub

string

No

Konten sertifikat SSL. Tentukan parameter ini hanya saat Anda mengaktifkan sertifikat.

xxx

SSLPri

string

No

Konten kunci privat. Tentukan parameter ini hanya saat Anda mengaktifkan sertifikat.

y****

CertRegion

string

No

Wilayah tempat sertifikat berada. Parameter ini hanya berlaku ketika Anda mengatur CertType ke cas. Nilai yang valid adalah cn-hangzhou dan ap-southeast-1. Nilai default-nya adalah cn-hangzhou. Jika Anda pengguna akun internasional Alibaba Cloud, atur parameter ini ke ap-southeast-1.

Valid values:

  • ap-southeast-1 :

    ap-southeast-1

  • cn-hangzhou :

    cn-hangzhou

cn-hangzhou

Elemen respons

Element

Type

Description

Example

object

RequestId

string

ID permintaan.

A7C69682-7F88-40DD-A198-10D0309E439D

Contoh

Respons sukses

JSONformat

{
  "RequestId": "A7C69682-7F88-40DD-A198-10D0309E439D"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidSSLProtocol.ValueNotSupported The specified SSLProtocol is invalid. The specified SSL certificate parameter is invalid. Set the value to on or off.
400 SSLPub.MissingParameter The SSLPub parameter is required. The SSLPub parameter is not specified.
400 SSLPri.MissingParameter The SSLPri parameter is required. The SSLPri parameter is not specified.
400 InvalidSSLPub The specified SSLPub is invalid. The value specified for the SSLPub parameter is invalid.
400 InvalidSSLPri The specified SSLPri is invalid. The value specified for the SSLPri parameter is invalid.
400 Certificate.MissMatch The SSLPri does not match the certificate. The certificate and private key do not match.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The maximum length of the specified certificate content has been reached.
400 InvalidCertName.TooLong The length of the certificate name cannot exceed 128 characters. The certificate name cannot contain more than 128 characters.
400 AuthenticationFailed Error performing verification. Identity authentication failed.
400 SetDomainCertificate.ParameterError The specified parameters are invalid. The specified parameter values are invalid.
400 Certificate.StatusError The status of the certificate is invalid. The specified certificate status is invalid.
400 DeleteFailed Error deleting the certificate. Failed to delete the certificate.
400 Certificate.NotFind The certificate does not exist. The specified certificate does not exist.
400 Certificate.Duplicated The certificate name already exists. The certificate is duplicated.
400 Certificate.FormatError The format of the certificate is invalid. The specified certificate format is invalid.
400 Certificate.KeyNull The private key is required. The private key is not specified.
400 Key.Malformed The specified Key format is invalid. The Key parameter is set in an invalid format.
400 CertStorage.failed Error saving the certificate. Failed to store the certificate.
400 CertificateContent.Duplicated The certificate has been uploaded; do not upload again. The specified certificate has been uploaded. Do not upload the certificate again.
400 Certificate.Expired The certificate has expired. The certificate has expired.
400 InvalidDomain.notOnline The domain is offline. Check the status of the domain and try again later. The specified domain name status is invalid. Check whether the domain name is online and try again later.
400 Decode.Error Error decoding the SSLPub or SSLPri certificate. The system has failed to decode the public key or the private key of the SSL certificate.
400 sslPub.Error Error encoding SSLPub. Failed to encode sslPub.
400 sslPri.Error Error encoding SSLPri. Failed to encode SSLPri.
400 DomainInSafeMode The domain is in safe mode. To request permission, contact Customer Service. The specified domain name is in the protected mode. If you must perform this operation, submit a ticket.
400 CreateCertificateFailed Create certificate failed,please try again. The certificate failed to be created. Create the certificate again.
400 Abs.CertRegion.ValueNotSupported CertRegion is not supported. The certificate region is not supported.
400 CertNameAlreadyExists The CertName already exists. The certificate name already exists.
403 DomainInProtectedMode The domain is in protection mode. To request permission, contact Customer Service. The specified domain name is in the protected mode. If you must perform this operation, contact customer service.
404 CertName.MissingParameter You must specify CertName.
404 InvalidDomain.Offline The domain is offline. The domain name is disabled.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.