cribl-control-plane 0.4.0b23__py3-none-any.whl → 0.5.0b3__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.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/collectors_sdk.py +993 -0
- cribl_control_plane/models/__init__.py +2161 -734
- cribl_control_plane/models/configgroup.py +3 -0
- cribl_control_plane/models/countedsavedjob.py +20 -0
- cribl_control_plane/models/createsavedjobop.py +30 -0
- cribl_control_plane/models/deletesavedjobbyidop.py +42 -0
- cribl_control_plane/models/functionaggregatemetrics.py +7 -144
- cribl_control_plane/models/functionaggregation.py +7 -110
- cribl_control_plane/models/functionautotimestamp.py +7 -111
- cribl_control_plane/models/functioncef.py +6 -51
- cribl_control_plane/models/functionchain.py +6 -12
- cribl_control_plane/models/functionclone.py +7 -13
- cribl_control_plane/models/functioncode.py +8 -35
- cribl_control_plane/models/functioncomment.py +6 -12
- cribl_control_plane/models/functionconfschemaaggregatemetrics.py +153 -0
- cribl_control_plane/models/functionconfschemaaggregation.py +114 -0
- cribl_control_plane/models/functionconfschemaautotimestamp.py +116 -0
- cribl_control_plane/models/functionconfschemacef.py +83 -0
- cribl_control_plane/models/functionconfschemachain.py +16 -0
- cribl_control_plane/models/functionconfschemaclone.py +16 -0
- cribl_control_plane/models/functionconfschemacode.py +38 -0
- cribl_control_plane/models/functionconfschemacomment.py +16 -0
- cribl_control_plane/models/functionconfschemadistinct.py +41 -0
- cribl_control_plane/models/functionconfschemadnslookup.py +193 -0
- cribl_control_plane/models/functionconfschemadrop.py +13 -0
- cribl_control_plane/models/functionconfschemadropdimensions.py +31 -0
- cribl_control_plane/models/functionconfschemadynamicsampling.py +67 -0
- cribl_control_plane/models/functionconfschemaeval.py +44 -0
- cribl_control_plane/models/functionconfschemaeventbreaker.py +51 -0
- cribl_control_plane/models/functionconfschemaeventstats.py +34 -0
- cribl_control_plane/models/functionconfschemaexternaldata.py +13 -0
- cribl_control_plane/models/functionconfschemaflatten.py +31 -0
- cribl_control_plane/models/functionconfschemafoldkeys.py +31 -0
- cribl_control_plane/models/functionconfschemagenstats.py +14 -0
- cribl_control_plane/models/functionconfschemageoip.py +66 -0
- cribl_control_plane/models/functionconfschemagrok.py +38 -0
- cribl_control_plane/models/functionconfschemahandlebar.py +56 -0
- cribl_control_plane/models/functionconfschemajoin.py +55 -0
- cribl_control_plane/models/functionconfschemajsonunroll.py +21 -0
- cribl_control_plane/models/functionconfschemalakeexport.py +44 -0
- cribl_control_plane/models/functionconfschemalimit.py +16 -0
- cribl_control_plane/models/functionconfschemalocalsearchdatatypeparser.py +17 -0
- cribl_control_plane/models/functionconfschemalocalsearchrulesetrunner.py +40 -0
- cribl_control_plane/models/functionconfschemalookup.py +92 -0
- cribl_control_plane/models/functionconfschemamask.py +63 -0
- cribl_control_plane/models/functionconfschemamvexpand.py +76 -0
- cribl_control_plane/models/functionconfschemamvpull.py +45 -0
- cribl_control_plane/models/functionconfschemanotificationpolicies.py +129 -0
- cribl_control_plane/models/functionconfschemanotifications.py +26 -0
- cribl_control_plane/models/functionconfschemanotify.py +149 -0
- cribl_control_plane/models/functionconfschemanumerify.py +63 -0
- cribl_control_plane/models/functionconfschemaotlplogs.py +24 -0
- cribl_control_plane/models/functionconfschemaotlpmetrics.py +61 -0
- cribl_control_plane/models/functionconfschemaotlptraces.py +54 -0
- cribl_control_plane/models/functionconfschemapack.py +24 -0
- cribl_control_plane/models/functionconfschemapivot.py +31 -0
- cribl_control_plane/models/functionconfschemapublishmetrics.py +98 -0
- cribl_control_plane/models/functionconfschemaredis.py +121 -0
- cribl_control_plane/models/functionconfschemaregexextract.py +55 -0
- cribl_control_plane/models/functionconfschemaregexfilter.py +38 -0
- cribl_control_plane/models/functionconfschemarename.py +49 -0
- cribl_control_plane/models/functionconfschemarollupmetrics.py +57 -0
- cribl_control_plane/models/functionconfschemasampling.py +32 -0
- cribl_control_plane/models/functionconfschemasend.py +84 -0
- cribl_control_plane/models/functionconfschemasensitivedatascanner.py +75 -0
- cribl_control_plane/models/functionconfschemaserde.py +105 -0
- cribl_control_plane/models/functionconfschemaserialize.py +78 -0
- cribl_control_plane/models/functionconfschemasidlookup.py +34 -0
- cribl_control_plane/models/functionconfschemasnmptrapserialize.py +92 -0
- cribl_control_plane/models/functionconfschemasort.py +41 -0
- cribl_control_plane/models/functionconfschemastore.py +75 -0
- cribl_control_plane/models/functionconfschemasuppress.py +57 -0
- cribl_control_plane/models/functionconfschematee.py +32 -0
- cribl_control_plane/models/functionconfschematrimtimestamp.py +16 -0
- cribl_control_plane/models/functionconfschemaunion.py +22 -0
- cribl_control_plane/models/functionconfschemaunroll.py +22 -0
- cribl_control_plane/models/functionconfschemawindow.py +40 -0
- cribl_control_plane/models/functionconfschemaxmlunroll.py +34 -0
- cribl_control_plane/models/functiondistinct.py +7 -37
- cribl_control_plane/models/functiondnslookup.py +7 -188
- cribl_control_plane/models/functiondrop.py +8 -12
- cribl_control_plane/models/functiondropdimensions.py +7 -25
- cribl_control_plane/models/functiondynamicsampling.py +6 -58
- cribl_control_plane/models/functioneval.py +9 -43
- cribl_control_plane/models/functioneventbreaker.py +6 -40
- cribl_control_plane/models/functioneventstats.py +7 -30
- cribl_control_plane/models/functionexternaldata.py +6 -10
- cribl_control_plane/models/functionflatten.py +7 -28
- cribl_control_plane/models/functionfoldkeys.py +6 -26
- cribl_control_plane/models/functiongenstats.py +7 -11
- cribl_control_plane/models/functiongeoip.py +7 -58
- cribl_control_plane/models/functiongrok.py +9 -35
- cribl_control_plane/models/functionhandlebar.py +6 -49
- cribl_control_plane/models/functionjoin.py +9 -52
- cribl_control_plane/models/functionjsonunroll.py +6 -17
- cribl_control_plane/models/functionlakeexport.py +6 -39
- cribl_control_plane/models/functionlimit.py +6 -12
- cribl_control_plane/models/functionlocalsearchdatatypeparser.py +6 -12
- cribl_control_plane/models/functionlocalsearchrulesetrunner.py +7 -34
- cribl_control_plane/models/functionlookup.py +7 -86
- cribl_control_plane/models/functionmask.py +9 -61
- cribl_control_plane/models/functionmvexpand.py +7 -66
- cribl_control_plane/models/functionmvpull.py +6 -36
- cribl_control_plane/models/functionnotificationpolicies.py +8 -125
- cribl_control_plane/models/functionnotifications.py +6 -22
- cribl_control_plane/models/functionnotify.py +6 -133
- cribl_control_plane/models/functionnumerify.py +7 -57
- cribl_control_plane/models/functionotlplogs.py +6 -19
- cribl_control_plane/models/functionotlpmetrics.py +7 -56
- cribl_control_plane/models/functionotlptraces.py +6 -48
- cribl_control_plane/models/functionpack.py +9 -20
- cribl_control_plane/models/functionpivot.py +7 -23
- cribl_control_plane/models/functionpublishmetrics.py +7 -91
- cribl_control_plane/models/functionredis.py +7 -111
- cribl_control_plane/models/functionregexextract.py +7 -50
- cribl_control_plane/models/functionregexfilter.py +7 -33
- cribl_control_plane/models/functionrename.py +7 -45
- cribl_control_plane/models/functionrollupmetrics.py +7 -52
- cribl_control_plane/models/functionsampling.py +7 -28
- cribl_control_plane/models/functionsend.py +8 -80
- cribl_control_plane/models/functionsensitivedatascanner.py +7 -66
- cribl_control_plane/models/functionserde.py +6 -98
- cribl_control_plane/models/functionserialize.py +7 -72
- cribl_control_plane/models/functionsidlookup.py +7 -31
- cribl_control_plane/models/functionsnmptrapserialize.py +6 -81
- cribl_control_plane/models/functionsort.py +8 -36
- cribl_control_plane/models/functionstore.py +6 -69
- cribl_control_plane/models/functionsuppress.py +6 -52
- cribl_control_plane/models/functiontee.py +6 -30
- cribl_control_plane/models/functiontrimtimestamp.py +6 -12
- cribl_control_plane/models/functionunion.py +9 -20
- cribl_control_plane/models/functionunroll.py +6 -17
- cribl_control_plane/models/functionwindow.py +7 -34
- cribl_control_plane/models/functionxmlunroll.py +6 -29
- cribl_control_plane/models/getsavedjobbyidop.py +33 -0
- cribl_control_plane/models/getsavedjobop.py +40 -0
- cribl_control_plane/models/groupcreaterequest.py +3 -0
- cribl_control_plane/models/heartbeatmetadata.py +42 -0
- cribl_control_plane/models/input.py +1 -1
- cribl_control_plane/models/inputedgeprometheus.py +11 -11
- cribl_control_plane/models/inputprometheus.py +23 -18
- cribl_control_plane/models/nodeprovidedinfo.py +42 -0
- cribl_control_plane/models/output.py +15 -9
- cribl_control_plane/models/outputclickhouse.py +31 -0
- cribl_control_plane/models/outputcriblhttp.py +7 -0
- cribl_control_plane/models/outputcriblsearchengine.py +655 -0
- cribl_control_plane/models/outputnetflow.py +16 -2
- cribl_control_plane/models/pipeline.py +52 -4
- cribl_control_plane/models/pipelinefunctionaggregatemetrics.py +195 -0
- cribl_control_plane/models/pipelinefunctionaggregation.py +159 -0
- cribl_control_plane/models/pipelinefunctionautotimestamp.py +56 -0
- cribl_control_plane/models/pipelinefunctioncef.py +96 -0
- cribl_control_plane/models/pipelinefunctionchain.py +62 -0
- cribl_control_plane/models/pipelinefunctionclone.py +56 -0
- cribl_control_plane/models/pipelinefunctioncode.py +56 -0
- cribl_control_plane/models/pipelinefunctioncomment.py +56 -0
- cribl_control_plane/models/pipelinefunctionconf.py +343 -46
- cribl_control_plane/models/pipelinefunctionconf_input.py +353 -0
- cribl_control_plane/models/pipelinefunctiondistinct.py +86 -0
- cribl_control_plane/models/pipelinefunctiondnslookup.py +56 -0
- cribl_control_plane/models/pipelinefunctiondrop.py +56 -0
- cribl_control_plane/models/pipelinefunctiondropdimensions.py +74 -0
- cribl_control_plane/models/pipelinefunctiondynamicsampling.py +111 -0
- cribl_control_plane/models/pipelinefunctioneval.py +56 -0
- cribl_control_plane/models/pipelinefunctioneventbreaker.py +95 -0
- cribl_control_plane/models/pipelinefunctioneventstats.py +79 -0
- cribl_control_plane/models/pipelinefunctionexternaldata.py +56 -0
- cribl_control_plane/models/pipelinefunctionflatten.py +56 -0
- cribl_control_plane/models/pipelinefunctionfoldkeys.py +56 -0
- cribl_control_plane/models/pipelinefunctiongenstats.py +56 -0
- cribl_control_plane/models/pipelinefunctiongeoip.py +109 -0
- cribl_control_plane/models/pipelinefunctiongrok.py +83 -0
- cribl_control_plane/models/pipelinefunctionhandlebar.py +99 -0
- cribl_control_plane/models/pipelinefunctionjoin.py +100 -0
- cribl_control_plane/models/pipelinefunctionjsonunroll.py +67 -0
- cribl_control_plane/models/pipelinefunctionlakeexport.py +89 -0
- cribl_control_plane/models/pipelinefunctionlimit.py +56 -0
- cribl_control_plane/models/pipelinefunctionlocalsearchdatatypeparser.py +62 -0
- cribl_control_plane/models/pipelinefunctionlocalsearchrulesetrunner.py +56 -0
- cribl_control_plane/models/pipelinefunctionlookup.py +136 -0
- cribl_control_plane/models/pipelinefunctionmask.py +108 -0
- cribl_control_plane/models/pipelinefunctionmvexpand.py +116 -0
- cribl_control_plane/models/pipelinefunctionmvpull.py +86 -0
- cribl_control_plane/models/pipelinefunctionnotificationpolicies.py +56 -0
- cribl_control_plane/models/pipelinefunctionnotifications.py +72 -0
- cribl_control_plane/models/pipelinefunctionnotify.py +189 -0
- cribl_control_plane/models/pipelinefunctionnumerify.py +56 -0
- cribl_control_plane/models/pipelinefunctionotlplogs.py +56 -0
- cribl_control_plane/models/pipelinefunctionotlpmetrics.py +56 -0
- cribl_control_plane/models/pipelinefunctionotlptraces.py +56 -0
- cribl_control_plane/models/pipelinefunctionpack.py +67 -0
- cribl_control_plane/models/pipelinefunctionpivot.py +72 -0
- cribl_control_plane/models/pipelinefunctionpublishmetrics.py +56 -0
- cribl_control_plane/models/pipelinefunctionredis.py +165 -0
- cribl_control_plane/models/pipelinefunctionregexextract.py +100 -0
- cribl_control_plane/models/pipelinefunctionregexfilter.py +56 -0
- cribl_control_plane/models/pipelinefunctionrename.py +56 -0
- cribl_control_plane/models/pipelinefunctionrollupmetrics.py +56 -0
- cribl_control_plane/models/pipelinefunctionsampling.py +56 -0
- cribl_control_plane/models/pipelinefunctionsend.py +128 -0
- cribl_control_plane/models/pipelinefunctionsensitivedatascanner.py +120 -0
- cribl_control_plane/models/pipelinefunctionserde.py +149 -0
- cribl_control_plane/models/pipelinefunctionserialize.py +122 -0
- cribl_control_plane/models/pipelinefunctionsidlookup.py +56 -0
- cribl_control_plane/models/pipelinefunctionsnmptrapserialize.py +56 -0
- cribl_control_plane/models/pipelinefunctionsort.py +84 -0
- cribl_control_plane/models/pipelinefunctionstore.py +120 -0
- cribl_control_plane/models/pipelinefunctionsuppress.py +102 -0
- cribl_control_plane/models/pipelinefunctiontee.py +77 -0
- cribl_control_plane/models/pipelinefunctiontrimtimestamp.py +56 -0
- cribl_control_plane/models/pipelinefunctionunion.py +67 -0
- cribl_control_plane/models/pipelinefunctionunroll.py +67 -0
- cribl_control_plane/models/pipelinefunctionwindow.py +83 -0
- cribl_control_plane/models/pipelinefunctionxmlunroll.py +79 -0
- cribl_control_plane/models/runnablejobcollection.py +11 -10
- cribl_control_plane/models/runnablejobexecutor.py +8 -8
- cribl_control_plane/models/savedjob.py +26 -0
- cribl_control_plane/models/savedjobcollection.py +411 -0
- cribl_control_plane/models/savedjobexecutor.py +301 -0
- cribl_control_plane/models/savedjobscheduledsearch.py +278 -0
- cribl_control_plane/models/updatepipelinebyidop.py +4 -3
- cribl_control_plane/models/updatesavedjobbyidop.py +42 -0
- cribl_control_plane/pipelines.py +16 -16
- cribl_control_plane/sdk.py +4 -0
- {cribl_control_plane-0.4.0b23.dist-info → cribl_control_plane-0.5.0b3.dist-info}/METADATA +10 -2
- {cribl_control_plane-0.4.0b23.dist-info → cribl_control_plane-0.5.0b3.dist-info}/RECORD +229 -88
- {cribl_control_plane-0.4.0b23.dist-info → cribl_control_plane-0.5.0b3.dist-info}/WHEEL +0 -0
- {cribl_control_plane-0.4.0b23.dist-info → cribl_control_plane-0.5.0b3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
4
|
+
from .functionconfschemapublishmetrics import (
|
|
5
|
+
FunctionConfSchemaPublishMetrics,
|
|
6
|
+
FunctionConfSchemaPublishMetricsTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from cribl_control_plane.types import BaseModel
|
|
6
|
-
from cribl_control_plane.utils import validate_open_enum
|
|
7
9
|
from enum import Enum
|
|
8
10
|
import pydantic
|
|
9
|
-
from
|
|
10
|
-
from pydantic.functional_validators import PlainValidator
|
|
11
|
-
from typing import Any, Dict, List, Optional
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
@@ -16,90 +16,6 @@ class FunctionPublishMetricsID(str, Enum):
|
|
|
16
16
|
PUBLISH_METRICS = "publish_metrics"
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class FunctionPublishMetricsMetricType(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
20
|
-
# Counter
|
|
21
|
-
COUNTER = "counter"
|
|
22
|
-
# Timer
|
|
23
|
-
TIMER = "timer"
|
|
24
|
-
# Gauge
|
|
25
|
-
GAUGE = "gauge"
|
|
26
|
-
# Distribution
|
|
27
|
-
DISTRIBUTION = "distribution"
|
|
28
|
-
# Summary
|
|
29
|
-
SUMMARY = "summary"
|
|
30
|
-
# Histogram
|
|
31
|
-
HISTOGRAM = "histogram"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class FunctionPublishMetricsFieldTypedDict(TypedDict):
|
|
35
|
-
in_field_name: str
|
|
36
|
-
r"""The name of the field in the event that contains the metric value"""
|
|
37
|
-
out_field_expr: NotRequired[str]
|
|
38
|
-
r"""JavaScript expression to evaluate the metric field name. Defaults to Event Field Name."""
|
|
39
|
-
metric_type: NotRequired[FunctionPublishMetricsMetricType]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class FunctionPublishMetricsField(BaseModel):
|
|
43
|
-
in_field_name: Annotated[str, pydantic.Field(alias="inFieldName")]
|
|
44
|
-
r"""The name of the field in the event that contains the metric value"""
|
|
45
|
-
|
|
46
|
-
out_field_expr: Annotated[Optional[str], pydantic.Field(alias="outFieldExpr")] = (
|
|
47
|
-
None
|
|
48
|
-
)
|
|
49
|
-
r"""JavaScript expression to evaluate the metric field name. Defaults to Event Field Name."""
|
|
50
|
-
|
|
51
|
-
metric_type: Annotated[
|
|
52
|
-
Annotated[
|
|
53
|
-
Optional[FunctionPublishMetricsMetricType],
|
|
54
|
-
PlainValidator(validate_open_enum(False)),
|
|
55
|
-
],
|
|
56
|
-
pydantic.Field(alias="metricType"),
|
|
57
|
-
] = FunctionPublishMetricsMetricType.GAUGE
|
|
58
|
-
|
|
59
|
-
@field_serializer("metric_type")
|
|
60
|
-
def serialize_metric_type(self, value):
|
|
61
|
-
if isinstance(value, str):
|
|
62
|
-
try:
|
|
63
|
-
return models.FunctionPublishMetricsMetricType(value)
|
|
64
|
-
except ValueError:
|
|
65
|
-
return value
|
|
66
|
-
return value
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class FunctionPublishMetricsSchemaTypedDict(TypedDict):
|
|
70
|
-
fields: NotRequired[List[FunctionPublishMetricsFieldTypedDict]]
|
|
71
|
-
r"""List of metrics from event to extract and format. Formatted metrics can be used by a destination to pass metrics to a metrics aggregation platform."""
|
|
72
|
-
overwrite: NotRequired[bool]
|
|
73
|
-
r"""Overwrite previous metric specs. Leave disabled to append."""
|
|
74
|
-
dimensions: NotRequired[List[str]]
|
|
75
|
-
r"""Optional list of dimensions to include in events. Wildcards supported. If you don't specify metrics, values will be appended to every metric found in the event. When you add a new metric, dimensions will be present only in those new metrics."""
|
|
76
|
-
remove_metrics: NotRequired[List[str]]
|
|
77
|
-
r"""Optional list of metric field names to look for when removing metrics. When a metric's field name matches an element in this list, the metric will be removed from the event."""
|
|
78
|
-
remove_dimensions: NotRequired[List[str]]
|
|
79
|
-
r"""Optional list of dimensions to remove from every metric found in the event. Wildcards supported."""
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class FunctionPublishMetricsSchema(BaseModel):
|
|
83
|
-
fields: Optional[List[FunctionPublishMetricsField]] = None
|
|
84
|
-
r"""List of metrics from event to extract and format. Formatted metrics can be used by a destination to pass metrics to a metrics aggregation platform."""
|
|
85
|
-
|
|
86
|
-
overwrite: Optional[bool] = False
|
|
87
|
-
r"""Overwrite previous metric specs. Leave disabled to append."""
|
|
88
|
-
|
|
89
|
-
dimensions: Optional[List[str]] = None
|
|
90
|
-
r"""Optional list of dimensions to include in events. Wildcards supported. If you don't specify metrics, values will be appended to every metric found in the event. When you add a new metric, dimensions will be present only in those new metrics."""
|
|
91
|
-
|
|
92
|
-
remove_metrics: Annotated[
|
|
93
|
-
Optional[List[str]], pydantic.Field(alias="removeMetrics")
|
|
94
|
-
] = None
|
|
95
|
-
r"""Optional list of metric field names to look for when removing metrics. When a metric's field name matches an element in this list, the metric will be removed from the event."""
|
|
96
|
-
|
|
97
|
-
remove_dimensions: Annotated[
|
|
98
|
-
Optional[List[str]], pydantic.Field(alias="removeDimensions")
|
|
99
|
-
] = None
|
|
100
|
-
r"""Optional list of dimensions to remove from every metric found in the event. Wildcards supported."""
|
|
101
|
-
|
|
102
|
-
|
|
103
19
|
class FunctionPublishMetricsTypedDict(TypedDict):
|
|
104
20
|
filename: str
|
|
105
21
|
group: str
|
|
@@ -114,7 +30,7 @@ class FunctionPublishMetricsTypedDict(TypedDict):
|
|
|
114
30
|
disabled: NotRequired[bool]
|
|
115
31
|
handle_signals: NotRequired[bool]
|
|
116
32
|
sync: NotRequired[bool]
|
|
117
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaPublishMetricsTypedDict]
|
|
118
34
|
|
|
119
35
|
|
|
120
36
|
class FunctionPublishMetrics(BaseModel):
|
|
@@ -149,5 +65,5 @@ class FunctionPublishMetrics(BaseModel):
|
|
|
149
65
|
sync: Optional[bool] = None
|
|
150
66
|
|
|
151
67
|
schema_: Annotated[
|
|
152
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaPublishMetrics], pydantic.Field(alias="schema")
|
|
153
69
|
] = None
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
4
|
+
from .functionconfschemaredis import (
|
|
5
|
+
FunctionConfSchemaRedis,
|
|
6
|
+
FunctionConfSchemaRedisTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from cribl_control_plane.types import BaseModel
|
|
6
|
-
from cribl_control_plane.utils import validate_open_enum
|
|
7
9
|
from enum import Enum
|
|
8
10
|
import pydantic
|
|
9
|
-
from
|
|
10
|
-
from pydantic.functional_validators import PlainValidator
|
|
11
|
-
from typing import Any, Dict, List, Optional
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
@@ -16,110 +16,6 @@ class FunctionRedisID(str, Enum):
|
|
|
16
16
|
REDIS = "redis"
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class CommandTypedDict(TypedDict):
|
|
20
|
-
command: str
|
|
21
|
-
r"""Redis command to perform. For a complete list visit: https://redis.io/commands"""
|
|
22
|
-
key_expr: str
|
|
23
|
-
r"""A JavaScript expression to compute the value of the key to operate on. Can also be a constant such as 'username'."""
|
|
24
|
-
out_field: NotRequired[str]
|
|
25
|
-
r"""Name of the field in which to store the returned value. Leave blank to discard returned value."""
|
|
26
|
-
args_expr: NotRequired[str]
|
|
27
|
-
r"""A JavaScript expression to compute arguments to the operation. Can return an array."""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class Command(BaseModel):
|
|
31
|
-
command: str
|
|
32
|
-
r"""Redis command to perform. For a complete list visit: https://redis.io/commands"""
|
|
33
|
-
|
|
34
|
-
key_expr: Annotated[str, pydantic.Field(alias="keyExpr")]
|
|
35
|
-
r"""A JavaScript expression to compute the value of the key to operate on. Can also be a constant such as 'username'."""
|
|
36
|
-
|
|
37
|
-
out_field: Annotated[Optional[str], pydantic.Field(alias="outField")] = None
|
|
38
|
-
r"""Name of the field in which to store the returned value. Leave blank to discard returned value."""
|
|
39
|
-
|
|
40
|
-
args_expr: Annotated[Optional[str], pydantic.Field(alias="argsExpr")] = None
|
|
41
|
-
r"""A JavaScript expression to compute arguments to the operation. Can return an array."""
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class DeploymentType(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
45
|
-
r"""How the Redis server is configured. Defaults to Standalone"""
|
|
46
|
-
|
|
47
|
-
# Standalone
|
|
48
|
-
STANDALONE = "standalone"
|
|
49
|
-
# Cluster
|
|
50
|
-
CLUSTER = "cluster"
|
|
51
|
-
# Sentinel
|
|
52
|
-
SENTINEL = "sentinel"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class FunctionRedisAuthenticationMethod(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
56
|
-
# None
|
|
57
|
-
NONE = "none"
|
|
58
|
-
# Manual
|
|
59
|
-
MANUAL = "manual"
|
|
60
|
-
# User Secret
|
|
61
|
-
CREDENTIALS_SECRET = "credentialsSecret"
|
|
62
|
-
# Admin Secret
|
|
63
|
-
TEXT_SECRET = "textSecret"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class FunctionRedisSchemaTypedDict(TypedDict):
|
|
67
|
-
commands: List[CommandTypedDict]
|
|
68
|
-
deployment_type: NotRequired[DeploymentType]
|
|
69
|
-
r"""How the Redis server is configured. Defaults to Standalone"""
|
|
70
|
-
auth_type: NotRequired[FunctionRedisAuthenticationMethod]
|
|
71
|
-
max_block_secs: NotRequired[float]
|
|
72
|
-
r"""Maximum amount of time (seconds) to wait before assuming that Redis is down and passing events through. Use 0 to disable."""
|
|
73
|
-
enable_client_side_caching: NotRequired[bool]
|
|
74
|
-
r"""Enable client-side cache. Redundant when using Redis write operations. See more options at Settings > General > Limits > Redis Cache."""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class FunctionRedisSchema(BaseModel):
|
|
78
|
-
commands: List[Command]
|
|
79
|
-
|
|
80
|
-
deployment_type: Annotated[
|
|
81
|
-
Annotated[Optional[DeploymentType], PlainValidator(validate_open_enum(False))],
|
|
82
|
-
pydantic.Field(alias="deploymentType"),
|
|
83
|
-
] = DeploymentType.STANDALONE
|
|
84
|
-
r"""How the Redis server is configured. Defaults to Standalone"""
|
|
85
|
-
|
|
86
|
-
auth_type: Annotated[
|
|
87
|
-
Annotated[
|
|
88
|
-
Optional[FunctionRedisAuthenticationMethod],
|
|
89
|
-
PlainValidator(validate_open_enum(False)),
|
|
90
|
-
],
|
|
91
|
-
pydantic.Field(alias="authType"),
|
|
92
|
-
] = FunctionRedisAuthenticationMethod.NONE
|
|
93
|
-
|
|
94
|
-
max_block_secs: Annotated[Optional[float], pydantic.Field(alias="maxBlockSecs")] = (
|
|
95
|
-
60
|
|
96
|
-
)
|
|
97
|
-
r"""Maximum amount of time (seconds) to wait before assuming that Redis is down and passing events through. Use 0 to disable."""
|
|
98
|
-
|
|
99
|
-
enable_client_side_caching: Annotated[
|
|
100
|
-
Optional[bool], pydantic.Field(alias="enableClientSideCaching")
|
|
101
|
-
] = None
|
|
102
|
-
r"""Enable client-side cache. Redundant when using Redis write operations. See more options at Settings > General > Limits > Redis Cache."""
|
|
103
|
-
|
|
104
|
-
@field_serializer("deployment_type")
|
|
105
|
-
def serialize_deployment_type(self, value):
|
|
106
|
-
if isinstance(value, str):
|
|
107
|
-
try:
|
|
108
|
-
return models.DeploymentType(value)
|
|
109
|
-
except ValueError:
|
|
110
|
-
return value
|
|
111
|
-
return value
|
|
112
|
-
|
|
113
|
-
@field_serializer("auth_type")
|
|
114
|
-
def serialize_auth_type(self, value):
|
|
115
|
-
if isinstance(value, str):
|
|
116
|
-
try:
|
|
117
|
-
return models.FunctionRedisAuthenticationMethod(value)
|
|
118
|
-
except ValueError:
|
|
119
|
-
return value
|
|
120
|
-
return value
|
|
121
|
-
|
|
122
|
-
|
|
123
19
|
class FunctionRedisTypedDict(TypedDict):
|
|
124
20
|
filename: str
|
|
125
21
|
group: str
|
|
@@ -134,7 +30,7 @@ class FunctionRedisTypedDict(TypedDict):
|
|
|
134
30
|
disabled: NotRequired[bool]
|
|
135
31
|
handle_signals: NotRequired[bool]
|
|
136
32
|
sync: NotRequired[bool]
|
|
137
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaRedisTypedDict]
|
|
138
34
|
|
|
139
35
|
|
|
140
36
|
class FunctionRedis(BaseModel):
|
|
@@ -169,5 +65,5 @@ class FunctionRedis(BaseModel):
|
|
|
169
65
|
sync: Optional[bool] = None
|
|
170
66
|
|
|
171
67
|
schema_: Annotated[
|
|
172
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaRedis], pydantic.Field(alias="schema")
|
|
173
69
|
] = None
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .functionconfschemaregexextract import (
|
|
5
|
+
FunctionConfSchemaRegexExtract,
|
|
6
|
+
FunctionConfSchemaRegexExtractTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from cribl_control_plane.types import BaseModel
|
|
5
9
|
from enum import Enum
|
|
6
10
|
import pydantic
|
|
7
|
-
from typing import Any, Dict,
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
10
14
|
|
|
@@ -12,53 +16,6 @@ class FunctionRegexExtractID(str, Enum):
|
|
|
12
16
|
REGEX_EXTRACT = "regex_extract"
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
class FunctionRegexExtractRegexListTypedDict(TypedDict):
|
|
16
|
-
regex: str
|
|
17
|
-
r"""Regex literal with named capturing groups, such as (?<foo>bar), or _NAME_ and _VALUE_ capturing groups, such as (?<_NAME_0>[^ =]+)=(?<_VALUE_0>[^,]+)"""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class FunctionRegexExtractRegexList(BaseModel):
|
|
21
|
-
regex: str
|
|
22
|
-
r"""Regex literal with named capturing groups, such as (?<foo>bar), or _NAME_ and _VALUE_ capturing groups, such as (?<_NAME_0>[^ =]+)=(?<_VALUE_0>[^,]+)"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class FunctionRegexExtractSchemaTypedDict(TypedDict):
|
|
26
|
-
regex: str
|
|
27
|
-
r"""Regex literal with named capturing groups, such as (?<foo>bar), or _NAME_ and _VALUE_ capturing groups, such as (?<_NAME_0>[^ =]+)=(?<_VALUE_0>[^,]+)"""
|
|
28
|
-
regex_list: NotRequired[List[FunctionRegexExtractRegexListTypedDict]]
|
|
29
|
-
source: NotRequired[str]
|
|
30
|
-
r"""Field on which to perform regex field extraction"""
|
|
31
|
-
iterations: NotRequired[float]
|
|
32
|
-
r"""The maximum number of times to apply regex to source field when the global flag is set, or when using _NAME_ and _VALUE_ capturing groups"""
|
|
33
|
-
field_name_expression: NotRequired[str]
|
|
34
|
-
r"""JavaScript expression to format field names when _NAME_n and _VALUE_n capturing groups are used. Original field name is in global variable 'name'. Example: To append XX to all field names, use `${name}_XX` (backticks are literal). If empty, names will be sanitized using this regex: /^[_0-9]+|[^a-zA-Z0-9_]+/g. You can access other fields values via __e.<fieldName>."""
|
|
35
|
-
overwrite: NotRequired[bool]
|
|
36
|
-
r"""Overwrite existing event fields with extracted values. If disabled, existing fields will be converted to an array."""
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class FunctionRegexExtractSchema(BaseModel):
|
|
40
|
-
regex: str
|
|
41
|
-
r"""Regex literal with named capturing groups, such as (?<foo>bar), or _NAME_ and _VALUE_ capturing groups, such as (?<_NAME_0>[^ =]+)=(?<_VALUE_0>[^,]+)"""
|
|
42
|
-
|
|
43
|
-
regex_list: Annotated[
|
|
44
|
-
Optional[List[FunctionRegexExtractRegexList]], pydantic.Field(alias="regexList")
|
|
45
|
-
] = None
|
|
46
|
-
|
|
47
|
-
source: Optional[str] = "_raw"
|
|
48
|
-
r"""Field on which to perform regex field extraction"""
|
|
49
|
-
|
|
50
|
-
iterations: Optional[float] = 100
|
|
51
|
-
r"""The maximum number of times to apply regex to source field when the global flag is set, or when using _NAME_ and _VALUE_ capturing groups"""
|
|
52
|
-
|
|
53
|
-
field_name_expression: Annotated[
|
|
54
|
-
Optional[str], pydantic.Field(alias="fieldNameExpression")
|
|
55
|
-
] = None
|
|
56
|
-
r"""JavaScript expression to format field names when _NAME_n and _VALUE_n capturing groups are used. Original field name is in global variable 'name'. Example: To append XX to all field names, use `${name}_XX` (backticks are literal). If empty, names will be sanitized using this regex: /^[_0-9]+|[^a-zA-Z0-9_]+/g. You can access other fields values via __e.<fieldName>."""
|
|
57
|
-
|
|
58
|
-
overwrite: Optional[bool] = False
|
|
59
|
-
r"""Overwrite existing event fields with extracted values. If disabled, existing fields will be converted to an array."""
|
|
60
|
-
|
|
61
|
-
|
|
62
19
|
class FunctionRegexExtractTypedDict(TypedDict):
|
|
63
20
|
filename: str
|
|
64
21
|
group: str
|
|
@@ -73,7 +30,7 @@ class FunctionRegexExtractTypedDict(TypedDict):
|
|
|
73
30
|
disabled: NotRequired[bool]
|
|
74
31
|
handle_signals: NotRequired[bool]
|
|
75
32
|
sync: NotRequired[bool]
|
|
76
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaRegexExtractTypedDict]
|
|
77
34
|
|
|
78
35
|
|
|
79
36
|
class FunctionRegexExtract(BaseModel):
|
|
@@ -108,5 +65,5 @@ class FunctionRegexExtract(BaseModel):
|
|
|
108
65
|
sync: Optional[bool] = None
|
|
109
66
|
|
|
110
67
|
schema_: Annotated[
|
|
111
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaRegexExtract], pydantic.Field(alias="schema")
|
|
112
69
|
] = None
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .functionconfschemaregexfilter import (
|
|
5
|
+
FunctionConfSchemaRegexFilter,
|
|
6
|
+
FunctionConfSchemaRegexFilterTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from cribl_control_plane.types import BaseModel
|
|
5
9
|
from enum import Enum
|
|
6
10
|
import pydantic
|
|
7
|
-
from typing import Any, Dict,
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
10
14
|
|
|
@@ -12,36 +16,6 @@ class FunctionRegexFilterID(str, Enum):
|
|
|
12
16
|
REGEX_FILTER = "regex_filter"
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
class FunctionRegexFilterRegexListTypedDict(TypedDict):
|
|
16
|
-
regex: str
|
|
17
|
-
r"""Regex to test against"""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class FunctionRegexFilterRegexList(BaseModel):
|
|
21
|
-
regex: str
|
|
22
|
-
r"""Regex to test against"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class FunctionRegexFilterSchemaTypedDict(TypedDict):
|
|
26
|
-
regex: NotRequired[str]
|
|
27
|
-
r"""Regex to test against"""
|
|
28
|
-
regex_list: NotRequired[List[FunctionRegexFilterRegexListTypedDict]]
|
|
29
|
-
field: NotRequired[str]
|
|
30
|
-
r"""Name of the field to apply the regex on (defaults to _raw)"""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class FunctionRegexFilterSchema(BaseModel):
|
|
34
|
-
regex: Optional[str] = None
|
|
35
|
-
r"""Regex to test against"""
|
|
36
|
-
|
|
37
|
-
regex_list: Annotated[
|
|
38
|
-
Optional[List[FunctionRegexFilterRegexList]], pydantic.Field(alias="regexList")
|
|
39
|
-
] = None
|
|
40
|
-
|
|
41
|
-
field: Optional[str] = "_raw"
|
|
42
|
-
r"""Name of the field to apply the regex on (defaults to _raw)"""
|
|
43
|
-
|
|
44
|
-
|
|
45
19
|
class FunctionRegexFilterTypedDict(TypedDict):
|
|
46
20
|
filename: str
|
|
47
21
|
group: str
|
|
@@ -56,7 +30,7 @@ class FunctionRegexFilterTypedDict(TypedDict):
|
|
|
56
30
|
disabled: NotRequired[bool]
|
|
57
31
|
handle_signals: NotRequired[bool]
|
|
58
32
|
sync: NotRequired[bool]
|
|
59
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaRegexFilterTypedDict]
|
|
60
34
|
|
|
61
35
|
|
|
62
36
|
class FunctionRegexFilter(BaseModel):
|
|
@@ -91,5 +65,5 @@ class FunctionRegexFilter(BaseModel):
|
|
|
91
65
|
sync: Optional[bool] = None
|
|
92
66
|
|
|
93
67
|
schema_: Annotated[
|
|
94
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaRegexFilter], pydantic.Field(alias="schema")
|
|
95
69
|
] = None
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .functionconfschemarename import (
|
|
5
|
+
FunctionConfSchemaRename,
|
|
6
|
+
FunctionConfSchemaRenameTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from cribl_control_plane.types import BaseModel
|
|
5
9
|
from enum import Enum
|
|
6
10
|
import pydantic
|
|
7
|
-
from typing import Any, Dict,
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
10
14
|
|
|
@@ -12,48 +16,6 @@ class FunctionRenameID(str, Enum):
|
|
|
12
16
|
RENAME = "rename"
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
class RenameTypedDict(TypedDict):
|
|
16
|
-
current_name: str
|
|
17
|
-
r"""Name of the field to rename. Literal identifiers must be quoted."""
|
|
18
|
-
new_name: str
|
|
19
|
-
r"""The name the field will be renamed to. Literal identifiers must be quoted."""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class Rename(BaseModel):
|
|
23
|
-
current_name: Annotated[str, pydantic.Field(alias="currentName")]
|
|
24
|
-
r"""Name of the field to rename. Literal identifiers must be quoted."""
|
|
25
|
-
|
|
26
|
-
new_name: Annotated[str, pydantic.Field(alias="newName")]
|
|
27
|
-
r"""The name the field will be renamed to. Literal identifiers must be quoted."""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class FunctionRenameSchemaTypedDict(TypedDict):
|
|
31
|
-
base_fields: NotRequired[List[str]]
|
|
32
|
-
r"""Fields whose children will inherit the Rename fields and Rename expression operations. Supports wildcards. If empty, only top-level fields will be renamed."""
|
|
33
|
-
rename: NotRequired[List[RenameTypedDict]]
|
|
34
|
-
r"""Set of key-value pairs to rename fields, where key is the current name and value is the new name. Does not support internal fields."""
|
|
35
|
-
rename_expr: NotRequired[str]
|
|
36
|
-
r"""Optional JavaScript expression whose returned value will be used to rename fields. Use the 'name' and 'value' global variables to access field names/values. Example: `name.startsWith('data') ? name.toUpperCase() : name`. You can access other field values via __e.<fieldName>."""
|
|
37
|
-
wildcard_depth: NotRequired[int]
|
|
38
|
-
r"""For wildcards specified in Parent fields, sets the maximum depth within events to match and rename fields. Enter `0` to match only top-level fields. Defaults to `5` levels down."""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class FunctionRenameSchema(BaseModel):
|
|
42
|
-
base_fields: Annotated[Optional[List[str]], pydantic.Field(alias="baseFields")] = (
|
|
43
|
-
None
|
|
44
|
-
)
|
|
45
|
-
r"""Fields whose children will inherit the Rename fields and Rename expression operations. Supports wildcards. If empty, only top-level fields will be renamed."""
|
|
46
|
-
|
|
47
|
-
rename: Optional[List[Rename]] = None
|
|
48
|
-
r"""Set of key-value pairs to rename fields, where key is the current name and value is the new name. Does not support internal fields."""
|
|
49
|
-
|
|
50
|
-
rename_expr: Annotated[Optional[str], pydantic.Field(alias="renameExpr")] = None
|
|
51
|
-
r"""Optional JavaScript expression whose returned value will be used to rename fields. Use the 'name' and 'value' global variables to access field names/values. Example: `name.startsWith('data') ? name.toUpperCase() : name`. You can access other field values via __e.<fieldName>."""
|
|
52
|
-
|
|
53
|
-
wildcard_depth: Annotated[Optional[int], pydantic.Field(alias="wildcardDepth")] = 5
|
|
54
|
-
r"""For wildcards specified in Parent fields, sets the maximum depth within events to match and rename fields. Enter `0` to match only top-level fields. Defaults to `5` levels down."""
|
|
55
|
-
|
|
56
|
-
|
|
57
19
|
class FunctionRenameTypedDict(TypedDict):
|
|
58
20
|
filename: str
|
|
59
21
|
group: str
|
|
@@ -68,7 +30,7 @@ class FunctionRenameTypedDict(TypedDict):
|
|
|
68
30
|
disabled: NotRequired[bool]
|
|
69
31
|
handle_signals: NotRequired[bool]
|
|
70
32
|
sync: NotRequired[bool]
|
|
71
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaRenameTypedDict]
|
|
72
34
|
|
|
73
35
|
|
|
74
36
|
class FunctionRename(BaseModel):
|
|
@@ -103,5 +65,5 @@ class FunctionRename(BaseModel):
|
|
|
103
65
|
sync: Optional[bool] = None
|
|
104
66
|
|
|
105
67
|
schema_: Annotated[
|
|
106
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaRename], pydantic.Field(alias="schema")
|
|
107
69
|
] = None
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
4
|
+
from .functionconfschemarollupmetrics import (
|
|
5
|
+
FunctionConfSchemaRollupMetrics,
|
|
6
|
+
FunctionConfSchemaRollupMetricsTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from cribl_control_plane.types import BaseModel
|
|
6
|
-
from cribl_control_plane.utils import validate_open_enum
|
|
7
9
|
from enum import Enum
|
|
8
10
|
import pydantic
|
|
9
|
-
from
|
|
10
|
-
from pydantic.functional_validators import PlainValidator
|
|
11
|
-
from typing import Any, Dict, List, Optional
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
@@ -16,51 +16,6 @@ class FunctionRollupMetricsID(str, Enum):
|
|
|
16
16
|
ROLLUP_METRICS = "rollup_metrics"
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class GaugeUpdate(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
20
|
-
r"""The operation to use when rolling up gauge metrics. Defaults to last."""
|
|
21
|
-
|
|
22
|
-
# Last
|
|
23
|
-
LAST = "last"
|
|
24
|
-
# Maximum
|
|
25
|
-
MAX = "max"
|
|
26
|
-
# Minimum
|
|
27
|
-
MIN = "min"
|
|
28
|
-
# Average
|
|
29
|
-
AVG = "avg"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class FunctionRollupMetricsSchemaTypedDict(TypedDict):
|
|
33
|
-
dimensions: NotRequired[List[str]]
|
|
34
|
-
r"""List of dimensions across which to perform rollups. Supports wildcards. Defaults to all original dimensions."""
|
|
35
|
-
time_window: NotRequired[str]
|
|
36
|
-
r"""The time span of the rollup window. Must be a valid time string (such as 10s)."""
|
|
37
|
-
gauge_rollup: NotRequired[GaugeUpdate]
|
|
38
|
-
r"""The operation to use when rolling up gauge metrics. Defaults to last."""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class FunctionRollupMetricsSchema(BaseModel):
|
|
42
|
-
dimensions: Optional[List[str]] = None
|
|
43
|
-
r"""List of dimensions across which to perform rollups. Supports wildcards. Defaults to all original dimensions."""
|
|
44
|
-
|
|
45
|
-
time_window: Annotated[Optional[str], pydantic.Field(alias="timeWindow")] = "30s"
|
|
46
|
-
r"""The time span of the rollup window. Must be a valid time string (such as 10s)."""
|
|
47
|
-
|
|
48
|
-
gauge_rollup: Annotated[
|
|
49
|
-
Annotated[Optional[GaugeUpdate], PlainValidator(validate_open_enum(False))],
|
|
50
|
-
pydantic.Field(alias="gaugeRollup"),
|
|
51
|
-
] = GaugeUpdate.LAST
|
|
52
|
-
r"""The operation to use when rolling up gauge metrics. Defaults to last."""
|
|
53
|
-
|
|
54
|
-
@field_serializer("gauge_rollup")
|
|
55
|
-
def serialize_gauge_rollup(self, value):
|
|
56
|
-
if isinstance(value, str):
|
|
57
|
-
try:
|
|
58
|
-
return models.GaugeUpdate(value)
|
|
59
|
-
except ValueError:
|
|
60
|
-
return value
|
|
61
|
-
return value
|
|
62
|
-
|
|
63
|
-
|
|
64
19
|
class FunctionRollupMetricsTypedDict(TypedDict):
|
|
65
20
|
filename: str
|
|
66
21
|
group: str
|
|
@@ -75,7 +30,7 @@ class FunctionRollupMetricsTypedDict(TypedDict):
|
|
|
75
30
|
disabled: NotRequired[bool]
|
|
76
31
|
handle_signals: NotRequired[bool]
|
|
77
32
|
sync: NotRequired[bool]
|
|
78
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaRollupMetricsTypedDict]
|
|
79
34
|
|
|
80
35
|
|
|
81
36
|
class FunctionRollupMetrics(BaseModel):
|
|
@@ -110,5 +65,5 @@ class FunctionRollupMetrics(BaseModel):
|
|
|
110
65
|
sync: Optional[bool] = None
|
|
111
66
|
|
|
112
67
|
schema_: Annotated[
|
|
113
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaRollupMetrics], pydantic.Field(alias="schema")
|
|
114
69
|
] = None
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .functionconfschemasampling import (
|
|
5
|
+
FunctionConfSchemaSampling,
|
|
6
|
+
FunctionConfSchemaSamplingTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from cribl_control_plane.types import BaseModel
|
|
5
9
|
from enum import Enum
|
|
6
10
|
import pydantic
|
|
7
|
-
from typing import Any, Dict,
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
8
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
13
|
|
|
10
14
|
|
|
@@ -12,31 +16,6 @@ class FunctionSamplingID(str, Enum):
|
|
|
12
16
|
SAMPLING = "sampling"
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
class FunctionSamplingRuleTypedDict(TypedDict):
|
|
16
|
-
filter_: NotRequired[str]
|
|
17
|
-
r"""JavaScript filter expression matching events to be sampled. Use true to match all."""
|
|
18
|
-
rate: NotRequired[int]
|
|
19
|
-
r"""Sampling rate; picks one out of N matching events"""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class FunctionSamplingRule(BaseModel):
|
|
23
|
-
filter_: Annotated[Optional[str], pydantic.Field(alias="filter")] = "true"
|
|
24
|
-
r"""JavaScript filter expression matching events to be sampled. Use true to match all."""
|
|
25
|
-
|
|
26
|
-
rate: Optional[int] = 1
|
|
27
|
-
r"""Sampling rate; picks one out of N matching events"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class FunctionSamplingSchemaTypedDict(TypedDict):
|
|
31
|
-
rules: NotRequired[List[FunctionSamplingRuleTypedDict]]
|
|
32
|
-
r"""Events matching these rules will be sampled at the given rate"""
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class FunctionSamplingSchema(BaseModel):
|
|
36
|
-
rules: Optional[List[FunctionSamplingRule]] = None
|
|
37
|
-
r"""Events matching these rules will be sampled at the given rate"""
|
|
38
|
-
|
|
39
|
-
|
|
40
19
|
class FunctionSamplingTypedDict(TypedDict):
|
|
41
20
|
filename: str
|
|
42
21
|
group: str
|
|
@@ -51,7 +30,7 @@ class FunctionSamplingTypedDict(TypedDict):
|
|
|
51
30
|
disabled: NotRequired[bool]
|
|
52
31
|
handle_signals: NotRequired[bool]
|
|
53
32
|
sync: NotRequired[bool]
|
|
54
|
-
schema_: NotRequired[
|
|
33
|
+
schema_: NotRequired[FunctionConfSchemaSamplingTypedDict]
|
|
55
34
|
|
|
56
35
|
|
|
57
36
|
class FunctionSampling(BaseModel):
|
|
@@ -86,5 +65,5 @@ class FunctionSampling(BaseModel):
|
|
|
86
65
|
sync: Optional[bool] = None
|
|
87
66
|
|
|
88
67
|
schema_: Annotated[
|
|
89
|
-
Optional[
|
|
68
|
+
Optional[FunctionConfSchemaSampling], pydantic.Field(alias="schema")
|
|
90
69
|
] = None
|