-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Organizations: list_organizational_units_for_parent #4077
Comments
Hi @holdcrop thanks for reaching out. Have you tried using the ListOrganizationalUnitsForParent paginator? For example: import boto3
client = boto3.client('organizations')
paginator = client.get_paginator('list_organizational_units_for_parent')
response_iterator = paginator.paginate(
ParentId='r-12345',
PaginationConfig={}
)
for page in response_iterator:
print(page) The AWS CLI handles server-side pagination automatically, so it will continue to fetch results when there are more to return. Boto3 paginators enable this behavior as well. Without automatic pagination the
|
Hi @tim-finnigan, |
Thanks for following up, and I'm glad the paginator is working for you. For any specific requests here please consider creating a new issue here in our cross-SDK repository and someone will reach out to the Organizations service team on your behalf. Service teams own and maintain the underlying APIs and paginators, so any issues related to the behavior of those should get forwarded to them. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When calling the list_organizational_units_for_parent operation, there is an inconsistent result returned versus the CLI.
Despite only having a single OU listed under the parent, the results from boto3 need to be paginated in order to retrieve the expected child OU details.
The same call through the CLI requires no pagination.
Expected Behavior
When there are fewer results than the page size limit, pagination should not be required.
Current Behavior
Organization Structure:
| - Parent
| - - Child
In trying to get the Id of the Child Organization Unit, pagination is required on the list_organizational_units_for_parent operation using the Parent Organisation Unit Id
Reproduction Steps
Organization Structure:
| - Parent
| - - Child
In trying to get the Id of the Child Organization Unit, pagination is required on the list_organizational_units_for_parent operation using the Parent Organisation Unit Id
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.34.79
Environment details (OS name and version, etc.)
Amazon Linux 2, Python 3.9
The text was updated successfully, but these errors were encountered: