cribl-control-plane 0.1.1rc6__py3-none-any.whl → 0.2.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 cribl-control-plane might be problematic. Click here for more details.

Files changed (145) hide show
  1. cribl_control_plane/_version.py +5 -3
  2. cribl_control_plane/groups_sdk.py +4 -4
  3. cribl_control_plane/models/__init__.py +27 -50
  4. cribl_control_plane/models/appmode.py +14 -0
  5. cribl_control_plane/models/authtoken.py +1 -5
  6. cribl_control_plane/models/configgroup.py +2 -17
  7. cribl_control_plane/models/createversionundoop.py +3 -3
  8. cribl_control_plane/models/distributedsummary.py +0 -6
  9. cribl_control_plane/models/hbcriblinfo.py +3 -14
  10. cribl_control_plane/models/heartbeatmetadata.py +0 -3
  11. cribl_control_plane/models/input.py +63 -65
  12. cribl_control_plane/models/inputappscope.py +0 -4
  13. cribl_control_plane/models/inputazureblob.py +0 -4
  14. cribl_control_plane/models/inputcollection.py +0 -4
  15. cribl_control_plane/models/inputconfluentcloud.py +18 -8
  16. cribl_control_plane/models/inputcribl.py +0 -4
  17. cribl_control_plane/models/inputcriblhttp.py +0 -4
  18. cribl_control_plane/models/inputcribllakehttp.py +0 -4
  19. cribl_control_plane/models/inputcriblmetrics.py +0 -4
  20. cribl_control_plane/models/inputcribltcp.py +0 -4
  21. cribl_control_plane/models/inputcrowdstrike.py +0 -7
  22. cribl_control_plane/models/inputdatadogagent.py +0 -4
  23. cribl_control_plane/models/inputdatagen.py +0 -4
  24. cribl_control_plane/models/inputedgeprometheus.py +0 -12
  25. cribl_control_plane/models/inputelastic.py +0 -11
  26. cribl_control_plane/models/inputeventhub.py +0 -6
  27. cribl_control_plane/models/inputexec.py +0 -4
  28. cribl_control_plane/models/inputfile.py +0 -6
  29. cribl_control_plane/models/inputfirehose.py +0 -4
  30. cribl_control_plane/models/inputgooglepubsub.py +0 -7
  31. cribl_control_plane/models/inputgrafana.py +0 -8
  32. cribl_control_plane/models/inputhttp.py +0 -4
  33. cribl_control_plane/models/inputhttpraw.py +0 -4
  34. cribl_control_plane/models/inputjournalfiles.py +0 -4
  35. cribl_control_plane/models/inputkafka.py +17 -8
  36. cribl_control_plane/models/inputkinesis.py +0 -15
  37. cribl_control_plane/models/inputkubeevents.py +0 -4
  38. cribl_control_plane/models/inputkubelogs.py +0 -4
  39. cribl_control_plane/models/inputkubemetrics.py +0 -4
  40. cribl_control_plane/models/inputloki.py +0 -4
  41. cribl_control_plane/models/inputmetrics.py +0 -4
  42. cribl_control_plane/models/inputmodeldriventelemetry.py +0 -4
  43. cribl_control_plane/models/inputmsk.py +17 -7
  44. cribl_control_plane/models/inputnetflow.py +0 -4
  45. cribl_control_plane/models/inputoffice365mgmt.py +0 -11
  46. cribl_control_plane/models/inputoffice365msgtrace.py +0 -11
  47. cribl_control_plane/models/inputoffice365service.py +0 -11
  48. cribl_control_plane/models/inputopentelemetry.py +0 -8
  49. cribl_control_plane/models/inputprometheus.py +0 -10
  50. cribl_control_plane/models/inputprometheusrw.py +0 -4
  51. cribl_control_plane/models/inputrawudp.py +0 -4
  52. cribl_control_plane/models/inputs3.py +0 -7
  53. cribl_control_plane/models/inputs3inventory.py +0 -7
  54. cribl_control_plane/models/inputsecuritylake.py +0 -7
  55. cribl_control_plane/models/inputsnmp.py +0 -11
  56. cribl_control_plane/models/inputsplunk.py +0 -9
  57. cribl_control_plane/models/inputsplunkhec.py +0 -4
  58. cribl_control_plane/models/inputsplunksearch.py +0 -7
  59. cribl_control_plane/models/inputsqs.py +0 -9
  60. cribl_control_plane/models/inputsyslog.py +0 -8
  61. cribl_control_plane/models/inputsystemmetrics.py +0 -32
  62. cribl_control_plane/models/inputsystemstate.py +0 -4
  63. cribl_control_plane/models/inputtcp.py +0 -4
  64. cribl_control_plane/models/inputtcpjson.py +0 -4
  65. cribl_control_plane/models/inputwef.py +0 -6
  66. cribl_control_plane/models/inputwindowsmetrics.py +0 -28
  67. cribl_control_plane/models/inputwineventlogs.py +0 -8
  68. cribl_control_plane/models/inputwiz.py +0 -7
  69. cribl_control_plane/models/inputwizwebhook.py +0 -4
  70. cribl_control_plane/models/inputzscalerhec.py +0 -4
  71. cribl_control_plane/models/jobinfo.py +1 -4
  72. cribl_control_plane/models/nodeprovidedinfo.py +1 -7
  73. cribl_control_plane/models/output.py +80 -85
  74. cribl_control_plane/models/outputazureblob.py +0 -20
  75. cribl_control_plane/models/outputazuredataexplorer.py +0 -28
  76. cribl_control_plane/models/outputazureeventhub.py +0 -17
  77. cribl_control_plane/models/outputazurelogs.py +0 -13
  78. cribl_control_plane/models/outputchronicle.py +0 -13
  79. cribl_control_plane/models/outputclickhouse.py +0 -17
  80. cribl_control_plane/models/outputcloudwatch.py +0 -13
  81. cribl_control_plane/models/outputconfluentcloud.py +18 -24
  82. cribl_control_plane/models/outputcriblhttp.py +0 -15
  83. cribl_control_plane/models/outputcribllake.py +0 -21
  84. cribl_control_plane/models/outputcribltcp.py +0 -12
  85. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +0 -15
  86. cribl_control_plane/models/outputdatadog.py +0 -30
  87. cribl_control_plane/models/outputdataset.py +0 -23
  88. cribl_control_plane/models/outputdls3.py +0 -35
  89. cribl_control_plane/models/outputdynatracehttp.py +0 -22
  90. cribl_control_plane/models/outputdynatraceotlp.py +0 -22
  91. cribl_control_plane/models/outputelastic.py +0 -18
  92. cribl_control_plane/models/outputelasticcloud.py +0 -13
  93. cribl_control_plane/models/outputexabeam.py +0 -14
  94. cribl_control_plane/models/outputfilesystem.py +0 -15
  95. cribl_control_plane/models/outputgooglechronicle.py +0 -21
  96. cribl_control_plane/models/outputgooglecloudlogging.py +0 -19
  97. cribl_control_plane/models/outputgooglecloudstorage.py +0 -28
  98. cribl_control_plane/models/outputgooglepubsub.py +0 -13
  99. cribl_control_plane/models/outputgrafanacloud.py +0 -50
  100. cribl_control_plane/models/outputgraphite.py +0 -12
  101. cribl_control_plane/models/outputhoneycomb.py +0 -13
  102. cribl_control_plane/models/outputhumiohec.py +0 -15
  103. cribl_control_plane/models/outputinfluxdb.py +0 -19
  104. cribl_control_plane/models/outputkafka.py +17 -24
  105. cribl_control_plane/models/outputkinesis.py +0 -15
  106. cribl_control_plane/models/outputloki.py +0 -20
  107. cribl_control_plane/models/outputminio.py +0 -28
  108. cribl_control_plane/models/outputmsk.py +17 -23
  109. cribl_control_plane/models/outputnewrelic.py +0 -16
  110. cribl_control_plane/models/outputnewrelicevents.py +0 -16
  111. cribl_control_plane/models/outputopentelemetry.py +0 -22
  112. cribl_control_plane/models/outputprometheus.py +0 -13
  113. cribl_control_plane/models/outputring.py +0 -2
  114. cribl_control_plane/models/outputs3.py +0 -35
  115. cribl_control_plane/models/outputsecuritylake.py +0 -29
  116. cribl_control_plane/models/outputsentinel.py +0 -15
  117. cribl_control_plane/models/outputsentineloneaisiem.py +0 -13
  118. cribl_control_plane/models/outputservicenow.py +0 -21
  119. cribl_control_plane/models/outputsignalfx.py +0 -13
  120. cribl_control_plane/models/outputsns.py +0 -13
  121. cribl_control_plane/models/outputsplunk.py +0 -15
  122. cribl_control_plane/models/outputsplunkhec.py +0 -13
  123. cribl_control_plane/models/outputsplunklb.py +0 -15
  124. cribl_control_plane/models/outputsqs.py +0 -15
  125. cribl_control_plane/models/outputstatsd.py +0 -12
  126. cribl_control_plane/models/outputstatsdext.py +0 -12
  127. cribl_control_plane/models/outputsumologic.py +0 -15
  128. cribl_control_plane/models/outputsyslog.py +0 -24
  129. cribl_control_plane/models/outputtcpjson.py +0 -12
  130. cribl_control_plane/models/outputwavefront.py +0 -13
  131. cribl_control_plane/models/outputwebhook.py +0 -23
  132. cribl_control_plane/models/outputxsiam.py +0 -13
  133. cribl_control_plane/models/packinfo.py +5 -8
  134. cribl_control_plane/models/packinstallinfo.py +5 -8
  135. cribl_control_plane/models/{uploadpackresponse.py → routecloneconf.py} +4 -4
  136. cribl_control_plane/models/routeconf.py +4 -3
  137. cribl_control_plane/models/runnablejobcollection.py +0 -4
  138. cribl_control_plane/packs.py +7 -202
  139. cribl_control_plane/tokens.py +6 -16
  140. {cribl_control_plane-0.1.1rc6.dist-info → cribl_control_plane-0.2.0.dist-info}/METADATA +3 -35
  141. {cribl_control_plane-0.1.1rc6.dist-info → cribl_control_plane-0.2.0.dist-info}/RECORD +142 -144
  142. cribl_control_plane/models/loginop.py +0 -18
  143. cribl_control_plane/models/outputdatabricks.py +0 -291
  144. cribl_control_plane/models/updatepacksop.py +0 -27
  145. {cribl_control_plane-0.1.1rc6.dist-info → cribl_control_plane-0.2.0.dist-info}/WHEEL +0 -0
