What Can I Do If "The API does not exist or has not been published in the environment" Is Displayed When I Rotate TaurusDB Secrets?
Symptom
When the TaurusDB secret rotation is enabled, the error message "The API does not exist or has not been published in the environment" is displayed.
Possible Causes
The domain name address in the FunctionGraph rotation function is incorrect.
Solution
- Log in to the DEW console.
- Click
in the upper left corner and select a region or project.
- In the navigation pane on the left, choose Cloud Secret Management Service > Secrets.
- In the Secrets, locate the target secret and click the secret name to go to the secret details page.
- In the Version area, click the number next to Failed rotations and check whether the secret rotation failure record contains The API does not exist or has not been published in the environment. If yes, go to the next step.
Figure 1 Viewing the cause of the secret rotation failure
- Return to the secret details page. In the secret information area, click the FunctionGraph rotate function to go to the FunctionGraph console.
- Locate the index.py file and search for https://gaussdb.%s.myhuaweicloud.com in the code source.
Figure 2 Editing the index.py file
- Call the TaurusDB API to obtain the database engine version and copy the TaurusDB database domain name in the current region.
- Replace https://gaussdb.%s.myhuaweicloud.com in the Step 7index.py file with the copied domain name and click Deploy.
Figure 3 Changing the domain name
When the message Code updated is displayed on the FunctionGraph console, the modification is successful.
Figure 4 Code updated
Follow-up Operations
To verify the rotation function, log in to the DEW console. In the navigation pane on the left, choose
, locate the target TaurusDB secret, and enable rotation again.Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot