Querying Certificates

Function

This API is used to query all the certificates. Filter query and pagination query are supported. Unless otherwise specified, exact match is applied.

Constraints

Parameters marker, limit, and page_reverse are used for pagination query. Parameters marker and page_reverse take effect only when they are used together with parameter limit.

URI

GET /v2.0/lbaas/certificates

Request

Table 1 Parameter description

Parameter

Mandatory

Type

Description

marker

No

String

Specifies the ID of the certificate from which pagination query starts, that is, the ID of the last certificate on the previous page.

This parameter must be used together with limit.

limit

No

Integer

Specifies the number of certificates on each page. If this parameter is not set, all certificates are queried by default.

page_reverse

No

Boolean

Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link.

This parameter must be used together with limit.

id

No

String

Specifies the certificate ID.

name

No

String

Specifies the certificate name.

The value contains a maximum of 255 characters.

description

No

String

Provides supplementary information about the certificate.

The value contains a maximum of 255 characters.

type

No

String

Specifies the certificate type. The default value is server.

The value can be one of the following:
  • server: indicates the server certificate.
  • client: indicates the CA certificate.

domain

No

String

Specifies the domain name associated with the server certificate.

A domain name can contain up to 10,000 characters. You can specify up to 100 domain names and separate them using commas (,).

The value can be one of the following:

  • A common domain name contains 0 to 100 characters and consists of several labels separated by dots (.). Each label can contain a maximum of 63 characters, including letters, digits, and hyphens (-), and must start and end with a letter or digit. Example: www.test.com
  • In addition to the requirements for common domain names, a wildcard domain name can start with an asterisk (*). Example: *.test.com
NOTE:
  • This parameter is valid only when type is set to server.
  • SNI certificates of a dedicated load balancer's listener can have up to 200 domain names.
  • SNI certificates of a shared load balancer's listener can have up to 30 domain names.

private_key

No

String

Specifies the private key of the server certificate. The value must be PEM encoded.

  • This parameter will be ignored if type is set to client. A CA server can still be created and used normally. This parameter will be left blank even if you enter a private key that is not PEM encoded.
  • This parameter is valid and mandatory only when type is set to server. If you enter an invalid private key, an error is returned.

certificate

No

String

Specifies the public key of the server certificate or CA certificate used to authenticate the client. The value of parameter type determines whether a public key or CA certificate is required. Both types of certificates are in PEM format.

create_time

No

String

Specifies the time when the certificate was created.

The UTC time is in YYYY-MM-DD HH:MM:SS format.

update_time

No

String

Specifies the time when the certificate was updated.

The UTC time is in YYYY-MM-DD HH:MM:SS format.

Response

Table 2 Parameter description

Parameter

Type

Description

certificates

Array

Lists the certificates. For details, see Table 3.

instance_num

Integer

Specifies the number of certificates.

Table 3 certificates parameter description

Parameter

Type

Description

id

String

Specifies the certificate ID.

tenant_id

String

Specifies the ID of the project where the certificate is used.

The value contains a maximum of 255 characters.

admin_state_up

Boolean

Specifies the administrative status of the certificate.

This parameter is reserved. The value can be true or false.

  • true: Enabled
  • false: Disabled

name

String

Specifies the certificate name.

The value contains a maximum of 255 characters.

description

String

Provides supplementary information about the certificate.

The value contains a maximum of 255 characters.

type

String

Specifies the certificate type.

The value can be one of the following:
  • server: indicates the server certificate.
  • client: indicates the CA certificate.

domain

String

Specifies the domain name associated with the server certificate.

A domain name can contain up to 10,000 characters. You can specify up to 100 domain names and separate them using commas (,).

The value can be one of the following:

  • A common domain name contains 0 to 100 characters and consists of several labels separated by dots (.). Each label can contain a maximum of 63 characters, including letters, digits, and hyphens (-), and must start and end with a letter or digit. Example: www.test.com
  • In addition to the requirements for common domain names, a wildcard domain name can start with an asterisk (*). Example: *.test.com
NOTE:
  • This parameter is valid only when type is set to server.
  • SNI certificates of a dedicated load balancer's listener can have up to 200 domain names.
  • SNI certificates of a shared load balancer's listener can have up to 30 domain names.

private_key

String

Specifies the private key of the server certificate in PEM format.

certificate

String

Specifies the public key of the server certificate or CA certificate used to authenticate the client. The value of parameter type determines whether a public key or CA certificate is required. Both types of certificates are in PEM format.

expire_time

String

Specifies the time when the certificate expired.

The UTC time is in YYYY-MM-DD HH:MM:SS format.

create_time

String

Specifies the time when the certificate was created.

The UTC time is in YYYY-MM-DD HH:MM:SS format.

update_time

String

Specifies the time when the certificate was updated.

The UTC time is in YYYY-MM-DD HH:MM:SS format.

Example Request

Example Response

Status Code

For details, see Status Codes.