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

posta 4 anni fa251 visualizzazioni
1 Risposta
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...

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande