Skip to content

Commit 2685f60

Browse files
authored
Merge branch 'main' into serverless-endpoints-class
2 parents ddb7a85 + ef11322 commit 2685f60

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

prismacloud/api/cspm/_endpoints.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,26 @@ def asset_inventory_list_read(self, query_params=None):
351351
return self.execute('GET', 'v2/inventory', query_params=query_params)
352352

353353
def asset_inventory_list_read_post(self, body_params=None):
354-
return self.execute('POST', 'v2/inventory', body_params=body_params)
354+
return self.execute('POST', 'v2/inventory', body_params=body_params)
355+
356+
"""
357+
Asset (Resources) Inventory V3
358+
359+
[x] LIST
360+
[ ] CREATE
361+
[ ] READ
362+
[ ] UPDATE
363+
[ ] DELETE
364+
Additional:
365+
[x] LIST (v3)
366+
[x] LIST WITH FILTERS(v3)
367+
"""
368+
369+
def asset_inventory_list_read_v3(self, query_params=None):
370+
return self.execute('GET', 'v3/inventory', query_params=query_params)
371+
372+
def asset_inventory_list_read_postv_3(self, body_params=None):
373+
return self.execute('POST', 'v3/inventory', body_params=body_params)
355374

356375
"""
357376
(Assets) Resources

scripts/pcs_rotate_service_account_access_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def get_current_version(access_key_name):
8484

8585
# Safeguards.
8686

87-
if current_access_key['id'].lower() == pc_api.username.lower():
87+
if current_access_key['id'].lower() == pc_api.identity.lower():
8888
pc_utility.error_and_exit(500, 'This script cannot rotate its own Access Key')
8989

90-
if previous_access_key and previous_access_key['id'].lower() == pc_api.username.lower():
90+
if previous_access_key and previous_access_key['id'].lower() == pc_api.identity.lower():
9191
pc_utility.error_and_exit(500, 'This script cannot rotate its own Access Key')
9292

9393
if current_access_key['username'].lower() == current_user['email'].lower():

0 commit comments

Comments
 (0)