java - Google Cloud Storage : create bucket with ACL -


i can create bucket not find how change bucket's acl when create it.
want can read objects not write.

to create bucket :

storage storage = new storage(......); storage.buckets().insert(projectname, new bucket().setname(bucketname)).execute(); 

i saw can use :

new bucket().setacl(list<bucketaccesscontrol>) 

how use .setacl methode ?

thx.

i think want set default object acl bucket. apply acl new objects uploaded bucket.

to that, can use setpredefineddefaultobjectacl method of storage.buckets.insert operation returned storage.buckets().insert call.

take @ applying predefined acl section of documentation list of predefined acls. in case, want use publicread.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -