files-com 1.6.208__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of files-com might be problematic. Click here for more details.
- README.md +758 -0
- _VERSION +1 -0
- files_com-1.6.208.dist-info/METADATA +770 -0
- files_com-1.6.208.dist-info/RECORD +126 -0
- files_com-1.6.208.dist-info/WHEEL +5 -0
- files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
- files_com-1.6.208.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +309 -0
- files_sdk/api.py +63 -0
- files_sdk/api_client.py +336 -0
- files_sdk/error.py +2981 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +119 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +153 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/agent_push_update.py +44 -0
- files_sdk/models/api_key.py +318 -0
- files_sdk/models/api_request_log.py +105 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +117 -0
- files_sdk/models/as2_outgoing_message.py +113 -0
- files_sdk/models/as2_partner.py +415 -0
- files_sdk/models/as2_station.py +282 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +823 -0
- files_sdk/models/automation_log.py +94 -0
- files_sdk/models/automation_run.py +112 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +340 -0
- files_sdk/models/bundle.py +686 -0
- files_sdk/models/bundle_action.py +93 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +252 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +133 -0
- files_sdk/models/bundle_registration.py +82 -0
- files_sdk/models/child_site_management_policy.py +278 -0
- files_sdk/models/clickwrap.py +268 -0
- files_sdk/models/dns_record.py +59 -0
- files_sdk/models/email_incoming_message.py +102 -0
- files_sdk/models/email_log.py +84 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +102 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +851 -0
- files_sdk/models/file_action.py +39 -0
- files_sdk/models/file_comment.py +191 -0
- files_sdk/models/file_comment_reaction.py +125 -0
- files_sdk/models/file_migration.py +69 -0
- files_sdk/models/file_migration_log.py +88 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +186 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +265 -0
- files_sdk/models/ftp_action_log.py +104 -0
- files_sdk/models/gpg_key.py +333 -0
- files_sdk/models/group.py +338 -0
- files_sdk/models/group_user.py +235 -0
- files_sdk/models/history.py +236 -0
- files_sdk/models/history_export.py +238 -0
- files_sdk/models/history_export_result.py +98 -0
- files_sdk/models/holiday_region.py +58 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbound_s3_log.py +95 -0
- files_sdk/models/inbox_recipient.py +124 -0
- files_sdk/models/inbox_registration.py +79 -0
- files_sdk/models/inbox_upload.py +80 -0
- files_sdk/models/invoice.py +91 -0
- files_sdk/models/invoice_line_item.py +51 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/key_lifecycle_rule.py +243 -0
- files_sdk/models/lock.py +174 -0
- files_sdk/models/message.py +244 -0
- files_sdk/models/message_comment.py +223 -0
- files_sdk/models/message_comment_reaction.py +181 -0
- files_sdk/models/message_reaction.py +170 -0
- files_sdk/models/notification.py +451 -0
- files_sdk/models/outbound_connection_log.py +105 -0
- files_sdk/models/partner.py +307 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +190 -0
- files_sdk/models/preview.py +40 -0
- files_sdk/models/priority.py +63 -0
- files_sdk/models/project.py +205 -0
- files_sdk/models/public_hosting_request_log.py +101 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +269 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +1854 -0
- files_sdk/models/remote_server_configuration_file.py +73 -0
- files_sdk/models/remote_server_credential.py +855 -0
- files_sdk/models/request.py +184 -0
- files_sdk/models/restore.py +142 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +108 -0
- files_sdk/models/sftp_host_key.py +215 -0
- files_sdk/models/share_group.py +228 -0
- files_sdk/models/share_group_member.py +41 -0
- files_sdk/models/siem_http_destination.py +1074 -0
- files_sdk/models/site.py +1289 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +168 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync.py +588 -0
- files_sdk/models/sync_log.py +86 -0
- files_sdk/models/sync_run.py +124 -0
- files_sdk/models/usage_by_top_level_dir.py +41 -0
- files_sdk/models/usage_daily_snapshot.py +93 -0
- files_sdk/models/usage_snapshot.py +73 -0
- files_sdk/models/user.py +1232 -0
- files_sdk/models/user_cipher_use.py +91 -0
- files_sdk/models/user_lifecycle_rule.py +355 -0
- files_sdk/models/user_request.py +166 -0
- files_sdk/models/user_sftp_client_use.py +68 -0
- files_sdk/models/web_dav_action_log.py +104 -0
- files_sdk/models/webhook_test.py +116 -0
- files_sdk/models/workspace.py +202 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,1074 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SiemHttpDestination:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - SIEM HTTP Destination ID
|
|
14
|
+
"name": None, # string - Name for this Destination
|
|
15
|
+
"destination_type": None, # string - Destination Type
|
|
16
|
+
"destination_url": None, # string - Destination Url
|
|
17
|
+
"file_destination_path": None, # string - Applicable only for destination type: file. Destination folder path on Files.com.
|
|
18
|
+
"file_format": None, # string - Applicable only for destination type: file. Generated file format.
|
|
19
|
+
"file_interval_minutes": None, # int64 - Applicable only for destination type: file. Interval, in minutes, between file deliveries.
|
|
20
|
+
"additional_headers": None, # object - Additional HTTP Headers included in calls to the destination URL
|
|
21
|
+
"sending_active": None, # boolean - Whether this SIEM HTTP Destination is currently being sent to or not
|
|
22
|
+
"generic_payload_type": None, # string - Applicable only for destination type: generic. Indicates the type of HTTP body. Can be json_newline or json_array. json_newline is multiple log entries as JSON separated by newlines. json_array is a single JSON array containing multiple log entries as JSON.
|
|
23
|
+
"splunk_token_masked": None, # string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
24
|
+
"azure_dcr_immutable_id": None, # string - Applicable only for destination types: azure, azure_legacy. Immutable ID of the Data Collection Rule.
|
|
25
|
+
"azure_stream_name": None, # string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
|
|
26
|
+
"azure_oauth_client_credentials_tenant_id": None, # string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Tenant ID.
|
|
27
|
+
"azure_oauth_client_credentials_client_id": None, # string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client ID.
|
|
28
|
+
"azure_oauth_client_credentials_client_secret_masked": None, # string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client Secret.
|
|
29
|
+
"qradar_username": None, # string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
|
|
30
|
+
"qradar_password_masked": None, # string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
31
|
+
"solar_winds_token_masked": None, # string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
32
|
+
"new_relic_api_key_masked": None, # string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
33
|
+
"datadog_api_key_masked": None, # string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
34
|
+
"sftp_action_send_enabled": None, # boolean - Whether or not sending is enabled for sftp_action logs.
|
|
35
|
+
"sftp_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
36
|
+
"ftp_action_send_enabled": None, # boolean - Whether or not sending is enabled for ftp_action logs.
|
|
37
|
+
"ftp_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
38
|
+
"web_dav_action_send_enabled": None, # boolean - Whether or not sending is enabled for web_dav_action logs.
|
|
39
|
+
"web_dav_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
40
|
+
"sync_send_enabled": None, # boolean - Whether or not sending is enabled for sync logs.
|
|
41
|
+
"sync_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
42
|
+
"outbound_connection_send_enabled": None, # boolean - Whether or not sending is enabled for outbound_connection logs.
|
|
43
|
+
"outbound_connection_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
44
|
+
"automation_send_enabled": None, # boolean - Whether or not sending is enabled for automation logs.
|
|
45
|
+
"automation_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
46
|
+
"api_request_send_enabled": None, # boolean - Whether or not sending is enabled for api_request logs.
|
|
47
|
+
"api_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
48
|
+
"public_hosting_request_send_enabled": None, # boolean - Whether or not sending is enabled for public_hosting_request logs.
|
|
49
|
+
"public_hosting_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
50
|
+
"email_send_enabled": None, # boolean - Whether or not sending is enabled for email logs.
|
|
51
|
+
"email_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
52
|
+
"exavault_api_request_send_enabled": None, # boolean - Whether or not sending is enabled for exavault_api_request logs.
|
|
53
|
+
"exavault_api_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
54
|
+
"settings_change_send_enabled": None, # boolean - Whether or not sending is enabled for settings_change logs.
|
|
55
|
+
"settings_change_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
|
|
56
|
+
"last_http_call_target_type": None, # string - Type of URL that was last called. Can be `destination_url` or `azure_oauth_client_credentials_url`
|
|
57
|
+
"last_http_call_success": None, # boolean - Was the last HTTP call made successful?
|
|
58
|
+
"last_http_call_response_code": None, # int64 - Last HTTP Call Response Code
|
|
59
|
+
"last_http_call_response_body": None, # string - Last HTTP Call Response Body. Large responses are truncated.
|
|
60
|
+
"last_http_call_error_message": None, # string - Last HTTP Call Error Message if applicable
|
|
61
|
+
"last_http_call_time": None, # string - Time of Last HTTP Call
|
|
62
|
+
"last_http_call_duration_ms": None, # int64 - Duration of the last HTTP Call in milliseconds
|
|
63
|
+
"most_recent_http_call_success_time": None, # string - Time of Most Recent Successful HTTP Call
|
|
64
|
+
"connection_test_entry": None, # string - Connection Test Entry
|
|
65
|
+
"splunk_token": None, # string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
66
|
+
"azure_oauth_client_credentials_client_secret": None, # string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
|
|
67
|
+
"qradar_password": None, # string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
68
|
+
"solar_winds_token": None, # string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
69
|
+
"new_relic_api_key": None, # string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
70
|
+
"datadog_api_key": None, # string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
def __init__(self, attributes=None, options=None):
|
|
74
|
+
if not isinstance(attributes, dict):
|
|
75
|
+
attributes = {}
|
|
76
|
+
if not isinstance(options, dict):
|
|
77
|
+
options = {}
|
|
78
|
+
self.set_attributes(attributes)
|
|
79
|
+
self.options = options
|
|
80
|
+
|
|
81
|
+
def set_attributes(self, attributes):
|
|
82
|
+
for (
|
|
83
|
+
attribute,
|
|
84
|
+
default_value,
|
|
85
|
+
) in SiemHttpDestination.default_attributes.items():
|
|
86
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
87
|
+
|
|
88
|
+
def get_attributes(self):
|
|
89
|
+
return {
|
|
90
|
+
k: getattr(self, k, None)
|
|
91
|
+
for k in SiemHttpDestination.default_attributes
|
|
92
|
+
if getattr(self, k, None) is not None
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Parameters:
|
|
96
|
+
# name - string - Name for this Destination
|
|
97
|
+
# additional_headers - object - Additional HTTP Headers included in calls to the destination URL
|
|
98
|
+
# sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
|
|
99
|
+
# generic_payload_type - string - Applicable only for destination type: generic. Indicates the type of HTTP body. Can be json_newline or json_array. json_newline is multiple log entries as JSON separated by newlines. json_array is a single JSON array containing multiple log entries as JSON.
|
|
100
|
+
# file_destination_path - string - Applicable only for destination type: file. Destination folder path on Files.com.
|
|
101
|
+
# file_format - string - Applicable only for destination type: file. Generated file format.
|
|
102
|
+
# file_interval_minutes - int64 - Applicable only for destination type: file. Interval, in minutes, between file deliveries. Valid values are 5, 10, 15, 20, 30, 60, 90, 180, 240, 360.
|
|
103
|
+
# splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
104
|
+
# azure_dcr_immutable_id - string - Applicable only for destination types: azure, azure_legacy. Immutable ID of the Data Collection Rule.
|
|
105
|
+
# azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
|
|
106
|
+
# azure_oauth_client_credentials_tenant_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Tenant ID.
|
|
107
|
+
# azure_oauth_client_credentials_client_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client ID.
|
|
108
|
+
# azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
|
|
109
|
+
# qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
|
|
110
|
+
# qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
111
|
+
# solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
112
|
+
# new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
113
|
+
# datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
114
|
+
# sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
|
|
115
|
+
# ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
|
|
116
|
+
# web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
|
|
117
|
+
# sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
|
|
118
|
+
# outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
|
|
119
|
+
# automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
|
|
120
|
+
# api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
|
|
121
|
+
# public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
|
|
122
|
+
# email_send_enabled - boolean - Whether or not sending is enabled for email logs.
|
|
123
|
+
# exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
|
|
124
|
+
# settings_change_send_enabled - boolean - Whether or not sending is enabled for settings_change logs.
|
|
125
|
+
# destination_type - string - Destination Type
|
|
126
|
+
# destination_url - string - Destination Url
|
|
127
|
+
def update(self, params=None):
|
|
128
|
+
if not isinstance(params, dict):
|
|
129
|
+
params = {}
|
|
130
|
+
|
|
131
|
+
if hasattr(self, "id") and self.id:
|
|
132
|
+
params["id"] = self.id
|
|
133
|
+
else:
|
|
134
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
135
|
+
if "id" not in params:
|
|
136
|
+
raise MissingParameterError("Parameter missing: id")
|
|
137
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
138
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
139
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
140
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
141
|
+
if "generic_payload_type" in params and not isinstance(
|
|
142
|
+
params["generic_payload_type"], str
|
|
143
|
+
):
|
|
144
|
+
raise InvalidParameterError(
|
|
145
|
+
"Bad parameter: generic_payload_type must be an str"
|
|
146
|
+
)
|
|
147
|
+
if "file_destination_path" in params and not isinstance(
|
|
148
|
+
params["file_destination_path"], str
|
|
149
|
+
):
|
|
150
|
+
raise InvalidParameterError(
|
|
151
|
+
"Bad parameter: file_destination_path must be an str"
|
|
152
|
+
)
|
|
153
|
+
if "file_format" in params and not isinstance(
|
|
154
|
+
params["file_format"], str
|
|
155
|
+
):
|
|
156
|
+
raise InvalidParameterError(
|
|
157
|
+
"Bad parameter: file_format must be an str"
|
|
158
|
+
)
|
|
159
|
+
if "file_interval_minutes" in params and not isinstance(
|
|
160
|
+
params["file_interval_minutes"], int
|
|
161
|
+
):
|
|
162
|
+
raise InvalidParameterError(
|
|
163
|
+
"Bad parameter: file_interval_minutes must be an int"
|
|
164
|
+
)
|
|
165
|
+
if "splunk_token" in params and not isinstance(
|
|
166
|
+
params["splunk_token"], str
|
|
167
|
+
):
|
|
168
|
+
raise InvalidParameterError(
|
|
169
|
+
"Bad parameter: splunk_token must be an str"
|
|
170
|
+
)
|
|
171
|
+
if "azure_dcr_immutable_id" in params and not isinstance(
|
|
172
|
+
params["azure_dcr_immutable_id"], str
|
|
173
|
+
):
|
|
174
|
+
raise InvalidParameterError(
|
|
175
|
+
"Bad parameter: azure_dcr_immutable_id must be an str"
|
|
176
|
+
)
|
|
177
|
+
if "azure_stream_name" in params and not isinstance(
|
|
178
|
+
params["azure_stream_name"], str
|
|
179
|
+
):
|
|
180
|
+
raise InvalidParameterError(
|
|
181
|
+
"Bad parameter: azure_stream_name must be an str"
|
|
182
|
+
)
|
|
183
|
+
if (
|
|
184
|
+
"azure_oauth_client_credentials_tenant_id" in params
|
|
185
|
+
and not isinstance(
|
|
186
|
+
params["azure_oauth_client_credentials_tenant_id"], str
|
|
187
|
+
)
|
|
188
|
+
):
|
|
189
|
+
raise InvalidParameterError(
|
|
190
|
+
"Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
|
|
191
|
+
)
|
|
192
|
+
if (
|
|
193
|
+
"azure_oauth_client_credentials_client_id" in params
|
|
194
|
+
and not isinstance(
|
|
195
|
+
params["azure_oauth_client_credentials_client_id"], str
|
|
196
|
+
)
|
|
197
|
+
):
|
|
198
|
+
raise InvalidParameterError(
|
|
199
|
+
"Bad parameter: azure_oauth_client_credentials_client_id must be an str"
|
|
200
|
+
)
|
|
201
|
+
if (
|
|
202
|
+
"azure_oauth_client_credentials_client_secret" in params
|
|
203
|
+
and not isinstance(
|
|
204
|
+
params["azure_oauth_client_credentials_client_secret"], str
|
|
205
|
+
)
|
|
206
|
+
):
|
|
207
|
+
raise InvalidParameterError(
|
|
208
|
+
"Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
|
|
209
|
+
)
|
|
210
|
+
if "qradar_username" in params and not isinstance(
|
|
211
|
+
params["qradar_username"], str
|
|
212
|
+
):
|
|
213
|
+
raise InvalidParameterError(
|
|
214
|
+
"Bad parameter: qradar_username must be an str"
|
|
215
|
+
)
|
|
216
|
+
if "qradar_password" in params and not isinstance(
|
|
217
|
+
params["qradar_password"], str
|
|
218
|
+
):
|
|
219
|
+
raise InvalidParameterError(
|
|
220
|
+
"Bad parameter: qradar_password must be an str"
|
|
221
|
+
)
|
|
222
|
+
if "solar_winds_token" in params and not isinstance(
|
|
223
|
+
params["solar_winds_token"], str
|
|
224
|
+
):
|
|
225
|
+
raise InvalidParameterError(
|
|
226
|
+
"Bad parameter: solar_winds_token must be an str"
|
|
227
|
+
)
|
|
228
|
+
if "new_relic_api_key" in params and not isinstance(
|
|
229
|
+
params["new_relic_api_key"], str
|
|
230
|
+
):
|
|
231
|
+
raise InvalidParameterError(
|
|
232
|
+
"Bad parameter: new_relic_api_key must be an str"
|
|
233
|
+
)
|
|
234
|
+
if "datadog_api_key" in params and not isinstance(
|
|
235
|
+
params["datadog_api_key"], str
|
|
236
|
+
):
|
|
237
|
+
raise InvalidParameterError(
|
|
238
|
+
"Bad parameter: datadog_api_key must be an str"
|
|
239
|
+
)
|
|
240
|
+
if "destination_type" in params and not isinstance(
|
|
241
|
+
params["destination_type"], str
|
|
242
|
+
):
|
|
243
|
+
raise InvalidParameterError(
|
|
244
|
+
"Bad parameter: destination_type must be an str"
|
|
245
|
+
)
|
|
246
|
+
if "destination_url" in params and not isinstance(
|
|
247
|
+
params["destination_url"], str
|
|
248
|
+
):
|
|
249
|
+
raise InvalidParameterError(
|
|
250
|
+
"Bad parameter: destination_url must be an str"
|
|
251
|
+
)
|
|
252
|
+
response, _options = Api.send_request(
|
|
253
|
+
"PATCH",
|
|
254
|
+
"/siem_http_destinations/{id}".format(id=params["id"]),
|
|
255
|
+
params,
|
|
256
|
+
self.options,
|
|
257
|
+
)
|
|
258
|
+
return response.data
|
|
259
|
+
|
|
260
|
+
def delete(self, params=None):
|
|
261
|
+
if not isinstance(params, dict):
|
|
262
|
+
params = {}
|
|
263
|
+
|
|
264
|
+
if hasattr(self, "id") and self.id:
|
|
265
|
+
params["id"] = self.id
|
|
266
|
+
else:
|
|
267
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
268
|
+
if "id" not in params:
|
|
269
|
+
raise MissingParameterError("Parameter missing: id")
|
|
270
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
271
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
272
|
+
Api.send_request(
|
|
273
|
+
"DELETE",
|
|
274
|
+
"/siem_http_destinations/{id}".format(id=params["id"]),
|
|
275
|
+
params,
|
|
276
|
+
self.options,
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
def destroy(self, params=None):
|
|
280
|
+
self.delete(params)
|
|
281
|
+
|
|
282
|
+
def save(self):
|
|
283
|
+
if hasattr(self, "id") and self.id:
|
|
284
|
+
new_obj = self.update(self.get_attributes())
|
|
285
|
+
self.set_attributes(new_obj.get_attributes())
|
|
286
|
+
return True
|
|
287
|
+
else:
|
|
288
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
289
|
+
self.set_attributes(new_obj.get_attributes())
|
|
290
|
+
return True
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
# Parameters:
|
|
294
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
295
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
296
|
+
def list(params=None, options=None):
|
|
297
|
+
if not isinstance(params, dict):
|
|
298
|
+
params = {}
|
|
299
|
+
if not isinstance(options, dict):
|
|
300
|
+
options = {}
|
|
301
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
302
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
303
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
304
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
305
|
+
return ListObj(
|
|
306
|
+
SiemHttpDestination, "GET", "/siem_http_destinations", params, options
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def all(params=None, options=None):
|
|
311
|
+
list(params, options)
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
# Parameters:
|
|
315
|
+
# id (required) - int64 - Siem Http Destination ID.
|
|
316
|
+
def find(id, params=None, options=None):
|
|
317
|
+
if not isinstance(params, dict):
|
|
318
|
+
params = {}
|
|
319
|
+
if not isinstance(options, dict):
|
|
320
|
+
options = {}
|
|
321
|
+
params["id"] = id
|
|
322
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
323
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
324
|
+
if "id" not in params:
|
|
325
|
+
raise MissingParameterError("Parameter missing: id")
|
|
326
|
+
response, options = Api.send_request(
|
|
327
|
+
"GET",
|
|
328
|
+
"/siem_http_destinations/{id}".format(id=params["id"]),
|
|
329
|
+
params,
|
|
330
|
+
options,
|
|
331
|
+
)
|
|
332
|
+
return SiemHttpDestination(response.data, options)
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def get(id, params=None, options=None):
|
|
336
|
+
find(id, params, options)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# Parameters:
|
|
340
|
+
# name - string - Name for this Destination
|
|
341
|
+
# additional_headers - object - Additional HTTP Headers included in calls to the destination URL
|
|
342
|
+
# sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
|
|
343
|
+
# generic_payload_type - string - Applicable only for destination type: generic. Indicates the type of HTTP body. Can be json_newline or json_array. json_newline is multiple log entries as JSON separated by newlines. json_array is a single JSON array containing multiple log entries as JSON.
|
|
344
|
+
# file_destination_path - string - Applicable only for destination type: file. Destination folder path on Files.com.
|
|
345
|
+
# file_format - string - Applicable only for destination type: file. Generated file format.
|
|
346
|
+
# file_interval_minutes - int64 - Applicable only for destination type: file. Interval, in minutes, between file deliveries. Valid values are 5, 10, 15, 20, 30, 60, 90, 180, 240, 360.
|
|
347
|
+
# splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
348
|
+
# azure_dcr_immutable_id - string - Applicable only for destination types: azure, azure_legacy. Immutable ID of the Data Collection Rule.
|
|
349
|
+
# azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
|
|
350
|
+
# azure_oauth_client_credentials_tenant_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Tenant ID.
|
|
351
|
+
# azure_oauth_client_credentials_client_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client ID.
|
|
352
|
+
# azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
|
|
353
|
+
# qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
|
|
354
|
+
# qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
355
|
+
# solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
356
|
+
# new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
357
|
+
# datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
358
|
+
# sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
|
|
359
|
+
# ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
|
|
360
|
+
# web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
|
|
361
|
+
# sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
|
|
362
|
+
# outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
|
|
363
|
+
# automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
|
|
364
|
+
# api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
|
|
365
|
+
# public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
|
|
366
|
+
# email_send_enabled - boolean - Whether or not sending is enabled for email logs.
|
|
367
|
+
# exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
|
|
368
|
+
# settings_change_send_enabled - boolean - Whether or not sending is enabled for settings_change logs.
|
|
369
|
+
# destination_type (required) - string - Destination Type
|
|
370
|
+
# destination_url - string - Destination Url
|
|
371
|
+
def create(params=None, options=None):
|
|
372
|
+
if not isinstance(params, dict):
|
|
373
|
+
params = {}
|
|
374
|
+
if not isinstance(options, dict):
|
|
375
|
+
options = {}
|
|
376
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
377
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
378
|
+
if "additional_headers" in params and not isinstance(
|
|
379
|
+
params["additional_headers"], dict
|
|
380
|
+
):
|
|
381
|
+
raise InvalidParameterError(
|
|
382
|
+
"Bad parameter: additional_headers must be an dict"
|
|
383
|
+
)
|
|
384
|
+
if "sending_active" in params and not isinstance(
|
|
385
|
+
params["sending_active"], bool
|
|
386
|
+
):
|
|
387
|
+
raise InvalidParameterError(
|
|
388
|
+
"Bad parameter: sending_active must be an bool"
|
|
389
|
+
)
|
|
390
|
+
if "generic_payload_type" in params and not isinstance(
|
|
391
|
+
params["generic_payload_type"], str
|
|
392
|
+
):
|
|
393
|
+
raise InvalidParameterError(
|
|
394
|
+
"Bad parameter: generic_payload_type must be an str"
|
|
395
|
+
)
|
|
396
|
+
if "file_destination_path" in params and not isinstance(
|
|
397
|
+
params["file_destination_path"], str
|
|
398
|
+
):
|
|
399
|
+
raise InvalidParameterError(
|
|
400
|
+
"Bad parameter: file_destination_path must be an str"
|
|
401
|
+
)
|
|
402
|
+
if "file_format" in params and not isinstance(params["file_format"], str):
|
|
403
|
+
raise InvalidParameterError(
|
|
404
|
+
"Bad parameter: file_format must be an str"
|
|
405
|
+
)
|
|
406
|
+
if "file_interval_minutes" in params and not isinstance(
|
|
407
|
+
params["file_interval_minutes"], int
|
|
408
|
+
):
|
|
409
|
+
raise InvalidParameterError(
|
|
410
|
+
"Bad parameter: file_interval_minutes must be an int"
|
|
411
|
+
)
|
|
412
|
+
if "splunk_token" in params and not isinstance(
|
|
413
|
+
params["splunk_token"], str
|
|
414
|
+
):
|
|
415
|
+
raise InvalidParameterError(
|
|
416
|
+
"Bad parameter: splunk_token must be an str"
|
|
417
|
+
)
|
|
418
|
+
if "azure_dcr_immutable_id" in params and not isinstance(
|
|
419
|
+
params["azure_dcr_immutable_id"], str
|
|
420
|
+
):
|
|
421
|
+
raise InvalidParameterError(
|
|
422
|
+
"Bad parameter: azure_dcr_immutable_id must be an str"
|
|
423
|
+
)
|
|
424
|
+
if "azure_stream_name" in params and not isinstance(
|
|
425
|
+
params["azure_stream_name"], str
|
|
426
|
+
):
|
|
427
|
+
raise InvalidParameterError(
|
|
428
|
+
"Bad parameter: azure_stream_name must be an str"
|
|
429
|
+
)
|
|
430
|
+
if (
|
|
431
|
+
"azure_oauth_client_credentials_tenant_id" in params
|
|
432
|
+
and not isinstance(
|
|
433
|
+
params["azure_oauth_client_credentials_tenant_id"], str
|
|
434
|
+
)
|
|
435
|
+
):
|
|
436
|
+
raise InvalidParameterError(
|
|
437
|
+
"Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
|
|
438
|
+
)
|
|
439
|
+
if (
|
|
440
|
+
"azure_oauth_client_credentials_client_id" in params
|
|
441
|
+
and not isinstance(
|
|
442
|
+
params["azure_oauth_client_credentials_client_id"], str
|
|
443
|
+
)
|
|
444
|
+
):
|
|
445
|
+
raise InvalidParameterError(
|
|
446
|
+
"Bad parameter: azure_oauth_client_credentials_client_id must be an str"
|
|
447
|
+
)
|
|
448
|
+
if (
|
|
449
|
+
"azure_oauth_client_credentials_client_secret" in params
|
|
450
|
+
and not isinstance(
|
|
451
|
+
params["azure_oauth_client_credentials_client_secret"], str
|
|
452
|
+
)
|
|
453
|
+
):
|
|
454
|
+
raise InvalidParameterError(
|
|
455
|
+
"Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
|
|
456
|
+
)
|
|
457
|
+
if "qradar_username" in params and not isinstance(
|
|
458
|
+
params["qradar_username"], str
|
|
459
|
+
):
|
|
460
|
+
raise InvalidParameterError(
|
|
461
|
+
"Bad parameter: qradar_username must be an str"
|
|
462
|
+
)
|
|
463
|
+
if "qradar_password" in params and not isinstance(
|
|
464
|
+
params["qradar_password"], str
|
|
465
|
+
):
|
|
466
|
+
raise InvalidParameterError(
|
|
467
|
+
"Bad parameter: qradar_password must be an str"
|
|
468
|
+
)
|
|
469
|
+
if "solar_winds_token" in params and not isinstance(
|
|
470
|
+
params["solar_winds_token"], str
|
|
471
|
+
):
|
|
472
|
+
raise InvalidParameterError(
|
|
473
|
+
"Bad parameter: solar_winds_token must be an str"
|
|
474
|
+
)
|
|
475
|
+
if "new_relic_api_key" in params and not isinstance(
|
|
476
|
+
params["new_relic_api_key"], str
|
|
477
|
+
):
|
|
478
|
+
raise InvalidParameterError(
|
|
479
|
+
"Bad parameter: new_relic_api_key must be an str"
|
|
480
|
+
)
|
|
481
|
+
if "datadog_api_key" in params and not isinstance(
|
|
482
|
+
params["datadog_api_key"], str
|
|
483
|
+
):
|
|
484
|
+
raise InvalidParameterError(
|
|
485
|
+
"Bad parameter: datadog_api_key must be an str"
|
|
486
|
+
)
|
|
487
|
+
if "sftp_action_send_enabled" in params and not isinstance(
|
|
488
|
+
params["sftp_action_send_enabled"], bool
|
|
489
|
+
):
|
|
490
|
+
raise InvalidParameterError(
|
|
491
|
+
"Bad parameter: sftp_action_send_enabled must be an bool"
|
|
492
|
+
)
|
|
493
|
+
if "ftp_action_send_enabled" in params and not isinstance(
|
|
494
|
+
params["ftp_action_send_enabled"], bool
|
|
495
|
+
):
|
|
496
|
+
raise InvalidParameterError(
|
|
497
|
+
"Bad parameter: ftp_action_send_enabled must be an bool"
|
|
498
|
+
)
|
|
499
|
+
if "web_dav_action_send_enabled" in params and not isinstance(
|
|
500
|
+
params["web_dav_action_send_enabled"], bool
|
|
501
|
+
):
|
|
502
|
+
raise InvalidParameterError(
|
|
503
|
+
"Bad parameter: web_dav_action_send_enabled must be an bool"
|
|
504
|
+
)
|
|
505
|
+
if "sync_send_enabled" in params and not isinstance(
|
|
506
|
+
params["sync_send_enabled"], bool
|
|
507
|
+
):
|
|
508
|
+
raise InvalidParameterError(
|
|
509
|
+
"Bad parameter: sync_send_enabled must be an bool"
|
|
510
|
+
)
|
|
511
|
+
if "outbound_connection_send_enabled" in params and not isinstance(
|
|
512
|
+
params["outbound_connection_send_enabled"], bool
|
|
513
|
+
):
|
|
514
|
+
raise InvalidParameterError(
|
|
515
|
+
"Bad parameter: outbound_connection_send_enabled must be an bool"
|
|
516
|
+
)
|
|
517
|
+
if "automation_send_enabled" in params and not isinstance(
|
|
518
|
+
params["automation_send_enabled"], bool
|
|
519
|
+
):
|
|
520
|
+
raise InvalidParameterError(
|
|
521
|
+
"Bad parameter: automation_send_enabled must be an bool"
|
|
522
|
+
)
|
|
523
|
+
if "api_request_send_enabled" in params and not isinstance(
|
|
524
|
+
params["api_request_send_enabled"], bool
|
|
525
|
+
):
|
|
526
|
+
raise InvalidParameterError(
|
|
527
|
+
"Bad parameter: api_request_send_enabled must be an bool"
|
|
528
|
+
)
|
|
529
|
+
if "public_hosting_request_send_enabled" in params and not isinstance(
|
|
530
|
+
params["public_hosting_request_send_enabled"], bool
|
|
531
|
+
):
|
|
532
|
+
raise InvalidParameterError(
|
|
533
|
+
"Bad parameter: public_hosting_request_send_enabled must be an bool"
|
|
534
|
+
)
|
|
535
|
+
if "email_send_enabled" in params and not isinstance(
|
|
536
|
+
params["email_send_enabled"], bool
|
|
537
|
+
):
|
|
538
|
+
raise InvalidParameterError(
|
|
539
|
+
"Bad parameter: email_send_enabled must be an bool"
|
|
540
|
+
)
|
|
541
|
+
if "exavault_api_request_send_enabled" in params and not isinstance(
|
|
542
|
+
params["exavault_api_request_send_enabled"], bool
|
|
543
|
+
):
|
|
544
|
+
raise InvalidParameterError(
|
|
545
|
+
"Bad parameter: exavault_api_request_send_enabled must be an bool"
|
|
546
|
+
)
|
|
547
|
+
if "settings_change_send_enabled" in params and not isinstance(
|
|
548
|
+
params["settings_change_send_enabled"], bool
|
|
549
|
+
):
|
|
550
|
+
raise InvalidParameterError(
|
|
551
|
+
"Bad parameter: settings_change_send_enabled must be an bool"
|
|
552
|
+
)
|
|
553
|
+
if "destination_type" in params and not isinstance(
|
|
554
|
+
params["destination_type"], str
|
|
555
|
+
):
|
|
556
|
+
raise InvalidParameterError(
|
|
557
|
+
"Bad parameter: destination_type must be an str"
|
|
558
|
+
)
|
|
559
|
+
if "destination_url" in params and not isinstance(
|
|
560
|
+
params["destination_url"], str
|
|
561
|
+
):
|
|
562
|
+
raise InvalidParameterError(
|
|
563
|
+
"Bad parameter: destination_url must be an str"
|
|
564
|
+
)
|
|
565
|
+
if "destination_type" not in params:
|
|
566
|
+
raise MissingParameterError("Parameter missing: destination_type")
|
|
567
|
+
response, options = Api.send_request(
|
|
568
|
+
"POST", "/siem_http_destinations", params, options
|
|
569
|
+
)
|
|
570
|
+
return SiemHttpDestination(response.data, options)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
# Parameters:
|
|
574
|
+
# siem_http_destination_id - int64 - SIEM HTTP Destination ID
|
|
575
|
+
# destination_type - string - Destination Type
|
|
576
|
+
# destination_url - string - Destination Url
|
|
577
|
+
# name - string - Name for this Destination
|
|
578
|
+
# additional_headers - object - Additional HTTP Headers included in calls to the destination URL
|
|
579
|
+
# sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
|
|
580
|
+
# generic_payload_type - string - Applicable only for destination type: generic. Indicates the type of HTTP body. Can be json_newline or json_array. json_newline is multiple log entries as JSON separated by newlines. json_array is a single JSON array containing multiple log entries as JSON.
|
|
581
|
+
# file_destination_path - string - Applicable only for destination type: file. Destination folder path on Files.com.
|
|
582
|
+
# file_format - string - Applicable only for destination type: file. Generated file format.
|
|
583
|
+
# file_interval_minutes - int64 - Applicable only for destination type: file. Interval, in minutes, between file deliveries. Valid values are 5, 10, 15, 20, 30, 60, 90, 180, 240, 360.
|
|
584
|
+
# splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
585
|
+
# azure_dcr_immutable_id - string - Applicable only for destination types: azure, azure_legacy. Immutable ID of the Data Collection Rule.
|
|
586
|
+
# azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
|
|
587
|
+
# azure_oauth_client_credentials_tenant_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Tenant ID.
|
|
588
|
+
# azure_oauth_client_credentials_client_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client ID.
|
|
589
|
+
# azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
|
|
590
|
+
# qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
|
|
591
|
+
# qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
592
|
+
# solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
593
|
+
# new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
594
|
+
# datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
595
|
+
# sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
|
|
596
|
+
# ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
|
|
597
|
+
# web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
|
|
598
|
+
# sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
|
|
599
|
+
# outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
|
|
600
|
+
# automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
|
|
601
|
+
# api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
|
|
602
|
+
# public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
|
|
603
|
+
# email_send_enabled - boolean - Whether or not sending is enabled for email logs.
|
|
604
|
+
# exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
|
|
605
|
+
# settings_change_send_enabled - boolean - Whether or not sending is enabled for settings_change logs.
|
|
606
|
+
def send_test_entry(params=None, options=None):
|
|
607
|
+
if not isinstance(params, dict):
|
|
608
|
+
params = {}
|
|
609
|
+
if not isinstance(options, dict):
|
|
610
|
+
options = {}
|
|
611
|
+
if "siem_http_destination_id" in params and not isinstance(
|
|
612
|
+
params["siem_http_destination_id"], int
|
|
613
|
+
):
|
|
614
|
+
raise InvalidParameterError(
|
|
615
|
+
"Bad parameter: siem_http_destination_id must be an int"
|
|
616
|
+
)
|
|
617
|
+
if "destination_type" in params and not isinstance(
|
|
618
|
+
params["destination_type"], str
|
|
619
|
+
):
|
|
620
|
+
raise InvalidParameterError(
|
|
621
|
+
"Bad parameter: destination_type must be an str"
|
|
622
|
+
)
|
|
623
|
+
if "destination_url" in params and not isinstance(
|
|
624
|
+
params["destination_url"], str
|
|
625
|
+
):
|
|
626
|
+
raise InvalidParameterError(
|
|
627
|
+
"Bad parameter: destination_url must be an str"
|
|
628
|
+
)
|
|
629
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
630
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
631
|
+
if "additional_headers" in params and not isinstance(
|
|
632
|
+
params["additional_headers"], dict
|
|
633
|
+
):
|
|
634
|
+
raise InvalidParameterError(
|
|
635
|
+
"Bad parameter: additional_headers must be an dict"
|
|
636
|
+
)
|
|
637
|
+
if "sending_active" in params and not isinstance(
|
|
638
|
+
params["sending_active"], bool
|
|
639
|
+
):
|
|
640
|
+
raise InvalidParameterError(
|
|
641
|
+
"Bad parameter: sending_active must be an bool"
|
|
642
|
+
)
|
|
643
|
+
if "generic_payload_type" in params and not isinstance(
|
|
644
|
+
params["generic_payload_type"], str
|
|
645
|
+
):
|
|
646
|
+
raise InvalidParameterError(
|
|
647
|
+
"Bad parameter: generic_payload_type must be an str"
|
|
648
|
+
)
|
|
649
|
+
if "file_destination_path" in params and not isinstance(
|
|
650
|
+
params["file_destination_path"], str
|
|
651
|
+
):
|
|
652
|
+
raise InvalidParameterError(
|
|
653
|
+
"Bad parameter: file_destination_path must be an str"
|
|
654
|
+
)
|
|
655
|
+
if "file_format" in params and not isinstance(params["file_format"], str):
|
|
656
|
+
raise InvalidParameterError(
|
|
657
|
+
"Bad parameter: file_format must be an str"
|
|
658
|
+
)
|
|
659
|
+
if "file_interval_minutes" in params and not isinstance(
|
|
660
|
+
params["file_interval_minutes"], int
|
|
661
|
+
):
|
|
662
|
+
raise InvalidParameterError(
|
|
663
|
+
"Bad parameter: file_interval_minutes must be an int"
|
|
664
|
+
)
|
|
665
|
+
if "splunk_token" in params and not isinstance(
|
|
666
|
+
params["splunk_token"], str
|
|
667
|
+
):
|
|
668
|
+
raise InvalidParameterError(
|
|
669
|
+
"Bad parameter: splunk_token must be an str"
|
|
670
|
+
)
|
|
671
|
+
if "azure_dcr_immutable_id" in params and not isinstance(
|
|
672
|
+
params["azure_dcr_immutable_id"], str
|
|
673
|
+
):
|
|
674
|
+
raise InvalidParameterError(
|
|
675
|
+
"Bad parameter: azure_dcr_immutable_id must be an str"
|
|
676
|
+
)
|
|
677
|
+
if "azure_stream_name" in params and not isinstance(
|
|
678
|
+
params["azure_stream_name"], str
|
|
679
|
+
):
|
|
680
|
+
raise InvalidParameterError(
|
|
681
|
+
"Bad parameter: azure_stream_name must be an str"
|
|
682
|
+
)
|
|
683
|
+
if (
|
|
684
|
+
"azure_oauth_client_credentials_tenant_id" in params
|
|
685
|
+
and not isinstance(
|
|
686
|
+
params["azure_oauth_client_credentials_tenant_id"], str
|
|
687
|
+
)
|
|
688
|
+
):
|
|
689
|
+
raise InvalidParameterError(
|
|
690
|
+
"Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
|
|
691
|
+
)
|
|
692
|
+
if (
|
|
693
|
+
"azure_oauth_client_credentials_client_id" in params
|
|
694
|
+
and not isinstance(
|
|
695
|
+
params["azure_oauth_client_credentials_client_id"], str
|
|
696
|
+
)
|
|
697
|
+
):
|
|
698
|
+
raise InvalidParameterError(
|
|
699
|
+
"Bad parameter: azure_oauth_client_credentials_client_id must be an str"
|
|
700
|
+
)
|
|
701
|
+
if (
|
|
702
|
+
"azure_oauth_client_credentials_client_secret" in params
|
|
703
|
+
and not isinstance(
|
|
704
|
+
params["azure_oauth_client_credentials_client_secret"], str
|
|
705
|
+
)
|
|
706
|
+
):
|
|
707
|
+
raise InvalidParameterError(
|
|
708
|
+
"Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
|
|
709
|
+
)
|
|
710
|
+
if "qradar_username" in params and not isinstance(
|
|
711
|
+
params["qradar_username"], str
|
|
712
|
+
):
|
|
713
|
+
raise InvalidParameterError(
|
|
714
|
+
"Bad parameter: qradar_username must be an str"
|
|
715
|
+
)
|
|
716
|
+
if "qradar_password" in params and not isinstance(
|
|
717
|
+
params["qradar_password"], str
|
|
718
|
+
):
|
|
719
|
+
raise InvalidParameterError(
|
|
720
|
+
"Bad parameter: qradar_password must be an str"
|
|
721
|
+
)
|
|
722
|
+
if "solar_winds_token" in params and not isinstance(
|
|
723
|
+
params["solar_winds_token"], str
|
|
724
|
+
):
|
|
725
|
+
raise InvalidParameterError(
|
|
726
|
+
"Bad parameter: solar_winds_token must be an str"
|
|
727
|
+
)
|
|
728
|
+
if "new_relic_api_key" in params and not isinstance(
|
|
729
|
+
params["new_relic_api_key"], str
|
|
730
|
+
):
|
|
731
|
+
raise InvalidParameterError(
|
|
732
|
+
"Bad parameter: new_relic_api_key must be an str"
|
|
733
|
+
)
|
|
734
|
+
if "datadog_api_key" in params and not isinstance(
|
|
735
|
+
params["datadog_api_key"], str
|
|
736
|
+
):
|
|
737
|
+
raise InvalidParameterError(
|
|
738
|
+
"Bad parameter: datadog_api_key must be an str"
|
|
739
|
+
)
|
|
740
|
+
if "sftp_action_send_enabled" in params and not isinstance(
|
|
741
|
+
params["sftp_action_send_enabled"], bool
|
|
742
|
+
):
|
|
743
|
+
raise InvalidParameterError(
|
|
744
|
+
"Bad parameter: sftp_action_send_enabled must be an bool"
|
|
745
|
+
)
|
|
746
|
+
if "ftp_action_send_enabled" in params and not isinstance(
|
|
747
|
+
params["ftp_action_send_enabled"], bool
|
|
748
|
+
):
|
|
749
|
+
raise InvalidParameterError(
|
|
750
|
+
"Bad parameter: ftp_action_send_enabled must be an bool"
|
|
751
|
+
)
|
|
752
|
+
if "web_dav_action_send_enabled" in params and not isinstance(
|
|
753
|
+
params["web_dav_action_send_enabled"], bool
|
|
754
|
+
):
|
|
755
|
+
raise InvalidParameterError(
|
|
756
|
+
"Bad parameter: web_dav_action_send_enabled must be an bool"
|
|
757
|
+
)
|
|
758
|
+
if "sync_send_enabled" in params and not isinstance(
|
|
759
|
+
params["sync_send_enabled"], bool
|
|
760
|
+
):
|
|
761
|
+
raise InvalidParameterError(
|
|
762
|
+
"Bad parameter: sync_send_enabled must be an bool"
|
|
763
|
+
)
|
|
764
|
+
if "outbound_connection_send_enabled" in params and not isinstance(
|
|
765
|
+
params["outbound_connection_send_enabled"], bool
|
|
766
|
+
):
|
|
767
|
+
raise InvalidParameterError(
|
|
768
|
+
"Bad parameter: outbound_connection_send_enabled must be an bool"
|
|
769
|
+
)
|
|
770
|
+
if "automation_send_enabled" in params and not isinstance(
|
|
771
|
+
params["automation_send_enabled"], bool
|
|
772
|
+
):
|
|
773
|
+
raise InvalidParameterError(
|
|
774
|
+
"Bad parameter: automation_send_enabled must be an bool"
|
|
775
|
+
)
|
|
776
|
+
if "api_request_send_enabled" in params and not isinstance(
|
|
777
|
+
params["api_request_send_enabled"], bool
|
|
778
|
+
):
|
|
779
|
+
raise InvalidParameterError(
|
|
780
|
+
"Bad parameter: api_request_send_enabled must be an bool"
|
|
781
|
+
)
|
|
782
|
+
if "public_hosting_request_send_enabled" in params and not isinstance(
|
|
783
|
+
params["public_hosting_request_send_enabled"], bool
|
|
784
|
+
):
|
|
785
|
+
raise InvalidParameterError(
|
|
786
|
+
"Bad parameter: public_hosting_request_send_enabled must be an bool"
|
|
787
|
+
)
|
|
788
|
+
if "email_send_enabled" in params and not isinstance(
|
|
789
|
+
params["email_send_enabled"], bool
|
|
790
|
+
):
|
|
791
|
+
raise InvalidParameterError(
|
|
792
|
+
"Bad parameter: email_send_enabled must be an bool"
|
|
793
|
+
)
|
|
794
|
+
if "exavault_api_request_send_enabled" in params and not isinstance(
|
|
795
|
+
params["exavault_api_request_send_enabled"], bool
|
|
796
|
+
):
|
|
797
|
+
raise InvalidParameterError(
|
|
798
|
+
"Bad parameter: exavault_api_request_send_enabled must be an bool"
|
|
799
|
+
)
|
|
800
|
+
if "settings_change_send_enabled" in params and not isinstance(
|
|
801
|
+
params["settings_change_send_enabled"], bool
|
|
802
|
+
):
|
|
803
|
+
raise InvalidParameterError(
|
|
804
|
+
"Bad parameter: settings_change_send_enabled must be an bool"
|
|
805
|
+
)
|
|
806
|
+
Api.send_request(
|
|
807
|
+
"POST", "/siem_http_destinations/send_test_entry", params, options
|
|
808
|
+
)
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
# Parameters:
|
|
812
|
+
# name - string - Name for this Destination
|
|
813
|
+
# additional_headers - object - Additional HTTP Headers included in calls to the destination URL
|
|
814
|
+
# sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
|
|
815
|
+
# generic_payload_type - string - Applicable only for destination type: generic. Indicates the type of HTTP body. Can be json_newline or json_array. json_newline is multiple log entries as JSON separated by newlines. json_array is a single JSON array containing multiple log entries as JSON.
|
|
816
|
+
# file_destination_path - string - Applicable only for destination type: file. Destination folder path on Files.com.
|
|
817
|
+
# file_format - string - Applicable only for destination type: file. Generated file format.
|
|
818
|
+
# file_interval_minutes - int64 - Applicable only for destination type: file. Interval, in minutes, between file deliveries. Valid values are 5, 10, 15, 20, 30, 60, 90, 180, 240, 360.
|
|
819
|
+
# splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
|
|
820
|
+
# azure_dcr_immutable_id - string - Applicable only for destination types: azure, azure_legacy. Immutable ID of the Data Collection Rule.
|
|
821
|
+
# azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
|
|
822
|
+
# azure_oauth_client_credentials_tenant_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Tenant ID.
|
|
823
|
+
# azure_oauth_client_credentials_client_id - string - Applicable only for destination types: azure, azure_legacy. Client Credentials OAuth Client ID.
|
|
824
|
+
# azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
|
|
825
|
+
# qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
|
|
826
|
+
# qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
|
|
827
|
+
# solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
|
|
828
|
+
# new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
|
|
829
|
+
# datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
|
|
830
|
+
# sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
|
|
831
|
+
# ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
|
|
832
|
+
# web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
|
|
833
|
+
# sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
|
|
834
|
+
# outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
|
|
835
|
+
# automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
|
|
836
|
+
# api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
|
|
837
|
+
# public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
|
|
838
|
+
# email_send_enabled - boolean - Whether or not sending is enabled for email logs.
|
|
839
|
+
# exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
|
|
840
|
+
# settings_change_send_enabled - boolean - Whether or not sending is enabled for settings_change logs.
|
|
841
|
+
# destination_type - string - Destination Type
|
|
842
|
+
# destination_url - string - Destination Url
|
|
843
|
+
def update(id, params=None, options=None):
|
|
844
|
+
if not isinstance(params, dict):
|
|
845
|
+
params = {}
|
|
846
|
+
if not isinstance(options, dict):
|
|
847
|
+
options = {}
|
|
848
|
+
params["id"] = id
|
|
849
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
850
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
851
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
852
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
853
|
+
if "additional_headers" in params and not isinstance(
|
|
854
|
+
params["additional_headers"], dict
|
|
855
|
+
):
|
|
856
|
+
raise InvalidParameterError(
|
|
857
|
+
"Bad parameter: additional_headers must be an dict"
|
|
858
|
+
)
|
|
859
|
+
if "sending_active" in params and not isinstance(
|
|
860
|
+
params["sending_active"], bool
|
|
861
|
+
):
|
|
862
|
+
raise InvalidParameterError(
|
|
863
|
+
"Bad parameter: sending_active must be an bool"
|
|
864
|
+
)
|
|
865
|
+
if "generic_payload_type" in params and not isinstance(
|
|
866
|
+
params["generic_payload_type"], str
|
|
867
|
+
):
|
|
868
|
+
raise InvalidParameterError(
|
|
869
|
+
"Bad parameter: generic_payload_type must be an str"
|
|
870
|
+
)
|
|
871
|
+
if "file_destination_path" in params and not isinstance(
|
|
872
|
+
params["file_destination_path"], str
|
|
873
|
+
):
|
|
874
|
+
raise InvalidParameterError(
|
|
875
|
+
"Bad parameter: file_destination_path must be an str"
|
|
876
|
+
)
|
|
877
|
+
if "file_format" in params and not isinstance(params["file_format"], str):
|
|
878
|
+
raise InvalidParameterError(
|
|
879
|
+
"Bad parameter: file_format must be an str"
|
|
880
|
+
)
|
|
881
|
+
if "file_interval_minutes" in params and not isinstance(
|
|
882
|
+
params["file_interval_minutes"], int
|
|
883
|
+
):
|
|
884
|
+
raise InvalidParameterError(
|
|
885
|
+
"Bad parameter: file_interval_minutes must be an int"
|
|
886
|
+
)
|
|
887
|
+
if "splunk_token" in params and not isinstance(
|
|
888
|
+
params["splunk_token"], str
|
|
889
|
+
):
|
|
890
|
+
raise InvalidParameterError(
|
|
891
|
+
"Bad parameter: splunk_token must be an str"
|
|
892
|
+
)
|
|
893
|
+
if "azure_dcr_immutable_id" in params and not isinstance(
|
|
894
|
+
params["azure_dcr_immutable_id"], str
|
|
895
|
+
):
|
|
896
|
+
raise InvalidParameterError(
|
|
897
|
+
"Bad parameter: azure_dcr_immutable_id must be an str"
|
|
898
|
+
)
|
|
899
|
+
if "azure_stream_name" in params and not isinstance(
|
|
900
|
+
params["azure_stream_name"], str
|
|
901
|
+
):
|
|
902
|
+
raise InvalidParameterError(
|
|
903
|
+
"Bad parameter: azure_stream_name must be an str"
|
|
904
|
+
)
|
|
905
|
+
if (
|
|
906
|
+
"azure_oauth_client_credentials_tenant_id" in params
|
|
907
|
+
and not isinstance(
|
|
908
|
+
params["azure_oauth_client_credentials_tenant_id"], str
|
|
909
|
+
)
|
|
910
|
+
):
|
|
911
|
+
raise InvalidParameterError(
|
|
912
|
+
"Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
|
|
913
|
+
)
|
|
914
|
+
if (
|
|
915
|
+
"azure_oauth_client_credentials_client_id" in params
|
|
916
|
+
and not isinstance(
|
|
917
|
+
params["azure_oauth_client_credentials_client_id"], str
|
|
918
|
+
)
|
|
919
|
+
):
|
|
920
|
+
raise InvalidParameterError(
|
|
921
|
+
"Bad parameter: azure_oauth_client_credentials_client_id must be an str"
|
|
922
|
+
)
|
|
923
|
+
if (
|
|
924
|
+
"azure_oauth_client_credentials_client_secret" in params
|
|
925
|
+
and not isinstance(
|
|
926
|
+
params["azure_oauth_client_credentials_client_secret"], str
|
|
927
|
+
)
|
|
928
|
+
):
|
|
929
|
+
raise InvalidParameterError(
|
|
930
|
+
"Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
|
|
931
|
+
)
|
|
932
|
+
if "qradar_username" in params and not isinstance(
|
|
933
|
+
params["qradar_username"], str
|
|
934
|
+
):
|
|
935
|
+
raise InvalidParameterError(
|
|
936
|
+
"Bad parameter: qradar_username must be an str"
|
|
937
|
+
)
|
|
938
|
+
if "qradar_password" in params and not isinstance(
|
|
939
|
+
params["qradar_password"], str
|
|
940
|
+
):
|
|
941
|
+
raise InvalidParameterError(
|
|
942
|
+
"Bad parameter: qradar_password must be an str"
|
|
943
|
+
)
|
|
944
|
+
if "solar_winds_token" in params and not isinstance(
|
|
945
|
+
params["solar_winds_token"], str
|
|
946
|
+
):
|
|
947
|
+
raise InvalidParameterError(
|
|
948
|
+
"Bad parameter: solar_winds_token must be an str"
|
|
949
|
+
)
|
|
950
|
+
if "new_relic_api_key" in params and not isinstance(
|
|
951
|
+
params["new_relic_api_key"], str
|
|
952
|
+
):
|
|
953
|
+
raise InvalidParameterError(
|
|
954
|
+
"Bad parameter: new_relic_api_key must be an str"
|
|
955
|
+
)
|
|
956
|
+
if "datadog_api_key" in params and not isinstance(
|
|
957
|
+
params["datadog_api_key"], str
|
|
958
|
+
):
|
|
959
|
+
raise InvalidParameterError(
|
|
960
|
+
"Bad parameter: datadog_api_key must be an str"
|
|
961
|
+
)
|
|
962
|
+
if "sftp_action_send_enabled" in params and not isinstance(
|
|
963
|
+
params["sftp_action_send_enabled"], bool
|
|
964
|
+
):
|
|
965
|
+
raise InvalidParameterError(
|
|
966
|
+
"Bad parameter: sftp_action_send_enabled must be an bool"
|
|
967
|
+
)
|
|
968
|
+
if "ftp_action_send_enabled" in params and not isinstance(
|
|
969
|
+
params["ftp_action_send_enabled"], bool
|
|
970
|
+
):
|
|
971
|
+
raise InvalidParameterError(
|
|
972
|
+
"Bad parameter: ftp_action_send_enabled must be an bool"
|
|
973
|
+
)
|
|
974
|
+
if "web_dav_action_send_enabled" in params and not isinstance(
|
|
975
|
+
params["web_dav_action_send_enabled"], bool
|
|
976
|
+
):
|
|
977
|
+
raise InvalidParameterError(
|
|
978
|
+
"Bad parameter: web_dav_action_send_enabled must be an bool"
|
|
979
|
+
)
|
|
980
|
+
if "sync_send_enabled" in params and not isinstance(
|
|
981
|
+
params["sync_send_enabled"], bool
|
|
982
|
+
):
|
|
983
|
+
raise InvalidParameterError(
|
|
984
|
+
"Bad parameter: sync_send_enabled must be an bool"
|
|
985
|
+
)
|
|
986
|
+
if "outbound_connection_send_enabled" in params and not isinstance(
|
|
987
|
+
params["outbound_connection_send_enabled"], bool
|
|
988
|
+
):
|
|
989
|
+
raise InvalidParameterError(
|
|
990
|
+
"Bad parameter: outbound_connection_send_enabled must be an bool"
|
|
991
|
+
)
|
|
992
|
+
if "automation_send_enabled" in params and not isinstance(
|
|
993
|
+
params["automation_send_enabled"], bool
|
|
994
|
+
):
|
|
995
|
+
raise InvalidParameterError(
|
|
996
|
+
"Bad parameter: automation_send_enabled must be an bool"
|
|
997
|
+
)
|
|
998
|
+
if "api_request_send_enabled" in params and not isinstance(
|
|
999
|
+
params["api_request_send_enabled"], bool
|
|
1000
|
+
):
|
|
1001
|
+
raise InvalidParameterError(
|
|
1002
|
+
"Bad parameter: api_request_send_enabled must be an bool"
|
|
1003
|
+
)
|
|
1004
|
+
if "public_hosting_request_send_enabled" in params and not isinstance(
|
|
1005
|
+
params["public_hosting_request_send_enabled"], bool
|
|
1006
|
+
):
|
|
1007
|
+
raise InvalidParameterError(
|
|
1008
|
+
"Bad parameter: public_hosting_request_send_enabled must be an bool"
|
|
1009
|
+
)
|
|
1010
|
+
if "email_send_enabled" in params and not isinstance(
|
|
1011
|
+
params["email_send_enabled"], bool
|
|
1012
|
+
):
|
|
1013
|
+
raise InvalidParameterError(
|
|
1014
|
+
"Bad parameter: email_send_enabled must be an bool"
|
|
1015
|
+
)
|
|
1016
|
+
if "exavault_api_request_send_enabled" in params and not isinstance(
|
|
1017
|
+
params["exavault_api_request_send_enabled"], bool
|
|
1018
|
+
):
|
|
1019
|
+
raise InvalidParameterError(
|
|
1020
|
+
"Bad parameter: exavault_api_request_send_enabled must be an bool"
|
|
1021
|
+
)
|
|
1022
|
+
if "settings_change_send_enabled" in params and not isinstance(
|
|
1023
|
+
params["settings_change_send_enabled"], bool
|
|
1024
|
+
):
|
|
1025
|
+
raise InvalidParameterError(
|
|
1026
|
+
"Bad parameter: settings_change_send_enabled must be an bool"
|
|
1027
|
+
)
|
|
1028
|
+
if "destination_type" in params and not isinstance(
|
|
1029
|
+
params["destination_type"], str
|
|
1030
|
+
):
|
|
1031
|
+
raise InvalidParameterError(
|
|
1032
|
+
"Bad parameter: destination_type must be an str"
|
|
1033
|
+
)
|
|
1034
|
+
if "destination_url" in params and not isinstance(
|
|
1035
|
+
params["destination_url"], str
|
|
1036
|
+
):
|
|
1037
|
+
raise InvalidParameterError(
|
|
1038
|
+
"Bad parameter: destination_url must be an str"
|
|
1039
|
+
)
|
|
1040
|
+
if "id" not in params:
|
|
1041
|
+
raise MissingParameterError("Parameter missing: id")
|
|
1042
|
+
response, options = Api.send_request(
|
|
1043
|
+
"PATCH",
|
|
1044
|
+
"/siem_http_destinations/{id}".format(id=params["id"]),
|
|
1045
|
+
params,
|
|
1046
|
+
options,
|
|
1047
|
+
)
|
|
1048
|
+
return SiemHttpDestination(response.data, options)
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
def delete(id, params=None, options=None):
|
|
1052
|
+
if not isinstance(params, dict):
|
|
1053
|
+
params = {}
|
|
1054
|
+
if not isinstance(options, dict):
|
|
1055
|
+
options = {}
|
|
1056
|
+
params["id"] = id
|
|
1057
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
1058
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
1059
|
+
if "id" not in params:
|
|
1060
|
+
raise MissingParameterError("Parameter missing: id")
|
|
1061
|
+
Api.send_request(
|
|
1062
|
+
"DELETE",
|
|
1063
|
+
"/siem_http_destinations/{id}".format(id=params["id"]),
|
|
1064
|
+
params,
|
|
1065
|
+
options,
|
|
1066
|
+
)
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
def destroy(id, params=None, options=None):
|
|
1070
|
+
delete(id, params, options)
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
def new(*args, **kwargs):
|
|
1074
|
+
return SiemHttpDestination(*args, **kwargs)
|