Closed jtb75 closed 2 years ago
:tada: Thanks for opening your first issue here! Welcome to the community!
Since cloud_accounts_list_read()
is a wrapper for one endpoint (https://prisma.pan.dev/api/cloud/cspm/cloud-accounts#operation/get-cloud-accounts) and enumerating the children accounts of a parent account requires another endpoint (https://prisma.pan.dev/api/cloud/cspm/cloud-accounts#operation/get-cloud-org-accounts) I think this could best be accomplished by adding a wrapper (organization_cloud_accounts_list_read
?) for that endpoint and adding a method to _extended.py
that calls organization_cloud_accounts_list_read(cloud_type, cloud_account_id)
for each account in the the result of cloud_accounts_list_read()
that is a parent (maybe identified via numberOfChildAccounts > 0
) ???
child query added is cloud_accounts_children_list_read within posture endpoints.
Is your feature request related to a problem?
The function cloud_accounts_list_read only returns individual or parent level accounts. All accounts should be returned.
Describe the solution you'd like
If calling cloud_accounts_list_read I would expect to receive all cloud accounts or would have an option for passing in an account ID of an org/tenant and receive all children accounts.
Describe alternatives you've considered