@@ -36,11 +36,8 @@ class OutputWavefrontExtraHTTPHeader(BaseModel):
36
36
  class OutputWavefrontFailedRequestLoggingMode(str, Enum, metaclass=utils.OpenEnumMeta):
37
37
  r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
38
38
 
39
- # Payload
40
39
  PAYLOAD = "payload"
41
- # Payload + Headers
42
40
  PAYLOAD_AND_HEADERS = "payloadAndHeaders"
43
- # None
44
41
  NONE = "none"
45
42
 
46
43
 
@@ -101,40 +98,30 @@ class OutputWavefrontTimeoutRetrySettings(BaseModel):
101
98
  class OutputWavefrontBackpressureBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
102
99
  r"""How to handle events when all receivers are exerting backpressure"""
103
100
 
104
- # Block
105
101
  BLOCK = "block"
106
- # Drop
107
102
  DROP = "drop"
108
- # Persistent Queue
109
103
  QUEUE = "queue"
110
104
 
111
105
 
112
106
  class OutputWavefrontCompression(str, Enum, metaclass=utils.OpenEnumMeta):
113
107
  r"""Codec to use to compress the persisted data"""
114
108
 
115
- # None
116
109
  NONE = "none"
117
- # Gzip
118
110
  GZIP = "gzip"
