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

gefragt vor 4 Jahren251 Aufrufe
1 Antwort
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...

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen