Skip to content

Commit

Permalink
Merge pull request #170 from ipalvr/serverless-endpoints-class
Browse files Browse the repository at this point in the history
Added Serverless Endpoint Class
  • Loading branch information
SimOnPanw authored May 22, 2024
2 parents ef11322 + 2685f60 commit 9e68b9e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions prismacloud/api/cwpp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ._registry import *
from ._scans import *
from ._settings import *
from ._serverless import *
from ._stats import *
from ._status import *
from ._tags import *
Expand Down
23 changes: 23 additions & 0 deletions prismacloud/api/cwpp/_serverless.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class ServerlessPrismaCloudAPICWPPMixin:
""" Prisma Cloud Compute Serverless Endpoints Class """

# Get serverless function scan results
def serverless_list_read(self, query_params=None):
result = self.execute_compute('GET', 'api/v1/serverless', query_params=query_params, paginated=True)
return result

# Download serverless function scan results
def serverless_download(self, query_params=None):
result = self.execute_compute('GET', 'api/v1/serverless/download?', query_params=query_params)
return result

# Start serverless function scan
def serverless_start_scan(self):
result = self.execute_compute('POST', 'api/v1/serverless/scan')
return result

# Stop serverless function scan
def serverless_stop_scan(self):
result = self.execute_compute('POST', 'api/v1/serverless/stop')
return result

2 changes: 1 addition & 1 deletion prismacloud/api/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "5.2.16"
version = "5.2.17"

0 comments on commit 9e68b9e

Please sign in to comment.