119
111
 
120
112
 
121
113
  class OutputWavefrontQueueFullBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
122
114
  r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
123
115
 
124
- # Block
125
116
  BLOCK = "block"
126
- # Drop new data
127
117
  DROP = "drop"
128
118
 
129
119
 
130
120
  class OutputWavefrontMode(str, Enum, metaclass=utils.OpenEnumMeta):
131
121
  r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
132
122
 
133
- # Error
134
123
  ERROR = "error"
135
- # Backpressure
136
124
  BACKPRESSURE = "backpressure"
137
- # Always On
138
125
  ALWAYS = "always"
139
126
 
140
127
 
@@ -26,13 +26,9 @@ class OutputWebhookMethod(str, Enum, metaclass=utils.OpenEnumMeta):
26
26
  class OutputWebhookFormat(str, Enum, metaclass=utils.OpenEnumMeta):
27
27
  r"""How to format events before sending out"""
28
28
 
29
- # NDJSON (Newline Delimited JSON)
30
29
  NDJSON = "ndjson"
31
- # JSON Array
32
30
  JSON_ARRAY = "json_array"
33
- # Custom
34
31
  CUSTOM = "custom"
35
- # Advanced
36
32
  ADVANCED = "advanced"
37
33
 
38
34
 
@@ -50,11 +46,8 @@ class OutputWebhookExtraHTTPHeader(BaseModel):
50
46
  class OutputWebhookFailedRequestLoggingMode(str, Enum, metaclass=utils.OpenEnumMeta):
51
47
  r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
52
48
 
53
- # Payload
54
49
  PAYLOAD = "payload"
55
- # Payload + Headers
56
50
  PAYLOAD_AND_HEADERS = "payloadAndHeaders"
57
- # None
58
51
  NONE = "none"
59
52
 
60
53
 
@@ -115,28 +108,19 @@ class OutputWebhookTimeoutRetrySettings(BaseModel):
115
108
  class OutputWebhookBackpressureBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
