Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add S3 Logging ACL parameter and add Redundancy options #279

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

bengesoff
Copy link
Contributor

The S3 logging endpoint in the Fastly API supports an acl parameter which allows setting the permissions of the uploaded log objects within the bucket.
This commit adds support for this to the SDK, as requested in #278.
The Fastly UI console suggests that there are 7 options for this based on the AWS "canned ACL"s, including "private", "public-read" etc, so I have added support for those.

Furthermore, there are 4 options for redundancy, but only two were previously supported by the SDK.
I have added the two others for the infrequently accessed storage tiers.

The API docs for s3 logging are here: https://developer.fastly.com/reference/api/logging/s3/

The test fixtures have a lot of changed timestamps and rate limit parameters in the diffs, but the main differences should be the acl and redundancy parameters in the requests.
I also added a couple of checks to the test to exercise the new options and verify that they were working.

The S3 logging endpoint in the Fastly API supports an `acl` parameter which allows setting the permissions of the uploaded log objects within the bucket.
This commit adds support for this to the SDK.
The Fastly UI console suggests that there are 7 options for this based on the AWS "canned ACL"s, including "private", "public-read" etc.
I have therefore used constants to represent these options, similarly to the redundancy parameters.

Furthermore, there are 4 options for redundancy, but only two were previously supported by the SDK.
I have added the two others for the infrequently accessed storage tiers.
@Integralist Integralist added the enhancement New feature or request label Jun 9, 2021
Copy link
Collaborator

@Integralist Integralist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bengesoff I have just one comment that needs some clarification (i.e. the 'struct field as a pointer' comment).

fastly/s3.go Show resolved Hide resolved
fastly/s3.go Show resolved Hide resolved
fastly/s3.go Outdated Show resolved Hide resolved
@Integralist
Copy link
Collaborator

@bengesoff did you have any further changes. I'm happy to merge this if you're OK with it being merged.

@bengesoff
Copy link
Contributor Author

@Integralist I'm happy with it if you are!

@Integralist Integralist merged commit 5da384b into fastly:main Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants