You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Nishant Chandra <ni...@gmail.com> on 2013/11/07 16:36:16 UTC

S3 blob permission

Hi,

I am working with Amazon S3. I want to control the blob permission.

The examples listed in the following link does not work:
http://jclouds.incubator.apache.org/documentation/quickstart/aws/

BlobStore blobStore = context.getBlobStore();
Blob blob = blobStore.blobBuilder(key).payload(payload)
.contentType("text/html").build();
blobStore.putBlob(container, blob, PutOptions.Builder.multipart());//
Defaults permission is private

I want to change the permission to public. How can this be achieved?

Thanks,
Nishant

Re: S3 blob permission

Posted by Andrew Phillips <an...@apache.org>.
> How do I get the underlying S3client? Any samples?

See the blobstore-basics example:

https://github.com/jclouds/jclouds-examples/blob/master/blobstore-basics/src/main/java/org/jclouds/examples/blobstore/basics/MainApp.java#L117

ap

Re: S3 blob permission

Posted by Nishant Chandra <ni...@gmail.com>.
Thanks.

How do I get the underlying S3client? Any samples?


On Thu, Nov 7, 2013 at 10:44 PM, Andrew Phillips <an...@apache.org> wrote:

> So is blob/object level permission not available via JClouds? S3 does
>> provide object level permissions.
>>
>
> Not via the portable BlobStore interface, as far as I am aware. From the
> underlying S3Client, you should be able to call putObject [1] with the
> appropriate ACL [2]
>
> ap
>
> [1] http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/S3Client.html
> [2] http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/
> options/PutBucketOptions.html
>



-- 
Nishant Chandra
Bangalore, India
Cell : +91 9739131616

Re: S3 blob permission

Posted by Andrew Phillips <an...@apache.org>.
> So is blob/object level permission not available via JClouds? S3 does
> provide object level permissions.

Not via the portable BlobStore interface, as far as I am aware. From  
the underlying S3Client, you should be able to call putObject [1] with  
the appropriate ACL [2]

ap

[1] http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/S3Client.html
[2]  
http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/options/PutBucketOptions.html

Re: S3 blob permission

Posted by Nishant Chandra <ni...@gmail.com>.
So is blob/object level permission not available via JClouds? S3 does
provide object level permissions.


On Thu, Nov 7, 2013 at 9:59 PM, Andrew Phillips <an...@apache.org> wrote:

> I want to change the permission to public. How can this be achieved?
>>
>
> See the following example [1] from the cloud storage workshop. Note that
> the permission is at the *container* level, not at the blob level...
>
> ap
>
> [1] https://github.com/jclouds/jclouds-cloud-storage-workshop/blob/master/
> exercise1/src/main/java/org/jclouds/labs/blobstore/
> exercise1/ImageUploader.java#L61
>



-- 
Nishant Chandra
Bangalore, India
Cell : +91 9739131616

Re: S3 blob permission

Posted by Andrew Phillips <an...@apache.org>.
> I want to change the permission to public. How can this be achieved?

See the following example [1] from the cloud storage workshop. Note  
that the permission is at the *container* level, not at the blob  
level...

ap

[1]  
https://github.com/jclouds/jclouds-cloud-storage-workshop/blob/master/exercise1/src/main/java/org/jclouds/labs/blobstore/exercise1/ImageUploader.java#L61