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

[ BUG ] Parameter abstraction for organization-ids is not working properly in CSPMRegistration.DeleteCSPMAwsAccount #539

Closed
jshcodes opened this issue Feb 4, 2022 · 1 comment · Fixed by #540
Assignees
Labels
bug 🐛 Something isn't working Horizon Horizon issues and questions

Comments

@jshcodes
Copy link
Member

jshcodes commented Feb 4, 2022

Describe the bug
When trying to use the DeleteCSPMAwsAccount operation (delete_aws_account), you cannot make use of parameter abstraction to specify the value for organization-ids. (Documented as organization_ids.)

When making use of the parameters keyword to specify this value, this operation executes successfully.

To Reproduce

from falconpy import CSPMRegistration

falcon = CSPMRegistration(client_id="CLIENT_ID_HERE", client_secret="CLIENT_SECRET_HERE")

print(falcon.delete_aws_account(organization_ids="ORG-ID-HERE"))

Expected behavior
The operation deletes the AWS account from the tenant as specified by the provided keyword.

Environment:

  • OS: All supported
  • Python: All supported
  • FalconPy: 0.5.4+

Additional context
This issue is caused by the parameter name within the API specification not matching the parameter allowed within the method.

Thanks to @jhseceng for identifying and reporting this issue.

A fix for this issue is in process.

Workaround
Users encountering this issue may successfully perform this operation by using the parameters keyword as opposed to parameter abstraction.

from falconpy import CSPMRegistration

falcon = CSPMRegistration(client_id="CLIENT_ID_HERE", client_secret="CLIENT_SECRET_HERE")

print(falcon.delete_aws_account(parameters={"organization-ids": "ORG-ID-HERE"}))
@jshcodes jshcodes added bug 🐛 Something isn't working Horizon Horizon issues and questions labels Feb 4, 2022
@jshcodes jshcodes self-assigned this Feb 4, 2022
@jshcodes
Copy link
Member Author

jshcodes commented Feb 4, 2022

A code review of this Service Class identifies other methods with the same issue. There are other parameters within this Service Class where this issue has been handled.

All methods within this Service Class with this issue handling parameters with this naming convention will be addressed by the v1.0.1 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Horizon Horizon issues and questions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant