Feature: Add new version API dns (actual) #5127
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This set of changes expands the existing Selectel DNS API script dns_selectel.sh to support the Selectel API version v2 (actual).
Now SELECTEL simultaneously works with two versions of the API: legacy DNS API and actual DNS API (new). The goal is to allow SELECTEL users to use the script for two versions.
https://developers.selectel.ru/docs/cloud-services/dns_api/dns_api_actual/
Issue: #5126
For existing installations where only the old version of the API (legacy) is used, nothing will have to be reconfigured and nothing needs to be done for older versions.
Variables that need to be controlled before starting:
export SL_Ver="v1" -- version API: 'v2' (actual) or 'v1' (legacy).
default: v1
If SL_Ver is equal "v1", then you need to define the variable
export SL_Key="API_KEY" -- token Selectel (API key)
You can view or create it in the control panel in the upper right corner, open the Profile and Settings menu -> API Keys.
https://my.selectel.ru/profile/apikeys
If SL_Ver is equal "v2", then you need to define the following variables
export SL_Expire=60 -- token lifetime in minutes (0-1440).
default: 1400 minutes
export SL_Login_ID=<account_id> -- account number in the control panel;
export SL_Project_Name=<project_name> -- name project.
export SL_Login_name=<login_name> - service user name.
You can view the name in the control panel:
in the upper right corner, open the menu ? Profile and settings ? User management section ? Service users tab
export SL_Pswd= - The service user password can be viewed when creating a user or changed to a new one.
All these variables will be saved in ~/.acme.sh/account.conf and will be reused as needed.
Tests: https://github.com/vlad-kms/acme.sh/actions
For two versions:
test DNS for v1 (legacy) - for version API DNS legacy
test DNS for v2 (actual) - for version API DNS actual (new)