116
109
  r"""How to handle events when all receivers are exerting backpressure"""
117
110
 
118
- # Block
119
111
  BLOCK = "block"
120
- # Drop
121
112
  DROP = "drop"
122
- # Persistent Queue
123
113
  QUEUE = "queue"
124
114
 
125
115
 
126
116
  class OutputWebhookAuthenticationType(str, Enum, metaclass=utils.OpenEnumMeta):
127
117
  r"""Authentication method to use for the HTTP request"""
128
118
 
129
- # None
130
119
  NONE = "none"
131
- # Basic
132
120
  BASIC = "basic"
133
- # Basic (credentials secret)
134
121
  CREDENTIALS_SECRET = "credentialsSecret"
135
- # Token
136
122
  TOKEN = "token"
137
- # Token (text secret)
138
123
  TEXT_SECRET = "textSecret"
139
- # OAuth
140
124
  OAUTH = "oauth"
141
125
 
142
126
 
@@ -215,29 +199,22 @@ class OutputWebhookTLSSettingsClientSide(BaseModel):
215
199
  class OutputWebhookCompression(str, Enum, metaclass=utils.OpenEnumMeta):
216
200
  r"""Codec to use to compress the persisted data"""
217
201
 
218
- # None
219
202
  NONE = "none"
220
- # Gzip
221
203
  GZIP = "gzip"
222
204
 
223
205
 
224
206
  class OutputWebhookQueueFullBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
225
207
  r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
226
208
 
227
- # Block
228
209
  BLOCK = "block"
229
- # Drop new data
230
210
  DROP = "drop"
231
211
 
232
212
 
233
213
  class OutputWebhookMode(str, Enum, metaclass=utils.OpenEnumMeta):
234
214
  r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
235
215
 
236
- # Error
237
216
  ERROR = "error"
238
- # Backpressure
239
217
  BACKPRESSURE = "backpressure"
240
- # Always On
241
218
  ALWAYS = "always"
242
219
 
243
220
 
@@ -29,11 +29,8 @@ class OutputXsiamExtraHTTPHeader(BaseModel):
29
29
  class OutputXsiamFailedRequestLoggingMode(str, Enum, metaclass=utils.OpenEnumMeta):
30
30
  r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
31
31
 
32
- # Payload
33
32
  PAYLOAD = "payload"
34
- # Payload + Headers
35
33
  PAYLOAD_AND_HEADERS = "payloadAndHeaders"
36
- # None
37
34
  NONE = "none"
38
35
 
39
36
 
@@ -101,11 +98,8 @@ class OutputXsiamTimeoutRetrySettings(BaseModel):
101
98
  class OutputXsiamBackpressureBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
102
99
  r"""How to handle events when all receivers are exerting backpressure"""
103
100
 
104
- # Block
105
101
  BLOCK = "block"
106
- # Drop
107
102
  DROP = "drop"
108
- # Persistent Queue
109
103
  QUEUE = "queue"
110
104
 
111
105
 
@@ -125,29 +119,22 @@ class OutputXsiamURL(BaseModel):
125
119
  class OutputXsiamCompression(str, Enum, metaclass=utils.OpenEnumMeta):
126
120
  r"""Codec to use to compress the persisted data"""
127
121
 
128
- # None
129
122
  NONE = "none"
130
- # Gzip
131
123
  GZIP = "gzip"
132
124
 
133
125
 
134
126
  class OutputXsiamQueueFullBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
135
127
  r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
136
128
 
137
- # Block
138
129
  BLOCK = "block"
139
- # Drop new data
140
130
  DROP = "drop"
141
131
 
142
132
 
143
133
  class OutputXsiamMode(str, Enum, metaclass=utils.OpenEnumMeta):
144
134
  r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
145
135
 
146
- # Error
147
136
  ERROR = "error"
148
- # Backpressure
149
137
  BACKPRESSURE = "backpressure"
150
- # Always On
151
138
  ALWAYS = "always"
152
139
 
153
140
 
@@ -8,27 +8,26 @@ from typing_extensions import Annotated, NotRequired, TypedDict
8
8
 
9
9
 
10
10
  class PackInfoTagsTypedDict(TypedDict):
11
- data_type: NotRequired[List[str]]
11
+ data_type: List[str]
12
+ technology: List[str]
12
13
  domain: NotRequired[List[str]]
13
14
  streamtags: NotRequired[List[str]]
14
- technology: NotRequired[List[str]]
15
15
 
16
16
 
17
17
  class PackInfoTags(BaseModel):
