0

try to terminate a running ATP instance using the following API from oci java sdk. TerminateDbSystemRequest terminateDbSystemRequest = TerminateDbSystemRequest.builder().dbSystemId(dbSystemId).build(); databaseClient.terminateDbSystem(terminateDbSystemRequest);

an exception caught Exception in thread "main" com.oracle.bmc.model.BmcException: (404, NotAuthorizedOrNotFound, false) Authorization failed or requested resource not found.

I can stop and start the atp instance successfully, just wondering which class should be used to terminate the atp instance.

Jian
  • 21
  • 3

1 Answers1

0

That is the right code to perform the action you are trying to perform using the OCI Java SDK, but it looks like you are hitting one of the two below issues:

  1. dbSystemId is not a valid DB System identifier. One way to confirm if you have the correct dbSystemId value is to confirm if you are able to stop and start the DB System using the same value.

  2. dbSystemId is a valid DB System identifier, but the credentials you are using to terminate the DB System do not have the proper permissions to do so. One way to confirm if this is a permissions issue is to see if, using the same account whose credentials you are using from the Java SDK, you are able to terminate the DB System from the OCI web portal

Joe
  • 2,500
  • 1
  • 14
  • 12
  • For your suggestion , I checked the code again. 1. i use the same DatabaseClient object to start, stop and terminate the Autonomous instanceId which i print out to the console to verify. start and stop operation succeed and terminate faile. – Jian Jul 09 '20 at 11:11
  • 2. When I login into Web console of my tenancy using the same credential, i can terminate the ATP instance. – Jian Jul 09 '20 at 11:12
  • some special option need to provide for the termination of the Autonomous database instance? – Jian Jul 09 '20 at 11:50