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

Wrong limit value in sample code for boto3 describe_log_groups #4079

Closed
puidenz opened this issue Apr 10, 2024 · 4 comments
Closed

Wrong limit value in sample code for boto3 describe_log_groups #4079

puidenz opened this issue Apr 10, 2024 · 4 comments
Assignees
Labels
bug This issue is a confirmed bug. documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.

Comments

@puidenz
Copy link

puidenz commented Apr 10, 2024

Describe the issue

The sample code uses limit=123; however, the valid value is 1 to 50 for DescribeLogGroups.

response = client.describe_log_groups(
    accountIdentifiers=[
        'string',
    ],
    logGroupNamePrefix='string',
    logGroupNamePattern='string',
    nextToken='string',
    limit=123,
    includeLinkedAccounts=True|False,
    logGroupClass='STANDARD'|'INFREQUENT_ACCESS'
)

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/logs/client/describe_log_groups.html#describe-log-groups

@puidenz puidenz added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Apr 11, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added bug This issue is a confirmed bug. p3 This is a minor priority issue investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 11, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @puidenz, thanks for reaching out. This is pretty common in SDK examples; the examples aren't intended to be copied and ran off-the-shelf. They exist to demonstrate the correct syntax and explain other nuances. All of the other parameters in DescribeLogGroups would need to be changed from their sample values as well, so I'm not sure how limit is any different. Hope that helps, and let me know if you have any follow-up questions.

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional information or feedback. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Apr 11, 2024
@puidenz
Copy link
Author

puidenz commented Apr 17, 2024

Hi Ryan, thanks for your reply!
Could we add valid value range (1~50) under explanation of limit attribute in the SDK doc? Currently there is no explanation for valid value.

limit (integer) – The maximum number of items returned. If you don’t specify a value, the default is up to 50 items.

So users don't have to travel over API doc or try-and-error to get the valid value.

@tim-finnigan
Copy link
Contributor

Hi @puidenz thanks for following up and providing more context. As Ryan mentioned, using limit=123 is just a placeholder and not intended to be copied and ran as is. However, I saw that this has tripped up a few other people over the years who were running other commands (see #1356 for example). So we brought this up for discussion with the team, and decided to create a new tracking issue (#4088) for tracking these issues.

As described in the new issue, further discussion is needed to discuss possible paths forward here. I'll go ahead and close this in favor of consolidating and tracking in the new issue. Please feel free to 👍 or comment there. Thanks again!

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.
Projects
None yet
Development

No branches or pull requests

3 participants