When I try to update doc ver I get a code 404

0

I am trying to upload a document via the Java SDK v1 using the code from this example:
https://docs.aws.amazon.com/code-samples/latest/catalog/java-workdocs-upload_user_doc.java.html

Everything goes well until I call the complete_upload() method, which in turn tries to invoke an updateDocumentVersion() method - which fails with an UnauthorizedResourceAccessException.

So:

  • uploading works (or seems to)
  • downloading works
  • other operation wich as getting subfolders and getting documents in folders etc work
  • updateDocumentVersion() does not work

I have initialized the client with the access key and secret key of a IAM user to which I have given permission of type "WorkDocs: FullAccess".

Any idea about why the updateDocumentVersion() returns an UnauthorizedResourceAccessException?

Piercarlo

已提問 4 年前檢視次數 251 次
1 個回答
0

Issue found: it was a bug in my code, I was not properly setting the versionId. It is worth noticing that the error was way misleading...

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南