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년 전250회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