Closed nikoizs closed 2 years ago
Update: looks like that SearchQuery
supports multiple filters in one query , I will try to simplify it a bit more.
Looks great, I assume this has been tested and works around your issue?
Tested the code separately but not as part of the lib
Please have a full successfull run the change and let me know, so I can merge and release.
Fully tested in our test environment and all works as expected.
Linting fails, please fix it and then I will message again and you can tag with a patch version.
should i create a new pull request ?
Yeah with the linting fixed
sorry for that :) here is the new pr with the fix: https://github.com/schubergphilis/awsapilib/pull/27
First I wanted to add pagination, retrieve all provisioned products and filter later in the code , like it was done originally, but unfortunately boto3 doesn't support pagination for the
search_provisioned_products
call. Instead I used the built in filter functionality to return onlyUNDER_CHANGE
products( which will return less than 100 results in 99.999% of the cases) and then filter later on type="CONTROL_TOWER_ACCOUNT"The other option would be to switch to
scan_provisioned_products
that supports pagination , but doesn't support filtering on the status.