18
- data_type: Annotated[Optional[List[str]], pydantic.Field(alias="dataType")] = None
18
+ data_type: Annotated[List[str], pydantic.Field(alias="dataType")]
19
+
20
+ technology: List[str]
19
21
 
20
22
  domain: Optional[List[str]] = None
21
23
 
22
24
  streamtags: Optional[List[str]] = None
23
25
 
24
- technology: Optional[List[str]] = None
25
-
26
26
 
27
27
  class PackInfoTypedDict(TypedDict):
28
28
  id: str
29
29
  source: str
30
30
  author: NotRequired[str]
31
- dependencies: NotRequired[Dict[str, str]]
32
31
  description: NotRequired[str]
33
32
  display_name: NotRequired[str]
34
33
  exports: NotRequired[List[str]]
@@ -49,8 +48,6 @@ class PackInfo(BaseModel):
49
48
 
50
49
  author: Optional[str] = None
51
50
 
52
- dependencies: Optional[Dict[str, str]] = None
53
-
54
51
  description: Optional[str] = None
55
52
 
56
53
  display_name: Annotated[Optional[str], pydantic.Field(alias="displayName")] = None
@@ -8,27 +8,26 @@ from typing_extensions import Annotated, NotRequired, TypedDict
8
8
 
9
9
 
10
10
  class PackInstallInfoTagsTypedDict(TypedDict):
11
- data_type: NotRequired[List[str]]
11
+ data_type: List[str]
12
+ technology: List[str]
12
13
  domain: NotRequired[List[str]]
13
14
  streamtags: NotRequired[List[str]]
14
- technology: NotRequired[List[str]]
15
15
 
16
16
 
17
17
  class PackInstallInfoTags(BaseModel):
18
- data_type: Annotated[Optional[List[str]], pydantic.Field(alias="dataType")] = None
18
+ data_type: Annotated[List[str], pydantic.Field(alias="dataType")]
19
+
20
+ technology: List[str]
19
21
 
20
22
  domain: Optional[List[str]] = None
21
23
 
22
24
  streamtags: Optional[List[str]] = None
23
25
 
24
- technology: Optional[List[str]] = None
25
-
26
26
 
27
27
  class PackInstallInfoTypedDict(TypedDict):
28
28
  id: str
29
29
  source: str
30
30
  author: NotRequired[str]
31
- dependencies: NotRequired[Dict[str, str]]
32
31
  description: NotRequired[str]
33
32
  display_name: NotRequired[str]
34
33
  exports: NotRequired[List[str]]
@@ -50,8 +49,6 @@ class PackInstallInfo(BaseModel):
50
49
 
51
50
  author: Optional[str] = None
52
51
 
53
- dependencies: Optional[Dict[str, str]] = None
54
-
55
52
  description: Optional[str] = None
56
53
 
57
54
  display_name: Annotated[Optional[str], pydantic.Field(alias="displayName")] = None
@@ -5,9 +5,9 @@ from cribl_control_plane.types import BaseModel
5
5
  from typing_extensions import TypedDict
6
6
 
7
7
 
8
- class UploadPackResponseTypedDict(TypedDict):
9
- source: str
8
+ class RouteCloneConfTypedDict(TypedDict):
9
+ pass
10
10
 
11
11
 
12
- class UploadPackResponse(BaseModel):
13
- source: str
12
+ class RouteCloneConf(BaseModel):
13
+ pass
@@ -1,9 +1,10 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
+ from .routecloneconf import RouteCloneConf, RouteCloneConfTypedDict
4
5
  from cribl_control_plane.types import BaseModel
5
6
  import pydantic
6
- from typing import Dict, List, Optional
7
+ from typing import List, Optional
7
8
  from typing_extensions import Annotated, NotRequired, TypedDict
8
9
 
9
10
 
@@ -12,7 +13,7 @@ class RouteConfTypedDict(TypedDict):
12
13
  id: str
13
14
  name: str
14
15
  pipeline: str
15
- clones: NotRequired[List[Dict[str, str]]]
16
+ clones: NotRequired[List[RouteCloneConfTypedDict]]
16
17
  context: NotRequired[str]
17
18
  description: NotRequired[str]
18
19
  disabled: NotRequired[bool]
@@ -32,7 +33,7 @@ class RouteConf(BaseModel):
32
33
 
33
34
  pipeline: str
34
35
 
35
- clones: Optional[List[Dict[str, str]]] = None
36
+ clones: Optional[List[RouteCloneConf]] = None
36
37
 
37
38
  context: Optional[str] = None
38
39
 
@@ -363,13 +363,9 @@ class RunnableJobCollectionTimeWarning(BaseModel):
363
363
 
364
364
 
365
365
  class WhereToCapture(int, Enum, metaclass=utils.OpenEnumMeta):
