Lists certificates that match specified records for a website. You can specify multiple records at a time.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| esa:ListCertificatesByRecord | list | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SiteId | long | Yes | The website ID, which can be obtained by calling the ListSites operation. | 1234567890123 |
| RecordName | string | Yes | The record name. | www.example.com |
| ValidOnly | boolean | No | Specifies whether to return only valid certificates. 0 indicates that all matched certificates are returned. 1 indicates that only valid certificates are returned. | 1 |
| Detail | boolean | No | Specifies whether to return the certificate details. 0 indicates that the certificate details are not returned. 1 indicates that the certificate details are returned. | 1 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "65C66B7B-671A-8297-9187-2R5477247B76",
"TotalCount": 12,
"SiteId": 1234567890123,
"SiteName": "example.com ",
"Result": [
{
"RecordName": "www.example.com ",
"Count": 3,
"Certificates": [
{
"CasId": 30000137,
"Id": "babab022c5e9b27bf9c64d7f4b1667f4",
"Name": "yourCertName",
"Region": "cn-hangzhou",
"Status": "OK",
"Type": "free",
"CommonName": "www.example.com ",
"NotBefore": "2023-02-28 06:17:11",
"NotAfter": "2024-02-28 06:17:11",
"Issuer": "GlobalSign nv-sa",
"IssuerCN": "GlobalSign Organization Validation CA - SHA256 - G3",
"SAN": "www.example.com,*.example.com",
"SigAlg": "SHA256-RSA",
"PubAlg": "RSA",
"CreateTime": "2023-02-28 06:17:11",
"UpdateTime": "2023-02-28 06:17:11",
"SerialNumber": "baba39055622c008b90285a8838ed09a",
"FingerprintSha256": "1dc5fc9af4eead2570c70d94b416130baeb6d4429b51fd3557379588456aca66"
}
],
"ApplylingCount": 1,
"Status": "none"
}
]
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter.SiteId | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. |
| 400 | MissingSiteId | Required parameter SiteId missing. Specify SiteId and try again. | Required parameter SiteId missing. Specify SiteId and try again. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | MissingParameter | Required parameter RecordName missing. Specify RecordName and try again. | Required parameter RecordName missing. Specify RecordName and try again. |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | The authentication time parameter you entered is invalid. Check the parameter value and try again. |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | The token you entered is invalid. Please check and enter the correct token and try again. |
For a list of error codes, visit the Service error codes.
