files-com 1.5.0__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.

Files changed (113) hide show
  1. README.md +682 -0
  2. _VERSION +1 -0
  3. files_com-1.5.0.dist-info/METADATA +694 -0
  4. files_com-1.5.0.dist-info/RECORD +113 -0
  5. files_com-1.5.0.dist-info/WHEEL +5 -0
  6. files_com-1.5.0.dist-info/licenses/LICENSE +21 -0
  7. files_com-1.5.0.dist-info/top_level.txt +1 -0
  8. files_sdk/__init__.py +270 -0
  9. files_sdk/api.py +57 -0
  10. files_sdk/api_client.py +327 -0
  11. files_sdk/error.py +2891 -0
  12. files_sdk/list_obj.py +42 -0
  13. files_sdk/models/__init__.py +104 -0
  14. files_sdk/models/account_line_item.py +51 -0
  15. files_sdk/models/action.py +49 -0
  16. files_sdk/models/action_notification_export.py +147 -0
  17. files_sdk/models/action_notification_export_result.py +88 -0
  18. files_sdk/models/api_key.py +322 -0
  19. files_sdk/models/api_request_log.py +87 -0
  20. files_sdk/models/app.py +89 -0
  21. files_sdk/models/as2_incoming_message.py +123 -0
  22. files_sdk/models/as2_outgoing_message.py +119 -0
  23. files_sdk/models/as2_partner.py +374 -0
  24. files_sdk/models/as2_station.py +271 -0
  25. files_sdk/models/auto.py +36 -0
  26. files_sdk/models/automation.py +691 -0
  27. files_sdk/models/automation_log.py +77 -0
  28. files_sdk/models/automation_run.py +108 -0
  29. files_sdk/models/bandwidth_snapshot.py +91 -0
  30. files_sdk/models/behavior.py +334 -0
  31. files_sdk/models/bundle.py +550 -0
  32. files_sdk/models/bundle_action.py +86 -0
  33. files_sdk/models/bundle_download.py +94 -0
  34. files_sdk/models/bundle_notification.py +217 -0
  35. files_sdk/models/bundle_path.py +37 -0
  36. files_sdk/models/bundle_recipient.py +120 -0
  37. files_sdk/models/bundle_registration.py +79 -0
  38. files_sdk/models/clickwrap.py +268 -0
  39. files_sdk/models/dns_record.py +59 -0
  40. files_sdk/models/email_incoming_message.py +102 -0
  41. files_sdk/models/email_log.py +74 -0
  42. files_sdk/models/errors.py +37 -0
  43. files_sdk/models/exavault_api_request_log.py +85 -0
  44. files_sdk/models/external_event.py +148 -0
  45. files_sdk/models/file.py +791 -0
  46. files_sdk/models/file_action.py +39 -0
  47. files_sdk/models/file_comment.py +191 -0
  48. files_sdk/models/file_comment_reaction.py +125 -0
  49. files_sdk/models/file_migration.py +69 -0
  50. files_sdk/models/file_migration_log.py +78 -0
  51. files_sdk/models/file_upload_part.py +54 -0
  52. files_sdk/models/folder.py +154 -0
  53. files_sdk/models/form_field.py +43 -0
  54. files_sdk/models/form_field_set.py +240 -0
  55. files_sdk/models/ftp_action_log.py +87 -0
  56. files_sdk/models/gpg_key.py +254 -0
  57. files_sdk/models/group.py +276 -0
  58. files_sdk/models/group_user.py +231 -0
  59. files_sdk/models/history.py +236 -0
  60. files_sdk/models/history_export.py +238 -0
  61. files_sdk/models/history_export_result.py +98 -0
  62. files_sdk/models/image.py +37 -0
  63. files_sdk/models/inbox_recipient.py +118 -0
  64. files_sdk/models/inbox_registration.py +79 -0
  65. files_sdk/models/inbox_upload.py +80 -0
  66. files_sdk/models/invoice.py +91 -0
  67. files_sdk/models/invoice_line_item.py +46 -0
  68. files_sdk/models/ip_address.py +119 -0
  69. files_sdk/models/lock.py +158 -0
  70. files_sdk/models/message.py +244 -0
  71. files_sdk/models/message_comment.py +223 -0
  72. files_sdk/models/message_comment_reaction.py +181 -0
  73. files_sdk/models/message_reaction.py +170 -0
  74. files_sdk/models/notification.py +357 -0
  75. files_sdk/models/outbound_connection_log.py +88 -0
  76. files_sdk/models/payment.py +91 -0
  77. files_sdk/models/payment_line_item.py +42 -0
  78. files_sdk/models/permission.py +174 -0
  79. files_sdk/models/preview.py +40 -0
  80. files_sdk/models/priority.py +63 -0
  81. files_sdk/models/project.py +205 -0
  82. files_sdk/models/public_hosting_request_log.py +82 -0
  83. files_sdk/models/public_ip_address.py +42 -0
  84. files_sdk/models/public_key.py +212 -0
  85. files_sdk/models/remote_bandwidth_snapshot.py +91 -0
  86. files_sdk/models/remote_server.py +1677 -0
  87. files_sdk/models/remote_server_configuration_file.py +72 -0
  88. files_sdk/models/request.py +180 -0
  89. files_sdk/models/restore.py +104 -0
  90. files_sdk/models/session.py +100 -0
  91. files_sdk/models/settings_change.py +71 -0
  92. files_sdk/models/sftp_action_log.py +91 -0
  93. files_sdk/models/sftp_host_key.py +215 -0
  94. files_sdk/models/share_group.py +228 -0
  95. files_sdk/models/share_group_member.py +41 -0
  96. files_sdk/models/siem_http_destination.py +773 -0
  97. files_sdk/models/site.py +767 -0
  98. files_sdk/models/snapshot.py +255 -0
  99. files_sdk/models/sso_strategy.py +167 -0
  100. files_sdk/models/status.py +42 -0
  101. files_sdk/models/style.py +152 -0
  102. files_sdk/models/sync_log.py +75 -0
  103. files_sdk/models/usage_by_top_level_dir.py +41 -0
  104. files_sdk/models/usage_daily_snapshot.py +93 -0
  105. files_sdk/models/usage_snapshot.py +73 -0
  106. files_sdk/models/user.py +893 -0
  107. files_sdk/models/user_cipher_use.py +68 -0
  108. files_sdk/models/user_request.py +166 -0
  109. files_sdk/models/user_sftp_client_use.py +68 -0
  110. files_sdk/models/web_dav_action_log.py +87 -0
  111. files_sdk/models/webhook_test.py +104 -0
  112. files_sdk/path_util.py +42 -0
  113. files_sdk/util.py +34 -0