366
- # 1. Before pre-processing Pipeline
367
366
  ZERO = 0
368
- # 2. Before the Routes
369
367
  ONE = 1
370
- # 3. Before post-processing Pipeline
371
368
  TWO = 2
372
- # 4. Before the Destination
373
369
  THREE = 3
374
370
 
375
371
 
@@ -6,8 +6,7 @@ from cribl_control_plane._hooks import HookContext
6
6
  from cribl_control_plane.types import BaseModel, OptionalNullable, UNSET
7
7
  from cribl_control_plane.utils import get_security_from_env
8
8
  from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
9
- import io
10
- from typing import Any, IO, Mapping, Optional, Union, cast
9
+ from typing import Any, Mapping, Optional, Union, cast
11
10
 
12
11
 
13
12
  class Packs(BaseSDK):
@@ -24,9 +23,9 @@ class Packs(BaseSDK):
24
23
  timeout_ms: Optional[int] = None,
25
24
  http_headers: Optional[Mapping[str, str]] = None,
26
25
  ) -> models.CreatePacksResponse:
27
- r"""Install a Pack
26
+ r"""Create or install a Pack
28
27
 
29
- Install a Pack.<br><br>To install an uploaded Pack, provide the <code>source</code> value from the <code>PUT /packs</code> response as the <code>source</code> parameter in the request body.<br><br>To install a Pack by importing from a URL, provide the direct URL location of the <code>.crbl</code> file for the Pack as the <code>source</code> parameter in the request body.<br><br>To install a Pack by importing from a Git repository, provide <code>git+<repo-url></code> as the <code>source</code> parameter in the request body.<br><br>If you do not include the <code>source</code> parameter in the request body, an empty Pack is created.
28
+ Create or install a Pack.
30
29
 
31
30
  :param request: The request object to send.
32
31
  :param retries: Override the default retry configuration for this method
@@ -116,9 +115,9 @@ class Packs(BaseSDK):
116
115
  timeout_ms: Optional[int] = None,
117
116
  http_headers: Optional[Mapping[str, str]] = None,
118
117
  ) -> models.CreatePacksResponse:
119
- r"""Install a Pack
118
+ r"""Create or install a Pack
120
119
 
121
- Install a Pack.<br><br>To install an uploaded Pack, provide the <code>source</code> value from the <code>PUT /packs</code> response as the <code>source</code> parameter in the request body.<br><br>To install a Pack by importing from a URL, provide the direct URL location of the <code>.crbl</code> file for the Pack as the <code>source</code> parameter in the request body.<br><br>To install a Pack by importing from a Git repository, provide <code>git+<repo-url></code> as the <code>source</code> parameter in the request body.<br><br>If you do not include the <code>source</code> parameter in the request body, an empty Pack is created.
120
+ Create or install a Pack.
122
121
 
123
122
  :param request: The request object to send.
124
123
  :param retries: Override the default retry configuration for this method
@@ -371,200 +370,6 @@ class Packs(BaseSDK):
371
370
 
372
371
  raise errors.APIError("Unexpected response received", http_res)
373
372
 
