Help Center/ Data Encryption Workshop/ FAQs/ CSMS Related/ 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?
Updated on 2025-07-22 GMT+08:00

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

  1. Log in to the DEW console.
  2. Click in the upper left corner and select a region or project.
  3. In the navigation pane on the left, choose Cloud Secret Management Service > Secrets.
  4. In the Secrets, locate the target secret and click the secret name to go to the secret details page.
  5. 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

  6. Return to the secret details page. In the secret information area, click the FunctionGraph rotate function to go to the FunctionGraph console.
  7. Locate the index.py file and search for https://gaussdb.%s.myhuaweicloud.com in the code source.

    Figure 2 Editing the index.py file

  8. Call the TaurusDB API to obtain the database engine version and copy the TaurusDB database domain name in the current region.
  9. 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 Cloud Secret Management Service > Secrets, locate the target TaurusDB secret, and enable rotation again.