You can call the DescribeServerCertificates API to query the server certificates of a specified region.

Note For security reasons, only the name and the fingerprint are returned instead of the certificate content and the private key.

Debug

Click here to perform a debug operation in OpenAPI Explorer and automatically generate an SDK code example.

Request parameters

Name Type Required? Example value Description
Action String Yes DescribeServerCertificates

The action to perform. Valid value: DescribeServerCertificates

RegionId String Yes cn-hangzhou

The region to which the SLB instance belongs.

You can query the region ID by calling the DescribeRegions API.

ResourceGroupId String No rg-atstuj3rtoptyui

The ID of the enterprise resource group

ServerCertificateId String No 123157908552****_166f8204689_1714763408_709981430

The ID of the server certificate

Response parameters

Name Type Example value Description
ServerCertificates

A list of the server certificates

  └ServerCertificateId String 123157908552****_166f8204689_1714763408_709981430

The ID of the server certificate

  └ServerCertificateName String slb

The name of the server certificate

  └RegionId String cn-hangzhou

The region to which the server certificate belongs

  └Fingerprint String 68:08:1a:f8:2c:97:69:a3:a1:e6:16:41:4b:ca:4f:5d:ee:a5:ef:0d

The fingerprint of the server certificate

  └AliCloudCertificateId String 7309126735407682_15d97e7709a_71445759hr_789289731

The ID of the server certificate from the Alibaba Cloud SSL Certificate Service

  └AliCloudCertificateName String testcertkey

The name of the server certificate from the Alibaba Cloud SSL Certificate Service

  └CommonName String www.example.com

The domain name that corresponds to the CommonName field of the certificate

  └CreateTime String 2017-08-31T02:49:05Z

The time at which the server certificate is uploaded

  └CreateTimeStamp Long 1504147745000

The timestamp that indicates when the server certificate is uploaded.

  └ExpireTime String 017-08-31T02:49:05Z

The expiration time

  └ExpireTimeStamp Long 15041477450

The timestamp that indicates when the server certificate expires

  └IsAliCloudCertificate Integer 0

Whether or not the certificate is from the Alibaba Cloud SSL Certificate Service.

  • 1: Yes
  • 0: No
  └ResourceGroupId String rg-atstuj3rtoptyui

The ID of the enterprise resource group

  └SubjectAlternativeNames 123

A list of alternate domain names for the certificate is returned in array format. It corresponds to the Subject Alternative Name field of the certificate.

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

The ID of the request

Examples

Request example


https://slb.aliyuncs.com/
&Action=DescribeServerCertificate
&RegionId=cn-hangzhou
&<CommonParameters>
? Action=DescribeServerCertificates
&<CommonParameters>

Normal response examples

XML format

<DescribeServerCertificatesResponse>
  <RequestId>9FFF450B-CC09-4FFB-900F-E347EB7AA2CC</RequestId>
  <ServerCertificates>
    <ServerCertificate>
      <CreateTimeStamp>1541761156000</CreateTimeStamp>
      <CommonName>*.example1.com</CommonName>
      <RegionIdAlias>cn-hangzhou</RegionIdAlias>
      <ResourceGroupId>rg-acfmxazb4ph6aiy</ResourceGroupId>
      <Fingerprint>68:08:1a:f8:2c:97:69:a3:a1:e6:16:41:4b:ca:4f:5d:ee:a5:ef:0d</Fingerprint>
      <ServerCertificateId>123157908552****_166f8204689_1714763408_709981430</ServerCertificateId>
      <ExpireTimeStamp>1558161264000</ExpireTimeStamp>
      <AliCloudCertificateId>1501739</AliCloudCertificateId>
      <ExpireTime>2019-05-18T06:34:24Z</ExpireTime>
      <RegionId>cn-hangzhou</RegionId>
      <CreateTime>2018-11-09T10:59:16Z</CreateTime>
      <ServerCertificateName>*.example1.com</ServerCertificateName>
      <IsAliCloudCertificate>1</IsAliCloudCertificate>
      <AliCloudCertificateName>slb</AliCloudCertificateName>
    </ServerCertificate>
    <ServerCertificate>
      <CreateTimeStamp>1481623069000</CreateTimeStamp>
      <RegionIdAlias>cn-hangzhou</RegionIdAlias>
      <ResourceGroupId>rg-acfmxazb4ph6aiy</ResourceGroupId>
      <Fingerprint>cd:90:1b:7b:49:4d:1d:90:f6:01:de:9a:81:7d:31:a7:38:1d:84:8d</Fingerprint>
      <ServerCertificateId>123157908552****_166f8204689_1714763408_709981430</ServerCertificateId>
      <ExpireTimeStamp>1732169065000</ExpireTimeStamp>
      <AliCloudCertificateId>0</AliCloudCertificateId>
      <ExpireTime>2024-11-21T06:04:25Z</ExpireTime>
      <RegionId>cn-hangzhou</RegionId>
      <CreateTime>2016-12-13T09:57:49Z</CreateTime>
      <ServerCertificateName>test_certificate</ServerCertificateName>
      <IsAliCloudCertificate>0</IsAliCloudCertificate>
      <AliCloudCertificateName/>
    </ServerCertificate>
  </ServerCertificates>
</DescribeServerCertificatesResponse>

JSON format

{
	"RequestId":"9FFF450B-CC09-4FFB-900F-E347EB7AA2CC",
	"ServerCertificates":{
		"ServerCertificate":[
			{
				"CreateTimeStamp":1541761156000,
				"CommonName":"*.example1.com",
				"RegionIdAlias":"cn-hangzhou",
				"ResourceGroupId":"rg-acfmxazb4ph6aiy",
				"Fingerprint":"68:08:1a:f8:2c:97:69:a3:a1:e6:16:41:4b:ca:4f:5d:ee:a5:ef:0d",
				"ServerCertificateId":"123157908552****_709981430",
				"ExpireTimeStamp":1558161264000,
				"AliCloudCertificateId":"1501739",
				"ExpireTime":"2019-05-18T06:34:24Z",
				"RegionId":"cn-hangzhou",
				"CreateTime":"2018-11-09T10:59:16Z",
				"ServerCertificateName":"*.example1.com",
				"IsAliCloudCertificate":1,
				"AliCloudCertificateName":"slb"
			},
			{
				"CreateTimeStamp":1481623069000,
				"RegionIdAlias":"cn-hangzhou",
				"ResourceGroupId":"rg-acfmxazb4ph6aiy",
				"Fingerprint":"cd:90:1b:7b:49:4d:1d:90:f6:01:de:9a:81:7d:31:a7:38:1d:84:8d",
				"ServerCertificateId":"12315790855****_158f79de306",
				"ExpireTimeStamp":1732169065000,
				"AliCloudCertificateId":"0",
				"ExpireTime":"2024-11-21T06:04:25Z",
				"RegionId":"cn-hangzhou",
				"CreateTime":"2016-12-13T09:57:49Z",
				"ServerCertificateName":"test_certificate",
				"IsAliCloudCertificate":0,
				"AliCloudCertificateName":""
			}
		]
	}
}

Error response example

JSON format

{
	"Message":"The specified parameter is not valid.",
	"RequestId":"0669D684-69D8-408E-A4FA-B9011E0F4E66",
	"HostId":"slb-pop.aliyuncs.com",
	"Code":"InvalidParameter"
}

Error codes

Click here to view the error codes.