374
- def upload(
375
- self,
376
- *,
377
- filename: str,
378
- request_body: Union[bytes, IO[bytes], io.BufferedReader],
379
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
380
- server_url: Optional[str] = None,
381
- timeout_ms: Optional[int] = None,
382
- http_headers: Optional[Mapping[str, str]] = None,
383
- ) -> models.UploadPackResponse:
384
- r"""Upload a Pack file
385
-
386
- Upload a Pack file. Returns the <code>source</code> ID needed to install the Pack with <code>POST /packs source</code>, which you must call separately.
387
-
388
- :param filename: Filename of the Pack file to upload.
389
- :param request_body: Binary file content
390
- :param retries: Override the default retry configuration for this method
391
- :param server_url: Override the default server URL for this method
392
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
393
- :param http_headers: Additional headers to set or replace on requests.
394
- """
395
- base_url = None
396
- url_variables = None
397
- if timeout_ms is None:
398
- timeout_ms = self.sdk_configuration.timeout_ms
399
-
400
- if server_url is not None:
401
- base_url = server_url
402
- else:
403
- base_url = self._get_url(base_url, url_variables)
404
-
405
- request = models.UpdatePacksRequest(
406
- filename=filename,
407
- request_body=request_body,
408
- )
409
-
410
- req = self._build_request(
411
- method="PUT",
412
- path="/packs",
413
- base_url=base_url,
414
- url_variables=url_variables,
415
- request=request,
416
- request_body_required=True,
417
- request_has_path_params=False,
418
- request_has_query_params=True,
419
- user_agent_header="user-agent",
420
- accept_header_value="application/json",
421
- http_headers=http_headers,
422
- security=self.sdk_configuration.security,
423
- get_serialized_body=lambda: utils.serialize_request_body(
424
- request.request_body,
425
- False,
426
- False,
427
- "raw",
428
- Union[bytes, IO[bytes], io.BufferedReader],
429
- ),
430
- timeout_ms=timeout_ms,
431
- )
432
-
433
- if retries == UNSET:
434
- if self.sdk_configuration.retry_config is not UNSET:
435
- retries = self.sdk_configuration.retry_config
436
-
437
- retry_config = None
438
- if isinstance(retries, utils.RetryConfig):
439
- retry_config = (retries, ["429", "500", "502", "503", "504"])
440
-
441
- http_res = self.do_request(
442
- hook_ctx=HookContext(
443
- config=self.sdk_configuration,
444
- base_url=base_url or "",
445
- operation_id="updatePacks",
446
- oauth2_scopes=[],
447
- security_source=get_security_from_env(
448
- self.sdk_configuration.security, models.Security
449
- ),
450
- ),
451
- request=req,
452
- error_status_codes=["401", "4XX", "500", "5XX"],
453
- retry_config=retry_config,
454
- )
455
-
456
- response_data: Any = None
457
- if utils.match_response(http_res, "200", "application/json"):
458
- return unmarshal_json_response(models.UploadPackResponse, http_res)
459
- if utils.match_response(http_res, "500", "application/json"):
460
- response_data = unmarshal_json_response(errors.ErrorData, http_res)
461
- raise errors.Error(response_data, http_res)
462
- if utils.match_response(http_res, ["401", "4XX"], "*"):
463
- http_res_text = utils.stream_to_text(http_res)
464
- raise errors.APIError("API error occurred", http_res, http_res_text)
465
- if utils.match_response(http_res, "5XX", "*"):
466
- http_res_text = utils.stream_to_text(http_res)
467
- raise errors.APIError("API error occurred", http_res, http_res_text)
468
-
469
- raise errors.APIError("Unexpected response received", http_res)
470
-
471
- async def upload_async(
472
- self,
473
- *,
474
- filename: str,
475
- request_body: Union[bytes, IO[bytes], io.BufferedReader],
476
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
477
- server_url: Optional[str] = None,
478
- timeout_ms: Optional[int] = None,
479
- http_headers: Optional[Mapping[str, str]] = None,
480
- ) -> models.UploadPackResponse:
481
- r"""Upload a Pack file
482
-
483
- Upload a Pack file. Returns the <code>source</code> ID needed to install the Pack with <code>POST /packs source</code>, which you must call separately.
484
-
485
- :param filename: Filename of the Pack file to upload.
486
- :param request_body: Binary file content
487
- :param retries: Override the default retry configuration for this method
488
- :param server_url: Override the default server URL for this method
489
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
490
- :param http_headers: Additional headers to set or replace on requests.
491
- """
492
- base_url = None
493
- url_variables = None
494
- if timeout_ms is None:
495
- timeout_ms = self.sdk_configuration.timeout_ms
496
-
497
- if server_url is not None:
498
- base_url = server_url
499
- else:
500
- base_url = self._get_url(base_url, url_variables)
501
-
502
- request = models.UpdatePacksRequest(
503
- filename=filename,
504
- request_body=request_body,
505
- )
506
-
507
- req = self._build_request_async(
508
- method="PUT",
509
- path="/packs",
510
- base_url=base_url,
511
- url_variables=url_variables,
512
- request=request,
513
- request_body_required=True,
514
- request_has_path_params=False,
515
- request_has_query_params=True,
516
- user_agent_header="user-agent",
517
- accept_header_value="application/json",
518
- http_headers=http_headers,
519
- security=self.sdk_configuration.security,
520
- get_serialized_body=lambda: utils.serialize_request_body(
521
- request.request_body,
522
- False,
523
- False,
524
- "raw",
525
- Union[bytes, IO[bytes], io.BufferedReader],
526
- ),
527
- timeout_ms=timeout_ms,
528
- )
529
-
530
- if retries == UNSET:
531
- if self.sdk_configuration.retry_config is not UNSET:
532
- retries = self.sdk_configuration.retry_config
533
-
534
- retry_config = None
535
- if isinstance(retries, utils.RetryConfig):
536
- retry_config = (retries, ["429", "500", "502", "503", "504"])
537
-
538
- http_res = await self.do_request_async(
539
- hook_ctx=HookContext(
540
- config=self.sdk_configuration,
541
- base_url=base_url or "",
542
- operation_id="updatePacks",
543
- oauth2_scopes=[],
544
- security_source=get_security_from_env(
545
- self.sdk_configuration.security, models.Security
546
- ),
547
- ),
548
- request=req,
549
- error_status_codes=["401", "4XX", "500", "5XX"],
550
- retry_config=retry_config,
551
- )
552
-
553
- response_data: Any = None
554
- if utils.match_response(http_res, "200", "application/json"):
555
- return unmarshal_json_response(models.UploadPackResponse, http_res)
556
- if utils.match_response(http_res, "500", "application/json"):
557
- response_data = unmarshal_json_response(errors.ErrorData, http_res)
558
- raise errors.Error(response_data, http_res)
559
- if utils.match_response(http_res, ["401", "4XX"], "*"):
560
- http_res_text = await utils.stream_to_text_async(http_res)
561
- raise errors.APIError("API error occurred", http_res, http_res_text)
562
- if utils.match_response(http_res, "5XX", "*"):
563
- http_res_text = await utils.stream_to_text_async(http_res)
564
- raise errors.APIError("API error occurred", http_res, http_res_text)
565
-
566
- raise errors.APIError("Unexpected response received", http_res)
567
-
568
373
  def delete(
569
374
  self,
570
375
  *,
@@ -928,7 +733,7 @@ class Packs(BaseSDK):
928
733
  ) -> models.UpdatePacksByIDResponse:
