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 getBucketPolicy, putBucketPolicy, deleteBucketPolicy & getBucketPolicyStatus #39

Open
c4spar opened this issue Nov 8, 2021 · 1 comment · May be fixed by #40
Open

Add getBucketPolicy, putBucketPolicy, deleteBucketPolicy & getBucketPolicyStatus #39

c4spar opened this issue Nov 8, 2021 · 1 comment · May be fixed by #40

Comments

@c4spar
Copy link
Contributor

c4spar commented Nov 8, 2021

I will open a PR for this too 😉

@c4spar
Copy link
Contributor Author

c4spar commented Nov 8, 2021

I'm wondering if we should move the getBucketPolicy, putBucketPolicy, deleteBucketPolicy && getBucketPolicyStatus methods to the S3Bucket class and rename them to getPolicy, putPolicy, deletePolicy & getPolicyStatus? Currently i have added them to the S3 class becasue the original aws sdk has these methods also on the S3 class but i think the S3Bucket class would be also a good place.

I would also like to add a getBucket method, than we can easily retrieve/switch bucket instances and call buckets with:

const s3 = new S3({
  accessKeyID: Deno.env.get("AWS_ACCESS_KEY_ID")!,
  secretKey: Deno.env.get("AWS_SECRET_ACCESS_KEY")!,
  region: "us-east-1",
  endpointURL: Deno.env.get("S3_ENDPOINT_URL"),
});

s3.getBucket("my-bucket").putPolicy({...})

@c4spar c4spar changed the title Add getBucketPolicy, putBucketPolicy & deleteBucketPolicy Add getBucketPolicy, putBucketPolicy, deleteBucketPolicy & getBucketPolicyStatus Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant