44
55from typing import List , Union , Iterable
66from datetime import datetime
7- from typing_extensions import Literal
87
98import httpx
109
@@ -203,13 +202,21 @@ def with_streaming_response(self) -> ThreatEventsResourceWithStreamingResponse:
203202 def create (
204203 self ,
205204 * ,
206- account_id : float ,
207- dataset_id : List [str ] | NotGiven = NOT_GIVEN ,
208- order : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
209- order_by : str | NotGiven = NOT_GIVEN ,
210- page : float | NotGiven = NOT_GIVEN ,
211- page_size : float | NotGiven = NOT_GIVEN ,
212- search : Iterable [threat_event_create_params .Search ] | NotGiven = NOT_GIVEN ,
205+ path_account_id : float ,
206+ attacker : str ,
207+ attacker_country : str ,
208+ category : str ,
209+ date : Union [str , datetime ],
210+ event : str ,
211+ indicator_type : str ,
212+ raw : threat_event_create_params .Raw ,
213+ tlp : str ,
214+ body_account_id : float | NotGiven = NOT_GIVEN ,
215+ dataset_id : str | NotGiven = NOT_GIVEN ,
216+ indicator : str | NotGiven = NOT_GIVEN ,
217+ tags : List [str ] | NotGiven = NOT_GIVEN ,
218+ target_country : str | NotGiven = NOT_GIVEN ,
219+ target_industry : str | NotGiven = NOT_GIVEN ,
213220 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
214221 # The extra values given here take precedence over values defined on the client or passed to this method.
215222 extra_headers : Headers | None = None ,
@@ -218,10 +225,10 @@ def create(
218225 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
219226 ) -> ThreatEventCreateResponse :
220227 """
221- Filter and list events
228+ Creates a new event
222229
223230 Args:
224- account_id : Account ID
231+ path_account_id : Account ID
225232
226233 extra_headers: Send extra headers
227234
@@ -232,15 +239,23 @@ def create(
232239 timeout: Override the client-level default timeout for this request, in seconds
233240 """
234241 return self ._post (
235- f"/accounts/{ account_id } /cloudforce-one/events" ,
242+ f"/accounts/{ path_account_id } /cloudforce-one/events/create " ,
236243 body = maybe_transform (
237244 {
245+ "attacker" : attacker ,
246+ "attacker_country" : attacker_country ,
247+ "category" : category ,
248+ "date" : date ,
249+ "event" : event ,
250+ "indicator_type" : indicator_type ,
251+ "raw" : raw ,
252+ "tlp" : tlp ,
253+ "body_account_id" : body_account_id ,
238254 "dataset_id" : dataset_id ,
239- "order" : order ,
240- "order_by" : order_by ,
241- "page" : page ,
242- "page_size" : page_size ,
243- "search" : search ,
255+ "indicator" : indicator ,
256+ "tags" : tags ,
257+ "target_country" : target_country ,
258+ "target_industry" : target_industry ,
244259 },
245260 threat_event_create_params .ThreatEventCreateParams ,
246261 ),
@@ -503,13 +518,21 @@ def with_streaming_response(self) -> AsyncThreatEventsResourceWithStreamingRespo
503518 async def create (
504519 self ,
505520 * ,
506- account_id : float ,
507- dataset_id : List [str ] | NotGiven = NOT_GIVEN ,
508- order : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
509- order_by : str | NotGiven = NOT_GIVEN ,
510- page : float | NotGiven = NOT_GIVEN ,
511- page_size : float | NotGiven = NOT_GIVEN ,
512- search : Iterable [threat_event_create_params .Search ] | NotGiven = NOT_GIVEN ,
521+ path_account_id : float ,
522+ attacker : str ,
523+ attacker_country : str ,
524+ category : str ,
525+ date : Union [str , datetime ],
526+ event : str ,
527+ indicator_type : str ,
528+ raw : threat_event_create_params .Raw ,
529+ tlp : str ,
530+ body_account_id : float | NotGiven = NOT_GIVEN ,
531+ dataset_id : str | NotGiven = NOT_GIVEN ,
532+ indicator : str | NotGiven = NOT_GIVEN ,
533+ tags : List [str ] | NotGiven = NOT_GIVEN ,
534+ target_country : str | NotGiven = NOT_GIVEN ,
535+ target_industry : str | NotGiven = NOT_GIVEN ,
513536 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
514537 # The extra values given here take precedence over values defined on the client or passed to this method.
515538 extra_headers : Headers | None = None ,
@@ -518,10 +541,10 @@ async def create(
518541 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
519542 ) -> ThreatEventCreateResponse :
520543 """
521- Filter and list events
544+ Creates a new event
522545
523546 Args:
524- account_id : Account ID
547+ path_account_id : Account ID
525548
526549 extra_headers: Send extra headers
527550
@@ -532,15 +555,23 @@ async def create(
532555 timeout: Override the client-level default timeout for this request, in seconds
533556 """
534557 return await self ._post (
535- f"/accounts/{ account_id } /cloudforce-one/events" ,
558+ f"/accounts/{ path_account_id } /cloudforce-one/events/create " ,
536559 body = await async_maybe_transform (
537560 {
561+ "attacker" : attacker ,
562+ "attacker_country" : attacker_country ,
563+ "category" : category ,
564+ "date" : date ,
565+ "event" : event ,
566+ "indicator_type" : indicator_type ,
567+ "raw" : raw ,
568+ "tlp" : tlp ,
569+ "body_account_id" : body_account_id ,
538570 "dataset_id" : dataset_id ,
539- "order" : order ,
540- "order_by" : order_by ,
541- "page" : page ,
542- "page_size" : page_size ,
543- "search" : search ,
571+ "indicator" : indicator ,
572+ "tags" : tags ,
573+ "target_country" : target_country ,
574+ "target_industry" : target_industry ,
544575 },
545576 threat_event_create_params .ThreatEventCreateParams ,
546577 ),
0 commit comments