All Products
Search
Document Center

Server Load Balancer:UploadServerCertificate

Last Updated:Jun 10, 2026

Mengunggah sertifikat server.

Deskripsi operasi

  • You can upload only one server certificate and its private key in each call.

  • After a server certificate and its private key are uploaded, the fingerprints of all server certificates that belong to your Alibaba Cloud account are returned.

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

slb:UploadServerCertificate

create

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Tag

array<object>

No

Tag.

object

No

The tags.

Key

string

No

The key of tag N. Valid values of N: 1 to 20. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

TestKey

Value

string

No

The value of tag N. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun and acs:.

TestValue

RegionId

string

Yes

ID wilayah instans CLB.

Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru.

cn-hangzhou

AliCloudCertificateId

string

No

ID sertifikat AliCloud.

775****

AliCloudCertificateName

string

No

Nama sertifikat AliCloud.

cloudcertificate

AliCloudCertificateRegionId

string

No

ID wilayah sertifikat AliCloud.

cn-hangzhou

ServerCertificate

string

No

Sertifikat server yang akan diunggah.

-----BEGIN CERTIFICATE----- MIIGDTCC****** -----END CERTIFICATE-----

PrivateKey

string

No

Kunci privat sertifikat.

-----BEGIN RSA PRIVATE KEY----- MIIEogIB****** -----END RSA PRIVATE KEY-----

ServerCertificateName

string

No

Nama sertifikat server.

Nama harus sepanjang 1 hingga 80 karakter. Harus diawali dengan huruf. Dapat berisi huruf, angka, titik (.), garis bawah (_), dan tanda hubung (-).

mycert01

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-atstuj3rto****

Elemen respons

Element

Type

Description

Example

object

AliCloudCertificateName

string

The AliCloud certificate name.

cloudcertificate****

CreateTimeStamp

integer

The timestamp generated when the CA certificate is uploaded.

1504147745000

ExpireTime

string

The time when the CA certificate expires.

2022-10-18T23:59:59Z

CreateTime

string

The time when the CA certificate is uploaded.

2022-02-21T02:49:05Z

ServerCertificateId

string

The ID of the server certificate.

1321932713******_17f1b4b696b_1114720822_-1671******

ExpireTimeStamp

integer

The timestamp generated when the CA certificate expires.

1504147745000

RegionId

string

The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

RequestId

string

The ID of the request.

365F4154-92F6-4AE4-92F8-7FF34B540710

Fingerprint

string

The fingerprint of the CA certificate.

8f:7d:cb:e5:f8:c8:33:9c:17:65:c1:92:30:9e:45:55:9c:3a:85:60

ServerCertificateName

string

The name of the server certificate.

The name must be 1 to 80 characters in length. It must start with an English letter. It can contain letters, numbers, periods (.), underscores (_), and hyphens (-).

mycert01

CommonName

string

The domain name of the CA certificate.

example.com

ResourceGroupId

string

The resource group ID.

rg-atstuj3rt****

AliCloudCertificateId

string

The AliCloud certificate ID.

775****

IsAliCloudCertificate

integer

Indicates whether the certificate is provided by Alibaba Cloud Certificate Management Service. Valid values:

  • 0: The certificate is not provided by Alibaba Cloud Certificate Management Service.

  • 1: The certificate is provided by Alibaba Cloud Certificate Management Service.

0

SubjectAlternativeNames

object

SubjectAlternativeName

array

The subject alternative names.

A domain name list is supported. A maximum of 10 domain names are supported.

string

The subject alternative names.

A domain name list is supported. A maximum of 10 domain names are supported.

["example.com","www.example.com"]

Contoh

Respons sukses

JSONformat

{
  "AliCloudCertificateName": "cloudcertificate****",
  "CreateTimeStamp": 1504147745000,
  "ExpireTime": "2022-10-18T23:59:59Z",
  "CreateTime": "2022-02-21T02:49:05Z",
  "ServerCertificateId": "1321932713******_17f1b4b696b_1114720822_-1671******",
  "ExpireTimeStamp": 1504147745000,
  "RegionId": "cn-hangzhou",
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "Fingerprint": "8f:7d:cb:e5:f8:c8:33:9c:17:65:c1:92:30:9e:45:55:9c:3a:85:60",
  "ServerCertificateName": "mycert01",
  "CommonName": "example.com",
  "ResourceGroupId": "rg-atstuj3rt****",
  "AliCloudCertificateId": "775****",
  "IsAliCloudCertificate": 0,
  "SubjectAlternativeNames": {
    "SubjectAlternativeName": [
      "[\"example.com\",\"www.example.com\"]"
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalParam.ServerCertificate The specified server certificate is illegal.
400 InvalidParameter The specified ServerCertificate and PrivateKey fail to validate.
400 ServerCertificate.NotSupport The specified Region Not support ServerCertificate.
400 InvalidParameter.AliCloudCertificateId The specified AliCloudCertificateId is invalid.
400 OperationDenied.IllegalKeyLength The operation is not allowed because the key length of certificate is illegal.
400 InvalidParam.TagValue %s.
400 InvalidParam.TagKey %s.
400 SizeLimitExceeded.Tag %s.
400 MissingParam.TagKey The param MissingParam.TagKey is missing.
400 EccCertificateNotSupport The ECC certificate is not support.
400 CertificateFormatInvalid The certificate format is invalid.
403 UnauthorizedRegion The specified region of is not authorized.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.