@@ -0,0 +1,773 @@
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
+ "additional_headers": None, # object - Additional HTTP Headers included in calls to the destination URL
18
+ "sending_active": None, # boolean - Whether this SIEM HTTP Destination is currently being sent to or not
19
+ "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.
20
+ "splunk_token_masked": None, # string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
21
+ "azure_dcr_immutable_id": None, # string - Applicable only for destination type: azure. Immutable ID of the Data Collection Rule.
22
+ "azure_stream_name": None, # string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
23
+ "azure_oauth_client_credentials_tenant_id": None, # string - Applicable only for destination type: azure. Client Credentials OAuth Tenant ID.
24
+ "azure_oauth_client_credentials_client_id": None, # string - Applicable only for destination type: azure. Client Credentials OAuth Client ID.
25
+ "azure_oauth_client_credentials_client_secret_masked": None, # string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
26
+ "qradar_username": None, # string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
27
+ "qradar_password_masked": None, # string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
28
+ "solar_winds_token_masked": None, # string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
29
+ "new_relic_api_key_masked": None, # string - Applicable only for destination type: new_relic. API key provided by New Relic.
30
+ "datadog_api_key_masked": None, # string - Applicable only for destination type: datadog. API key provided by Datadog.
31
+ "sftp_action_send_enabled": None, # boolean - Whether or not sending is enabled for sftp_action logs.
32
+ "sftp_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
33
+ "ftp_action_send_enabled": None, # boolean - Whether or not sending is enabled for ftp_action logs.
34
+ "ftp_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
35
+ "web_dav_action_send_enabled": None, # boolean - Whether or not sending is enabled for web_dav_action logs.
36
+ "web_dav_action_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
37
+ "sync_send_enabled": None, # boolean - Whether or not sending is enabled for sync logs.
38
+ "sync_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
39
+ "outbound_connection_send_enabled": None, # boolean - Whether or not sending is enabled for outbound_connection logs.
40
+ "outbound_connection_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
41
+ "automation_send_enabled": None, # boolean - Whether or not sending is enabled for automation logs.
42
+ "automation_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
43
+ "api_request_send_enabled": None, # boolean - Whether or not sending is enabled for api_request logs.
44
+ "api_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
45
+ "public_hosting_request_send_enabled": None, # boolean - Whether or not sending is enabled for public_hosting_request logs.
46
+ "public_hosting_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
47
+ "email_send_enabled": None, # boolean - Whether or not sending is enabled for email logs.
48
+ "email_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
49
+ "exavault_api_request_send_enabled": None, # boolean - Whether or not sending is enabled for exavault_api_request logs.
50
+ "exavault_api_request_entries_sent": None, # int64 - Number of log entries sent for the lifetime of this destination.
51
+ "last_http_call_target_type": None, # string - Type of URL that was last called. Can be `destination_url` or `azure_oauth_client_credentials_url`
52
+ "last_http_call_success": None, # boolean - Was the last HTTP call made successful?
53
+ "last_http_call_response_code": None, # int64 - Last HTTP Call Response Code
54
+ "last_http_call_response_body": None, # string - Last HTTP Call Response Body. Large responses are truncated.
55
+ "last_http_call_error_message": None, # string - Last HTTP Call Error Message if applicable
56
+ "last_http_call_time": None, # string - Time of Last HTTP Call
57
+ "last_http_call_duration_ms": None, # int64 - Duration of the last HTTP Call in milliseconds
58
+ "most_recent_http_call_success_time": None, # string - Time of Most Recent Successful HTTP Call
59
+ "connection_test_entry": None, # string - Connection Test Entry
60
+ "splunk_token": None, # string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
61
+ "azure_oauth_client_credentials_client_secret": None, # string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
62
+ "qradar_password": None, # string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
63
+ "solar_winds_token": None, # string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
64
+ "new_relic_api_key": None, # string - Applicable only for destination type: new_relic. API key provided by New Relic.
65
+ "datadog_api_key": None, # string - Applicable only for destination type: datadog. API key provided by Datadog.
66
+ }
67
+
68
+ def __init__(self, attributes=None, options=None):
69
+ if not isinstance(attributes, dict):
70
+ attributes = {}
71
+ if not isinstance(options, dict):
72
+ options = {}
73
+ self.set_attributes(attributes)
74
+ self.options = options
75
+
76
+ def set_attributes(self, attributes):
77
+ for (
78
+ attribute,
79
+ default_value,
80
+ ) in SiemHttpDestination.default_attributes.items():
81
+ setattr(self, attribute, attributes.get(attribute, default_value))
82
+
83
+ def get_attributes(self):
84
+ return {
85
+ k: getattr(self, k, None)
86
+ for k in SiemHttpDestination.default_attributes
87
+ if getattr(self, k, None) is not None
88
+ }
89
+
90
+ # Parameters:
91
+ # name - string - Name for this Destination
92
+ # additional_headers - object - Additional HTTP Headers included in calls to the destination URL
93
+ # sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
94
+ # 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.
95
+ # splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
96
+ # azure_dcr_immutable_id - string - Applicable only for destination type: azure. Immutable ID of the Data Collection Rule.
97
+ # azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
98
+ # azure_oauth_client_credentials_tenant_id - string - Applicable only for destination type: azure. Client Credentials OAuth Tenant ID.
99
+ # azure_oauth_client_credentials_client_id - string - Applicable only for destination type: azure. Client Credentials OAuth Client ID.
100
+ # azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
101
+ # qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
102
+ # qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
103
+ # solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
104
+ # new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
105
+ # datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
106
+ # sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
107
+ # ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
108
+ # web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
109
+ # sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
110
+ # outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
111
+ # automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
112
+ # api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
113
+ # public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
114
+ # email_send_enabled - boolean - Whether or not sending is enabled for email logs.
115
+ # exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
116
+ # destination_type - string - Destination Type
117
+ # destination_url - string - Destination Url
118
+ def update(self, params=None):
119
+ if not isinstance(params, dict):
120
+ params = {}
121
+
122
+ if hasattr(self, "id") and self.id:
123
+ params["id"] = self.id
124
+ else:
125
+ raise MissingParameterError("Current object doesn't have a id")
126
+ if "id" not in params:
127
+ raise MissingParameterError("Parameter missing: id")
128
+ if "id" in params and not isinstance(params["id"], int):
129
+ raise InvalidParameterError("Bad parameter: id must be an int")
130
+ if "name" in params and not isinstance(params["name"], str):
131
+ raise InvalidParameterError("Bad parameter: name must be an str")
132
+ if "generic_payload_type" in params and not isinstance(
133
+ params["generic_payload_type"], str
134
+ ):
135
+ raise InvalidParameterError(
136
+ "Bad parameter: generic_payload_type must be an str"
137
+ )
138
+ if "splunk_token" in params and not isinstance(
139
+ params["splunk_token"], str
140
+ ):
141
+ raise InvalidParameterError(
142
+ "Bad parameter: splunk_token must be an str"
143
+ )
144
+ if "azure_dcr_immutable_id" in params and not isinstance(
145
+ params["azure_dcr_immutable_id"], str
146
+ ):
147
+ raise InvalidParameterError(
148
+ "Bad parameter: azure_dcr_immutable_id must be an str"
149
+ )
150
+ if "azure_stream_name" in params and not isinstance(
151
+ params["azure_stream_name"], str
152
+ ):
153
+ raise InvalidParameterError(
154
+ "Bad parameter: azure_stream_name must be an str"
155
+ )
156
+ if (
157
+ "azure_oauth_client_credentials_tenant_id" in params
158
+ and not isinstance(
159
+ params["azure_oauth_client_credentials_tenant_id"], str
160
+ )
161
+ ):
162
+ raise InvalidParameterError(
163
+ "Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
164
+ )
165
+ if (
166
+ "azure_oauth_client_credentials_client_id" in params
167
+ and not isinstance(
168
+ params["azure_oauth_client_credentials_client_id"], str
169
+ )
170
+ ):
171
+ raise InvalidParameterError(
172
+ "Bad parameter: azure_oauth_client_credentials_client_id must be an str"
173
+ )
174
+ if (
175
+ "azure_oauth_client_credentials_client_secret" in params
176
+ and not isinstance(
177
+ params["azure_oauth_client_credentials_client_secret"], str
178
+ )
179
+ ):
180
+ raise InvalidParameterError(
181
+ "Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
182
+ )
183
+ if "qradar_username" in params and not isinstance(
184
+ params["qradar_username"], str
185
+ ):
186
+ raise InvalidParameterError(
187
+ "Bad parameter: qradar_username must be an str"
188
+ )
189
+ if "qradar_password" in params and not isinstance(
190
+ params["qradar_password"], str
191
+ ):
192
+ raise InvalidParameterError(
193
+ "Bad parameter: qradar_password must be an str"
194
+ )
195
+ if "solar_winds_token" in params and not isinstance(
196
+ params["solar_winds_token"], str
197
+ ):
198
+ raise InvalidParameterError(
199
+ "Bad parameter: solar_winds_token must be an str"
200
+ )
201
+ if "new_relic_api_key" in params and not isinstance(
202
+ params["new_relic_api_key"], str
203
+ ):
204
+ raise InvalidParameterError(
205
+ "Bad parameter: new_relic_api_key must be an str"
206
+ )
207
+ if "datadog_api_key" in params and not isinstance(
208
+ params["datadog_api_key"], str
209
+ ):
210
+ raise InvalidParameterError(
211
+ "Bad parameter: datadog_api_key must be an str"
212
+ )
213
+ if "destination_type" in params and not isinstance(
214
+ params["destination_type"], str
215
+ ):
216
+ raise InvalidParameterError(
217
+ "Bad parameter: destination_type must be an str"
218
+ )
219
+ if "destination_url" in params and not isinstance(
220
+ params["destination_url"], str
221
+ ):
222
+ raise InvalidParameterError(
223
+ "Bad parameter: destination_url must be an str"
224
+ )
225
+ response, _options = Api.send_request(
226
+ "PATCH",
227
+ "/siem_http_destinations/{id}".format(id=params["id"]),
228
+ params,
229
+ self.options,
230
+ )
231
+ return response.data
232
+
233
+ def delete(self, params=None):
234
+ if not isinstance(params, dict):
235
+ params = {}
236
+
237
+ if hasattr(self, "id") and self.id:
238
+ params["id"] = self.id
239
+ else:
240
+ raise MissingParameterError("Current object doesn't have a id")
241
+ if "id" not in params:
242
+ raise MissingParameterError("Parameter missing: id")
243
+ if "id" in params and not isinstance(params["id"], int):
244
+ raise InvalidParameterError("Bad parameter: id must be an int")
245
+ Api.send_request(
246
+ "DELETE",
247
+ "/siem_http_destinations/{id}".format(id=params["id"]),
248
+ params,
249
+ self.options,
250
+ )
251
+
252
+ def destroy(self, params=None):
253
+ self.delete(params)
254
+
255
+ def save(self):
256
+ if hasattr(self, "id") and self.id:
257
+ new_obj = self.update(self.get_attributes())
258
+ self.set_attributes(new_obj.get_attributes())
259
+ return True
260
+ else:
261
+ new_obj = create(self.get_attributes(), self.options)
262
+ self.set_attributes(new_obj.get_attributes())
263
+ return True
264
+
265
+
266
+ # Parameters:
267
+ # 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.
268
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
269
+ def list(params=None, options=None):
270
+ if not isinstance(params, dict):
271
+ params = {}
272
+ if not isinstance(options, dict):
273
+ options = {}
274
+ if "cursor" in params and not isinstance(params["cursor"], str):
275
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
276
+ if "per_page" in params and not isinstance(params["per_page"], int):
277
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
278
+ return ListObj(
279
+ SiemHttpDestination, "GET", "/siem_http_destinations", params, options
280
+ )
281
+
282
+
283
+ def all(params=None, options=None):
284
+ list(params, options)
285
+
286
+
287
+ # Parameters:
288
+ # id (required) - int64 - Siem Http Destination ID.
289
+ def find(id, params=None, options=None):
290
+ if not isinstance(params, dict):
291
+ params = {}
292
+ if not isinstance(options, dict):
293
+ options = {}
294
+ params["id"] = id
295
+ if "id" in params and not isinstance(params["id"], int):
296
+ raise InvalidParameterError("Bad parameter: id must be an int")
297
+ if "id" not in params:
298
+ raise MissingParameterError("Parameter missing: id")
299
+ response, options = Api.send_request(
300
+ "GET",
301
+ "/siem_http_destinations/{id}".format(id=params["id"]),
302
+ params,
303
+ options,
304
+ )
305
+ return SiemHttpDestination(response.data, options)
306
+
307
+
308
+ def get(id, params=None, options=None):
309
+ find(id, params, options)
310
+
311
+
312
+ # Parameters:
313
+ # name - string - Name for this Destination
314
+ # additional_headers - object - Additional HTTP Headers included in calls to the destination URL
315
+ # sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
316
+ # 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.
317
+ # splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
318
+ # azure_dcr_immutable_id - string - Applicable only for destination type: azure. Immutable ID of the Data Collection Rule.
319
+ # azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
320
+ # azure_oauth_client_credentials_tenant_id - string - Applicable only for destination type: azure. Client Credentials OAuth Tenant ID.
321
+ # azure_oauth_client_credentials_client_id - string - Applicable only for destination type: azure. Client Credentials OAuth Client ID.
322
+ # azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
323
+ # qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
324
+ # qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
325
+ # solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
326
+ # new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
327
+ # datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
328
+ # sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
329
+ # ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
330
+ # web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
331
+ # sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
332
+ # outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
333
+ # automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
334
+ # api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
335
+ # public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
336
+ # email_send_enabled - boolean - Whether or not sending is enabled for email logs.
337
+ # exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
338
+ # destination_type (required) - string - Destination Type
339
+ # destination_url (required) - string - Destination Url
340
+ def create(params=None, options=None):
341
+ if not isinstance(params, dict):
342
+ params = {}
343
+ if not isinstance(options, dict):
344
+ options = {}
345
+ if "name" in params and not isinstance(params["name"], str):
346
+ raise InvalidParameterError("Bad parameter: name must be an str")
347
+ if "additional_headers" in params and not isinstance(
348
+ params["additional_headers"], dict
349
+ ):
350
+ raise InvalidParameterError(
351
+ "Bad parameter: additional_headers must be an dict"
352
+ )
353
+ if "generic_payload_type" in params and not isinstance(
354
+ params["generic_payload_type"], str
355
+ ):
356
+ raise InvalidParameterError(
357
+ "Bad parameter: generic_payload_type must be an str"
358
+ )
359
+ if "splunk_token" in params and not isinstance(
360
+ params["splunk_token"], str
361
+ ):
362
+ raise InvalidParameterError(
363
+ "Bad parameter: splunk_token must be an str"
364
+ )
365
+ if "azure_dcr_immutable_id" in params and not isinstance(
366
+ params["azure_dcr_immutable_id"], str
367
+ ):
368
+ raise InvalidParameterError(
369
+ "Bad parameter: azure_dcr_immutable_id must be an str"
370
+ )
371
+ if "azure_stream_name" in params and not isinstance(
372
+ params["azure_stream_name"], str
373
+ ):
374
+ raise InvalidParameterError(
375
+ "Bad parameter: azure_stream_name must be an str"
376
+ )
377
+ if (
378
+ "azure_oauth_client_credentials_tenant_id" in params
379
+ and not isinstance(
380
+ params["azure_oauth_client_credentials_tenant_id"], str
381
+ )
382
+ ):
383
+ raise InvalidParameterError(
384
+ "Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
385
+ )
386
+ if (
387
+ "azure_oauth_client_credentials_client_id" in params
388
+ and not isinstance(
389
+ params["azure_oauth_client_credentials_client_id"], str
390
+ )
391
+ ):
392
+ raise InvalidParameterError(
393
+ "Bad parameter: azure_oauth_client_credentials_client_id must be an str"
394
+ )
395
+ if (
396
+ "azure_oauth_client_credentials_client_secret" in params
397
+ and not isinstance(
398
+ params["azure_oauth_client_credentials_client_secret"], str
399
+ )
400
+ ):
401
+ raise InvalidParameterError(
402
+ "Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
403
+ )
404
+ if "qradar_username" in params and not isinstance(
405
+ params["qradar_username"], str
406
+ ):
407
+ raise InvalidParameterError(
408
+ "Bad parameter: qradar_username must be an str"
409
+ )
410
+ if "qradar_password" in params and not isinstance(
411
+ params["qradar_password"], str
412
+ ):
413
+ raise InvalidParameterError(
414
+ "Bad parameter: qradar_password must be an str"
415
+ )
416
+ if "solar_winds_token" in params and not isinstance(
417
+ params["solar_winds_token"], str
418
+ ):
419
+ raise InvalidParameterError(
420
+ "Bad parameter: solar_winds_token must be an str"
421
+ )
422
+ if "new_relic_api_key" in params and not isinstance(
423
+ params["new_relic_api_key"], str
424
+ ):
425
+ raise InvalidParameterError(
426
+ "Bad parameter: new_relic_api_key must be an str"
427
+ )
428
+ if "datadog_api_key" in params and not isinstance(
429
+ params["datadog_api_key"], str
430
+ ):
431
+ raise InvalidParameterError(
432
+ "Bad parameter: datadog_api_key must be an str"
433
+ )
434
+ if "destination_type" in params and not isinstance(
435
+ params["destination_type"], str
436
+ ):
437
+ raise InvalidParameterError(
438
+ "Bad parameter: destination_type must be an str"
439
+ )
440
+ if "destination_url" in params and not isinstance(
441
+ params["destination_url"], str
442
+ ):
443
+ raise InvalidParameterError(
444
+ "Bad parameter: destination_url must be an str"
445
+ )
446
+ if "destination_type" not in params:
447
+ raise MissingParameterError("Parameter missing: destination_type")
448
+ if "destination_url" not in params:
449
+ raise MissingParameterError("Parameter missing: destination_url")
450
+ response, options = Api.send_request(
451
+ "POST", "/siem_http_destinations", params, options
452
+ )
453
+ return SiemHttpDestination(response.data, options)
454
+
455
+
456
+ # Parameters:
457
+ # siem_http_destination_id - int64 - SIEM HTTP Destination ID
458
+ # destination_type - string - Destination Type
459
+ # destination_url - string - Destination Url
460
+ # name - string - Name for this Destination
461
+ # additional_headers - object - Additional HTTP Headers included in calls to the destination URL
462
+ # sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
463
+ # 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.
464
+ # splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
465
+ # azure_dcr_immutable_id - string - Applicable only for destination type: azure. Immutable ID of the Data Collection Rule.
466
+ # azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
467
+ # azure_oauth_client_credentials_tenant_id - string - Applicable only for destination type: azure. Client Credentials OAuth Tenant ID.
468
+ # azure_oauth_client_credentials_client_id - string - Applicable only for destination type: azure. Client Credentials OAuth Client ID.
469
+ # azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
470
+ # qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
471
+ # qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
472
+ # solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
473
+ # new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
474
+ # datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
475
+ # sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
476
+ # ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
477
+ # web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
478
+ # sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
479
+ # outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
480
+ # automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
481
+ # api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
482
+ # public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
483
+ # email_send_enabled - boolean - Whether or not sending is enabled for email logs.
484
+ # exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
485
+ def send_test_entry(params=None, options=None):
486
+ if not isinstance(params, dict):
487
+ params = {}
488
+ if not isinstance(options, dict):
489
+ options = {}
490
+ if "siem_http_destination_id" in params and not isinstance(
491
+ params["siem_http_destination_id"], int
492
+ ):
493
+ raise InvalidParameterError(
494
+ "Bad parameter: siem_http_destination_id must be an int"
495
+ )
496
+ if "destination_type" in params and not isinstance(
497
+ params["destination_type"], str
498
+ ):
499
+ raise InvalidParameterError(
500
+ "Bad parameter: destination_type must be an str"
501
+ )
502
+ if "destination_url" in params and not isinstance(
503
+ params["destination_url"], str
504
+ ):
505
+ raise InvalidParameterError(
506
+ "Bad parameter: destination_url must be an str"
507
+ )
508
+ if "name" in params and not isinstance(params["name"], str):
509
+ raise InvalidParameterError("Bad parameter: name must be an str")
510
+ if "additional_headers" in params and not isinstance(
511
+ params["additional_headers"], dict
512
+ ):
513
+ raise InvalidParameterError(
514
+ "Bad parameter: additional_headers must be an dict"
515
+ )
516
+ if "generic_payload_type" in params and not isinstance(
517
+ params["generic_payload_type"], str
518
+ ):
519
+ raise InvalidParameterError(
520
+ "Bad parameter: generic_payload_type must be an str"
521
+ )
522
+ if "splunk_token" in params and not isinstance(
523
+ params["splunk_token"], str
524
+ ):
525
+ raise InvalidParameterError(
526
+ "Bad parameter: splunk_token must be an str"
527
+ )
528
+ if "azure_dcr_immutable_id" in params and not isinstance(
529
+ params["azure_dcr_immutable_id"], str
530
+ ):
531
+ raise InvalidParameterError(
532
+ "Bad parameter: azure_dcr_immutable_id must be an str"
533
+ )
534
+ if "azure_stream_name" in params and not isinstance(
535
+ params["azure_stream_name"], str
536
+ ):
537
+ raise InvalidParameterError(
538
+ "Bad parameter: azure_stream_name must be an str"
539
+ )
540
+ if (
541
+ "azure_oauth_client_credentials_tenant_id" in params
542
+ and not isinstance(
543
+ params["azure_oauth_client_credentials_tenant_id"], str
544
+ )
545
+ ):
546
+ raise InvalidParameterError(
547
+ "Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
548
+ )
549
+ if (
550
+ "azure_oauth_client_credentials_client_id" in params
551
+ and not isinstance(
552
+ params["azure_oauth_client_credentials_client_id"], str
553
+ )
554
+ ):
555
+ raise InvalidParameterError(
556
+ "Bad parameter: azure_oauth_client_credentials_client_id must be an str"
557
+ )
558
+ if (
559
+ "azure_oauth_client_credentials_client_secret" in params
560
+ and not isinstance(
561
+ params["azure_oauth_client_credentials_client_secret"], str
562
+ )
563
+ ):
564
+ raise InvalidParameterError(
565
+ "Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
566
+ )
567
+ if "qradar_username" in params and not isinstance(
568
+ params["qradar_username"], str
569
+ ):
570
+ raise InvalidParameterError(
571
+ "Bad parameter: qradar_username must be an str"
572
+ )
573
+ if "qradar_password" in params and not isinstance(
574
+ params["qradar_password"], str
575
+ ):
576
+ raise InvalidParameterError(
577
+ "Bad parameter: qradar_password must be an str"
578
+ )
579
+ if "solar_winds_token" in params and not isinstance(
580
+ params["solar_winds_token"], str
581
+ ):
582
+ raise InvalidParameterError(
583
+ "Bad parameter: solar_winds_token must be an str"
584
+ )
585
+ if "new_relic_api_key" in params and not isinstance(
586
+ params["new_relic_api_key"], str
587
+ ):
588
+ raise InvalidParameterError(
589
+ "Bad parameter: new_relic_api_key must be an str"
590
+ )
591
+ if "datadog_api_key" in params and not isinstance(
592
+ params["datadog_api_key"], str
593
+ ):
594
+ raise InvalidParameterError(
595
+ "Bad parameter: datadog_api_key must be an str"
596
+ )
597
+ Api.send_request(
598
+ "POST", "/siem_http_destinations/send_test_entry", params, options
599
+ )
600
+
601
+
602
+ # Parameters:
603
+ # name - string - Name for this Destination
604
+ # additional_headers - object - Additional HTTP Headers included in calls to the destination URL
605
+ # sending_active - boolean - Whether this SIEM HTTP Destination is currently being sent to or not
606
+ # 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.
607
+ # splunk_token - string - Applicable only for destination type: splunk. Authentication token provided by Splunk.
608
+ # azure_dcr_immutable_id - string - Applicable only for destination type: azure. Immutable ID of the Data Collection Rule.
609
+ # azure_stream_name - string - Applicable only for destination type: azure. Name of the stream in the DCR that represents the destination table.
610
+ # azure_oauth_client_credentials_tenant_id - string - Applicable only for destination type: azure. Client Credentials OAuth Tenant ID.
611
+ # azure_oauth_client_credentials_client_id - string - Applicable only for destination type: azure. Client Credentials OAuth Client ID.
612
+ # azure_oauth_client_credentials_client_secret - string - Applicable only for destination type: azure. Client Credentials OAuth Client Secret.
613
+ # qradar_username - string - Applicable only for destination type: qradar. Basic auth username provided by QRadar.
614
+ # qradar_password - string - Applicable only for destination type: qradar. Basic auth password provided by QRadar.
615
+ # solar_winds_token - string - Applicable only for destination type: solar_winds. Authentication token provided by Solar Winds.
616
+ # new_relic_api_key - string - Applicable only for destination type: new_relic. API key provided by New Relic.
617
+ # datadog_api_key - string - Applicable only for destination type: datadog. API key provided by Datadog.
618
+ # sftp_action_send_enabled - boolean - Whether or not sending is enabled for sftp_action logs.
619
+ # ftp_action_send_enabled - boolean - Whether or not sending is enabled for ftp_action logs.
620
+ # web_dav_action_send_enabled - boolean - Whether or not sending is enabled for web_dav_action logs.
621
+ # sync_send_enabled - boolean - Whether or not sending is enabled for sync logs.
622
+ # outbound_connection_send_enabled - boolean - Whether or not sending is enabled for outbound_connection logs.
623
+ # automation_send_enabled - boolean - Whether or not sending is enabled for automation logs.
624
+ # api_request_send_enabled - boolean - Whether or not sending is enabled for api_request logs.
625
+ # public_hosting_request_send_enabled - boolean - Whether or not sending is enabled for public_hosting_request logs.
626
+ # email_send_enabled - boolean - Whether or not sending is enabled for email logs.
627
+ # exavault_api_request_send_enabled - boolean - Whether or not sending is enabled for exavault_api_request logs.
628
+ # destination_type - string - Destination Type
629
+ # destination_url - string - Destination Url
630
+ def update(id, params=None, options=None):
631
+ if not isinstance(params, dict):
632
+ params = {}
633
+ if not isinstance(options, dict):
634
+ options = {}
635
+ params["id"] = id
636
+ if "id" in params and not isinstance(params["id"], int):
637
+ raise InvalidParameterError("Bad parameter: id must be an int")
638
+ if "name" in params and not isinstance(params["name"], str):
639
+ raise InvalidParameterError("Bad parameter: name must be an str")
640
+ if "additional_headers" in params and not isinstance(
641
+ params["additional_headers"], dict
642
+ ):
643
+ raise InvalidParameterError(
644
+ "Bad parameter: additional_headers must be an dict"
645
+ )
646
+ if "generic_payload_type" in params and not isinstance(
647
+ params["generic_payload_type"], str
648
+ ):
649
+ raise InvalidParameterError(
650
+ "Bad parameter: generic_payload_type must be an str"
651
+ )
652
+ if "splunk_token" in params and not isinstance(
653
+ params["splunk_token"], str
654
+ ):
655
+ raise InvalidParameterError(
656
+ "Bad parameter: splunk_token must be an str"
657
+ )
658
+ if "azure_dcr_immutable_id" in params and not isinstance(
659
+ params["azure_dcr_immutable_id"], str
660
+ ):
661
+ raise InvalidParameterError(
662
+ "Bad parameter: azure_dcr_immutable_id must be an str"
663
+ )
664
+ if "azure_stream_name" in params and not isinstance(
665
+ params["azure_stream_name"], str
666
+ ):
667
+ raise InvalidParameterError(
668
+ "Bad parameter: azure_stream_name must be an str"
669
+ )
670
+ if (
671
+ "azure_oauth_client_credentials_tenant_id" in params
672
+ and not isinstance(
673
+ params["azure_oauth_client_credentials_tenant_id"], str
674
+ )
675
+ ):
676
+ raise InvalidParameterError(
677
+ "Bad parameter: azure_oauth_client_credentials_tenant_id must be an str"
678
+ )
679
+ if (
680
+ "azure_oauth_client_credentials_client_id" in params
681
+ and not isinstance(
682
+ params["azure_oauth_client_credentials_client_id"], str
683
+ )
684
+ ):
685
+ raise InvalidParameterError(
686
+ "Bad parameter: azure_oauth_client_credentials_client_id must be an str"
687
+ )
688
+ if (
689
+ "azure_oauth_client_credentials_client_secret" in params
690
+ and not isinstance(
691
+ params["azure_oauth_client_credentials_client_secret"], str
692
+ )
693
+ ):
694
+ raise InvalidParameterError(
695
+ "Bad parameter: azure_oauth_client_credentials_client_secret must be an str"
696
+ )
697
+ if "qradar_username" in params and not isinstance(
698
+ params["qradar_username"], str
699
+ ):
700
+ raise InvalidParameterError(
701
+ "Bad parameter: qradar_username must be an str"
702
+ )
703
+ if "qradar_password" in params and not isinstance(
704
+ params["qradar_password"], str
705
+ ):
706
+ raise InvalidParameterError(
707
+ "Bad parameter: qradar_password must be an str"
708
+ )
709
+ if "solar_winds_token" in params and not isinstance(
710
+ params["solar_winds_token"], str
711
+ ):
712
+ raise InvalidParameterError(
713
+ "Bad parameter: solar_winds_token must be an str"
714
+ )
715
+ if "new_relic_api_key" in params and not isinstance(
716
+ params["new_relic_api_key"], str
717
+ ):
718
+ raise InvalidParameterError(
719
+ "Bad parameter: new_relic_api_key must be an str"
720
+ )
721
+ if "datadog_api_key" in params and not isinstance(
722
+ params["datadog_api_key"], str
723
+ ):
724
+ raise InvalidParameterError(
725
+ "Bad parameter: datadog_api_key must be an str"
726
+ )
727
+ if "destination_type" in params and not isinstance(
728
+ params["destination_type"], str
729
+ ):
730
+ raise InvalidParameterError(
731
+ "Bad parameter: destination_type must be an str"
732
+ )
733
+ if "destination_url" in params and not isinstance(
734
+ params["destination_url"], str
735
+ ):
736
+ raise InvalidParameterError(
737
+ "Bad parameter: destination_url must be an str"
738
+ )
739
+ if "id" not in params:
740
+ raise MissingParameterError("Parameter missing: id")
741
+ response, options = Api.send_request(
742
+ "PATCH",
743
+ "/siem_http_destinations/{id}".format(id=params["id"]),
744
+ params,
745
+ options,
746
+ )
747
+ return SiemHttpDestination(response.data, options)
748
+
749
+
750
+ def delete(id, params=None, options=None):
751
+ if not isinstance(params, dict):
752
+ params = {}
753
+ if not isinstance(options, dict):
754
+ options = {}
755
+ params["id"] = id
756
+ if "id" in params and not isinstance(params["id"], int):
757
+ raise InvalidParameterError("Bad parameter: id must be an int")
758
+ if "id" not in params:
759
+ raise MissingParameterError("Parameter missing: id")
760
+ Api.send_request(
761
+ "DELETE",
762
+ "/siem_http_destinations/{id}".format(id=params["id"]),
763
+ params,
764
+ options,
765
+ )
766
+
767
+
768
+ def destroy(id, params=None, options=None):
769
+ delete(id, params, options)
770
+
771
+
772
+ def new(*args, **kwargs):
773
+ return SiemHttpDestination(*args, **kwargs)