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

Update python script to support rapid response #207

Merged
merged 1 commit into from
May 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions sdcclient/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def get_user_ids(self, users):
return [True, list(res.values())]

def create_team(self, name, memberships=None, filter='', description='', show='host', theme='#7BB0B2',
perm_capture=False, perm_custom_events=False, perm_aws_data=False):
perm_capture=False, perm_custom_events=False, perm_aws_data=False, perm_rapid_response=False):
'''
**Description**
Creates a new team
Expand All @@ -780,6 +780,7 @@ def create_team(self, name, memberships=None, filter='', description='', show='h
- **perm_capture**: if True, this team will be allowed to take sysdig captures.
- **perm_custom_events**: if True, this team will be allowed to view all custom events from every user and agent.
- **perm_aws_data**: if True, this team will have access to all AWS metrics and tags, regardless of the team's scope.
- **perm_rapid_response**: if True, this team will have access rapid response feature.

**Success Return Value**
The newly created team.
Expand All @@ -795,6 +796,7 @@ def create_team(self, name, memberships=None, filter='', description='', show='h
'canUseSysdigCapture': perm_capture,
'canUseCustomEvents': perm_custom_events,
'canUseAwsMetrics': perm_aws_data,
'canUseRapidResponse': perm_rapid_response,
}

# Map user-names to IDs
Expand All @@ -820,7 +822,7 @@ def create_team(self, name, memberships=None, filter='', description='', show='h
return self._request_result(res)

def edit_team(self, name, memberships=None, filter=None, description=None, show=None, theme=None,
perm_capture=None, perm_custom_events=None, perm_aws_data=None):
perm_capture=None, perm_custom_events=None, perm_aws_data=None, perm_rapid_response=False):
'''
**Description**
Edits an existing team. All arguments are optional. Team settings for any arguments unspecified will remain at their current settings.
Expand All @@ -835,6 +837,7 @@ def edit_team(self, name, memberships=None, filter=None, description=None, show=
- **perm_capture**: if True, this team will be allowed to take sysdig captures.
- **perm_custom_events**: if True, this team will be allowed to view all custom events from every user and agent.
- **perm_aws_data**: if True, this team will have access to all AWS metrics and tags, regardless of the team's scope.
- **perm_rapid_response**: if True, this team will have access rapid response feature.

**Success Return Value**
The edited team.
Expand All @@ -853,6 +856,7 @@ def edit_team(self, name, memberships=None, filter=None, description=None, show=
'canUseSysdigCapture': perm_capture if perm_capture else team['canUseSysdigCapture'],
'canUseCustomEvents': perm_custom_events if perm_custom_events else team['canUseCustomEvents'],
'canUseAwsMetrics': perm_aws_data if perm_aws_data else team['canUseAwsMetrics'],
'canUseRapidResponse': perm_rapid_response,
'defaultTeamRole': team['defaultTeamRole'],
'entryPoint': team['entryPoint'],
'id': team['id'],
Expand Down