Slide 16
Slide 16 text
aws-sdk-go
input := &s3.PutObjectInput{
Bucket: aws.String("myBucket"),
Key: aws.String("myKey"),
ACL: aws.String(
s3.ObjectCannedACLPrivate
),
Body: file,
}
aws-sdk-go-v2
aws-sdk-goとの違い
・APIインプット構造体に型指定された列挙値を提供
input := &s3.PutObjectInput{
Bucket: aws.String("myBucket"),
Key: aws.String("myKey"),
ACL: s3.ObjectCannedACLPrivate,
Body: file,
}