I've created this issue https://github.com/mcohen01/amazonica/issues/230 
for the set-bucket-notification-configuration as I believe there is a 
problem with the use of that function.

Having looked at the trace out from set-bucket-notification-configuration I'm 
convinced I can get set-bucket-tagging-configuration to work with the right 
structure as it looks like it's doing the right thing when it needs to pass 
multiple args to a function. Can't get the data structures correct though.

On Thursday, 21 July 2016 10:30:50 UTC+1, Gareth Rogers wrote:
>
> Thanks that's helpful. I must have been too frustrated by the end of the 
> day and didn't Google that one!
>
> Reading the trace output for the tag setting I believe the original code I 
> wrote is producing an empty TagSet which is what the API considers 
> malformed. Looks like a <tag> element is required: 
> http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTtagging.html.
>
> That makes me feel that the my problem is that I can't create a tag set 
> correctly through Amazonica. For now I need this to work so I'll switch to 
> doing the Java interop which the SO article is very helpful, thanks :)
>
> set-bucket-notification-configuration is still a mystery but I haven't 
> tried trace with that yet.
>
> I'm going to try set-bucket-lifecycle-configuration which has an example 
> in tests and I'd like to set a policy to delete failed part file uploads. 
> It's use is similar to the notification configuration.
>
> On Thursday, 21 July 2016 00:44:11 UTC+1, Andrea Richiardi wrote:
>>
>> Maybe not related, but I was checking that api and this showed up, maybe 
>> it can be helpful?
>>
>>
>> https://stackoverflow.com/questions/30521046/malformedxml-when-tagging-an-s3-bucket
>>
>> On Wednesday, July 20, 2016 at 7:56:10 AM UTC-7, Gareth Rogers wrote:
>>>
>>> After chatting with a colleague who read this and showed me the magic of 
>>> trace I think the problem with amazonica.aws.
>>> s3/set-bucket-tagging-configuration is that I need
>>>
>>> {:tag-sets [{:tag {"Formation" "notlive"}}]}
>>>
>>> i.e. I need to know how to call setTag(string key, string value) which 
>>> takes two args through the Amazonica. I've only dealt with single args 
>>> before.
>>>
>>> On Wednesday, 20 July 2016 14:53:11 UTC+1, Gareth Rogers wrote:
>>>>
>>>> Hi
>>>>
>>>> Has any one had any success using either 
>>>> amazonica.aws.s3/set-bucket-notification-configuration or 
>>>> amazonica.aws.s3/set-bucket-tagging-configuration?
>>>>
>>>> I've got
>>>>
>>>> (amazonica.aws.s3/set-bucket-notification-configuration
>>>>     "my.bucket.name"
>>>>     {"my-custom-event-name"
>>>>     {"<sqs-arn>" ;; This replaced with the ARN of an SQS queue I've 
>>>> created
>>>>      "ObjectCreatedByPut" ;; [S3Event/ObjectCreatedByPut] ;; 
>>>> "s3:ObjectCreated:Put" <-- tried all three
>>>>      ;; :filter    "/_SUCCESS"
>>>>          }})
>>>>
>>>> and
>>>>
>>>> (amazonica.aws.s3/set-bucket-tagging-configuration
>>>>      "my.bucket.name"
>>>>      {:tag-sets [{"Formation" "notlive"}]})
>>>>
>>>> Both of those are wrapped with amazonica.core/with-credential which 
>>>> I've omitted.
>>>>
>>>> The call to amazonica.aws.s3/set-bucket-notification-configuration returns 
>>>> nil. I guess this means it's getting converted to a valid call but the S3 
>>>> API is rejecting it silently? Anyone know what it should look like?
>>>>
>>>> The call to amazonica.aws.s3/set-bucket-tagging-configuration is 
>>>> throwing:
>>>>
>>>> Unhandled com.amazonaws.services.s3.model.AmazonS3Exception
>>>>    The XML you provided was not well-formed or did not validate
>>>>    against our published schema (Service: Amazon S3; Status Code: 400;
>>>>    Error Code: MalformedXML; Request ID: )
>>>>
>>>> I can't figure out what might be wrong there either. I've tried a few 
>>>> variations on the tag sets but it either doesn't run because it can't find 
>>>> an appropriate function or gives the XML error.
>>>>
>>>> Any pointers would be appreciated.
>>>>
>>>> Thanks
>>>> Gareth
>>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to