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

[docs] Missing information from s3 client - generate_presigned_url method - Params dict #3901

Open
antoineaws opened this issue Oct 17, 2023 · 5 comments
Labels
documentation This is a problem with documentation.

Comments

@antoineaws
Copy link

Describe the issue

Team,

For the s3 client in boto3, we have missing information on what "Params" parameter field is and what are the sub-fields that it contain. All that it references is that it's a dict. Looking at the boto3 s3 client link, doesn't provide enough information.
I recommend we look into providing additional information on what are the possible values within each of the parameters (ClientMethod, Params, HttpMethod).

    ClientMethod (string) – The client method to presign for

    Params (dict) – The parameters normally passed to ClientMethod.

    ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)

    HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.

Thanks!

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/generate_presigned_url.html

@antoineaws antoineaws added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Oct 17, 2023
@nateprewitt
Copy link
Contributor

Hi @antoineaws,

Params is whatever parameters you'd pass to the S3 operation you're passing in ClientMethod. Those are all documented in the individual operations.

   ClientMethod (string) – The client method to presign for

   Params (dict) – The parameters normally passed to ClientMethod.

If you have feedback on generalized wording that would help clarify this further, we'd be happy to review any suggestions. Thanks!

@nateprewitt nateprewitt added response-requested Waiting on additional information or feedback. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 17, 2023
@nateprewitt
Copy link
Contributor

For reference, these are the detailed docs for how presigned urls work in boto3.

@github-actions github-actions bot removed the response-requested Waiting on additional information or feedback. label Oct 18, 2023
@antoineaws
Copy link
Author

Hey @nateprewitt,

Both links are missing key details such as what are the different values possible for ClientMethod, more specifically on these 2 links above, we don't state for example that 'put_object' is an option. On both pages, we are also missing what are the possible values for "Params". We state it's a dict, ok great, but what are the parameters possible within that dict? Where can we find them? In the example, we show that it's possible to have Bucket and Key, but it's missing information on Metadata and Conditions.

I believe we should include the info on both the example page and the method specific page as examples don't replace method level information. Same for ClientMethod if we list it's a string, ok great, but what are the possible values for it.

If you guide me towards, where we document the possible values for ClientMethod and list of possible fields within "Params", I can provide more details on structure on how I think it should look like.

Thanks!

@Manouchehri
Copy link

Here's a list of what you can add:

Bucket, IfMatch, IfModifiedSince, IfNoneMatch, IfUnmodifiedSince, Key, Range, ResponseCacheControl, ResponseContentDisposition, ResponseContentEncoding, ResponseContentLanguage, ResponseContentType, ResponseExpires, VersionId, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, RequestPayer, PartNumber, ExpectedBucketOwner, ChecksumMode

@r-heimann
Copy link

I also came across this, i don't remember boto3 documentation being so... "empty". Would be great if those pages have more information available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
Development

No branches or pull requests

4 participants