Renew a certificate
Certificate Manager doesn't manage user certificates. To make your certificate continuously available to your resources, be sure to renew it on time.
To get a new version of a user certificate:
Management console
CLI
API
- In the management console, select the folder where the certificate was created.
- In the list of services, select Certificate Manager.
- Select the certificate you want to renew in the list.
- In the window that opens, click Renew certificate.
- In the window that opens, click Add certificate in the Certificate field.
- Select how to add your certificate: File or Text.
- Click Add.
- In the Intermediate certificate chain field, click Add chain.
- Select how to add your certificate: File or Text.
- Click Add.
- In the Private key field, click Add private key.
- Select how to add your certificate: File or Text.
- Click Add.
- Click Create.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the command:
yc certificate-manager certificate update --help
-
View the list of certificates:
yc certificate-manager certificate list +----------------------+--------+-------------+---------------------+----------+--------+ | ID | NAME | DOMAINS | NOT AFTER | TYPE | STATUS | +----------------------+--------+-------------+---------------------+----------+--------+ | fpqmg47avvimp7rvmp30 | mycert | example.com | 2021-09-15 06:48:26 | IMPORTED | ISSUED | +----------------------+--------+-------------+---------------------+----------+--------+
-
Run the command:
yc certificate-manager certificate update \ --id fpqmg47avvimp7rvmp30 \ --chain myupdatedcert.pem \ --key myupdatedkey.pem
Command parameters:
--id
: ID of the certificate to renew.--chain
: Path to the new certificate chain file.--key
: Path to the file of the new certificate private key.
Command results:
id: fpqmg47avvimp7rvmp30 folder_id: b1g7gvsi89m34qmcm3ke created_at: "2020-09-15T06:54:44.916Z" name: mycert type: IMPORTED domains: - example.com status: ISSUED issuer: CN=example.com subject: CN=example.com serial: 3df79e43df7c3868397b78bfc15a431fa942a135 updated_at: "2020-09-15T08:23:50.147668Z" issued_at: "2020-09-15T08:23:50.147668Z" not_after: "2021-09-15T08:12:57Z" not_before: "2020-09-15T08:12:57Z"
To update the certificate, use the update method for the Certificate resource.