929
734
  r"""Upgrade a Pack
930
735
 
931
- Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack.Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
736
+ Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack. Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
932
737
 
933
738
  :param id: The <code>id</code> of the Pack to upgrade.
934
739
  :param source:
@@ -1036,7 +841,7 @@ class Packs(BaseSDK):
1036
841
  ) -> models.UpdatePacksByIDResponse:
1037
842
  r"""Upgrade a Pack
1038
843
 
1039
- Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack.Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
844
+ Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack. Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
1040
845
 
1041
846
  :param id: The <code>id</code> of the Pack to upgrade.
1042
847
  :param source:
@@ -18,7 +18,7 @@ class Tokens(BaseSDK):
18
18
  server_url: Optional[str] = None,
19
19
  timeout_ms: Optional[int] = None,
20
20
  http_headers: Optional[Mapping[str, str]] = None,
21
- ) -> models.LoginResponse:
21
+ ) -> models.AuthToken:
22
22
  r"""Log in and fetch an authentication token
23
23
 
24
24
  This endpoint is unavailable on Cribl.Cloud. Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
@@ -85,13 +85,8 @@ class Tokens(BaseSDK):
85
85
  )
86
86
 
87
87
  if utils.match_response(http_res, "200", "application/json"):
88
- return models.LoginResponse(
89
- result=unmarshal_json_response(models.AuthToken, http_res), headers={}
90
- )
91
- if utils.match_response(http_res, "429", "*"):
92
- http_res_text = utils.stream_to_text(http_res)
93
- raise errors.APIError("API error occurred", http_res, http_res_text)
94
- if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
88
+ return unmarshal_json_response(models.AuthToken, http_res)
89
+ if utils.match_response(http_res, ["401", "403", "429", "4XX"], "*"):
95
90
  http_res_text = utils.stream_to_text(http_res)
96
91
  raise errors.APIError("API error occurred", http_res, http_res_text)
97
92
  if utils.match_response(http_res, "5XX", "*"):
@@ -109,7 +104,7 @@ class Tokens(BaseSDK):
109
104
  server_url: Optional[str] = None,
110
105
  timeout_ms: Optional[int] = None,
111
106
  http_headers: Optional[Mapping[str, str]] = None,
112
- ) -> models.LoginResponse:
107
+ ) -> models.AuthToken:
113
108
  r"""Log in and fetch an authentication token
114
109
 
115
110
  This endpoint is unavailable on Cribl.Cloud. Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
@@ -176,13 +171,8 @@ class Tokens(BaseSDK):
176
171
  )
177
172
 
178
173
  if utils.match_response(http_res, "200", "application/json"):
179
- return models.LoginResponse(
180
- result=unmarshal_json_response(models.AuthToken, http_res), headers={}
181
- )
182
- if utils.match_response(http_res, "429", "*"):
183
- http_res_text = await utils.stream_to_text_async(http_res)
184
- raise errors.APIError("API error occurred", http_res, http_res_text)
185
- if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
174
+ return unmarshal_json_response(models.AuthToken, http_res)
175
+ if utils.match_response(http_res, ["401", "403", "429", "4XX"], "*"):
186
176
  http_res_text = await utils.stream_to_text_async(http_res)
187
177
  raise errors.APIError("API error occurred", http_res, http_res_text)
188
178
  if utils.match_response(http_res, "5XX", "*"):