我正在尝试使用 oci java sdk 创建秘密:https ://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/2.8.0/vault/CreateSecretExample.java.html
但收到此错误:
Exception in thread "main" com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) stage must be one of CURRENT. (opc-request-id: C4EB9DB09DDA436C8726E9B94C07B503/C6F1D676C4B532C7A5F1CDB1B8FEC023/7AA6550199EE36E59BA85377FF136466)
at com.oracle.bmc.http.internal.ResponseHelper.throwIfNotSuccessful(ResponseHelper.java:140)
at com.oracle.bmc.http.internal.ResponseConversionFunctionFactory$ValidatingParseResponseFunction.apply(ResponseConversionFunctionFactory.java:88)
at com.oracle.bmc.http.internal.ResponseConversionFunctionFactory$ValidatingParseResponseFunction.apply(ResponseConversionFunctionFactory.java:84)
at com.oracle.bmc.vault.internal.http.CreateSecretConverter$1.apply(CreateSecretConverter.java:78)
at com.oracle.bmc.vault.internal.http.CreateSecretConverter$1.apply(CreateSecretConverter.java:62)
at com.oracle.bmc.vault.VaultsClient.lambda$null$6(VaultsClient.java:576)
at com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89)
at com.oracle.bmc.retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60)
at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55)
at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier.java:51)
at com.oracle.bmc.vault.VaultsClient.lambda$createSecret$7(VaultsClient.java:568)
at com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89)
at com.oracle.bmc.retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60)
at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55)
at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier.java:51)
at com.oracle.bmc.vault.VaultsClient.createSecret(VaultsClient.java:562)
我尝试了两个阶段:SecretContentDetails.Stage.Pending、SecretContentDetails.Stage.Current
但得到与上述相同的错误?知道如何解决吗?