1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-14 00:42:44 +00:00
cloudkeys-go/vendor/github.com/aws/aws-sdk-go/example/service/s3/putObjectAcl
Knut Ahlers 7581358922
Switch to dep for vendoring, update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-12-08 13:03:10 +01:00
..
putObjectAcl.go Switch to dep for vendoring, update dependencies 2017-12-08 13:03:10 +01:00
README.md Switch to dep for vendoring, update dependencies 2017-12-08 13:03:10 +01:00

Example

putObjectAcl is an example using the AWS SDK for Go to put an ACL on an S3 object.

Usage

putBucketAcl <params>
	-region <region> // required
	-bucket <bucket> // required
	-key <key> // required
	-owner-name <owner-name>
	-owner-id <owner-id>
	-grantee-type <some type> // required
	-uri <uri to group>
	-email <email address>
	-user-id <user-id>
	-display-name <display name>
go run -tags example putObjectAcl.go 
	-bucket <bucket> 
	-key <key> 
	-owner-name <name> 
	-owner-id <id>
	-grantee-type <some type>
	-user-id <user-id>

Depending on the type is used depends on which of the three, uri, email, or user-id, needs to be used.

  • s3.TypeCanonicalUser: user-id or display-name must be used
  • s3.TypeAmazonCustomerByEmail: email must be used
  • s3.TypeGroup: uri must be used

Output:

success {
} nil