robhan-cdk-lib.aws-aps 0.0.147__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 robhan-cdk-lib.aws-aps might be problematic. Click here for more details.
- robhan_cdk_lib/aws_aps/__init__.py +4088 -0
- robhan_cdk_lib/aws_aps/_jsii/__init__.py +43 -0
- robhan_cdk_lib/aws_aps/_jsii/aws_aps@0.0.147.jsii.tgz +0 -0
- robhan_cdk_lib/aws_aps/py.typed +1 -0
- robhan_cdk_lib_aws_aps-0.0.147.dist-info/LICENSE +19 -0
- robhan_cdk_lib_aws_aps-0.0.147.dist-info/METADATA +92 -0
- robhan_cdk_lib_aws_aps-0.0.147.dist-info/RECORD +9 -0
- robhan_cdk_lib_aws_aps-0.0.147.dist-info/WHEEL +5 -0
- robhan_cdk_lib_aws_aps-0.0.147.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,4088 @@
|
|
|
1
|
+
r'''
|
|
2
|
+
# @robhan-cdk-lib/aws_aps
|
|
3
|
+
|
|
4
|
+
AWS Cloud Development Kit (CDK) constructs for Amazon Managed Service for Prometheus.
|
|
5
|
+
|
|
6
|
+
In [aws-cdk-lib.aws_aps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_aps-readme.html), there currently only exist L1 constructs for Amazon Managed Service for Prometheus.
|
|
7
|
+
|
|
8
|
+
While helpful, they miss convenience like:
|
|
9
|
+
|
|
10
|
+
* advanced parameter checking (min/max number values, string lengths, array lengths...) before CloudFormation deployment
|
|
11
|
+
* proper parameter typing, e.g. enum values instead of strings
|
|
12
|
+
* simply referencing other constructs instead of e.g. ARN strings
|
|
13
|
+
|
|
14
|
+
Those features are implemented here.
|
|
15
|
+
|
|
16
|
+
The CDK maintainers explain that [publishing your own package](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#publishing-your-own-package) is "by far the strongest signal you can give to the CDK team that a feature should be included within the core aws-cdk packages".
|
|
17
|
+
|
|
18
|
+
This project aims to develop aws_aps constructs to a maturity that can potentially be accepted to the CDK core.
|
|
19
|
+
|
|
20
|
+
It is not supported by AWS and is not endorsed by them. Please file issues in the [GitHub repository](https://github.com/robert-hanuschke/cdk-aws_aps/issues) if you find any.
|
|
21
|
+
|
|
22
|
+
## Example use
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
import * as cdk from 'aws-cdk-lib';
|
|
26
|
+
import { Subnet } from 'aws-cdk-lib/aws-ec2';
|
|
27
|
+
import { Cluster } from 'aws-cdk-lib/aws-eks';
|
|
28
|
+
import { Construct } from 'constructs';
|
|
29
|
+
import { Workspace, RuleGroupsNamespace, Scraper } from '@robhan-cdk-lib/aws_aps';
|
|
30
|
+
|
|
31
|
+
export class AwsApsCdkStack extends cdk.Stack {
|
|
32
|
+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
33
|
+
super(scope, id, props);
|
|
34
|
+
|
|
35
|
+
const workspace = new Workspace(this, 'MyWorkspace', {});
|
|
36
|
+
new RuleGroupsNamespace(this, 'MyRuleGroupsNamespace', { workspace, data: '<myRulesFileData>', name: 'myRuleGroupsNamespace' });
|
|
37
|
+
new Scraper(this, 'MyScraper', {
|
|
38
|
+
destination: {
|
|
39
|
+
ampConfiguration: {
|
|
40
|
+
workspace,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
source: {
|
|
44
|
+
eksConfiguration: {
|
|
45
|
+
cluster: Cluster.fromClusterAttributes(this, 'MyCluster', {
|
|
46
|
+
clusterName: 'clusterName',
|
|
47
|
+
}),
|
|
48
|
+
subnets: [
|
|
49
|
+
Subnet.fromSubnetAttributes(this, 'MySubnet', {
|
|
50
|
+
subnetId: 'subnetId',
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
scrapeConfiguration: {
|
|
56
|
+
configurationBlob: '<myScrapeConfiguration>',
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT
|
|
66
|
+
'''
|
|
67
|
+
from pkgutil import extend_path
|
|
68
|
+
__path__ = extend_path(__path__, __name__)
|
|
69
|
+
|
|
70
|
+
import abc
|
|
71
|
+
import builtins
|
|
72
|
+
import datetime
|
|
73
|
+
import enum
|
|
74
|
+
import typing
|
|
75
|
+
|
|
76
|
+
import jsii
|
|
77
|
+
import publication
|
|
78
|
+
import typing_extensions
|
|
79
|
+
|
|
80
|
+
import typeguard
|
|
81
|
+
from importlib.metadata import version as _metadata_package_version
|
|
82
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
83
|
+
|
|
84
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
85
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
86
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
87
|
+
else:
|
|
88
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
89
|
+
pass
|
|
90
|
+
else:
|
|
91
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
92
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
93
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
94
|
+
else:
|
|
95
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
96
|
+
|
|
97
|
+
from ._jsii import *
|
|
98
|
+
|
|
99
|
+
import aws_cdk as _aws_cdk_ceddda9d
|
|
100
|
+
import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
|
|
101
|
+
import aws_cdk.aws_eks as _aws_cdk_aws_eks_ceddda9d
|
|
102
|
+
import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
|
|
103
|
+
import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
|
|
104
|
+
import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
|
|
105
|
+
import constructs as _constructs_77d1e7e8
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@jsii.data_type(
|
|
109
|
+
jsii_type="@robhan-cdk-lib/aws_aps.AmpConfiguration",
|
|
110
|
+
jsii_struct_bases=[],
|
|
111
|
+
name_mapping={"workspace": "workspace"},
|
|
112
|
+
)
|
|
113
|
+
class AmpConfiguration:
|
|
114
|
+
def __init__(self, *, workspace: "IWorkspace") -> None:
|
|
115
|
+
'''The AmpConfiguration structure defines the Amazon Managed Service for Prometheus instance a scraper should send metrics to.
|
|
116
|
+
|
|
117
|
+
:param workspace: The Amazon Managed Service for Prometheus workspace.
|
|
118
|
+
'''
|
|
119
|
+
if __debug__:
|
|
120
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9b57f1ed441699407024d3a67f6d0ecf1fd33175a38d466e4e90e190923b70a0)
|
|
121
|
+
check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
|
|
122
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
123
|
+
"workspace": workspace,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@builtins.property
|
|
127
|
+
def workspace(self) -> "IWorkspace":
|
|
128
|
+
'''The Amazon Managed Service for Prometheus workspace.'''
|
|
129
|
+
result = self._values.get("workspace")
|
|
130
|
+
assert result is not None, "Required property 'workspace' is missing"
|
|
131
|
+
return typing.cast("IWorkspace", result)
|
|
132
|
+
|
|
133
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
134
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
135
|
+
|
|
136
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
137
|
+
return not (rhs == self)
|
|
138
|
+
|
|
139
|
+
def __repr__(self) -> str:
|
|
140
|
+
return "AmpConfiguration(%s)" % ", ".join(
|
|
141
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
@jsii.data_type(
|
|
146
|
+
jsii_type="@robhan-cdk-lib/aws_aps.AnomalyDetectorConfiguration",
|
|
147
|
+
jsii_struct_bases=[],
|
|
148
|
+
name_mapping={"random_cut_forest": "randomCutForest"},
|
|
149
|
+
)
|
|
150
|
+
class AnomalyDetectorConfiguration:
|
|
151
|
+
def __init__(
|
|
152
|
+
self,
|
|
153
|
+
*,
|
|
154
|
+
random_cut_forest: typing.Union["RandomCutForestConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
155
|
+
) -> None:
|
|
156
|
+
'''The configuration for the anomaly detection algorithm.
|
|
157
|
+
|
|
158
|
+
:param random_cut_forest: The Random Cut Forest algorithm configuration for anomaly detection.
|
|
159
|
+
'''
|
|
160
|
+
if isinstance(random_cut_forest, dict):
|
|
161
|
+
random_cut_forest = RandomCutForestConfiguration(**random_cut_forest)
|
|
162
|
+
if __debug__:
|
|
163
|
+
type_hints = typing.get_type_hints(_typecheckingstub__488e50421526d1e316a7bd2f186eccb1fc4bf1daba066e779c147e9e9dbc747a)
|
|
164
|
+
check_type(argname="argument random_cut_forest", value=random_cut_forest, expected_type=type_hints["random_cut_forest"])
|
|
165
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
166
|
+
"random_cut_forest": random_cut_forest,
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@builtins.property
|
|
170
|
+
def random_cut_forest(self) -> "RandomCutForestConfiguration":
|
|
171
|
+
'''The Random Cut Forest algorithm configuration for anomaly detection.'''
|
|
172
|
+
result = self._values.get("random_cut_forest")
|
|
173
|
+
assert result is not None, "Required property 'random_cut_forest' is missing"
|
|
174
|
+
return typing.cast("RandomCutForestConfiguration", result)
|
|
175
|
+
|
|
176
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
177
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
178
|
+
|
|
179
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
180
|
+
return not (rhs == self)
|
|
181
|
+
|
|
182
|
+
def __repr__(self) -> str:
|
|
183
|
+
return "AnomalyDetectorConfiguration(%s)" % ", ".join(
|
|
184
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
@jsii.data_type(
|
|
189
|
+
jsii_type="@robhan-cdk-lib/aws_aps.AnomalyDetectorProps",
|
|
190
|
+
jsii_struct_bases=[],
|
|
191
|
+
name_mapping={
|
|
192
|
+
"alias": "alias",
|
|
193
|
+
"configuration": "configuration",
|
|
194
|
+
"workspace": "workspace",
|
|
195
|
+
"evaluation_interval_in_seconds": "evaluationIntervalInSeconds",
|
|
196
|
+
"labels": "labels",
|
|
197
|
+
"missing_data_action": "missingDataAction",
|
|
198
|
+
},
|
|
199
|
+
)
|
|
200
|
+
class AnomalyDetectorProps:
|
|
201
|
+
def __init__(
|
|
202
|
+
self,
|
|
203
|
+
*,
|
|
204
|
+
alias: builtins.str,
|
|
205
|
+
configuration: typing.Union["AnomalyDetectorConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
206
|
+
workspace: "IWorkspace",
|
|
207
|
+
evaluation_interval_in_seconds: typing.Optional[jsii.Number] = None,
|
|
208
|
+
labels: typing.Optional[typing.Sequence[typing.Union["Label", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
209
|
+
missing_data_action: typing.Optional[typing.Union["MissingDataAction", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
210
|
+
) -> None:
|
|
211
|
+
'''Properties for creating an Amazon Managed Service for Prometheus Anomaly Detector.
|
|
212
|
+
|
|
213
|
+
:param alias: The user-friendly name of the anomaly detector. 1 to 128 characters length.
|
|
214
|
+
:param configuration: The algorithm configuration of the anomaly detector.
|
|
215
|
+
:param workspace: An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
|
|
216
|
+
:param evaluation_interval_in_seconds: The frequency, in seconds, at which the anomaly detector evaluates metrics. Minimum value of 30. Maximum value of 86400.
|
|
217
|
+
:param labels: The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector. Map Entries: Minimum number of 0 items. Maximum number of 140 items. Key Length Constraints: Minimum length of 1. Maximum length of 7168. Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]* Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
218
|
+
:param missing_data_action: The action taken when data is missing during evaluation.
|
|
219
|
+
'''
|
|
220
|
+
if isinstance(configuration, dict):
|
|
221
|
+
configuration = AnomalyDetectorConfiguration(**configuration)
|
|
222
|
+
if isinstance(missing_data_action, dict):
|
|
223
|
+
missing_data_action = MissingDataAction(**missing_data_action)
|
|
224
|
+
if __debug__:
|
|
225
|
+
type_hints = typing.get_type_hints(_typecheckingstub__d73bc4f90dcbc90f45d5d011fc423d2638eb9cfe65810e23594184c620ce38aa)
|
|
226
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
|
227
|
+
check_type(argname="argument configuration", value=configuration, expected_type=type_hints["configuration"])
|
|
228
|
+
check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
|
|
229
|
+
check_type(argname="argument evaluation_interval_in_seconds", value=evaluation_interval_in_seconds, expected_type=type_hints["evaluation_interval_in_seconds"])
|
|
230
|
+
check_type(argname="argument labels", value=labels, expected_type=type_hints["labels"])
|
|
231
|
+
check_type(argname="argument missing_data_action", value=missing_data_action, expected_type=type_hints["missing_data_action"])
|
|
232
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
233
|
+
"alias": alias,
|
|
234
|
+
"configuration": configuration,
|
|
235
|
+
"workspace": workspace,
|
|
236
|
+
}
|
|
237
|
+
if evaluation_interval_in_seconds is not None:
|
|
238
|
+
self._values["evaluation_interval_in_seconds"] = evaluation_interval_in_seconds
|
|
239
|
+
if labels is not None:
|
|
240
|
+
self._values["labels"] = labels
|
|
241
|
+
if missing_data_action is not None:
|
|
242
|
+
self._values["missing_data_action"] = missing_data_action
|
|
243
|
+
|
|
244
|
+
@builtins.property
|
|
245
|
+
def alias(self) -> builtins.str:
|
|
246
|
+
'''The user-friendly name of the anomaly detector.
|
|
247
|
+
|
|
248
|
+
1 to 128 characters length.
|
|
249
|
+
'''
|
|
250
|
+
result = self._values.get("alias")
|
|
251
|
+
assert result is not None, "Required property 'alias' is missing"
|
|
252
|
+
return typing.cast(builtins.str, result)
|
|
253
|
+
|
|
254
|
+
@builtins.property
|
|
255
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
256
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
257
|
+
result = self._values.get("configuration")
|
|
258
|
+
assert result is not None, "Required property 'configuration' is missing"
|
|
259
|
+
return typing.cast("AnomalyDetectorConfiguration", result)
|
|
260
|
+
|
|
261
|
+
@builtins.property
|
|
262
|
+
def workspace(self) -> "IWorkspace":
|
|
263
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
264
|
+
result = self._values.get("workspace")
|
|
265
|
+
assert result is not None, "Required property 'workspace' is missing"
|
|
266
|
+
return typing.cast("IWorkspace", result)
|
|
267
|
+
|
|
268
|
+
@builtins.property
|
|
269
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
270
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
271
|
+
|
|
272
|
+
Minimum value of 30. Maximum value of 86400.
|
|
273
|
+
'''
|
|
274
|
+
result = self._values.get("evaluation_interval_in_seconds")
|
|
275
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
276
|
+
|
|
277
|
+
@builtins.property
|
|
278
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
279
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
280
|
+
|
|
281
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
282
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
283
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
284
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
285
|
+
'''
|
|
286
|
+
result = self._values.get("labels")
|
|
287
|
+
return typing.cast(typing.Optional[typing.List["Label"]], result)
|
|
288
|
+
|
|
289
|
+
@builtins.property
|
|
290
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
291
|
+
'''The action taken when data is missing during evaluation.'''
|
|
292
|
+
result = self._values.get("missing_data_action")
|
|
293
|
+
return typing.cast(typing.Optional["MissingDataAction"], result)
|
|
294
|
+
|
|
295
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
296
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
297
|
+
|
|
298
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
299
|
+
return not (rhs == self)
|
|
300
|
+
|
|
301
|
+
def __repr__(self) -> str:
|
|
302
|
+
return "AnomalyDetectorProps(%s)" % ", ".join(
|
|
303
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
@jsii.data_type(
|
|
308
|
+
jsii_type="@robhan-cdk-lib/aws_aps.CloudWatchLogDestination",
|
|
309
|
+
jsii_struct_bases=[],
|
|
310
|
+
name_mapping={"log_group": "logGroup"},
|
|
311
|
+
)
|
|
312
|
+
class CloudWatchLogDestination:
|
|
313
|
+
def __init__(self, *, log_group: "_aws_cdk_aws_logs_ceddda9d.ILogGroup") -> None:
|
|
314
|
+
'''Configuration details for logging to CloudWatch Logs.
|
|
315
|
+
|
|
316
|
+
:param log_group: The CloudWatch log group.
|
|
317
|
+
'''
|
|
318
|
+
if __debug__:
|
|
319
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f4c8d116f44cd0ce0c010e39612b1f9f3d190e82d3f5f4c0372ae03517a31a79)
|
|
320
|
+
check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
|
|
321
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
322
|
+
"log_group": log_group,
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@builtins.property
|
|
326
|
+
def log_group(self) -> "_aws_cdk_aws_logs_ceddda9d.ILogGroup":
|
|
327
|
+
'''The CloudWatch log group.'''
|
|
328
|
+
result = self._values.get("log_group")
|
|
329
|
+
assert result is not None, "Required property 'log_group' is missing"
|
|
330
|
+
return typing.cast("_aws_cdk_aws_logs_ceddda9d.ILogGroup", result)
|
|
331
|
+
|
|
332
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
333
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
334
|
+
|
|
335
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
336
|
+
return not (rhs == self)
|
|
337
|
+
|
|
338
|
+
def __repr__(self) -> str:
|
|
339
|
+
return "CloudWatchLogDestination(%s)" % ", ".join(
|
|
340
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
@jsii.data_type(
|
|
345
|
+
jsii_type="@robhan-cdk-lib/aws_aps.Destination",
|
|
346
|
+
jsii_struct_bases=[],
|
|
347
|
+
name_mapping={"amp_configuration": "ampConfiguration"},
|
|
348
|
+
)
|
|
349
|
+
class Destination:
|
|
350
|
+
def __init__(
|
|
351
|
+
self,
|
|
352
|
+
*,
|
|
353
|
+
amp_configuration: typing.Union["AmpConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
354
|
+
) -> None:
|
|
355
|
+
'''Where to send the metrics from a scraper.
|
|
356
|
+
|
|
357
|
+
:param amp_configuration: The Amazon Managed Service for Prometheus workspace to send metrics to.
|
|
358
|
+
'''
|
|
359
|
+
if isinstance(amp_configuration, dict):
|
|
360
|
+
amp_configuration = AmpConfiguration(**amp_configuration)
|
|
361
|
+
if __debug__:
|
|
362
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f247dc1883eff5c9525a2e09081bf65d9f34dc7f9581f5fcb643b104e14afa09)
|
|
363
|
+
check_type(argname="argument amp_configuration", value=amp_configuration, expected_type=type_hints["amp_configuration"])
|
|
364
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
365
|
+
"amp_configuration": amp_configuration,
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@builtins.property
|
|
369
|
+
def amp_configuration(self) -> "AmpConfiguration":
|
|
370
|
+
'''The Amazon Managed Service for Prometheus workspace to send metrics to.'''
|
|
371
|
+
result = self._values.get("amp_configuration")
|
|
372
|
+
assert result is not None, "Required property 'amp_configuration' is missing"
|
|
373
|
+
return typing.cast("AmpConfiguration", result)
|
|
374
|
+
|
|
375
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
376
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
377
|
+
|
|
378
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
379
|
+
return not (rhs == self)
|
|
380
|
+
|
|
381
|
+
def __repr__(self) -> str:
|
|
382
|
+
return "Destination(%s)" % ", ".join(
|
|
383
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
@jsii.data_type(
|
|
388
|
+
jsii_type="@robhan-cdk-lib/aws_aps.EksConfiguration",
|
|
389
|
+
jsii_struct_bases=[],
|
|
390
|
+
name_mapping={
|
|
391
|
+
"cluster": "cluster",
|
|
392
|
+
"subnets": "subnets",
|
|
393
|
+
"security_groups": "securityGroups",
|
|
394
|
+
},
|
|
395
|
+
)
|
|
396
|
+
class EksConfiguration:
|
|
397
|
+
def __init__(
|
|
398
|
+
self,
|
|
399
|
+
*,
|
|
400
|
+
cluster: "_aws_cdk_aws_eks_ceddda9d.ICluster",
|
|
401
|
+
subnets: typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.ISubnet"],
|
|
402
|
+
security_groups: typing.Optional[typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"]] = None,
|
|
403
|
+
) -> None:
|
|
404
|
+
'''The EksConfiguration structure describes the connection to the Amazon EKS cluster from which a scraper collects metrics.
|
|
405
|
+
|
|
406
|
+
:param cluster: The Amazon EKS cluster.
|
|
407
|
+
:param subnets: A list of subnets for the Amazon EKS cluster VPC configuration. Min 1, max 5.
|
|
408
|
+
:param security_groups: A list of the security group IDs for the Amazon EKS cluster VPC configuration. Min 1, max 5.
|
|
409
|
+
'''
|
|
410
|
+
if __debug__:
|
|
411
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9e3526038ce65e3714e7b69cac8f1dac03b300f7ee7b6eb0a81f578bb9386261)
|
|
412
|
+
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
413
|
+
check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
|
|
414
|
+
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
415
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
416
|
+
"cluster": cluster,
|
|
417
|
+
"subnets": subnets,
|
|
418
|
+
}
|
|
419
|
+
if security_groups is not None:
|
|
420
|
+
self._values["security_groups"] = security_groups
|
|
421
|
+
|
|
422
|
+
@builtins.property
|
|
423
|
+
def cluster(self) -> "_aws_cdk_aws_eks_ceddda9d.ICluster":
|
|
424
|
+
'''The Amazon EKS cluster.'''
|
|
425
|
+
result = self._values.get("cluster")
|
|
426
|
+
assert result is not None, "Required property 'cluster' is missing"
|
|
427
|
+
return typing.cast("_aws_cdk_aws_eks_ceddda9d.ICluster", result)
|
|
428
|
+
|
|
429
|
+
@builtins.property
|
|
430
|
+
def subnets(self) -> typing.List["_aws_cdk_aws_ec2_ceddda9d.ISubnet"]:
|
|
431
|
+
'''A list of subnets for the Amazon EKS cluster VPC configuration.
|
|
432
|
+
|
|
433
|
+
Min 1, max 5.
|
|
434
|
+
'''
|
|
435
|
+
result = self._values.get("subnets")
|
|
436
|
+
assert result is not None, "Required property 'subnets' is missing"
|
|
437
|
+
return typing.cast(typing.List["_aws_cdk_aws_ec2_ceddda9d.ISubnet"], result)
|
|
438
|
+
|
|
439
|
+
@builtins.property
|
|
440
|
+
def security_groups(
|
|
441
|
+
self,
|
|
442
|
+
) -> typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"]]:
|
|
443
|
+
'''A list of the security group IDs for the Amazon EKS cluster VPC configuration.
|
|
444
|
+
|
|
445
|
+
Min 1, max 5.
|
|
446
|
+
'''
|
|
447
|
+
result = self._values.get("security_groups")
|
|
448
|
+
return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"]], result)
|
|
449
|
+
|
|
450
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
451
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
452
|
+
|
|
453
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
454
|
+
return not (rhs == self)
|
|
455
|
+
|
|
456
|
+
def __repr__(self) -> str:
|
|
457
|
+
return "EksConfiguration(%s)" % ", ".join(
|
|
458
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IAnomalyDetector")
|
|
463
|
+
class IAnomalyDetector(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
464
|
+
@builtins.property
|
|
465
|
+
@jsii.member(jsii_name="alias")
|
|
466
|
+
def alias(self) -> builtins.str:
|
|
467
|
+
'''The user-friendly name of the anomaly detector. 1 to 128 characters length.
|
|
468
|
+
|
|
469
|
+
Minimum length of 1. Maximum length of 64.
|
|
470
|
+
Pattern: [0-9A-Za-z][-.0-9A-Z_a-z]*
|
|
471
|
+
'''
|
|
472
|
+
...
|
|
473
|
+
|
|
474
|
+
@builtins.property
|
|
475
|
+
@jsii.member(jsii_name="anomalyDetectorArn")
|
|
476
|
+
def anomaly_detector_arn(self) -> builtins.str:
|
|
477
|
+
'''The Amazon Resource Name (ARN) of the anomaly detector.
|
|
478
|
+
|
|
479
|
+
:attribute: true
|
|
480
|
+
'''
|
|
481
|
+
...
|
|
482
|
+
|
|
483
|
+
@builtins.property
|
|
484
|
+
@jsii.member(jsii_name="configuration")
|
|
485
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
486
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
487
|
+
...
|
|
488
|
+
|
|
489
|
+
@builtins.property
|
|
490
|
+
@jsii.member(jsii_name="workspace")
|
|
491
|
+
def workspace(self) -> "IWorkspace":
|
|
492
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
493
|
+
...
|
|
494
|
+
|
|
495
|
+
@builtins.property
|
|
496
|
+
@jsii.member(jsii_name="evaluationIntervalInSeconds")
|
|
497
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
498
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
499
|
+
|
|
500
|
+
Minimum value of 30. Maximum value of 86400.
|
|
501
|
+
'''
|
|
502
|
+
...
|
|
503
|
+
|
|
504
|
+
@builtins.property
|
|
505
|
+
@jsii.member(jsii_name="labels")
|
|
506
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
507
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
508
|
+
|
|
509
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
510
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
511
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
512
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
513
|
+
'''
|
|
514
|
+
...
|
|
515
|
+
|
|
516
|
+
@builtins.property
|
|
517
|
+
@jsii.member(jsii_name="missingDataAction")
|
|
518
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
519
|
+
'''The action taken when data is missing during evaluation.'''
|
|
520
|
+
...
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
class _IAnomalyDetectorProxy(
|
|
524
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
525
|
+
):
|
|
526
|
+
__jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IAnomalyDetector"
|
|
527
|
+
|
|
528
|
+
@builtins.property
|
|
529
|
+
@jsii.member(jsii_name="alias")
|
|
530
|
+
def alias(self) -> builtins.str:
|
|
531
|
+
'''The user-friendly name of the anomaly detector. 1 to 128 characters length.
|
|
532
|
+
|
|
533
|
+
Minimum length of 1. Maximum length of 64.
|
|
534
|
+
Pattern: [0-9A-Za-z][-.0-9A-Z_a-z]*
|
|
535
|
+
'''
|
|
536
|
+
return typing.cast(builtins.str, jsii.get(self, "alias"))
|
|
537
|
+
|
|
538
|
+
@builtins.property
|
|
539
|
+
@jsii.member(jsii_name="anomalyDetectorArn")
|
|
540
|
+
def anomaly_detector_arn(self) -> builtins.str:
|
|
541
|
+
'''The Amazon Resource Name (ARN) of the anomaly detector.
|
|
542
|
+
|
|
543
|
+
:attribute: true
|
|
544
|
+
'''
|
|
545
|
+
return typing.cast(builtins.str, jsii.get(self, "anomalyDetectorArn"))
|
|
546
|
+
|
|
547
|
+
@builtins.property
|
|
548
|
+
@jsii.member(jsii_name="configuration")
|
|
549
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
550
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
551
|
+
return typing.cast("AnomalyDetectorConfiguration", jsii.get(self, "configuration"))
|
|
552
|
+
|
|
553
|
+
@builtins.property
|
|
554
|
+
@jsii.member(jsii_name="workspace")
|
|
555
|
+
def workspace(self) -> "IWorkspace":
|
|
556
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
557
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
558
|
+
|
|
559
|
+
@builtins.property
|
|
560
|
+
@jsii.member(jsii_name="evaluationIntervalInSeconds")
|
|
561
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
562
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
563
|
+
|
|
564
|
+
Minimum value of 30. Maximum value of 86400.
|
|
565
|
+
'''
|
|
566
|
+
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "evaluationIntervalInSeconds"))
|
|
567
|
+
|
|
568
|
+
@builtins.property
|
|
569
|
+
@jsii.member(jsii_name="labels")
|
|
570
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
571
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
572
|
+
|
|
573
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
574
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
575
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
576
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
577
|
+
'''
|
|
578
|
+
return typing.cast(typing.Optional[typing.List["Label"]], jsii.get(self, "labels"))
|
|
579
|
+
|
|
580
|
+
@builtins.property
|
|
581
|
+
@jsii.member(jsii_name="missingDataAction")
|
|
582
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
583
|
+
'''The action taken when data is missing during evaluation.'''
|
|
584
|
+
return typing.cast(typing.Optional["MissingDataAction"], jsii.get(self, "missingDataAction"))
|
|
585
|
+
|
|
586
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
587
|
+
typing.cast(typing.Any, IAnomalyDetector).__jsii_proxy_class__ = lambda : _IAnomalyDetectorProxy
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
@jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IResourcePolicy")
|
|
591
|
+
class IResourcePolicy(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
592
|
+
@builtins.property
|
|
593
|
+
@jsii.member(jsii_name="policyDocument")
|
|
594
|
+
def policy_document(self) -> builtins.str:
|
|
595
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
596
|
+
...
|
|
597
|
+
|
|
598
|
+
@builtins.property
|
|
599
|
+
@jsii.member(jsii_name="workspace")
|
|
600
|
+
def workspace(self) -> "IWorkspace":
|
|
601
|
+
'''The workspace to attach the policy to.'''
|
|
602
|
+
...
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
class _IResourcePolicyProxy(
|
|
606
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
607
|
+
):
|
|
608
|
+
__jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IResourcePolicy"
|
|
609
|
+
|
|
610
|
+
@builtins.property
|
|
611
|
+
@jsii.member(jsii_name="policyDocument")
|
|
612
|
+
def policy_document(self) -> builtins.str:
|
|
613
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
614
|
+
return typing.cast(builtins.str, jsii.get(self, "policyDocument"))
|
|
615
|
+
|
|
616
|
+
@builtins.property
|
|
617
|
+
@jsii.member(jsii_name="workspace")
|
|
618
|
+
def workspace(self) -> "IWorkspace":
|
|
619
|
+
'''The workspace to attach the policy to.'''
|
|
620
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
621
|
+
|
|
622
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
623
|
+
typing.cast(typing.Any, IResourcePolicy).__jsii_proxy_class__ = lambda : _IResourcePolicyProxy
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
@jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IRuleGroupsNamespace")
|
|
627
|
+
class IRuleGroupsNamespace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
628
|
+
@builtins.property
|
|
629
|
+
@jsii.member(jsii_name="data")
|
|
630
|
+
def data(self) -> builtins.str:
|
|
631
|
+
'''The rules file used in the namespace.'''
|
|
632
|
+
...
|
|
633
|
+
|
|
634
|
+
@builtins.property
|
|
635
|
+
@jsii.member(jsii_name="name")
|
|
636
|
+
def name(self) -> builtins.str:
|
|
637
|
+
'''The name of the rule groups namespace.'''
|
|
638
|
+
...
|
|
639
|
+
|
|
640
|
+
@builtins.property
|
|
641
|
+
@jsii.member(jsii_name="ruleGroupsNamespaceArn")
|
|
642
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
643
|
+
'''The ARN of the rule groups namespace.
|
|
644
|
+
|
|
645
|
+
:attribute: true
|
|
646
|
+
'''
|
|
647
|
+
...
|
|
648
|
+
|
|
649
|
+
@builtins.property
|
|
650
|
+
@jsii.member(jsii_name="workspace")
|
|
651
|
+
def workspace(self) -> "IWorkspace":
|
|
652
|
+
'''The workspace to add the rule groups namespace.'''
|
|
653
|
+
...
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
class _IRuleGroupsNamespaceProxy(
|
|
657
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
658
|
+
):
|
|
659
|
+
__jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IRuleGroupsNamespace"
|
|
660
|
+
|
|
661
|
+
@builtins.property
|
|
662
|
+
@jsii.member(jsii_name="data")
|
|
663
|
+
def data(self) -> builtins.str:
|
|
664
|
+
'''The rules file used in the namespace.'''
|
|
665
|
+
return typing.cast(builtins.str, jsii.get(self, "data"))
|
|
666
|
+
|
|
667
|
+
@builtins.property
|
|
668
|
+
@jsii.member(jsii_name="name")
|
|
669
|
+
def name(self) -> builtins.str:
|
|
670
|
+
'''The name of the rule groups namespace.'''
|
|
671
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
672
|
+
|
|
673
|
+
@builtins.property
|
|
674
|
+
@jsii.member(jsii_name="ruleGroupsNamespaceArn")
|
|
675
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
676
|
+
'''The ARN of the rule groups namespace.
|
|
677
|
+
|
|
678
|
+
:attribute: true
|
|
679
|
+
'''
|
|
680
|
+
return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
|
|
681
|
+
|
|
682
|
+
@builtins.property
|
|
683
|
+
@jsii.member(jsii_name="workspace")
|
|
684
|
+
def workspace(self) -> "IWorkspace":
|
|
685
|
+
'''The workspace to add the rule groups namespace.'''
|
|
686
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
687
|
+
|
|
688
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
689
|
+
typing.cast(typing.Any, IRuleGroupsNamespace).__jsii_proxy_class__ = lambda : _IRuleGroupsNamespaceProxy
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
@jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IScraper")
|
|
693
|
+
class IScraper(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
694
|
+
@builtins.property
|
|
695
|
+
@jsii.member(jsii_name="destination")
|
|
696
|
+
def destination(self) -> "Destination":
|
|
697
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
698
|
+
...
|
|
699
|
+
|
|
700
|
+
@builtins.property
|
|
701
|
+
@jsii.member(jsii_name="scrapeConfiguration")
|
|
702
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
703
|
+
'''The configuration in use by the scraper.'''
|
|
704
|
+
...
|
|
705
|
+
|
|
706
|
+
@builtins.property
|
|
707
|
+
@jsii.member(jsii_name="scraperArn")
|
|
708
|
+
def scraper_arn(self) -> builtins.str:
|
|
709
|
+
'''The ARN of the scraper.
|
|
710
|
+
|
|
711
|
+
:attribute: true
|
|
712
|
+
'''
|
|
713
|
+
...
|
|
714
|
+
|
|
715
|
+
@builtins.property
|
|
716
|
+
@jsii.member(jsii_name="scraperId")
|
|
717
|
+
def scraper_id(self) -> builtins.str:
|
|
718
|
+
'''The ID of the scraper.
|
|
719
|
+
|
|
720
|
+
:attribute: true
|
|
721
|
+
'''
|
|
722
|
+
...
|
|
723
|
+
|
|
724
|
+
@builtins.property
|
|
725
|
+
@jsii.member(jsii_name="source")
|
|
726
|
+
def source(self) -> "Source":
|
|
727
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
728
|
+
...
|
|
729
|
+
|
|
730
|
+
@builtins.property
|
|
731
|
+
@jsii.member(jsii_name="alias")
|
|
732
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
733
|
+
'''An optional user-assigned scraper alias.
|
|
734
|
+
|
|
735
|
+
1-100 characters.
|
|
736
|
+
|
|
737
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
738
|
+
'''
|
|
739
|
+
...
|
|
740
|
+
|
|
741
|
+
@builtins.property
|
|
742
|
+
@jsii.member(jsii_name="roleConfiguration")
|
|
743
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
744
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
745
|
+
...
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
class _IScraperProxy(
|
|
749
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
750
|
+
):
|
|
751
|
+
__jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IScraper"
|
|
752
|
+
|
|
753
|
+
@builtins.property
|
|
754
|
+
@jsii.member(jsii_name="destination")
|
|
755
|
+
def destination(self) -> "Destination":
|
|
756
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
757
|
+
return typing.cast("Destination", jsii.get(self, "destination"))
|
|
758
|
+
|
|
759
|
+
@builtins.property
|
|
760
|
+
@jsii.member(jsii_name="scrapeConfiguration")
|
|
761
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
762
|
+
'''The configuration in use by the scraper.'''
|
|
763
|
+
return typing.cast("ScrapeConfiguration", jsii.get(self, "scrapeConfiguration"))
|
|
764
|
+
|
|
765
|
+
@builtins.property
|
|
766
|
+
@jsii.member(jsii_name="scraperArn")
|
|
767
|
+
def scraper_arn(self) -> builtins.str:
|
|
768
|
+
'''The ARN of the scraper.
|
|
769
|
+
|
|
770
|
+
:attribute: true
|
|
771
|
+
'''
|
|
772
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
|
|
773
|
+
|
|
774
|
+
@builtins.property
|
|
775
|
+
@jsii.member(jsii_name="scraperId")
|
|
776
|
+
def scraper_id(self) -> builtins.str:
|
|
777
|
+
'''The ID of the scraper.
|
|
778
|
+
|
|
779
|
+
:attribute: true
|
|
780
|
+
'''
|
|
781
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperId"))
|
|
782
|
+
|
|
783
|
+
@builtins.property
|
|
784
|
+
@jsii.member(jsii_name="source")
|
|
785
|
+
def source(self) -> "Source":
|
|
786
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
787
|
+
return typing.cast("Source", jsii.get(self, "source"))
|
|
788
|
+
|
|
789
|
+
@builtins.property
|
|
790
|
+
@jsii.member(jsii_name="alias")
|
|
791
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
792
|
+
'''An optional user-assigned scraper alias.
|
|
793
|
+
|
|
794
|
+
1-100 characters.
|
|
795
|
+
|
|
796
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
797
|
+
'''
|
|
798
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
799
|
+
|
|
800
|
+
@builtins.property
|
|
801
|
+
@jsii.member(jsii_name="roleConfiguration")
|
|
802
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
803
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
804
|
+
return typing.cast(typing.Optional["RoleConfiguration"], jsii.get(self, "roleConfiguration"))
|
|
805
|
+
|
|
806
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
807
|
+
typing.cast(typing.Any, IScraper).__jsii_proxy_class__ = lambda : _IScraperProxy
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
@jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IWorkspace")
|
|
811
|
+
class IWorkspace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
|
|
812
|
+
@builtins.property
|
|
813
|
+
@jsii.member(jsii_name="workspaceArn")
|
|
814
|
+
def workspace_arn(self) -> builtins.str:
|
|
815
|
+
'''The ARN of the workspace.
|
|
816
|
+
|
|
817
|
+
:attribute: true
|
|
818
|
+
'''
|
|
819
|
+
...
|
|
820
|
+
|
|
821
|
+
@builtins.property
|
|
822
|
+
@jsii.member(jsii_name="workspaceId")
|
|
823
|
+
def workspace_id(self) -> builtins.str:
|
|
824
|
+
'''The unique ID for the workspace.
|
|
825
|
+
|
|
826
|
+
:attribute: true
|
|
827
|
+
'''
|
|
828
|
+
...
|
|
829
|
+
|
|
830
|
+
@builtins.property
|
|
831
|
+
@jsii.member(jsii_name="alertManagerDefinition")
|
|
832
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
833
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
834
|
+
...
|
|
835
|
+
|
|
836
|
+
@builtins.property
|
|
837
|
+
@jsii.member(jsii_name="alias")
|
|
838
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
839
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
840
|
+
|
|
841
|
+
It does not need to be
|
|
842
|
+
unique.
|
|
843
|
+
'''
|
|
844
|
+
...
|
|
845
|
+
|
|
846
|
+
@builtins.property
|
|
847
|
+
@jsii.member(jsii_name="kmsKey")
|
|
848
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
849
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
850
|
+
...
|
|
851
|
+
|
|
852
|
+
@builtins.property
|
|
853
|
+
@jsii.member(jsii_name="loggingConfiguration")
|
|
854
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
855
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
856
|
+
|
|
857
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
858
|
+
'''
|
|
859
|
+
...
|
|
860
|
+
|
|
861
|
+
@builtins.property
|
|
862
|
+
@jsii.member(jsii_name="queryLoggingConfiguration")
|
|
863
|
+
def query_logging_configuration(
|
|
864
|
+
self,
|
|
865
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
866
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
867
|
+
...
|
|
868
|
+
|
|
869
|
+
@builtins.property
|
|
870
|
+
@jsii.member(jsii_name="workspaceConfiguration")
|
|
871
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
872
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
873
|
+
...
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
class _IWorkspaceProxy(
|
|
877
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
|
|
878
|
+
):
|
|
879
|
+
__jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IWorkspace"
|
|
880
|
+
|
|
881
|
+
@builtins.property
|
|
882
|
+
@jsii.member(jsii_name="workspaceArn")
|
|
883
|
+
def workspace_arn(self) -> builtins.str:
|
|
884
|
+
'''The ARN of the workspace.
|
|
885
|
+
|
|
886
|
+
:attribute: true
|
|
887
|
+
'''
|
|
888
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
|
|
889
|
+
|
|
890
|
+
@builtins.property
|
|
891
|
+
@jsii.member(jsii_name="workspaceId")
|
|
892
|
+
def workspace_id(self) -> builtins.str:
|
|
893
|
+
'''The unique ID for the workspace.
|
|
894
|
+
|
|
895
|
+
:attribute: true
|
|
896
|
+
'''
|
|
897
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
|
|
898
|
+
|
|
899
|
+
@builtins.property
|
|
900
|
+
@jsii.member(jsii_name="alertManagerDefinition")
|
|
901
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
902
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
903
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
|
|
904
|
+
|
|
905
|
+
@builtins.property
|
|
906
|
+
@jsii.member(jsii_name="alias")
|
|
907
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
908
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
909
|
+
|
|
910
|
+
It does not need to be
|
|
911
|
+
unique.
|
|
912
|
+
'''
|
|
913
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
914
|
+
|
|
915
|
+
@builtins.property
|
|
916
|
+
@jsii.member(jsii_name="kmsKey")
|
|
917
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
918
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
919
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], jsii.get(self, "kmsKey"))
|
|
920
|
+
|
|
921
|
+
@builtins.property
|
|
922
|
+
@jsii.member(jsii_name="loggingConfiguration")
|
|
923
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
924
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
925
|
+
|
|
926
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
927
|
+
'''
|
|
928
|
+
return typing.cast(typing.Optional["LoggingConfiguration"], jsii.get(self, "loggingConfiguration"))
|
|
929
|
+
|
|
930
|
+
@builtins.property
|
|
931
|
+
@jsii.member(jsii_name="queryLoggingConfiguration")
|
|
932
|
+
def query_logging_configuration(
|
|
933
|
+
self,
|
|
934
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
935
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
936
|
+
return typing.cast(typing.Optional["QueryLoggingConfiguration"], jsii.get(self, "queryLoggingConfiguration"))
|
|
937
|
+
|
|
938
|
+
@builtins.property
|
|
939
|
+
@jsii.member(jsii_name="workspaceConfiguration")
|
|
940
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
941
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
942
|
+
return typing.cast(typing.Optional["WorkspaceConfiguration"], jsii.get(self, "workspaceConfiguration"))
|
|
943
|
+
|
|
944
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
945
|
+
typing.cast(typing.Any, IWorkspace).__jsii_proxy_class__ = lambda : _IWorkspaceProxy
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
@jsii.data_type(
|
|
949
|
+
jsii_type="@robhan-cdk-lib/aws_aps.IgnoreNearExpected",
|
|
950
|
+
jsii_struct_bases=[],
|
|
951
|
+
name_mapping={"amount": "amount", "ratio": "ratio"},
|
|
952
|
+
)
|
|
953
|
+
class IgnoreNearExpected:
|
|
954
|
+
def __init__(
|
|
955
|
+
self,
|
|
956
|
+
*,
|
|
957
|
+
amount: typing.Optional[jsii.Number] = None,
|
|
958
|
+
ratio: typing.Optional[jsii.Number] = None,
|
|
959
|
+
) -> None:
|
|
960
|
+
'''Configuration for threshold settings that determine when values near expected values should be ignored during anomaly detection.
|
|
961
|
+
|
|
962
|
+
:param amount: The absolute amount by which values can differ from expected values before being considered anomalous.
|
|
963
|
+
:param ratio: The ratio by which values can differ from expected values before being considered anomalous.
|
|
964
|
+
'''
|
|
965
|
+
if __debug__:
|
|
966
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fa12ec68028f74d5d8f1d96a0b99090659c404c86bd0ec936014ab264467ca22)
|
|
967
|
+
check_type(argname="argument amount", value=amount, expected_type=type_hints["amount"])
|
|
968
|
+
check_type(argname="argument ratio", value=ratio, expected_type=type_hints["ratio"])
|
|
969
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
970
|
+
if amount is not None:
|
|
971
|
+
self._values["amount"] = amount
|
|
972
|
+
if ratio is not None:
|
|
973
|
+
self._values["ratio"] = ratio
|
|
974
|
+
|
|
975
|
+
@builtins.property
|
|
976
|
+
def amount(self) -> typing.Optional[jsii.Number]:
|
|
977
|
+
'''The absolute amount by which values can differ from expected values before being considered anomalous.'''
|
|
978
|
+
result = self._values.get("amount")
|
|
979
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
980
|
+
|
|
981
|
+
@builtins.property
|
|
982
|
+
def ratio(self) -> typing.Optional[jsii.Number]:
|
|
983
|
+
'''The ratio by which values can differ from expected values before being considered anomalous.'''
|
|
984
|
+
result = self._values.get("ratio")
|
|
985
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
986
|
+
|
|
987
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
988
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
989
|
+
|
|
990
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
991
|
+
return not (rhs == self)
|
|
992
|
+
|
|
993
|
+
def __repr__(self) -> str:
|
|
994
|
+
return "IgnoreNearExpected(%s)" % ", ".join(
|
|
995
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
@jsii.data_type(
|
|
1000
|
+
jsii_type="@robhan-cdk-lib/aws_aps.Label",
|
|
1001
|
+
jsii_struct_bases=[],
|
|
1002
|
+
name_mapping={"name": "name", "value": "value"},
|
|
1003
|
+
)
|
|
1004
|
+
class Label:
|
|
1005
|
+
def __init__(self, *, name: builtins.str, value: builtins.str) -> None:
|
|
1006
|
+
'''A label is a name:value pair used to add context to ingested metrics.
|
|
1007
|
+
|
|
1008
|
+
This structure defines the
|
|
1009
|
+
name and value for one label that is used in a label set. You can set ingestion limits on time
|
|
1010
|
+
series that match defined label sets, to help prevent a workspace from being overwhelmed with
|
|
1011
|
+
unexpected spikes in time series ingestion.
|
|
1012
|
+
|
|
1013
|
+
:param name: The name for this label. Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ At least one character.
|
|
1014
|
+
:param value: The value for this label. At least one character.
|
|
1015
|
+
'''
|
|
1016
|
+
if __debug__:
|
|
1017
|
+
type_hints = typing.get_type_hints(_typecheckingstub__5c797aa51820ba19e3974b523e246d357e3b44ff0bc743b0f1171b5ae9bebdea)
|
|
1018
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
1019
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
1020
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1021
|
+
"name": name,
|
|
1022
|
+
"value": value,
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
@builtins.property
|
|
1026
|
+
def name(self) -> builtins.str:
|
|
1027
|
+
'''The name for this label.
|
|
1028
|
+
|
|
1029
|
+
Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
|
|
1030
|
+
|
|
1031
|
+
At least one character.
|
|
1032
|
+
'''
|
|
1033
|
+
result = self._values.get("name")
|
|
1034
|
+
assert result is not None, "Required property 'name' is missing"
|
|
1035
|
+
return typing.cast(builtins.str, result)
|
|
1036
|
+
|
|
1037
|
+
@builtins.property
|
|
1038
|
+
def value(self) -> builtins.str:
|
|
1039
|
+
'''The value for this label.
|
|
1040
|
+
|
|
1041
|
+
At least one character.
|
|
1042
|
+
'''
|
|
1043
|
+
result = self._values.get("value")
|
|
1044
|
+
assert result is not None, "Required property 'value' is missing"
|
|
1045
|
+
return typing.cast(builtins.str, result)
|
|
1046
|
+
|
|
1047
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1048
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1049
|
+
|
|
1050
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1051
|
+
return not (rhs == self)
|
|
1052
|
+
|
|
1053
|
+
def __repr__(self) -> str:
|
|
1054
|
+
return "Label(%s)" % ", ".join(
|
|
1055
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
@jsii.data_type(
|
|
1060
|
+
jsii_type="@robhan-cdk-lib/aws_aps.LimitsPerLabelSet",
|
|
1061
|
+
jsii_struct_bases=[],
|
|
1062
|
+
name_mapping={"label_set": "labelSet", "limits": "limits"},
|
|
1063
|
+
)
|
|
1064
|
+
class LimitsPerLabelSet:
|
|
1065
|
+
def __init__(
|
|
1066
|
+
self,
|
|
1067
|
+
*,
|
|
1068
|
+
label_set: typing.Sequence[typing.Union["Label", typing.Dict[builtins.str, typing.Any]]],
|
|
1069
|
+
limits: typing.Union["LimitsPerLabelSetEntry", typing.Dict[builtins.str, typing.Any]],
|
|
1070
|
+
) -> None:
|
|
1071
|
+
'''This defines a label set for the workspace, and defines the ingestion limit for active time series that match that label set.
|
|
1072
|
+
|
|
1073
|
+
Each label name in a label set must be unique.
|
|
1074
|
+
|
|
1075
|
+
:param label_set: This defines one label set that will have an enforced ingestion limit. You can set ingestion limits on time series that match defined label sets, to help prevent a workspace from being overwhelmed with unexpected spikes in time series ingestion. Label values accept all UTF-8 characters with one exception. If the label name is metric name label **name**, then the metric part of the name must conform to the following pattern: [a-zA-Z_:][a-zA-Z0-9_:]* Minimum 0
|
|
1076
|
+
:param limits: This structure contains the information about the limits that apply to time series that match this label set.
|
|
1077
|
+
'''
|
|
1078
|
+
if isinstance(limits, dict):
|
|
1079
|
+
limits = LimitsPerLabelSetEntry(**limits)
|
|
1080
|
+
if __debug__:
|
|
1081
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6893b1308b220935b9f1ce7c4eae4ddc73c29be6663d247911732ccfcec7f4d9)
|
|
1082
|
+
check_type(argname="argument label_set", value=label_set, expected_type=type_hints["label_set"])
|
|
1083
|
+
check_type(argname="argument limits", value=limits, expected_type=type_hints["limits"])
|
|
1084
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1085
|
+
"label_set": label_set,
|
|
1086
|
+
"limits": limits,
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
@builtins.property
|
|
1090
|
+
def label_set(self) -> typing.List["Label"]:
|
|
1091
|
+
'''This defines one label set that will have an enforced ingestion limit.
|
|
1092
|
+
|
|
1093
|
+
You can set ingestion
|
|
1094
|
+
limits on time series that match defined label sets, to help prevent a workspace from being
|
|
1095
|
+
overwhelmed with unexpected spikes in time series ingestion.
|
|
1096
|
+
|
|
1097
|
+
Label values accept all UTF-8 characters with one exception. If the label name is metric
|
|
1098
|
+
name label **name**, then the metric part of the name must conform to the following pattern:
|
|
1099
|
+
[a-zA-Z_:][a-zA-Z0-9_:]*
|
|
1100
|
+
|
|
1101
|
+
Minimum 0
|
|
1102
|
+
'''
|
|
1103
|
+
result = self._values.get("label_set")
|
|
1104
|
+
assert result is not None, "Required property 'label_set' is missing"
|
|
1105
|
+
return typing.cast(typing.List["Label"], result)
|
|
1106
|
+
|
|
1107
|
+
@builtins.property
|
|
1108
|
+
def limits(self) -> "LimitsPerLabelSetEntry":
|
|
1109
|
+
'''This structure contains the information about the limits that apply to time series that match this label set.'''
|
|
1110
|
+
result = self._values.get("limits")
|
|
1111
|
+
assert result is not None, "Required property 'limits' is missing"
|
|
1112
|
+
return typing.cast("LimitsPerLabelSetEntry", result)
|
|
1113
|
+
|
|
1114
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1115
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1116
|
+
|
|
1117
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1118
|
+
return not (rhs == self)
|
|
1119
|
+
|
|
1120
|
+
def __repr__(self) -> str:
|
|
1121
|
+
return "LimitsPerLabelSet(%s)" % ", ".join(
|
|
1122
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1123
|
+
)
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
@jsii.data_type(
|
|
1127
|
+
jsii_type="@robhan-cdk-lib/aws_aps.LimitsPerLabelSetEntry",
|
|
1128
|
+
jsii_struct_bases=[],
|
|
1129
|
+
name_mapping={"max_series": "maxSeries"},
|
|
1130
|
+
)
|
|
1131
|
+
class LimitsPerLabelSetEntry:
|
|
1132
|
+
def __init__(self, *, max_series: typing.Optional[jsii.Number] = None) -> None:
|
|
1133
|
+
'''This structure contains the limits that apply to time series that match one label set.
|
|
1134
|
+
|
|
1135
|
+
:param max_series: The maximum number of active series that can be ingested that match this label set. Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch Logs. Minimum 0
|
|
1136
|
+
'''
|
|
1137
|
+
if __debug__:
|
|
1138
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f53acc1bbc1fb66aa75ed0ff80395c4fd66be1563ee572788afab4e42af12da4)
|
|
1139
|
+
check_type(argname="argument max_series", value=max_series, expected_type=type_hints["max_series"])
|
|
1140
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1141
|
+
if max_series is not None:
|
|
1142
|
+
self._values["max_series"] = max_series
|
|
1143
|
+
|
|
1144
|
+
@builtins.property
|
|
1145
|
+
def max_series(self) -> typing.Optional[jsii.Number]:
|
|
1146
|
+
'''The maximum number of active series that can be ingested that match this label set.
|
|
1147
|
+
|
|
1148
|
+
Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed
|
|
1149
|
+
Service for Prometheus to vend label set metrics to CloudWatch Logs.
|
|
1150
|
+
|
|
1151
|
+
Minimum 0
|
|
1152
|
+
'''
|
|
1153
|
+
result = self._values.get("max_series")
|
|
1154
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
1155
|
+
|
|
1156
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1157
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1158
|
+
|
|
1159
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1160
|
+
return not (rhs == self)
|
|
1161
|
+
|
|
1162
|
+
def __repr__(self) -> str:
|
|
1163
|
+
return "LimitsPerLabelSetEntry(%s)" % ", ".join(
|
|
1164
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1165
|
+
)
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
@jsii.data_type(
|
|
1169
|
+
jsii_type="@robhan-cdk-lib/aws_aps.LoggingConfiguration",
|
|
1170
|
+
jsii_struct_bases=[],
|
|
1171
|
+
name_mapping={"log_group": "logGroup"},
|
|
1172
|
+
)
|
|
1173
|
+
class LoggingConfiguration:
|
|
1174
|
+
def __init__(
|
|
1175
|
+
self,
|
|
1176
|
+
*,
|
|
1177
|
+
log_group: typing.Optional["_aws_cdk_aws_logs_ceddda9d.ILogGroup"] = None,
|
|
1178
|
+
) -> None:
|
|
1179
|
+
'''Contains information about the rules and alerting logging configuration for the workspace.
|
|
1180
|
+
|
|
1181
|
+
:param log_group: The CloudWatch log group to which the vended log data will be published.
|
|
1182
|
+
'''
|
|
1183
|
+
if __debug__:
|
|
1184
|
+
type_hints = typing.get_type_hints(_typecheckingstub__282c7cd599e82904024934838ca325999d8149f211c5885145973734c9c85b76)
|
|
1185
|
+
check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
|
|
1186
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1187
|
+
if log_group is not None:
|
|
1188
|
+
self._values["log_group"] = log_group
|
|
1189
|
+
|
|
1190
|
+
@builtins.property
|
|
1191
|
+
def log_group(self) -> typing.Optional["_aws_cdk_aws_logs_ceddda9d.ILogGroup"]:
|
|
1192
|
+
'''The CloudWatch log group to which the vended log data will be published.'''
|
|
1193
|
+
result = self._values.get("log_group")
|
|
1194
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_logs_ceddda9d.ILogGroup"], result)
|
|
1195
|
+
|
|
1196
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1197
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1198
|
+
|
|
1199
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1200
|
+
return not (rhs == self)
|
|
1201
|
+
|
|
1202
|
+
def __repr__(self) -> str:
|
|
1203
|
+
return "LoggingConfiguration(%s)" % ", ".join(
|
|
1204
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1205
|
+
)
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
@jsii.data_type(
|
|
1209
|
+
jsii_type="@robhan-cdk-lib/aws_aps.LoggingDestination",
|
|
1210
|
+
jsii_struct_bases=[],
|
|
1211
|
+
name_mapping={"cloud_watch_logs": "cloudWatchLogs", "filters": "filters"},
|
|
1212
|
+
)
|
|
1213
|
+
class LoggingDestination:
|
|
1214
|
+
def __init__(
|
|
1215
|
+
self,
|
|
1216
|
+
*,
|
|
1217
|
+
cloud_watch_logs: typing.Union["CloudWatchLogDestination", typing.Dict[builtins.str, typing.Any]],
|
|
1218
|
+
filters: typing.Union["LoggingFilter", typing.Dict[builtins.str, typing.Any]],
|
|
1219
|
+
) -> None:
|
|
1220
|
+
'''The logging destination in an Amazon Managed Service for Prometheus workspace.
|
|
1221
|
+
|
|
1222
|
+
:param cloud_watch_logs: Configuration details for logging to CloudWatch Logs.
|
|
1223
|
+
:param filters: Filtering criteria that determine which queries are logged.
|
|
1224
|
+
'''
|
|
1225
|
+
if isinstance(cloud_watch_logs, dict):
|
|
1226
|
+
cloud_watch_logs = CloudWatchLogDestination(**cloud_watch_logs)
|
|
1227
|
+
if isinstance(filters, dict):
|
|
1228
|
+
filters = LoggingFilter(**filters)
|
|
1229
|
+
if __debug__:
|
|
1230
|
+
type_hints = typing.get_type_hints(_typecheckingstub__2496000b19af109fb0c5c290e32ab9bbc75be51fbfa27d16758c01f8baf00891)
|
|
1231
|
+
check_type(argname="argument cloud_watch_logs", value=cloud_watch_logs, expected_type=type_hints["cloud_watch_logs"])
|
|
1232
|
+
check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
|
|
1233
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1234
|
+
"cloud_watch_logs": cloud_watch_logs,
|
|
1235
|
+
"filters": filters,
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
@builtins.property
|
|
1239
|
+
def cloud_watch_logs(self) -> "CloudWatchLogDestination":
|
|
1240
|
+
'''Configuration details for logging to CloudWatch Logs.'''
|
|
1241
|
+
result = self._values.get("cloud_watch_logs")
|
|
1242
|
+
assert result is not None, "Required property 'cloud_watch_logs' is missing"
|
|
1243
|
+
return typing.cast("CloudWatchLogDestination", result)
|
|
1244
|
+
|
|
1245
|
+
@builtins.property
|
|
1246
|
+
def filters(self) -> "LoggingFilter":
|
|
1247
|
+
'''Filtering criteria that determine which queries are logged.'''
|
|
1248
|
+
result = self._values.get("filters")
|
|
1249
|
+
assert result is not None, "Required property 'filters' is missing"
|
|
1250
|
+
return typing.cast("LoggingFilter", result)
|
|
1251
|
+
|
|
1252
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1253
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1254
|
+
|
|
1255
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1256
|
+
return not (rhs == self)
|
|
1257
|
+
|
|
1258
|
+
def __repr__(self) -> str:
|
|
1259
|
+
return "LoggingDestination(%s)" % ", ".join(
|
|
1260
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1261
|
+
)
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
@jsii.data_type(
|
|
1265
|
+
jsii_type="@robhan-cdk-lib/aws_aps.LoggingFilter",
|
|
1266
|
+
jsii_struct_bases=[],
|
|
1267
|
+
name_mapping={"qsp_threshold": "qspThreshold"},
|
|
1268
|
+
)
|
|
1269
|
+
class LoggingFilter:
|
|
1270
|
+
def __init__(self, *, qsp_threshold: jsii.Number) -> None:
|
|
1271
|
+
'''Filtering criteria that determine which queries are logged.
|
|
1272
|
+
|
|
1273
|
+
:param qsp_threshold: Integer. Minimum 0
|
|
1274
|
+
'''
|
|
1275
|
+
if __debug__:
|
|
1276
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c7beea1121128e5f35f0720b90b21713abba4beef8755e891bbf87c2ad9711a0)
|
|
1277
|
+
check_type(argname="argument qsp_threshold", value=qsp_threshold, expected_type=type_hints["qsp_threshold"])
|
|
1278
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1279
|
+
"qsp_threshold": qsp_threshold,
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
@builtins.property
|
|
1283
|
+
def qsp_threshold(self) -> jsii.Number:
|
|
1284
|
+
'''Integer.
|
|
1285
|
+
|
|
1286
|
+
Minimum 0
|
|
1287
|
+
'''
|
|
1288
|
+
result = self._values.get("qsp_threshold")
|
|
1289
|
+
assert result is not None, "Required property 'qsp_threshold' is missing"
|
|
1290
|
+
return typing.cast(jsii.Number, result)
|
|
1291
|
+
|
|
1292
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1293
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1294
|
+
|
|
1295
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1296
|
+
return not (rhs == self)
|
|
1297
|
+
|
|
1298
|
+
def __repr__(self) -> str:
|
|
1299
|
+
return "LoggingFilter(%s)" % ", ".join(
|
|
1300
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1301
|
+
)
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
@jsii.data_type(
|
|
1305
|
+
jsii_type="@robhan-cdk-lib/aws_aps.MissingDataAction",
|
|
1306
|
+
jsii_struct_bases=[],
|
|
1307
|
+
name_mapping={"mark_as_anomaly": "markAsAnomaly", "skip": "skip"},
|
|
1308
|
+
)
|
|
1309
|
+
class MissingDataAction:
|
|
1310
|
+
def __init__(
|
|
1311
|
+
self,
|
|
1312
|
+
*,
|
|
1313
|
+
mark_as_anomaly: typing.Optional[builtins.bool] = None,
|
|
1314
|
+
skip: typing.Optional[builtins.bool] = None,
|
|
1315
|
+
) -> None:
|
|
1316
|
+
'''Specifies the action to take when data is missing during anomaly detection evaluation.
|
|
1317
|
+
|
|
1318
|
+
:param mark_as_anomaly: Marks missing data points as anomalies.
|
|
1319
|
+
:param skip: Skips evaluation when data is missing.
|
|
1320
|
+
'''
|
|
1321
|
+
if __debug__:
|
|
1322
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4de31fdb80b9646037b68b88ae1dae6b46be704ab84a3c61100b29e91fc959c2)
|
|
1323
|
+
check_type(argname="argument mark_as_anomaly", value=mark_as_anomaly, expected_type=type_hints["mark_as_anomaly"])
|
|
1324
|
+
check_type(argname="argument skip", value=skip, expected_type=type_hints["skip"])
|
|
1325
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1326
|
+
if mark_as_anomaly is not None:
|
|
1327
|
+
self._values["mark_as_anomaly"] = mark_as_anomaly
|
|
1328
|
+
if skip is not None:
|
|
1329
|
+
self._values["skip"] = skip
|
|
1330
|
+
|
|
1331
|
+
@builtins.property
|
|
1332
|
+
def mark_as_anomaly(self) -> typing.Optional[builtins.bool]:
|
|
1333
|
+
'''Marks missing data points as anomalies.'''
|
|
1334
|
+
result = self._values.get("mark_as_anomaly")
|
|
1335
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1336
|
+
|
|
1337
|
+
@builtins.property
|
|
1338
|
+
def skip(self) -> typing.Optional[builtins.bool]:
|
|
1339
|
+
'''Skips evaluation when data is missing.'''
|
|
1340
|
+
result = self._values.get("skip")
|
|
1341
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1342
|
+
|
|
1343
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1344
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1345
|
+
|
|
1346
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1347
|
+
return not (rhs == self)
|
|
1348
|
+
|
|
1349
|
+
def __repr__(self) -> str:
|
|
1350
|
+
return "MissingDataAction(%s)" % ", ".join(
|
|
1351
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1352
|
+
)
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
@jsii.data_type(
|
|
1356
|
+
jsii_type="@robhan-cdk-lib/aws_aps.QueryLoggingConfiguration",
|
|
1357
|
+
jsii_struct_bases=[],
|
|
1358
|
+
name_mapping={"destinations": "destinations"},
|
|
1359
|
+
)
|
|
1360
|
+
class QueryLoggingConfiguration:
|
|
1361
|
+
def __init__(
|
|
1362
|
+
self,
|
|
1363
|
+
*,
|
|
1364
|
+
destinations: typing.Sequence[typing.Union["LoggingDestination", typing.Dict[builtins.str, typing.Any]]],
|
|
1365
|
+
) -> None:
|
|
1366
|
+
'''The query logging configuration in an Amazon Managed Service for Prometheus workspace.
|
|
1367
|
+
|
|
1368
|
+
:param destinations: Defines a destination and its associated filtering criteria for query logging. Minimum 1 and maximum 1 item in array.
|
|
1369
|
+
'''
|
|
1370
|
+
if __debug__:
|
|
1371
|
+
type_hints = typing.get_type_hints(_typecheckingstub__092820c29e1435155b193e5488fd2841dcea5141110ab984fa14a237e2f4a4ae)
|
|
1372
|
+
check_type(argname="argument destinations", value=destinations, expected_type=type_hints["destinations"])
|
|
1373
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1374
|
+
"destinations": destinations,
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
@builtins.property
|
|
1378
|
+
def destinations(self) -> typing.List["LoggingDestination"]:
|
|
1379
|
+
'''Defines a destination and its associated filtering criteria for query logging.
|
|
1380
|
+
|
|
1381
|
+
Minimum 1 and maximum 1 item in array.
|
|
1382
|
+
'''
|
|
1383
|
+
result = self._values.get("destinations")
|
|
1384
|
+
assert result is not None, "Required property 'destinations' is missing"
|
|
1385
|
+
return typing.cast(typing.List["LoggingDestination"], result)
|
|
1386
|
+
|
|
1387
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1388
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1389
|
+
|
|
1390
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1391
|
+
return not (rhs == self)
|
|
1392
|
+
|
|
1393
|
+
def __repr__(self) -> str:
|
|
1394
|
+
return "QueryLoggingConfiguration(%s)" % ", ".join(
|
|
1395
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1396
|
+
)
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
@jsii.data_type(
|
|
1400
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RandomCutForestConfiguration",
|
|
1401
|
+
jsii_struct_bases=[],
|
|
1402
|
+
name_mapping={
|
|
1403
|
+
"query": "query",
|
|
1404
|
+
"ignore_near_expected_from_above": "ignoreNearExpectedFromAbove",
|
|
1405
|
+
"ignore_near_expected_from_below": "ignoreNearExpectedFromBelow",
|
|
1406
|
+
"sample_size": "sampleSize",
|
|
1407
|
+
"shingle_size": "shingleSize",
|
|
1408
|
+
},
|
|
1409
|
+
)
|
|
1410
|
+
class RandomCutForestConfiguration:
|
|
1411
|
+
def __init__(
|
|
1412
|
+
self,
|
|
1413
|
+
*,
|
|
1414
|
+
query: builtins.str,
|
|
1415
|
+
ignore_near_expected_from_above: typing.Optional[typing.Union["IgnoreNearExpected", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1416
|
+
ignore_near_expected_from_below: typing.Optional[typing.Union["IgnoreNearExpected", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1417
|
+
sample_size: typing.Optional[jsii.Number] = None,
|
|
1418
|
+
shingle_size: typing.Optional[jsii.Number] = None,
|
|
1419
|
+
) -> None:
|
|
1420
|
+
'''Configuration for the Random Cut Forest algorithm used for anomaly detection in time-series data.
|
|
1421
|
+
|
|
1422
|
+
:param query: The Prometheus query used to retrieve the time-series data for anomaly detection. 1 to 8192 characters length.
|
|
1423
|
+
:param ignore_near_expected_from_above: Configuration for ignoring values that are near expected values from above during anomaly detection.
|
|
1424
|
+
:param ignore_near_expected_from_below: Configuration for ignoring values that are near expected values from below during anomaly detection.
|
|
1425
|
+
:param sample_size: The number of data points sampled from the input stream for the Random Cut Forest algorithm. The default number is 256 consecutive data points. Minimum: 256 Maximum: 1024
|
|
1426
|
+
:param shingle_size: The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm. The default number is 8 consecutive data points. Minimum: 2 Maximum: 1024
|
|
1427
|
+
'''
|
|
1428
|
+
if isinstance(ignore_near_expected_from_above, dict):
|
|
1429
|
+
ignore_near_expected_from_above = IgnoreNearExpected(**ignore_near_expected_from_above)
|
|
1430
|
+
if isinstance(ignore_near_expected_from_below, dict):
|
|
1431
|
+
ignore_near_expected_from_below = IgnoreNearExpected(**ignore_near_expected_from_below)
|
|
1432
|
+
if __debug__:
|
|
1433
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c44dedd708a153df90c20f2738e66c34f510bb7ed036637ccb7a1bde1f3394b8)
|
|
1434
|
+
check_type(argname="argument query", value=query, expected_type=type_hints["query"])
|
|
1435
|
+
check_type(argname="argument ignore_near_expected_from_above", value=ignore_near_expected_from_above, expected_type=type_hints["ignore_near_expected_from_above"])
|
|
1436
|
+
check_type(argname="argument ignore_near_expected_from_below", value=ignore_near_expected_from_below, expected_type=type_hints["ignore_near_expected_from_below"])
|
|
1437
|
+
check_type(argname="argument sample_size", value=sample_size, expected_type=type_hints["sample_size"])
|
|
1438
|
+
check_type(argname="argument shingle_size", value=shingle_size, expected_type=type_hints["shingle_size"])
|
|
1439
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1440
|
+
"query": query,
|
|
1441
|
+
}
|
|
1442
|
+
if ignore_near_expected_from_above is not None:
|
|
1443
|
+
self._values["ignore_near_expected_from_above"] = ignore_near_expected_from_above
|
|
1444
|
+
if ignore_near_expected_from_below is not None:
|
|
1445
|
+
self._values["ignore_near_expected_from_below"] = ignore_near_expected_from_below
|
|
1446
|
+
if sample_size is not None:
|
|
1447
|
+
self._values["sample_size"] = sample_size
|
|
1448
|
+
if shingle_size is not None:
|
|
1449
|
+
self._values["shingle_size"] = shingle_size
|
|
1450
|
+
|
|
1451
|
+
@builtins.property
|
|
1452
|
+
def query(self) -> builtins.str:
|
|
1453
|
+
'''The Prometheus query used to retrieve the time-series data for anomaly detection.
|
|
1454
|
+
|
|
1455
|
+
1 to 8192 characters length.
|
|
1456
|
+
'''
|
|
1457
|
+
result = self._values.get("query")
|
|
1458
|
+
assert result is not None, "Required property 'query' is missing"
|
|
1459
|
+
return typing.cast(builtins.str, result)
|
|
1460
|
+
|
|
1461
|
+
@builtins.property
|
|
1462
|
+
def ignore_near_expected_from_above(self) -> typing.Optional["IgnoreNearExpected"]:
|
|
1463
|
+
'''Configuration for ignoring values that are near expected values from above during anomaly detection.'''
|
|
1464
|
+
result = self._values.get("ignore_near_expected_from_above")
|
|
1465
|
+
return typing.cast(typing.Optional["IgnoreNearExpected"], result)
|
|
1466
|
+
|
|
1467
|
+
@builtins.property
|
|
1468
|
+
def ignore_near_expected_from_below(self) -> typing.Optional["IgnoreNearExpected"]:
|
|
1469
|
+
'''Configuration for ignoring values that are near expected values from below during anomaly detection.'''
|
|
1470
|
+
result = self._values.get("ignore_near_expected_from_below")
|
|
1471
|
+
return typing.cast(typing.Optional["IgnoreNearExpected"], result)
|
|
1472
|
+
|
|
1473
|
+
@builtins.property
|
|
1474
|
+
def sample_size(self) -> typing.Optional[jsii.Number]:
|
|
1475
|
+
'''The number of data points sampled from the input stream for the Random Cut Forest algorithm.
|
|
1476
|
+
|
|
1477
|
+
The default number is 256 consecutive data points.
|
|
1478
|
+
|
|
1479
|
+
Minimum: 256
|
|
1480
|
+
Maximum: 1024
|
|
1481
|
+
'''
|
|
1482
|
+
result = self._values.get("sample_size")
|
|
1483
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
1484
|
+
|
|
1485
|
+
@builtins.property
|
|
1486
|
+
def shingle_size(self) -> typing.Optional[jsii.Number]:
|
|
1487
|
+
'''The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm.
|
|
1488
|
+
|
|
1489
|
+
The default number is 8 consecutive data points.
|
|
1490
|
+
|
|
1491
|
+
Minimum: 2
|
|
1492
|
+
Maximum: 1024
|
|
1493
|
+
'''
|
|
1494
|
+
result = self._values.get("shingle_size")
|
|
1495
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
1496
|
+
|
|
1497
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1498
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1499
|
+
|
|
1500
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1501
|
+
return not (rhs == self)
|
|
1502
|
+
|
|
1503
|
+
def __repr__(self) -> str:
|
|
1504
|
+
return "RandomCutForestConfiguration(%s)" % ", ".join(
|
|
1505
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1506
|
+
)
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
@jsii.implements(IResourcePolicy)
|
|
1510
|
+
class ResourcePolicyBase(
|
|
1511
|
+
_aws_cdk_ceddda9d.Resource,
|
|
1512
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
1513
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ResourcePolicyBase",
|
|
1514
|
+
):
|
|
1515
|
+
def __init__(
|
|
1516
|
+
self,
|
|
1517
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
1518
|
+
id: builtins.str,
|
|
1519
|
+
*,
|
|
1520
|
+
account: typing.Optional[builtins.str] = None,
|
|
1521
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
1522
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
1523
|
+
region: typing.Optional[builtins.str] = None,
|
|
1524
|
+
) -> None:
|
|
1525
|
+
'''
|
|
1526
|
+
:param scope: -
|
|
1527
|
+
:param id: -
|
|
1528
|
+
:param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
|
|
1529
|
+
:param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
|
|
1530
|
+
:param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
|
|
1531
|
+
:param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
|
|
1532
|
+
'''
|
|
1533
|
+
if __debug__:
|
|
1534
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1705a6716ddb826f74670d4b351789ae363cbbc6a4fda6389f3fe972e4ad37e8)
|
|
1535
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1536
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1537
|
+
props = _aws_cdk_ceddda9d.ResourceProps(
|
|
1538
|
+
account=account,
|
|
1539
|
+
environment_from_arn=environment_from_arn,
|
|
1540
|
+
physical_name=physical_name,
|
|
1541
|
+
region=region,
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1544
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
1545
|
+
|
|
1546
|
+
@builtins.property
|
|
1547
|
+
@jsii.member(jsii_name="policyDocument")
|
|
1548
|
+
@abc.abstractmethod
|
|
1549
|
+
def policy_document(self) -> builtins.str:
|
|
1550
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
1551
|
+
...
|
|
1552
|
+
|
|
1553
|
+
@builtins.property
|
|
1554
|
+
@jsii.member(jsii_name="workspace")
|
|
1555
|
+
@abc.abstractmethod
|
|
1556
|
+
def workspace(self) -> "IWorkspace":
|
|
1557
|
+
'''The workspace to attach the policy to.'''
|
|
1558
|
+
...
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
class _ResourcePolicyBaseProxy(
|
|
1562
|
+
ResourcePolicyBase,
|
|
1563
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
|
|
1564
|
+
):
|
|
1565
|
+
@builtins.property
|
|
1566
|
+
@jsii.member(jsii_name="policyDocument")
|
|
1567
|
+
def policy_document(self) -> builtins.str:
|
|
1568
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
1569
|
+
return typing.cast(builtins.str, jsii.get(self, "policyDocument"))
|
|
1570
|
+
|
|
1571
|
+
@builtins.property
|
|
1572
|
+
@jsii.member(jsii_name="workspace")
|
|
1573
|
+
def workspace(self) -> "IWorkspace":
|
|
1574
|
+
'''The workspace to attach the policy to.'''
|
|
1575
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
1576
|
+
|
|
1577
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
1578
|
+
typing.cast(typing.Any, ResourcePolicyBase).__jsii_proxy_class__ = lambda : _ResourcePolicyBaseProxy
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
@jsii.data_type(
|
|
1582
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ResourcePolicyProps",
|
|
1583
|
+
jsii_struct_bases=[],
|
|
1584
|
+
name_mapping={"policy_document": "policyDocument", "workspace": "workspace"},
|
|
1585
|
+
)
|
|
1586
|
+
class ResourcePolicyProps:
|
|
1587
|
+
def __init__(
|
|
1588
|
+
self,
|
|
1589
|
+
*,
|
|
1590
|
+
policy_document: builtins.str,
|
|
1591
|
+
workspace: "IWorkspace",
|
|
1592
|
+
) -> None:
|
|
1593
|
+
'''Properties for creating an Amazon Managed Service for Prometheus Resource Policy.
|
|
1594
|
+
|
|
1595
|
+
:param policy_document: The JSON to use as the Resource-based Policy.
|
|
1596
|
+
:param workspace: The workspace to attach the policy to.
|
|
1597
|
+
'''
|
|
1598
|
+
if __debug__:
|
|
1599
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e64bdaac8096e1f570bf3bdd34320a336689a41b7fadad148bbe26533f682a36)
|
|
1600
|
+
check_type(argname="argument policy_document", value=policy_document, expected_type=type_hints["policy_document"])
|
|
1601
|
+
check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
|
|
1602
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1603
|
+
"policy_document": policy_document,
|
|
1604
|
+
"workspace": workspace,
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
@builtins.property
|
|
1608
|
+
def policy_document(self) -> builtins.str:
|
|
1609
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
1610
|
+
result = self._values.get("policy_document")
|
|
1611
|
+
assert result is not None, "Required property 'policy_document' is missing"
|
|
1612
|
+
return typing.cast(builtins.str, result)
|
|
1613
|
+
|
|
1614
|
+
@builtins.property
|
|
1615
|
+
def workspace(self) -> "IWorkspace":
|
|
1616
|
+
'''The workspace to attach the policy to.'''
|
|
1617
|
+
result = self._values.get("workspace")
|
|
1618
|
+
assert result is not None, "Required property 'workspace' is missing"
|
|
1619
|
+
return typing.cast("IWorkspace", result)
|
|
1620
|
+
|
|
1621
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1622
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1623
|
+
|
|
1624
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1625
|
+
return not (rhs == self)
|
|
1626
|
+
|
|
1627
|
+
def __repr__(self) -> str:
|
|
1628
|
+
return "ResourcePolicyProps(%s)" % ", ".join(
|
|
1629
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1630
|
+
)
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
@jsii.data_type(
|
|
1634
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RoleConfiguration",
|
|
1635
|
+
jsii_struct_bases=[],
|
|
1636
|
+
name_mapping={"source_role": "sourceRole", "target_role": "targetRole"},
|
|
1637
|
+
)
|
|
1638
|
+
class RoleConfiguration:
|
|
1639
|
+
def __init__(
|
|
1640
|
+
self,
|
|
1641
|
+
*,
|
|
1642
|
+
source_role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
|
|
1643
|
+
target_role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
|
|
1644
|
+
) -> None:
|
|
1645
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.
|
|
1646
|
+
|
|
1647
|
+
:param source_role: The source role.
|
|
1648
|
+
:param target_role: The target role.
|
|
1649
|
+
'''
|
|
1650
|
+
if __debug__:
|
|
1651
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e96c135bdcece9823caf073421082af151c59b6d52a5918bb38689bbca7ab2a3)
|
|
1652
|
+
check_type(argname="argument source_role", value=source_role, expected_type=type_hints["source_role"])
|
|
1653
|
+
check_type(argname="argument target_role", value=target_role, expected_type=type_hints["target_role"])
|
|
1654
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1655
|
+
if source_role is not None:
|
|
1656
|
+
self._values["source_role"] = source_role
|
|
1657
|
+
if target_role is not None:
|
|
1658
|
+
self._values["target_role"] = target_role
|
|
1659
|
+
|
|
1660
|
+
@builtins.property
|
|
1661
|
+
def source_role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
|
|
1662
|
+
'''The source role.'''
|
|
1663
|
+
result = self._values.get("source_role")
|
|
1664
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], result)
|
|
1665
|
+
|
|
1666
|
+
@builtins.property
|
|
1667
|
+
def target_role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
|
|
1668
|
+
'''The target role.'''
|
|
1669
|
+
result = self._values.get("target_role")
|
|
1670
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], result)
|
|
1671
|
+
|
|
1672
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1673
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1674
|
+
|
|
1675
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1676
|
+
return not (rhs == self)
|
|
1677
|
+
|
|
1678
|
+
def __repr__(self) -> str:
|
|
1679
|
+
return "RoleConfiguration(%s)" % ", ".join(
|
|
1680
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1681
|
+
)
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
@jsii.data_type(
|
|
1685
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceAttributes",
|
|
1686
|
+
jsii_struct_bases=[],
|
|
1687
|
+
name_mapping={
|
|
1688
|
+
"data": "data",
|
|
1689
|
+
"name": "name",
|
|
1690
|
+
"rule_groups_namespace_arn": "ruleGroupsNamespaceArn",
|
|
1691
|
+
"workspace": "workspace",
|
|
1692
|
+
},
|
|
1693
|
+
)
|
|
1694
|
+
class RuleGroupsNamespaceAttributes:
|
|
1695
|
+
def __init__(
|
|
1696
|
+
self,
|
|
1697
|
+
*,
|
|
1698
|
+
data: builtins.str,
|
|
1699
|
+
name: builtins.str,
|
|
1700
|
+
rule_groups_namespace_arn: builtins.str,
|
|
1701
|
+
workspace: "IWorkspace",
|
|
1702
|
+
) -> None:
|
|
1703
|
+
'''Properties for importing a rule groups namespace in an Amazon Managed Service for Prometheus workspace from attributes.
|
|
1704
|
+
|
|
1705
|
+
:param data: The rules file used in the namespace.
|
|
1706
|
+
:param name: The name of the rule groups namespace. Between 1 and 64 characters.
|
|
1707
|
+
:param rule_groups_namespace_arn: The ARN of the rule groups namespace.
|
|
1708
|
+
:param workspace: The workspace to add the rule groups namespace.
|
|
1709
|
+
'''
|
|
1710
|
+
if __debug__:
|
|
1711
|
+
type_hints = typing.get_type_hints(_typecheckingstub__aca59ceb33a6b456771bcbba45d97752cb2f2f13917c19b7e97cd69b7f165a45)
|
|
1712
|
+
check_type(argname="argument data", value=data, expected_type=type_hints["data"])
|
|
1713
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
1714
|
+
check_type(argname="argument rule_groups_namespace_arn", value=rule_groups_namespace_arn, expected_type=type_hints["rule_groups_namespace_arn"])
|
|
1715
|
+
check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
|
|
1716
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1717
|
+
"data": data,
|
|
1718
|
+
"name": name,
|
|
1719
|
+
"rule_groups_namespace_arn": rule_groups_namespace_arn,
|
|
1720
|
+
"workspace": workspace,
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
@builtins.property
|
|
1724
|
+
def data(self) -> builtins.str:
|
|
1725
|
+
'''The rules file used in the namespace.'''
|
|
1726
|
+
result = self._values.get("data")
|
|
1727
|
+
assert result is not None, "Required property 'data' is missing"
|
|
1728
|
+
return typing.cast(builtins.str, result)
|
|
1729
|
+
|
|
1730
|
+
@builtins.property
|
|
1731
|
+
def name(self) -> builtins.str:
|
|
1732
|
+
'''The name of the rule groups namespace.
|
|
1733
|
+
|
|
1734
|
+
Between 1 and 64 characters.
|
|
1735
|
+
'''
|
|
1736
|
+
result = self._values.get("name")
|
|
1737
|
+
assert result is not None, "Required property 'name' is missing"
|
|
1738
|
+
return typing.cast(builtins.str, result)
|
|
1739
|
+
|
|
1740
|
+
@builtins.property
|
|
1741
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
1742
|
+
'''The ARN of the rule groups namespace.'''
|
|
1743
|
+
result = self._values.get("rule_groups_namespace_arn")
|
|
1744
|
+
assert result is not None, "Required property 'rule_groups_namespace_arn' is missing"
|
|
1745
|
+
return typing.cast(builtins.str, result)
|
|
1746
|
+
|
|
1747
|
+
@builtins.property
|
|
1748
|
+
def workspace(self) -> "IWorkspace":
|
|
1749
|
+
'''The workspace to add the rule groups namespace.'''
|
|
1750
|
+
result = self._values.get("workspace")
|
|
1751
|
+
assert result is not None, "Required property 'workspace' is missing"
|
|
1752
|
+
return typing.cast("IWorkspace", result)
|
|
1753
|
+
|
|
1754
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1755
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1756
|
+
|
|
1757
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1758
|
+
return not (rhs == self)
|
|
1759
|
+
|
|
1760
|
+
def __repr__(self) -> str:
|
|
1761
|
+
return "RuleGroupsNamespaceAttributes(%s)" % ", ".join(
|
|
1762
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1763
|
+
)
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
@jsii.implements(IRuleGroupsNamespace)
|
|
1767
|
+
class RuleGroupsNamespaceBase(
|
|
1768
|
+
_aws_cdk_ceddda9d.Resource,
|
|
1769
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
1770
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceBase",
|
|
1771
|
+
):
|
|
1772
|
+
def __init__(
|
|
1773
|
+
self,
|
|
1774
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
1775
|
+
id: builtins.str,
|
|
1776
|
+
*,
|
|
1777
|
+
account: typing.Optional[builtins.str] = None,
|
|
1778
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
1779
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
1780
|
+
region: typing.Optional[builtins.str] = None,
|
|
1781
|
+
) -> None:
|
|
1782
|
+
'''
|
|
1783
|
+
:param scope: -
|
|
1784
|
+
:param id: -
|
|
1785
|
+
:param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
|
|
1786
|
+
:param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
|
|
1787
|
+
:param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
|
|
1788
|
+
:param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
|
|
1789
|
+
'''
|
|
1790
|
+
if __debug__:
|
|
1791
|
+
type_hints = typing.get_type_hints(_typecheckingstub__54435341b8b1c3c7efe004b41ef5c6d515fe3983bc74fae1b1b26947b9d05f20)
|
|
1792
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1793
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1794
|
+
props = _aws_cdk_ceddda9d.ResourceProps(
|
|
1795
|
+
account=account,
|
|
1796
|
+
environment_from_arn=environment_from_arn,
|
|
1797
|
+
physical_name=physical_name,
|
|
1798
|
+
region=region,
|
|
1799
|
+
)
|
|
1800
|
+
|
|
1801
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
1802
|
+
|
|
1803
|
+
@builtins.property
|
|
1804
|
+
@jsii.member(jsii_name="data")
|
|
1805
|
+
@abc.abstractmethod
|
|
1806
|
+
def data(self) -> builtins.str:
|
|
1807
|
+
'''The rules file used in the namespace.'''
|
|
1808
|
+
...
|
|
1809
|
+
|
|
1810
|
+
@builtins.property
|
|
1811
|
+
@jsii.member(jsii_name="name")
|
|
1812
|
+
@abc.abstractmethod
|
|
1813
|
+
def name(self) -> builtins.str:
|
|
1814
|
+
'''The name of the rule groups namespace.'''
|
|
1815
|
+
...
|
|
1816
|
+
|
|
1817
|
+
@builtins.property
|
|
1818
|
+
@jsii.member(jsii_name="ruleGroupsNamespaceArn")
|
|
1819
|
+
@abc.abstractmethod
|
|
1820
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
1821
|
+
'''The ARN of the rule groups namespace.'''
|
|
1822
|
+
...
|
|
1823
|
+
|
|
1824
|
+
@builtins.property
|
|
1825
|
+
@jsii.member(jsii_name="workspace")
|
|
1826
|
+
@abc.abstractmethod
|
|
1827
|
+
def workspace(self) -> "IWorkspace":
|
|
1828
|
+
'''The workspace to add the rule groups namespace.'''
|
|
1829
|
+
...
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
class _RuleGroupsNamespaceBaseProxy(
|
|
1833
|
+
RuleGroupsNamespaceBase,
|
|
1834
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
|
|
1835
|
+
):
|
|
1836
|
+
@builtins.property
|
|
1837
|
+
@jsii.member(jsii_name="data")
|
|
1838
|
+
def data(self) -> builtins.str:
|
|
1839
|
+
'''The rules file used in the namespace.'''
|
|
1840
|
+
return typing.cast(builtins.str, jsii.get(self, "data"))
|
|
1841
|
+
|
|
1842
|
+
@builtins.property
|
|
1843
|
+
@jsii.member(jsii_name="name")
|
|
1844
|
+
def name(self) -> builtins.str:
|
|
1845
|
+
'''The name of the rule groups namespace.'''
|
|
1846
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
1847
|
+
|
|
1848
|
+
@builtins.property
|
|
1849
|
+
@jsii.member(jsii_name="ruleGroupsNamespaceArn")
|
|
1850
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
1851
|
+
'''The ARN of the rule groups namespace.'''
|
|
1852
|
+
return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
|
|
1853
|
+
|
|
1854
|
+
@builtins.property
|
|
1855
|
+
@jsii.member(jsii_name="workspace")
|
|
1856
|
+
def workspace(self) -> "IWorkspace":
|
|
1857
|
+
'''The workspace to add the rule groups namespace.'''
|
|
1858
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
1859
|
+
|
|
1860
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
1861
|
+
typing.cast(typing.Any, RuleGroupsNamespaceBase).__jsii_proxy_class__ = lambda : _RuleGroupsNamespaceBaseProxy
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
@jsii.data_type(
|
|
1865
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceProps",
|
|
1866
|
+
jsii_struct_bases=[],
|
|
1867
|
+
name_mapping={"data": "data", "name": "name", "workspace": "workspace"},
|
|
1868
|
+
)
|
|
1869
|
+
class RuleGroupsNamespaceProps:
|
|
1870
|
+
def __init__(
|
|
1871
|
+
self,
|
|
1872
|
+
*,
|
|
1873
|
+
data: builtins.str,
|
|
1874
|
+
name: builtins.str,
|
|
1875
|
+
workspace: "IWorkspace",
|
|
1876
|
+
) -> None:
|
|
1877
|
+
'''Properties for creating a rule groups namespace in an Amazon Managed Service for Prometheus workspace.
|
|
1878
|
+
|
|
1879
|
+
:param data: The rules file used in the namespace.
|
|
1880
|
+
:param name: The name of the rule groups namespace. Between 1 and 64 characters.
|
|
1881
|
+
:param workspace: The workspace to add the rule groups namespace.
|
|
1882
|
+
'''
|
|
1883
|
+
if __debug__:
|
|
1884
|
+
type_hints = typing.get_type_hints(_typecheckingstub__38cadfd9b05a1407d50e98748f6488d0e79d3484e75c5786ea83b3235d73c3e1)
|
|
1885
|
+
check_type(argname="argument data", value=data, expected_type=type_hints["data"])
|
|
1886
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
1887
|
+
check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
|
|
1888
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1889
|
+
"data": data,
|
|
1890
|
+
"name": name,
|
|
1891
|
+
"workspace": workspace,
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
@builtins.property
|
|
1895
|
+
def data(self) -> builtins.str:
|
|
1896
|
+
'''The rules file used in the namespace.'''
|
|
1897
|
+
result = self._values.get("data")
|
|
1898
|
+
assert result is not None, "Required property 'data' is missing"
|
|
1899
|
+
return typing.cast(builtins.str, result)
|
|
1900
|
+
|
|
1901
|
+
@builtins.property
|
|
1902
|
+
def name(self) -> builtins.str:
|
|
1903
|
+
'''The name of the rule groups namespace.
|
|
1904
|
+
|
|
1905
|
+
Between 1 and 64 characters.
|
|
1906
|
+
'''
|
|
1907
|
+
result = self._values.get("name")
|
|
1908
|
+
assert result is not None, "Required property 'name' is missing"
|
|
1909
|
+
return typing.cast(builtins.str, result)
|
|
1910
|
+
|
|
1911
|
+
@builtins.property
|
|
1912
|
+
def workspace(self) -> "IWorkspace":
|
|
1913
|
+
'''The workspace to add the rule groups namespace.'''
|
|
1914
|
+
result = self._values.get("workspace")
|
|
1915
|
+
assert result is not None, "Required property 'workspace' is missing"
|
|
1916
|
+
return typing.cast("IWorkspace", result)
|
|
1917
|
+
|
|
1918
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1919
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1920
|
+
|
|
1921
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1922
|
+
return not (rhs == self)
|
|
1923
|
+
|
|
1924
|
+
def __repr__(self) -> str:
|
|
1925
|
+
return "RuleGroupsNamespaceProps(%s)" % ", ".join(
|
|
1926
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1927
|
+
)
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
@jsii.data_type(
|
|
1931
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ScrapeConfiguration",
|
|
1932
|
+
jsii_struct_bases=[],
|
|
1933
|
+
name_mapping={"configuration_blob": "configurationBlob"},
|
|
1934
|
+
)
|
|
1935
|
+
class ScrapeConfiguration:
|
|
1936
|
+
def __init__(self, *, configuration_blob: builtins.str) -> None:
|
|
1937
|
+
'''A scrape configuration for a scraper, base 64 encoded.
|
|
1938
|
+
|
|
1939
|
+
:param configuration_blob: The base 64 encoded scrape configuration file.
|
|
1940
|
+
'''
|
|
1941
|
+
if __debug__:
|
|
1942
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6313d0a5d8e3eda66be90025eafb5520d36fb7fb11adbc40c4398cb56b0ce09d)
|
|
1943
|
+
check_type(argname="argument configuration_blob", value=configuration_blob, expected_type=type_hints["configuration_blob"])
|
|
1944
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
1945
|
+
"configuration_blob": configuration_blob,
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
@builtins.property
|
|
1949
|
+
def configuration_blob(self) -> builtins.str:
|
|
1950
|
+
'''The base 64 encoded scrape configuration file.'''
|
|
1951
|
+
result = self._values.get("configuration_blob")
|
|
1952
|
+
assert result is not None, "Required property 'configuration_blob' is missing"
|
|
1953
|
+
return typing.cast(builtins.str, result)
|
|
1954
|
+
|
|
1955
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1956
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1957
|
+
|
|
1958
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1959
|
+
return not (rhs == self)
|
|
1960
|
+
|
|
1961
|
+
def __repr__(self) -> str:
|
|
1962
|
+
return "ScrapeConfiguration(%s)" % ", ".join(
|
|
1963
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1964
|
+
)
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
@jsii.data_type(
|
|
1968
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ScraperAttributes",
|
|
1969
|
+
jsii_struct_bases=[],
|
|
1970
|
+
name_mapping={
|
|
1971
|
+
"destination": "destination",
|
|
1972
|
+
"scrape_configuration": "scrapeConfiguration",
|
|
1973
|
+
"scraper_arn": "scraperArn",
|
|
1974
|
+
"source": "source",
|
|
1975
|
+
"alias": "alias",
|
|
1976
|
+
"role_configuration": "roleConfiguration",
|
|
1977
|
+
},
|
|
1978
|
+
)
|
|
1979
|
+
class ScraperAttributes:
|
|
1980
|
+
def __init__(
|
|
1981
|
+
self,
|
|
1982
|
+
*,
|
|
1983
|
+
destination: typing.Union["Destination", typing.Dict[builtins.str, typing.Any]],
|
|
1984
|
+
scrape_configuration: typing.Union["ScrapeConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
1985
|
+
scraper_arn: builtins.str,
|
|
1986
|
+
source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
|
|
1987
|
+
alias: typing.Optional[builtins.str] = None,
|
|
1988
|
+
role_configuration: typing.Optional[typing.Union["RoleConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1989
|
+
) -> None:
|
|
1990
|
+
'''Properties for importing an Amazon Managed Service for Prometheus Scraper from attributes.
|
|
1991
|
+
|
|
1992
|
+
:param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
|
|
1993
|
+
:param scrape_configuration: The configuration in use by the scraper.
|
|
1994
|
+
:param scraper_arn: The ARN of the scraper.
|
|
1995
|
+
:param source: The Amazon EKS cluster from which the scraper collects metrics.
|
|
1996
|
+
:param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
1997
|
+
:param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
|
|
1998
|
+
'''
|
|
1999
|
+
if isinstance(destination, dict):
|
|
2000
|
+
destination = Destination(**destination)
|
|
2001
|
+
if isinstance(scrape_configuration, dict):
|
|
2002
|
+
scrape_configuration = ScrapeConfiguration(**scrape_configuration)
|
|
2003
|
+
if isinstance(source, dict):
|
|
2004
|
+
source = Source(**source)
|
|
2005
|
+
if isinstance(role_configuration, dict):
|
|
2006
|
+
role_configuration = RoleConfiguration(**role_configuration)
|
|
2007
|
+
if __debug__:
|
|
2008
|
+
type_hints = typing.get_type_hints(_typecheckingstub__2aab74937b2fefec81fb3f25317393581e00fbda88f9d176c61fd521a9189d81)
|
|
2009
|
+
check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
|
|
2010
|
+
check_type(argname="argument scrape_configuration", value=scrape_configuration, expected_type=type_hints["scrape_configuration"])
|
|
2011
|
+
check_type(argname="argument scraper_arn", value=scraper_arn, expected_type=type_hints["scraper_arn"])
|
|
2012
|
+
check_type(argname="argument source", value=source, expected_type=type_hints["source"])
|
|
2013
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
|
2014
|
+
check_type(argname="argument role_configuration", value=role_configuration, expected_type=type_hints["role_configuration"])
|
|
2015
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2016
|
+
"destination": destination,
|
|
2017
|
+
"scrape_configuration": scrape_configuration,
|
|
2018
|
+
"scraper_arn": scraper_arn,
|
|
2019
|
+
"source": source,
|
|
2020
|
+
}
|
|
2021
|
+
if alias is not None:
|
|
2022
|
+
self._values["alias"] = alias
|
|
2023
|
+
if role_configuration is not None:
|
|
2024
|
+
self._values["role_configuration"] = role_configuration
|
|
2025
|
+
|
|
2026
|
+
@builtins.property
|
|
2027
|
+
def destination(self) -> "Destination":
|
|
2028
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
2029
|
+
result = self._values.get("destination")
|
|
2030
|
+
assert result is not None, "Required property 'destination' is missing"
|
|
2031
|
+
return typing.cast("Destination", result)
|
|
2032
|
+
|
|
2033
|
+
@builtins.property
|
|
2034
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
2035
|
+
'''The configuration in use by the scraper.'''
|
|
2036
|
+
result = self._values.get("scrape_configuration")
|
|
2037
|
+
assert result is not None, "Required property 'scrape_configuration' is missing"
|
|
2038
|
+
return typing.cast("ScrapeConfiguration", result)
|
|
2039
|
+
|
|
2040
|
+
@builtins.property
|
|
2041
|
+
def scraper_arn(self) -> builtins.str:
|
|
2042
|
+
'''The ARN of the scraper.'''
|
|
2043
|
+
result = self._values.get("scraper_arn")
|
|
2044
|
+
assert result is not None, "Required property 'scraper_arn' is missing"
|
|
2045
|
+
return typing.cast(builtins.str, result)
|
|
2046
|
+
|
|
2047
|
+
@builtins.property
|
|
2048
|
+
def source(self) -> "Source":
|
|
2049
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
2050
|
+
result = self._values.get("source")
|
|
2051
|
+
assert result is not None, "Required property 'source' is missing"
|
|
2052
|
+
return typing.cast("Source", result)
|
|
2053
|
+
|
|
2054
|
+
@builtins.property
|
|
2055
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2056
|
+
'''An optional user-assigned scraper alias.
|
|
2057
|
+
|
|
2058
|
+
1-100 characters.
|
|
2059
|
+
|
|
2060
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
2061
|
+
'''
|
|
2062
|
+
result = self._values.get("alias")
|
|
2063
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2064
|
+
|
|
2065
|
+
@builtins.property
|
|
2066
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
2067
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
2068
|
+
result = self._values.get("role_configuration")
|
|
2069
|
+
return typing.cast(typing.Optional["RoleConfiguration"], result)
|
|
2070
|
+
|
|
2071
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2072
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2073
|
+
|
|
2074
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2075
|
+
return not (rhs == self)
|
|
2076
|
+
|
|
2077
|
+
def __repr__(self) -> str:
|
|
2078
|
+
return "ScraperAttributes(%s)" % ", ".join(
|
|
2079
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2080
|
+
)
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
@jsii.implements(IScraper)
|
|
2084
|
+
class ScraperBase(
|
|
2085
|
+
_aws_cdk_ceddda9d.Resource,
|
|
2086
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
2087
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ScraperBase",
|
|
2088
|
+
):
|
|
2089
|
+
def __init__(
|
|
2090
|
+
self,
|
|
2091
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
2092
|
+
id: builtins.str,
|
|
2093
|
+
*,
|
|
2094
|
+
account: typing.Optional[builtins.str] = None,
|
|
2095
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
2096
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
2097
|
+
region: typing.Optional[builtins.str] = None,
|
|
2098
|
+
) -> None:
|
|
2099
|
+
'''
|
|
2100
|
+
:param scope: -
|
|
2101
|
+
:param id: -
|
|
2102
|
+
:param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
|
|
2103
|
+
:param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
|
|
2104
|
+
:param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
|
|
2105
|
+
:param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
|
|
2106
|
+
'''
|
|
2107
|
+
if __debug__:
|
|
2108
|
+
type_hints = typing.get_type_hints(_typecheckingstub__79f44dd804edbb4f2d30815f15d40d8f8c94bc90ec7657ced6d4b8716930412f)
|
|
2109
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2110
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2111
|
+
props = _aws_cdk_ceddda9d.ResourceProps(
|
|
2112
|
+
account=account,
|
|
2113
|
+
environment_from_arn=environment_from_arn,
|
|
2114
|
+
physical_name=physical_name,
|
|
2115
|
+
region=region,
|
|
2116
|
+
)
|
|
2117
|
+
|
|
2118
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
2119
|
+
|
|
2120
|
+
@jsii.member(jsii_name="getScraperId")
|
|
2121
|
+
def _get_scraper_id(self, scraper_arn: builtins.str) -> builtins.str:
|
|
2122
|
+
'''
|
|
2123
|
+
:param scraper_arn: -
|
|
2124
|
+
'''
|
|
2125
|
+
if __debug__:
|
|
2126
|
+
type_hints = typing.get_type_hints(_typecheckingstub__720023f01199e16b0b50b3928b380b6c70d0c625eb677c6631c94d1822effb36)
|
|
2127
|
+
check_type(argname="argument scraper_arn", value=scraper_arn, expected_type=type_hints["scraper_arn"])
|
|
2128
|
+
return typing.cast(builtins.str, jsii.invoke(self, "getScraperId", [scraper_arn]))
|
|
2129
|
+
|
|
2130
|
+
@builtins.property
|
|
2131
|
+
@jsii.member(jsii_name="destination")
|
|
2132
|
+
@abc.abstractmethod
|
|
2133
|
+
def destination(self) -> "Destination":
|
|
2134
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
2135
|
+
...
|
|
2136
|
+
|
|
2137
|
+
@builtins.property
|
|
2138
|
+
@jsii.member(jsii_name="scrapeConfiguration")
|
|
2139
|
+
@abc.abstractmethod
|
|
2140
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
2141
|
+
'''The configuration in use by the scraper.'''
|
|
2142
|
+
...
|
|
2143
|
+
|
|
2144
|
+
@builtins.property
|
|
2145
|
+
@jsii.member(jsii_name="scraperArn")
|
|
2146
|
+
@abc.abstractmethod
|
|
2147
|
+
def scraper_arn(self) -> builtins.str:
|
|
2148
|
+
'''The ARN of the scraper.'''
|
|
2149
|
+
...
|
|
2150
|
+
|
|
2151
|
+
@builtins.property
|
|
2152
|
+
@jsii.member(jsii_name="scraperId")
|
|
2153
|
+
@abc.abstractmethod
|
|
2154
|
+
def scraper_id(self) -> builtins.str:
|
|
2155
|
+
'''The ID of the scraper.'''
|
|
2156
|
+
...
|
|
2157
|
+
|
|
2158
|
+
@builtins.property
|
|
2159
|
+
@jsii.member(jsii_name="source")
|
|
2160
|
+
@abc.abstractmethod
|
|
2161
|
+
def source(self) -> "Source":
|
|
2162
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
2163
|
+
...
|
|
2164
|
+
|
|
2165
|
+
@builtins.property
|
|
2166
|
+
@jsii.member(jsii_name="alias")
|
|
2167
|
+
@abc.abstractmethod
|
|
2168
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2169
|
+
'''An optional user-assigned scraper alias.
|
|
2170
|
+
|
|
2171
|
+
1-100 characters.
|
|
2172
|
+
|
|
2173
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
2174
|
+
'''
|
|
2175
|
+
...
|
|
2176
|
+
|
|
2177
|
+
@builtins.property
|
|
2178
|
+
@jsii.member(jsii_name="roleConfiguration")
|
|
2179
|
+
@abc.abstractmethod
|
|
2180
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
2181
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
2182
|
+
...
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
class _ScraperBaseProxy(
|
|
2186
|
+
ScraperBase,
|
|
2187
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
|
|
2188
|
+
):
|
|
2189
|
+
@builtins.property
|
|
2190
|
+
@jsii.member(jsii_name="destination")
|
|
2191
|
+
def destination(self) -> "Destination":
|
|
2192
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
2193
|
+
return typing.cast("Destination", jsii.get(self, "destination"))
|
|
2194
|
+
|
|
2195
|
+
@builtins.property
|
|
2196
|
+
@jsii.member(jsii_name="scrapeConfiguration")
|
|
2197
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
2198
|
+
'''The configuration in use by the scraper.'''
|
|
2199
|
+
return typing.cast("ScrapeConfiguration", jsii.get(self, "scrapeConfiguration"))
|
|
2200
|
+
|
|
2201
|
+
@builtins.property
|
|
2202
|
+
@jsii.member(jsii_name="scraperArn")
|
|
2203
|
+
def scraper_arn(self) -> builtins.str:
|
|
2204
|
+
'''The ARN of the scraper.'''
|
|
2205
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
|
|
2206
|
+
|
|
2207
|
+
@builtins.property
|
|
2208
|
+
@jsii.member(jsii_name="scraperId")
|
|
2209
|
+
def scraper_id(self) -> builtins.str:
|
|
2210
|
+
'''The ID of the scraper.'''
|
|
2211
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperId"))
|
|
2212
|
+
|
|
2213
|
+
@builtins.property
|
|
2214
|
+
@jsii.member(jsii_name="source")
|
|
2215
|
+
def source(self) -> "Source":
|
|
2216
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
2217
|
+
return typing.cast("Source", jsii.get(self, "source"))
|
|
2218
|
+
|
|
2219
|
+
@builtins.property
|
|
2220
|
+
@jsii.member(jsii_name="alias")
|
|
2221
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2222
|
+
'''An optional user-assigned scraper alias.
|
|
2223
|
+
|
|
2224
|
+
1-100 characters.
|
|
2225
|
+
|
|
2226
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
2227
|
+
'''
|
|
2228
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
2229
|
+
|
|
2230
|
+
@builtins.property
|
|
2231
|
+
@jsii.member(jsii_name="roleConfiguration")
|
|
2232
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
2233
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
2234
|
+
return typing.cast(typing.Optional["RoleConfiguration"], jsii.get(self, "roleConfiguration"))
|
|
2235
|
+
|
|
2236
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
2237
|
+
typing.cast(typing.Any, ScraperBase).__jsii_proxy_class__ = lambda : _ScraperBaseProxy
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
@jsii.data_type(
|
|
2241
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ScraperProps",
|
|
2242
|
+
jsii_struct_bases=[],
|
|
2243
|
+
name_mapping={
|
|
2244
|
+
"destination": "destination",
|
|
2245
|
+
"scrape_configuration": "scrapeConfiguration",
|
|
2246
|
+
"source": "source",
|
|
2247
|
+
"alias": "alias",
|
|
2248
|
+
"role_configuration": "roleConfiguration",
|
|
2249
|
+
},
|
|
2250
|
+
)
|
|
2251
|
+
class ScraperProps:
|
|
2252
|
+
def __init__(
|
|
2253
|
+
self,
|
|
2254
|
+
*,
|
|
2255
|
+
destination: typing.Union["Destination", typing.Dict[builtins.str, typing.Any]],
|
|
2256
|
+
scrape_configuration: typing.Union["ScrapeConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
2257
|
+
source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
|
|
2258
|
+
alias: typing.Optional[builtins.str] = None,
|
|
2259
|
+
role_configuration: typing.Optional[typing.Union["RoleConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2260
|
+
) -> None:
|
|
2261
|
+
'''Properties for creating an Amazon Managed Service for Prometheus Scraper.
|
|
2262
|
+
|
|
2263
|
+
:param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
|
|
2264
|
+
:param scrape_configuration: The configuration in use by the scraper.
|
|
2265
|
+
:param source: The Amazon EKS cluster from which the scraper collects metrics.
|
|
2266
|
+
:param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
2267
|
+
:param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
|
|
2268
|
+
'''
|
|
2269
|
+
if isinstance(destination, dict):
|
|
2270
|
+
destination = Destination(**destination)
|
|
2271
|
+
if isinstance(scrape_configuration, dict):
|
|
2272
|
+
scrape_configuration = ScrapeConfiguration(**scrape_configuration)
|
|
2273
|
+
if isinstance(source, dict):
|
|
2274
|
+
source = Source(**source)
|
|
2275
|
+
if isinstance(role_configuration, dict):
|
|
2276
|
+
role_configuration = RoleConfiguration(**role_configuration)
|
|
2277
|
+
if __debug__:
|
|
2278
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e27ba8269266aa91c926829a5c485aaf203a6638ce54c2fced4fdf950ba2e944)
|
|
2279
|
+
check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
|
|
2280
|
+
check_type(argname="argument scrape_configuration", value=scrape_configuration, expected_type=type_hints["scrape_configuration"])
|
|
2281
|
+
check_type(argname="argument source", value=source, expected_type=type_hints["source"])
|
|
2282
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
|
2283
|
+
check_type(argname="argument role_configuration", value=role_configuration, expected_type=type_hints["role_configuration"])
|
|
2284
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2285
|
+
"destination": destination,
|
|
2286
|
+
"scrape_configuration": scrape_configuration,
|
|
2287
|
+
"source": source,
|
|
2288
|
+
}
|
|
2289
|
+
if alias is not None:
|
|
2290
|
+
self._values["alias"] = alias
|
|
2291
|
+
if role_configuration is not None:
|
|
2292
|
+
self._values["role_configuration"] = role_configuration
|
|
2293
|
+
|
|
2294
|
+
@builtins.property
|
|
2295
|
+
def destination(self) -> "Destination":
|
|
2296
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
2297
|
+
result = self._values.get("destination")
|
|
2298
|
+
assert result is not None, "Required property 'destination' is missing"
|
|
2299
|
+
return typing.cast("Destination", result)
|
|
2300
|
+
|
|
2301
|
+
@builtins.property
|
|
2302
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
2303
|
+
'''The configuration in use by the scraper.'''
|
|
2304
|
+
result = self._values.get("scrape_configuration")
|
|
2305
|
+
assert result is not None, "Required property 'scrape_configuration' is missing"
|
|
2306
|
+
return typing.cast("ScrapeConfiguration", result)
|
|
2307
|
+
|
|
2308
|
+
@builtins.property
|
|
2309
|
+
def source(self) -> "Source":
|
|
2310
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
2311
|
+
result = self._values.get("source")
|
|
2312
|
+
assert result is not None, "Required property 'source' is missing"
|
|
2313
|
+
return typing.cast("Source", result)
|
|
2314
|
+
|
|
2315
|
+
@builtins.property
|
|
2316
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2317
|
+
'''An optional user-assigned scraper alias.
|
|
2318
|
+
|
|
2319
|
+
1-100 characters.
|
|
2320
|
+
|
|
2321
|
+
Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
2322
|
+
'''
|
|
2323
|
+
result = self._values.get("alias")
|
|
2324
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2325
|
+
|
|
2326
|
+
@builtins.property
|
|
2327
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
2328
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
2329
|
+
result = self._values.get("role_configuration")
|
|
2330
|
+
return typing.cast(typing.Optional["RoleConfiguration"], result)
|
|
2331
|
+
|
|
2332
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2333
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2334
|
+
|
|
2335
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2336
|
+
return not (rhs == self)
|
|
2337
|
+
|
|
2338
|
+
def __repr__(self) -> str:
|
|
2339
|
+
return "ScraperProps(%s)" % ", ".join(
|
|
2340
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2341
|
+
)
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
@jsii.data_type(
|
|
2345
|
+
jsii_type="@robhan-cdk-lib/aws_aps.Source",
|
|
2346
|
+
jsii_struct_bases=[],
|
|
2347
|
+
name_mapping={"eks_configuration": "eksConfiguration"},
|
|
2348
|
+
)
|
|
2349
|
+
class Source:
|
|
2350
|
+
def __init__(
|
|
2351
|
+
self,
|
|
2352
|
+
*,
|
|
2353
|
+
eks_configuration: typing.Union["EksConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
2354
|
+
) -> None:
|
|
2355
|
+
'''The source of collected metrics for a scraper.
|
|
2356
|
+
|
|
2357
|
+
:param eks_configuration: The Amazon EKS cluster from which a scraper collects metrics.
|
|
2358
|
+
'''
|
|
2359
|
+
if isinstance(eks_configuration, dict):
|
|
2360
|
+
eks_configuration = EksConfiguration(**eks_configuration)
|
|
2361
|
+
if __debug__:
|
|
2362
|
+
type_hints = typing.get_type_hints(_typecheckingstub__2f45388bb39e3b47ec674e4da970163a87c5fb85665ad1fc10517bafda034ad5)
|
|
2363
|
+
check_type(argname="argument eks_configuration", value=eks_configuration, expected_type=type_hints["eks_configuration"])
|
|
2364
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2365
|
+
"eks_configuration": eks_configuration,
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
@builtins.property
|
|
2369
|
+
def eks_configuration(self) -> "EksConfiguration":
|
|
2370
|
+
'''The Amazon EKS cluster from which a scraper collects metrics.'''
|
|
2371
|
+
result = self._values.get("eks_configuration")
|
|
2372
|
+
assert result is not None, "Required property 'eks_configuration' is missing"
|
|
2373
|
+
return typing.cast("EksConfiguration", result)
|
|
2374
|
+
|
|
2375
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2376
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2377
|
+
|
|
2378
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2379
|
+
return not (rhs == self)
|
|
2380
|
+
|
|
2381
|
+
def __repr__(self) -> str:
|
|
2382
|
+
return "Source(%s)" % ", ".join(
|
|
2383
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2384
|
+
)
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
@jsii.data_type(
|
|
2388
|
+
jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceAttributes",
|
|
2389
|
+
jsii_struct_bases=[],
|
|
2390
|
+
name_mapping={
|
|
2391
|
+
"workspace_arn": "workspaceArn",
|
|
2392
|
+
"alert_manager_definition": "alertManagerDefinition",
|
|
2393
|
+
"alias": "alias",
|
|
2394
|
+
"kms_key": "kmsKey",
|
|
2395
|
+
"logging_configuration": "loggingConfiguration",
|
|
2396
|
+
"query_logging_configuration": "queryLoggingConfiguration",
|
|
2397
|
+
"workspace_configuration": "workspaceConfiguration",
|
|
2398
|
+
},
|
|
2399
|
+
)
|
|
2400
|
+
class WorkspaceAttributes:
|
|
2401
|
+
def __init__(
|
|
2402
|
+
self,
|
|
2403
|
+
*,
|
|
2404
|
+
workspace_arn: builtins.str,
|
|
2405
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
2406
|
+
alias: typing.Optional[builtins.str] = None,
|
|
2407
|
+
kms_key: typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"] = None,
|
|
2408
|
+
logging_configuration: typing.Optional[typing.Union["LoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2409
|
+
query_logging_configuration: typing.Optional[typing.Union["QueryLoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2410
|
+
workspace_configuration: typing.Optional[typing.Union["WorkspaceConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2411
|
+
) -> None:
|
|
2412
|
+
'''Properties for importing an Amazon Managed Service for Prometheus Workspace from attributes.
|
|
2413
|
+
|
|
2414
|
+
:param workspace_arn: The arn of this workspace.
|
|
2415
|
+
:param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
|
|
2416
|
+
:param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique.
|
|
2417
|
+
:param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
|
|
2418
|
+
:param logging_configuration: Contains information about the current rules and alerting logging configuration for the workspace. Note: These logging configurations are only for rules and alerting logs.
|
|
2419
|
+
:param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
|
|
2420
|
+
:param workspace_configuration: Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
|
|
2421
|
+
'''
|
|
2422
|
+
if isinstance(logging_configuration, dict):
|
|
2423
|
+
logging_configuration = LoggingConfiguration(**logging_configuration)
|
|
2424
|
+
if isinstance(query_logging_configuration, dict):
|
|
2425
|
+
query_logging_configuration = QueryLoggingConfiguration(**query_logging_configuration)
|
|
2426
|
+
if isinstance(workspace_configuration, dict):
|
|
2427
|
+
workspace_configuration = WorkspaceConfiguration(**workspace_configuration)
|
|
2428
|
+
if __debug__:
|
|
2429
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bbfa4d3de7b456e3faeccf136f83095036d68c2058e82076f7a678eeac164e17)
|
|
2430
|
+
check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
|
|
2431
|
+
check_type(argname="argument alert_manager_definition", value=alert_manager_definition, expected_type=type_hints["alert_manager_definition"])
|
|
2432
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
|
2433
|
+
check_type(argname="argument kms_key", value=kms_key, expected_type=type_hints["kms_key"])
|
|
2434
|
+
check_type(argname="argument logging_configuration", value=logging_configuration, expected_type=type_hints["logging_configuration"])
|
|
2435
|
+
check_type(argname="argument query_logging_configuration", value=query_logging_configuration, expected_type=type_hints["query_logging_configuration"])
|
|
2436
|
+
check_type(argname="argument workspace_configuration", value=workspace_configuration, expected_type=type_hints["workspace_configuration"])
|
|
2437
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2438
|
+
"workspace_arn": workspace_arn,
|
|
2439
|
+
}
|
|
2440
|
+
if alert_manager_definition is not None:
|
|
2441
|
+
self._values["alert_manager_definition"] = alert_manager_definition
|
|
2442
|
+
if alias is not None:
|
|
2443
|
+
self._values["alias"] = alias
|
|
2444
|
+
if kms_key is not None:
|
|
2445
|
+
self._values["kms_key"] = kms_key
|
|
2446
|
+
if logging_configuration is not None:
|
|
2447
|
+
self._values["logging_configuration"] = logging_configuration
|
|
2448
|
+
if query_logging_configuration is not None:
|
|
2449
|
+
self._values["query_logging_configuration"] = query_logging_configuration
|
|
2450
|
+
if workspace_configuration is not None:
|
|
2451
|
+
self._values["workspace_configuration"] = workspace_configuration
|
|
2452
|
+
|
|
2453
|
+
@builtins.property
|
|
2454
|
+
def workspace_arn(self) -> builtins.str:
|
|
2455
|
+
'''The arn of this workspace.'''
|
|
2456
|
+
result = self._values.get("workspace_arn")
|
|
2457
|
+
assert result is not None, "Required property 'workspace_arn' is missing"
|
|
2458
|
+
return typing.cast(builtins.str, result)
|
|
2459
|
+
|
|
2460
|
+
@builtins.property
|
|
2461
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
2462
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
2463
|
+
result = self._values.get("alert_manager_definition")
|
|
2464
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2465
|
+
|
|
2466
|
+
@builtins.property
|
|
2467
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2468
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
2469
|
+
|
|
2470
|
+
It does not need to be
|
|
2471
|
+
unique.
|
|
2472
|
+
'''
|
|
2473
|
+
result = self._values.get("alias")
|
|
2474
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2475
|
+
|
|
2476
|
+
@builtins.property
|
|
2477
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
2478
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
2479
|
+
result = self._values.get("kms_key")
|
|
2480
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], result)
|
|
2481
|
+
|
|
2482
|
+
@builtins.property
|
|
2483
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
2484
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
2485
|
+
|
|
2486
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
2487
|
+
'''
|
|
2488
|
+
result = self._values.get("logging_configuration")
|
|
2489
|
+
return typing.cast(typing.Optional["LoggingConfiguration"], result)
|
|
2490
|
+
|
|
2491
|
+
@builtins.property
|
|
2492
|
+
def query_logging_configuration(
|
|
2493
|
+
self,
|
|
2494
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
2495
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
2496
|
+
result = self._values.get("query_logging_configuration")
|
|
2497
|
+
return typing.cast(typing.Optional["QueryLoggingConfiguration"], result)
|
|
2498
|
+
|
|
2499
|
+
@builtins.property
|
|
2500
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
2501
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
2502
|
+
result = self._values.get("workspace_configuration")
|
|
2503
|
+
return typing.cast(typing.Optional["WorkspaceConfiguration"], result)
|
|
2504
|
+
|
|
2505
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2506
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2507
|
+
|
|
2508
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2509
|
+
return not (rhs == self)
|
|
2510
|
+
|
|
2511
|
+
def __repr__(self) -> str:
|
|
2512
|
+
return "WorkspaceAttributes(%s)" % ", ".join(
|
|
2513
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2514
|
+
)
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
@jsii.implements(IWorkspace)
|
|
2518
|
+
class WorkspaceBase(
|
|
2519
|
+
_aws_cdk_ceddda9d.Resource,
|
|
2520
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
2521
|
+
jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceBase",
|
|
2522
|
+
):
|
|
2523
|
+
def __init__(
|
|
2524
|
+
self,
|
|
2525
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
2526
|
+
id: builtins.str,
|
|
2527
|
+
*,
|
|
2528
|
+
account: typing.Optional[builtins.str] = None,
|
|
2529
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
2530
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
2531
|
+
region: typing.Optional[builtins.str] = None,
|
|
2532
|
+
) -> None:
|
|
2533
|
+
'''
|
|
2534
|
+
:param scope: -
|
|
2535
|
+
:param id: -
|
|
2536
|
+
:param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
|
|
2537
|
+
:param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
|
|
2538
|
+
:param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
|
|
2539
|
+
:param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
|
|
2540
|
+
'''
|
|
2541
|
+
if __debug__:
|
|
2542
|
+
type_hints = typing.get_type_hints(_typecheckingstub__26324cd5062f2f5ec83013af6d021bcb8f2e2c6d4df14147a97bf35d099c4a1b)
|
|
2543
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2544
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2545
|
+
props = _aws_cdk_ceddda9d.ResourceProps(
|
|
2546
|
+
account=account,
|
|
2547
|
+
environment_from_arn=environment_from_arn,
|
|
2548
|
+
physical_name=physical_name,
|
|
2549
|
+
region=region,
|
|
2550
|
+
)
|
|
2551
|
+
|
|
2552
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
2553
|
+
|
|
2554
|
+
@jsii.member(jsii_name="getWorkspaceId")
|
|
2555
|
+
def _get_workspace_id(self, workspace_arn: builtins.str) -> builtins.str:
|
|
2556
|
+
'''
|
|
2557
|
+
:param workspace_arn: -
|
|
2558
|
+
'''
|
|
2559
|
+
if __debug__:
|
|
2560
|
+
type_hints = typing.get_type_hints(_typecheckingstub__d3ac750f120961e0958cd690a53ccc4e09d55d88803a7e53ed9bc1e70a3a9a78)
|
|
2561
|
+
check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
|
|
2562
|
+
return typing.cast(builtins.str, jsii.invoke(self, "getWorkspaceId", [workspace_arn]))
|
|
2563
|
+
|
|
2564
|
+
@builtins.property
|
|
2565
|
+
@jsii.member(jsii_name="workspaceArn")
|
|
2566
|
+
@abc.abstractmethod
|
|
2567
|
+
def workspace_arn(self) -> builtins.str:
|
|
2568
|
+
'''The ARN of the workspace.'''
|
|
2569
|
+
...
|
|
2570
|
+
|
|
2571
|
+
@builtins.property
|
|
2572
|
+
@jsii.member(jsii_name="workspaceId")
|
|
2573
|
+
@abc.abstractmethod
|
|
2574
|
+
def workspace_id(self) -> builtins.str:
|
|
2575
|
+
'''The unique ID for the workspace.'''
|
|
2576
|
+
...
|
|
2577
|
+
|
|
2578
|
+
@builtins.property
|
|
2579
|
+
@jsii.member(jsii_name="alertManagerDefinition")
|
|
2580
|
+
@abc.abstractmethod
|
|
2581
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
2582
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
2583
|
+
...
|
|
2584
|
+
|
|
2585
|
+
@builtins.property
|
|
2586
|
+
@jsii.member(jsii_name="alias")
|
|
2587
|
+
@abc.abstractmethod
|
|
2588
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2589
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
2590
|
+
|
|
2591
|
+
It does not need to be
|
|
2592
|
+
unique.
|
|
2593
|
+
'''
|
|
2594
|
+
...
|
|
2595
|
+
|
|
2596
|
+
@builtins.property
|
|
2597
|
+
@jsii.member(jsii_name="kmsKey")
|
|
2598
|
+
@abc.abstractmethod
|
|
2599
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
2600
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
2601
|
+
...
|
|
2602
|
+
|
|
2603
|
+
@builtins.property
|
|
2604
|
+
@jsii.member(jsii_name="loggingConfiguration")
|
|
2605
|
+
@abc.abstractmethod
|
|
2606
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
2607
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
2608
|
+
|
|
2609
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
2610
|
+
'''
|
|
2611
|
+
...
|
|
2612
|
+
|
|
2613
|
+
@builtins.property
|
|
2614
|
+
@jsii.member(jsii_name="queryLoggingConfiguration")
|
|
2615
|
+
@abc.abstractmethod
|
|
2616
|
+
def query_logging_configuration(
|
|
2617
|
+
self,
|
|
2618
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
2619
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
2620
|
+
...
|
|
2621
|
+
|
|
2622
|
+
@builtins.property
|
|
2623
|
+
@jsii.member(jsii_name="workspaceConfiguration")
|
|
2624
|
+
@abc.abstractmethod
|
|
2625
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
2626
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
2627
|
+
...
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
class _WorkspaceBaseProxy(
|
|
2631
|
+
WorkspaceBase,
|
|
2632
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
|
|
2633
|
+
):
|
|
2634
|
+
@builtins.property
|
|
2635
|
+
@jsii.member(jsii_name="workspaceArn")
|
|
2636
|
+
def workspace_arn(self) -> builtins.str:
|
|
2637
|
+
'''The ARN of the workspace.'''
|
|
2638
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
|
|
2639
|
+
|
|
2640
|
+
@builtins.property
|
|
2641
|
+
@jsii.member(jsii_name="workspaceId")
|
|
2642
|
+
def workspace_id(self) -> builtins.str:
|
|
2643
|
+
'''The unique ID for the workspace.'''
|
|
2644
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
|
|
2645
|
+
|
|
2646
|
+
@builtins.property
|
|
2647
|
+
@jsii.member(jsii_name="alertManagerDefinition")
|
|
2648
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
2649
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
2650
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
|
|
2651
|
+
|
|
2652
|
+
@builtins.property
|
|
2653
|
+
@jsii.member(jsii_name="alias")
|
|
2654
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2655
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
2656
|
+
|
|
2657
|
+
It does not need to be
|
|
2658
|
+
unique.
|
|
2659
|
+
'''
|
|
2660
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
2661
|
+
|
|
2662
|
+
@builtins.property
|
|
2663
|
+
@jsii.member(jsii_name="kmsKey")
|
|
2664
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
2665
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
2666
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], jsii.get(self, "kmsKey"))
|
|
2667
|
+
|
|
2668
|
+
@builtins.property
|
|
2669
|
+
@jsii.member(jsii_name="loggingConfiguration")
|
|
2670
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
2671
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
2672
|
+
|
|
2673
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
2674
|
+
'''
|
|
2675
|
+
return typing.cast(typing.Optional["LoggingConfiguration"], jsii.get(self, "loggingConfiguration"))
|
|
2676
|
+
|
|
2677
|
+
@builtins.property
|
|
2678
|
+
@jsii.member(jsii_name="queryLoggingConfiguration")
|
|
2679
|
+
def query_logging_configuration(
|
|
2680
|
+
self,
|
|
2681
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
2682
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
2683
|
+
return typing.cast(typing.Optional["QueryLoggingConfiguration"], jsii.get(self, "queryLoggingConfiguration"))
|
|
2684
|
+
|
|
2685
|
+
@builtins.property
|
|
2686
|
+
@jsii.member(jsii_name="workspaceConfiguration")
|
|
2687
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
2688
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
2689
|
+
return typing.cast(typing.Optional["WorkspaceConfiguration"], jsii.get(self, "workspaceConfiguration"))
|
|
2690
|
+
|
|
2691
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
2692
|
+
typing.cast(typing.Any, WorkspaceBase).__jsii_proxy_class__ = lambda : _WorkspaceBaseProxy
|
|
2693
|
+
|
|
2694
|
+
|
|
2695
|
+
@jsii.data_type(
|
|
2696
|
+
jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceConfiguration",
|
|
2697
|
+
jsii_struct_bases=[],
|
|
2698
|
+
name_mapping={
|
|
2699
|
+
"limits_per_label_sets": "limitsPerLabelSets",
|
|
2700
|
+
"retention_period_in_days": "retentionPeriodInDays",
|
|
2701
|
+
},
|
|
2702
|
+
)
|
|
2703
|
+
class WorkspaceConfiguration:
|
|
2704
|
+
def __init__(
|
|
2705
|
+
self,
|
|
2706
|
+
*,
|
|
2707
|
+
limits_per_label_sets: typing.Optional[typing.Sequence[typing.Union["LimitsPerLabelSet", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
2708
|
+
retention_period_in_days: typing.Optional[jsii.Number] = None,
|
|
2709
|
+
) -> None:
|
|
2710
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
|
|
2711
|
+
|
|
2712
|
+
:param limits_per_label_sets: This is an array of structures, where each structure defines a label set for the workspace, and defines the ingestion limit for active time series for each of those label sets. Each label name in a label set must be unique. Minimum 0
|
|
2713
|
+
:param retention_period_in_days: Specifies how many days that metrics will be retained in the workspace. Minimum 1
|
|
2714
|
+
'''
|
|
2715
|
+
if __debug__:
|
|
2716
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ae4d82a0bb8d7f12fbf4cbe9ccc1b9bdb2415b0517e902e2bdbf5e5546c092ce)
|
|
2717
|
+
check_type(argname="argument limits_per_label_sets", value=limits_per_label_sets, expected_type=type_hints["limits_per_label_sets"])
|
|
2718
|
+
check_type(argname="argument retention_period_in_days", value=retention_period_in_days, expected_type=type_hints["retention_period_in_days"])
|
|
2719
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
2720
|
+
if limits_per_label_sets is not None:
|
|
2721
|
+
self._values["limits_per_label_sets"] = limits_per_label_sets
|
|
2722
|
+
if retention_period_in_days is not None:
|
|
2723
|
+
self._values["retention_period_in_days"] = retention_period_in_days
|
|
2724
|
+
|
|
2725
|
+
@builtins.property
|
|
2726
|
+
def limits_per_label_sets(
|
|
2727
|
+
self,
|
|
2728
|
+
) -> typing.Optional[typing.List["LimitsPerLabelSet"]]:
|
|
2729
|
+
'''This is an array of structures, where each structure defines a label set for the workspace, and defines the ingestion limit for active time series for each of those label sets.
|
|
2730
|
+
|
|
2731
|
+
Each
|
|
2732
|
+
label name in a label set must be unique.
|
|
2733
|
+
|
|
2734
|
+
Minimum 0
|
|
2735
|
+
'''
|
|
2736
|
+
result = self._values.get("limits_per_label_sets")
|
|
2737
|
+
return typing.cast(typing.Optional[typing.List["LimitsPerLabelSet"]], result)
|
|
2738
|
+
|
|
2739
|
+
@builtins.property
|
|
2740
|
+
def retention_period_in_days(self) -> typing.Optional[jsii.Number]:
|
|
2741
|
+
'''Specifies how many days that metrics will be retained in the workspace.
|
|
2742
|
+
|
|
2743
|
+
Minimum 1
|
|
2744
|
+
'''
|
|
2745
|
+
result = self._values.get("retention_period_in_days")
|
|
2746
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
2747
|
+
|
|
2748
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2749
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2750
|
+
|
|
2751
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2752
|
+
return not (rhs == self)
|
|
2753
|
+
|
|
2754
|
+
def __repr__(self) -> str:
|
|
2755
|
+
return "WorkspaceConfiguration(%s)" % ", ".join(
|
|
2756
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2757
|
+
)
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
@jsii.data_type(
|
|
2761
|
+
jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceProps",
|
|
2762
|
+
jsii_struct_bases=[],
|
|
2763
|
+
name_mapping={
|
|
2764
|
+
"alert_manager_definition": "alertManagerDefinition",
|
|
2765
|
+
"alias": "alias",
|
|
2766
|
+
"kms_key": "kmsKey",
|
|
2767
|
+
"logging_configuration": "loggingConfiguration",
|
|
2768
|
+
"query_logging_configuration": "queryLoggingConfiguration",
|
|
2769
|
+
"workspace_configuration": "workspaceConfiguration",
|
|
2770
|
+
},
|
|
2771
|
+
)
|
|
2772
|
+
class WorkspaceProps:
|
|
2773
|
+
def __init__(
|
|
2774
|
+
self,
|
|
2775
|
+
*,
|
|
2776
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
2777
|
+
alias: typing.Optional[builtins.str] = None,
|
|
2778
|
+
kms_key: typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"] = None,
|
|
2779
|
+
logging_configuration: typing.Optional[typing.Union["LoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2780
|
+
query_logging_configuration: typing.Optional[typing.Union["QueryLoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2781
|
+
workspace_configuration: typing.Optional[typing.Union["WorkspaceConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2782
|
+
) -> None:
|
|
2783
|
+
'''Properties for creating an Amazon Managed Service for Prometheus Workspace.
|
|
2784
|
+
|
|
2785
|
+
:param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
|
|
2786
|
+
:param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique. 0 to 100 characters
|
|
2787
|
+
:param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
|
|
2788
|
+
:param logging_configuration: Contains information about the current rules and alerting logging configuration for the workspace. Note: These logging configurations are only for rules and alerting logs.
|
|
2789
|
+
:param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
|
|
2790
|
+
:param workspace_configuration: Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
|
|
2791
|
+
'''
|
|
2792
|
+
if isinstance(logging_configuration, dict):
|
|
2793
|
+
logging_configuration = LoggingConfiguration(**logging_configuration)
|
|
2794
|
+
if isinstance(query_logging_configuration, dict):
|
|
2795
|
+
query_logging_configuration = QueryLoggingConfiguration(**query_logging_configuration)
|
|
2796
|
+
if isinstance(workspace_configuration, dict):
|
|
2797
|
+
workspace_configuration = WorkspaceConfiguration(**workspace_configuration)
|
|
2798
|
+
if __debug__:
|
|
2799
|
+
type_hints = typing.get_type_hints(_typecheckingstub__204cf0cc18e2fd2c643a33020d11a1d61cbfe8a2abd5cd5bda6a222e017e12ef)
|
|
2800
|
+
check_type(argname="argument alert_manager_definition", value=alert_manager_definition, expected_type=type_hints["alert_manager_definition"])
|
|
2801
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
|
2802
|
+
check_type(argname="argument kms_key", value=kms_key, expected_type=type_hints["kms_key"])
|
|
2803
|
+
check_type(argname="argument logging_configuration", value=logging_configuration, expected_type=type_hints["logging_configuration"])
|
|
2804
|
+
check_type(argname="argument query_logging_configuration", value=query_logging_configuration, expected_type=type_hints["query_logging_configuration"])
|
|
2805
|
+
check_type(argname="argument workspace_configuration", value=workspace_configuration, expected_type=type_hints["workspace_configuration"])
|
|
2806
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
2807
|
+
if alert_manager_definition is not None:
|
|
2808
|
+
self._values["alert_manager_definition"] = alert_manager_definition
|
|
2809
|
+
if alias is not None:
|
|
2810
|
+
self._values["alias"] = alias
|
|
2811
|
+
if kms_key is not None:
|
|
2812
|
+
self._values["kms_key"] = kms_key
|
|
2813
|
+
if logging_configuration is not None:
|
|
2814
|
+
self._values["logging_configuration"] = logging_configuration
|
|
2815
|
+
if query_logging_configuration is not None:
|
|
2816
|
+
self._values["query_logging_configuration"] = query_logging_configuration
|
|
2817
|
+
if workspace_configuration is not None:
|
|
2818
|
+
self._values["workspace_configuration"] = workspace_configuration
|
|
2819
|
+
|
|
2820
|
+
@builtins.property
|
|
2821
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
2822
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
2823
|
+
result = self._values.get("alert_manager_definition")
|
|
2824
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2825
|
+
|
|
2826
|
+
@builtins.property
|
|
2827
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
2828
|
+
'''The alias that is assigned to this workspace to help identify it. It does not need to be unique.
|
|
2829
|
+
|
|
2830
|
+
0 to 100 characters
|
|
2831
|
+
'''
|
|
2832
|
+
result = self._values.get("alias")
|
|
2833
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
2834
|
+
|
|
2835
|
+
@builtins.property
|
|
2836
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
2837
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
2838
|
+
result = self._values.get("kms_key")
|
|
2839
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], result)
|
|
2840
|
+
|
|
2841
|
+
@builtins.property
|
|
2842
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
2843
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
2844
|
+
|
|
2845
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
2846
|
+
'''
|
|
2847
|
+
result = self._values.get("logging_configuration")
|
|
2848
|
+
return typing.cast(typing.Optional["LoggingConfiguration"], result)
|
|
2849
|
+
|
|
2850
|
+
@builtins.property
|
|
2851
|
+
def query_logging_configuration(
|
|
2852
|
+
self,
|
|
2853
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
2854
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
2855
|
+
result = self._values.get("query_logging_configuration")
|
|
2856
|
+
return typing.cast(typing.Optional["QueryLoggingConfiguration"], result)
|
|
2857
|
+
|
|
2858
|
+
@builtins.property
|
|
2859
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
2860
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
2861
|
+
result = self._values.get("workspace_configuration")
|
|
2862
|
+
return typing.cast(typing.Optional["WorkspaceConfiguration"], result)
|
|
2863
|
+
|
|
2864
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2865
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2866
|
+
|
|
2867
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2868
|
+
return not (rhs == self)
|
|
2869
|
+
|
|
2870
|
+
def __repr__(self) -> str:
|
|
2871
|
+
return "WorkspaceProps(%s)" % ", ".join(
|
|
2872
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2873
|
+
)
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
@jsii.implements(IAnomalyDetector)
|
|
2877
|
+
class AnomalyDetectorBase(
|
|
2878
|
+
_aws_cdk_ceddda9d.Resource,
|
|
2879
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
2880
|
+
jsii_type="@robhan-cdk-lib/aws_aps.AnomalyDetectorBase",
|
|
2881
|
+
):
|
|
2882
|
+
def __init__(
|
|
2883
|
+
self,
|
|
2884
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
2885
|
+
id: builtins.str,
|
|
2886
|
+
*,
|
|
2887
|
+
account: typing.Optional[builtins.str] = None,
|
|
2888
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
2889
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
2890
|
+
region: typing.Optional[builtins.str] = None,
|
|
2891
|
+
) -> None:
|
|
2892
|
+
'''
|
|
2893
|
+
:param scope: -
|
|
2894
|
+
:param id: -
|
|
2895
|
+
:param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
|
|
2896
|
+
:param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
|
|
2897
|
+
:param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
|
|
2898
|
+
:param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
|
|
2899
|
+
'''
|
|
2900
|
+
if __debug__:
|
|
2901
|
+
type_hints = typing.get_type_hints(_typecheckingstub__763ce8aef513d695a9ea5e157a4299be537296b8475d4cac315b4f595f7d0536)
|
|
2902
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2903
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2904
|
+
props = _aws_cdk_ceddda9d.ResourceProps(
|
|
2905
|
+
account=account,
|
|
2906
|
+
environment_from_arn=environment_from_arn,
|
|
2907
|
+
physical_name=physical_name,
|
|
2908
|
+
region=region,
|
|
2909
|
+
)
|
|
2910
|
+
|
|
2911
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
2912
|
+
|
|
2913
|
+
@builtins.property
|
|
2914
|
+
@jsii.member(jsii_name="alias")
|
|
2915
|
+
@abc.abstractmethod
|
|
2916
|
+
def alias(self) -> builtins.str:
|
|
2917
|
+
'''The user-friendly name of the anomaly detector. 1 to 64 characters length.
|
|
2918
|
+
|
|
2919
|
+
Minimum length of 1. Maximum length of 64.
|
|
2920
|
+
Pattern: [0-9A-Za-z][-.0-9A-Z_a-z]*
|
|
2921
|
+
'''
|
|
2922
|
+
...
|
|
2923
|
+
|
|
2924
|
+
@builtins.property
|
|
2925
|
+
@jsii.member(jsii_name="anomalyDetectorArn")
|
|
2926
|
+
@abc.abstractmethod
|
|
2927
|
+
def anomaly_detector_arn(self) -> builtins.str:
|
|
2928
|
+
'''The Amazon Resource Name (ARN) of the anomaly detector.
|
|
2929
|
+
|
|
2930
|
+
:attribute: true
|
|
2931
|
+
'''
|
|
2932
|
+
...
|
|
2933
|
+
|
|
2934
|
+
@builtins.property
|
|
2935
|
+
@jsii.member(jsii_name="configuration")
|
|
2936
|
+
@abc.abstractmethod
|
|
2937
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
2938
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
2939
|
+
...
|
|
2940
|
+
|
|
2941
|
+
@builtins.property
|
|
2942
|
+
@jsii.member(jsii_name="workspace")
|
|
2943
|
+
@abc.abstractmethod
|
|
2944
|
+
def workspace(self) -> "IWorkspace":
|
|
2945
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
2946
|
+
...
|
|
2947
|
+
|
|
2948
|
+
@builtins.property
|
|
2949
|
+
@jsii.member(jsii_name="evaluationIntervalInSeconds")
|
|
2950
|
+
@abc.abstractmethod
|
|
2951
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
2952
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
2953
|
+
|
|
2954
|
+
Minimum value of 30. Maximum value of 86400.
|
|
2955
|
+
'''
|
|
2956
|
+
...
|
|
2957
|
+
|
|
2958
|
+
@builtins.property
|
|
2959
|
+
@jsii.member(jsii_name="labels")
|
|
2960
|
+
@abc.abstractmethod
|
|
2961
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
2962
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
2963
|
+
|
|
2964
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
2965
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
2966
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
2967
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
2968
|
+
'''
|
|
2969
|
+
...
|
|
2970
|
+
|
|
2971
|
+
@builtins.property
|
|
2972
|
+
@jsii.member(jsii_name="missingDataAction")
|
|
2973
|
+
@abc.abstractmethod
|
|
2974
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
2975
|
+
'''The action taken when data is missing during evaluation.'''
|
|
2976
|
+
...
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
class _AnomalyDetectorBaseProxy(
|
|
2980
|
+
AnomalyDetectorBase,
|
|
2981
|
+
jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
|
|
2982
|
+
):
|
|
2983
|
+
@builtins.property
|
|
2984
|
+
@jsii.member(jsii_name="alias")
|
|
2985
|
+
def alias(self) -> builtins.str:
|
|
2986
|
+
'''The user-friendly name of the anomaly detector. 1 to 64 characters length.
|
|
2987
|
+
|
|
2988
|
+
Minimum length of 1. Maximum length of 64.
|
|
2989
|
+
Pattern: [0-9A-Za-z][-.0-9A-Z_a-z]*
|
|
2990
|
+
'''
|
|
2991
|
+
return typing.cast(builtins.str, jsii.get(self, "alias"))
|
|
2992
|
+
|
|
2993
|
+
@builtins.property
|
|
2994
|
+
@jsii.member(jsii_name="anomalyDetectorArn")
|
|
2995
|
+
def anomaly_detector_arn(self) -> builtins.str:
|
|
2996
|
+
'''The Amazon Resource Name (ARN) of the anomaly detector.
|
|
2997
|
+
|
|
2998
|
+
:attribute: true
|
|
2999
|
+
'''
|
|
3000
|
+
return typing.cast(builtins.str, jsii.get(self, "anomalyDetectorArn"))
|
|
3001
|
+
|
|
3002
|
+
@builtins.property
|
|
3003
|
+
@jsii.member(jsii_name="configuration")
|
|
3004
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
3005
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
3006
|
+
return typing.cast("AnomalyDetectorConfiguration", jsii.get(self, "configuration"))
|
|
3007
|
+
|
|
3008
|
+
@builtins.property
|
|
3009
|
+
@jsii.member(jsii_name="workspace")
|
|
3010
|
+
def workspace(self) -> "IWorkspace":
|
|
3011
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
3012
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
3013
|
+
|
|
3014
|
+
@builtins.property
|
|
3015
|
+
@jsii.member(jsii_name="evaluationIntervalInSeconds")
|
|
3016
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
3017
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
3018
|
+
|
|
3019
|
+
Minimum value of 30. Maximum value of 86400.
|
|
3020
|
+
'''
|
|
3021
|
+
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "evaluationIntervalInSeconds"))
|
|
3022
|
+
|
|
3023
|
+
@builtins.property
|
|
3024
|
+
@jsii.member(jsii_name="labels")
|
|
3025
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
3026
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
3027
|
+
|
|
3028
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
3029
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
3030
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
3031
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
3032
|
+
'''
|
|
3033
|
+
return typing.cast(typing.Optional[typing.List["Label"]], jsii.get(self, "labels"))
|
|
3034
|
+
|
|
3035
|
+
@builtins.property
|
|
3036
|
+
@jsii.member(jsii_name="missingDataAction")
|
|
3037
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
3038
|
+
'''The action taken when data is missing during evaluation.'''
|
|
3039
|
+
return typing.cast(typing.Optional["MissingDataAction"], jsii.get(self, "missingDataAction"))
|
|
3040
|
+
|
|
3041
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
3042
|
+
typing.cast(typing.Any, AnomalyDetectorBase).__jsii_proxy_class__ = lambda : _AnomalyDetectorBaseProxy
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
class ResourcePolicy(
|
|
3046
|
+
ResourcePolicyBase,
|
|
3047
|
+
metaclass=jsii.JSIIMeta,
|
|
3048
|
+
jsii_type="@robhan-cdk-lib/aws_aps.ResourcePolicy",
|
|
3049
|
+
):
|
|
3050
|
+
def __init__(
|
|
3051
|
+
self,
|
|
3052
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3053
|
+
id: builtins.str,
|
|
3054
|
+
*,
|
|
3055
|
+
policy_document: builtins.str,
|
|
3056
|
+
workspace: "IWorkspace",
|
|
3057
|
+
) -> None:
|
|
3058
|
+
'''
|
|
3059
|
+
:param scope: -
|
|
3060
|
+
:param id: -
|
|
3061
|
+
:param policy_document: The JSON to use as the Resource-based Policy.
|
|
3062
|
+
:param workspace: The workspace to attach the policy to.
|
|
3063
|
+
'''
|
|
3064
|
+
if __debug__:
|
|
3065
|
+
type_hints = typing.get_type_hints(_typecheckingstub__152018d2f86ee27c3ac817bf409dc2fae4034315290b87fd5d6c906625b633d3)
|
|
3066
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3067
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3068
|
+
props = ResourcePolicyProps(
|
|
3069
|
+
policy_document=policy_document, workspace=workspace
|
|
3070
|
+
)
|
|
3071
|
+
|
|
3072
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
3073
|
+
|
|
3074
|
+
@jsii.member(jsii_name="isResourcePolicy")
|
|
3075
|
+
@builtins.classmethod
|
|
3076
|
+
def is_resource_policy(cls, x: typing.Any) -> builtins.bool:
|
|
3077
|
+
'''
|
|
3078
|
+
:param x: -
|
|
3079
|
+
'''
|
|
3080
|
+
if __debug__:
|
|
3081
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b7b7c7ca19cd491541f3243572cf47da8425bab13c98330c2653c2302cfa6b53)
|
|
3082
|
+
check_type(argname="argument x", value=x, expected_type=type_hints["x"])
|
|
3083
|
+
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isResourcePolicy", [x]))
|
|
3084
|
+
|
|
3085
|
+
@builtins.property
|
|
3086
|
+
@jsii.member(jsii_name="policyDocument")
|
|
3087
|
+
def policy_document(self) -> builtins.str:
|
|
3088
|
+
'''The JSON to use as the Resource-based Policy.'''
|
|
3089
|
+
return typing.cast(builtins.str, jsii.get(self, "policyDocument"))
|
|
3090
|
+
|
|
3091
|
+
@builtins.property
|
|
3092
|
+
@jsii.member(jsii_name="workspace")
|
|
3093
|
+
def workspace(self) -> "IWorkspace":
|
|
3094
|
+
'''The workspace to attach the policy to.'''
|
|
3095
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
class RuleGroupsNamespace(
|
|
3099
|
+
RuleGroupsNamespaceBase,
|
|
3100
|
+
metaclass=jsii.JSIIMeta,
|
|
3101
|
+
jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespace",
|
|
3102
|
+
):
|
|
3103
|
+
'''The definition of a rule groups namespace in an Amazon Managed Service for Prometheus workspace.
|
|
3104
|
+
|
|
3105
|
+
A rule groups namespace is associated with exactly one rules file. A workspace can have multiple
|
|
3106
|
+
rule groups namespaces.
|
|
3107
|
+
'''
|
|
3108
|
+
|
|
3109
|
+
def __init__(
|
|
3110
|
+
self,
|
|
3111
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3112
|
+
id: builtins.str,
|
|
3113
|
+
*,
|
|
3114
|
+
data: builtins.str,
|
|
3115
|
+
name: builtins.str,
|
|
3116
|
+
workspace: "IWorkspace",
|
|
3117
|
+
) -> None:
|
|
3118
|
+
'''
|
|
3119
|
+
:param scope: -
|
|
3120
|
+
:param id: -
|
|
3121
|
+
:param data: The rules file used in the namespace.
|
|
3122
|
+
:param name: The name of the rule groups namespace. Between 1 and 64 characters.
|
|
3123
|
+
:param workspace: The workspace to add the rule groups namespace.
|
|
3124
|
+
'''
|
|
3125
|
+
if __debug__:
|
|
3126
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6d20ad42e4be3f2ea717b0a2a018087c9c8a4437ea677e47f420ba1b0b9d445d)
|
|
3127
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3128
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3129
|
+
props = RuleGroupsNamespaceProps(data=data, name=name, workspace=workspace)
|
|
3130
|
+
|
|
3131
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
3132
|
+
|
|
3133
|
+
@jsii.member(jsii_name="fromRuleGroupsNamespaceAttributes")
|
|
3134
|
+
@builtins.classmethod
|
|
3135
|
+
def from_rule_groups_namespace_attributes(
|
|
3136
|
+
cls,
|
|
3137
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3138
|
+
id: builtins.str,
|
|
3139
|
+
*,
|
|
3140
|
+
data: builtins.str,
|
|
3141
|
+
name: builtins.str,
|
|
3142
|
+
rule_groups_namespace_arn: builtins.str,
|
|
3143
|
+
workspace: "IWorkspace",
|
|
3144
|
+
) -> "IRuleGroupsNamespace":
|
|
3145
|
+
'''
|
|
3146
|
+
:param scope: -
|
|
3147
|
+
:param id: -
|
|
3148
|
+
:param data: The rules file used in the namespace.
|
|
3149
|
+
:param name: The name of the rule groups namespace. Between 1 and 64 characters.
|
|
3150
|
+
:param rule_groups_namespace_arn: The ARN of the rule groups namespace.
|
|
3151
|
+
:param workspace: The workspace to add the rule groups namespace.
|
|
3152
|
+
'''
|
|
3153
|
+
if __debug__:
|
|
3154
|
+
type_hints = typing.get_type_hints(_typecheckingstub__07bf6a97084316812dac20b3c71ddb45a75f79b4a8ec626bd6762069ada7d925)
|
|
3155
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3156
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3157
|
+
attrs = RuleGroupsNamespaceAttributes(
|
|
3158
|
+
data=data,
|
|
3159
|
+
name=name,
|
|
3160
|
+
rule_groups_namespace_arn=rule_groups_namespace_arn,
|
|
3161
|
+
workspace=workspace,
|
|
3162
|
+
)
|
|
3163
|
+
|
|
3164
|
+
return typing.cast("IRuleGroupsNamespace", jsii.sinvoke(cls, "fromRuleGroupsNamespaceAttributes", [scope, id, attrs]))
|
|
3165
|
+
|
|
3166
|
+
@jsii.member(jsii_name="isRuleGroupsNamespace")
|
|
3167
|
+
@builtins.classmethod
|
|
3168
|
+
def is_rule_groups_namespace(cls, x: typing.Any) -> builtins.bool:
|
|
3169
|
+
'''
|
|
3170
|
+
:param x: -
|
|
3171
|
+
'''
|
|
3172
|
+
if __debug__:
|
|
3173
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9f121730976c1abb9dd8b8aeb3d4783892a3f693e887909348c16a32681593f4)
|
|
3174
|
+
check_type(argname="argument x", value=x, expected_type=type_hints["x"])
|
|
3175
|
+
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isRuleGroupsNamespace", [x]))
|
|
3176
|
+
|
|
3177
|
+
@builtins.property
|
|
3178
|
+
@jsii.member(jsii_name="data")
|
|
3179
|
+
def data(self) -> builtins.str:
|
|
3180
|
+
'''The rules file used in the namespace.'''
|
|
3181
|
+
return typing.cast(builtins.str, jsii.get(self, "data"))
|
|
3182
|
+
|
|
3183
|
+
@builtins.property
|
|
3184
|
+
@jsii.member(jsii_name="name")
|
|
3185
|
+
def name(self) -> builtins.str:
|
|
3186
|
+
'''The name of the rule groups namespace.'''
|
|
3187
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
3188
|
+
|
|
3189
|
+
@builtins.property
|
|
3190
|
+
@jsii.member(jsii_name="ruleGroupsNamespaceArn")
|
|
3191
|
+
def rule_groups_namespace_arn(self) -> builtins.str:
|
|
3192
|
+
'''The workspace to add the rule groups namespace.'''
|
|
3193
|
+
return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
|
|
3194
|
+
|
|
3195
|
+
@builtins.property
|
|
3196
|
+
@jsii.member(jsii_name="workspace")
|
|
3197
|
+
def workspace(self) -> "IWorkspace":
|
|
3198
|
+
'''The workspace to add the rule groups namespace.'''
|
|
3199
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
3200
|
+
|
|
3201
|
+
|
|
3202
|
+
class Scraper(
|
|
3203
|
+
ScraperBase,
|
|
3204
|
+
metaclass=jsii.JSIIMeta,
|
|
3205
|
+
jsii_type="@robhan-cdk-lib/aws_aps.Scraper",
|
|
3206
|
+
):
|
|
3207
|
+
def __init__(
|
|
3208
|
+
self,
|
|
3209
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3210
|
+
id: builtins.str,
|
|
3211
|
+
*,
|
|
3212
|
+
destination: typing.Union["Destination", typing.Dict[builtins.str, typing.Any]],
|
|
3213
|
+
scrape_configuration: typing.Union["ScrapeConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
3214
|
+
source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
|
|
3215
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3216
|
+
role_configuration: typing.Optional[typing.Union["RoleConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3217
|
+
) -> None:
|
|
3218
|
+
'''
|
|
3219
|
+
:param scope: -
|
|
3220
|
+
:param id: -
|
|
3221
|
+
:param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
|
|
3222
|
+
:param scrape_configuration: The configuration in use by the scraper.
|
|
3223
|
+
:param source: The Amazon EKS cluster from which the scraper collects metrics.
|
|
3224
|
+
:param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
3225
|
+
:param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
|
|
3226
|
+
'''
|
|
3227
|
+
if __debug__:
|
|
3228
|
+
type_hints = typing.get_type_hints(_typecheckingstub__420a8a3c500b6acbf7b84e9b716db0e0256ad4fe2f714daf764abfebb254c38a)
|
|
3229
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3230
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3231
|
+
props = ScraperProps(
|
|
3232
|
+
destination=destination,
|
|
3233
|
+
scrape_configuration=scrape_configuration,
|
|
3234
|
+
source=source,
|
|
3235
|
+
alias=alias,
|
|
3236
|
+
role_configuration=role_configuration,
|
|
3237
|
+
)
|
|
3238
|
+
|
|
3239
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
3240
|
+
|
|
3241
|
+
@jsii.member(jsii_name="fromScraperAttributes")
|
|
3242
|
+
@builtins.classmethod
|
|
3243
|
+
def from_scraper_attributes(
|
|
3244
|
+
cls,
|
|
3245
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3246
|
+
id: builtins.str,
|
|
3247
|
+
*,
|
|
3248
|
+
destination: typing.Union["Destination", typing.Dict[builtins.str, typing.Any]],
|
|
3249
|
+
scrape_configuration: typing.Union["ScrapeConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
3250
|
+
scraper_arn: builtins.str,
|
|
3251
|
+
source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
|
|
3252
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3253
|
+
role_configuration: typing.Optional[typing.Union["RoleConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3254
|
+
) -> "IScraper":
|
|
3255
|
+
'''
|
|
3256
|
+
:param scope: -
|
|
3257
|
+
:param id: -
|
|
3258
|
+
:param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
|
|
3259
|
+
:param scrape_configuration: The configuration in use by the scraper.
|
|
3260
|
+
:param scraper_arn: The ARN of the scraper.
|
|
3261
|
+
:param source: The Amazon EKS cluster from which the scraper collects metrics.
|
|
3262
|
+
:param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
|
|
3263
|
+
:param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
|
|
3264
|
+
'''
|
|
3265
|
+
if __debug__:
|
|
3266
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a782eecfe3a632aac5c0103f9029c7ec8a0b5f2ac8b500e9a0257a762eda243d)
|
|
3267
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3268
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3269
|
+
attrs = ScraperAttributes(
|
|
3270
|
+
destination=destination,
|
|
3271
|
+
scrape_configuration=scrape_configuration,
|
|
3272
|
+
scraper_arn=scraper_arn,
|
|
3273
|
+
source=source,
|
|
3274
|
+
alias=alias,
|
|
3275
|
+
role_configuration=role_configuration,
|
|
3276
|
+
)
|
|
3277
|
+
|
|
3278
|
+
return typing.cast("IScraper", jsii.sinvoke(cls, "fromScraperAttributes", [scope, id, attrs]))
|
|
3279
|
+
|
|
3280
|
+
@jsii.member(jsii_name="isScraper")
|
|
3281
|
+
@builtins.classmethod
|
|
3282
|
+
def is_scraper(cls, x: typing.Any) -> builtins.bool:
|
|
3283
|
+
'''
|
|
3284
|
+
:param x: -
|
|
3285
|
+
'''
|
|
3286
|
+
if __debug__:
|
|
3287
|
+
type_hints = typing.get_type_hints(_typecheckingstub__34e6af43e419cebdae94e53a8eb7f2112edcf143a28894ce155d8f3be94b5f49)
|
|
3288
|
+
check_type(argname="argument x", value=x, expected_type=type_hints["x"])
|
|
3289
|
+
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isScraper", [x]))
|
|
3290
|
+
|
|
3291
|
+
@builtins.property
|
|
3292
|
+
@jsii.member(jsii_name="destination")
|
|
3293
|
+
def destination(self) -> "Destination":
|
|
3294
|
+
'''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
|
|
3295
|
+
return typing.cast("Destination", jsii.get(self, "destination"))
|
|
3296
|
+
|
|
3297
|
+
@builtins.property
|
|
3298
|
+
@jsii.member(jsii_name="scrapeConfiguration")
|
|
3299
|
+
def scrape_configuration(self) -> "ScrapeConfiguration":
|
|
3300
|
+
'''The configuration in use by the scraper.'''
|
|
3301
|
+
return typing.cast("ScrapeConfiguration", jsii.get(self, "scrapeConfiguration"))
|
|
3302
|
+
|
|
3303
|
+
@builtins.property
|
|
3304
|
+
@jsii.member(jsii_name="scraperArn")
|
|
3305
|
+
def scraper_arn(self) -> builtins.str:
|
|
3306
|
+
'''The ARN of the scraper.'''
|
|
3307
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
|
|
3308
|
+
|
|
3309
|
+
@builtins.property
|
|
3310
|
+
@jsii.member(jsii_name="scraperId")
|
|
3311
|
+
def scraper_id(self) -> builtins.str:
|
|
3312
|
+
'''The ID of the scraper.'''
|
|
3313
|
+
return typing.cast(builtins.str, jsii.get(self, "scraperId"))
|
|
3314
|
+
|
|
3315
|
+
@builtins.property
|
|
3316
|
+
@jsii.member(jsii_name="source")
|
|
3317
|
+
def source(self) -> "Source":
|
|
3318
|
+
'''The Amazon EKS cluster from which the scraper collects metrics.'''
|
|
3319
|
+
return typing.cast("Source", jsii.get(self, "source"))
|
|
3320
|
+
|
|
3321
|
+
@builtins.property
|
|
3322
|
+
@jsii.member(jsii_name="alias")
|
|
3323
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
3324
|
+
'''An optional user-assigned scraper alias.'''
|
|
3325
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
3326
|
+
|
|
3327
|
+
@builtins.property
|
|
3328
|
+
@jsii.member(jsii_name="roleConfiguration")
|
|
3329
|
+
def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
|
|
3330
|
+
'''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
|
|
3331
|
+
return typing.cast(typing.Optional["RoleConfiguration"], jsii.get(self, "roleConfiguration"))
|
|
3332
|
+
|
|
3333
|
+
|
|
3334
|
+
class Workspace(
|
|
3335
|
+
WorkspaceBase,
|
|
3336
|
+
metaclass=jsii.JSIIMeta,
|
|
3337
|
+
jsii_type="@robhan-cdk-lib/aws_aps.Workspace",
|
|
3338
|
+
):
|
|
3339
|
+
def __init__(
|
|
3340
|
+
self,
|
|
3341
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3342
|
+
id: builtins.str,
|
|
3343
|
+
*,
|
|
3344
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
3345
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3346
|
+
kms_key: typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"] = None,
|
|
3347
|
+
logging_configuration: typing.Optional[typing.Union["LoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3348
|
+
query_logging_configuration: typing.Optional[typing.Union["QueryLoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3349
|
+
workspace_configuration: typing.Optional[typing.Union["WorkspaceConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3350
|
+
) -> None:
|
|
3351
|
+
'''
|
|
3352
|
+
:param scope: -
|
|
3353
|
+
:param id: -
|
|
3354
|
+
:param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
|
|
3355
|
+
:param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique. 0 to 100 characters
|
|
3356
|
+
:param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
|
|
3357
|
+
:param logging_configuration: Contains information about the current rules and alerting logging configuration for the workspace. Note: These logging configurations are only for rules and alerting logs.
|
|
3358
|
+
:param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
|
|
3359
|
+
:param workspace_configuration: Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
|
|
3360
|
+
'''
|
|
3361
|
+
if __debug__:
|
|
3362
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fce396480613eba99c44ddbc02181012d71649d36c3a0187e9437c5268bc1cd8)
|
|
3363
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3364
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3365
|
+
props = WorkspaceProps(
|
|
3366
|
+
alert_manager_definition=alert_manager_definition,
|
|
3367
|
+
alias=alias,
|
|
3368
|
+
kms_key=kms_key,
|
|
3369
|
+
logging_configuration=logging_configuration,
|
|
3370
|
+
query_logging_configuration=query_logging_configuration,
|
|
3371
|
+
workspace_configuration=workspace_configuration,
|
|
3372
|
+
)
|
|
3373
|
+
|
|
3374
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
3375
|
+
|
|
3376
|
+
@jsii.member(jsii_name="fromWorkspaceAttributes")
|
|
3377
|
+
@builtins.classmethod
|
|
3378
|
+
def from_workspace_attributes(
|
|
3379
|
+
cls,
|
|
3380
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3381
|
+
id: builtins.str,
|
|
3382
|
+
*,
|
|
3383
|
+
workspace_arn: builtins.str,
|
|
3384
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
3385
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3386
|
+
kms_key: typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"] = None,
|
|
3387
|
+
logging_configuration: typing.Optional[typing.Union["LoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3388
|
+
query_logging_configuration: typing.Optional[typing.Union["QueryLoggingConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3389
|
+
workspace_configuration: typing.Optional[typing.Union["WorkspaceConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3390
|
+
) -> "IWorkspace":
|
|
3391
|
+
'''
|
|
3392
|
+
:param scope: -
|
|
3393
|
+
:param id: -
|
|
3394
|
+
:param workspace_arn: The arn of this workspace.
|
|
3395
|
+
:param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
|
|
3396
|
+
:param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique.
|
|
3397
|
+
:param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
|
|
3398
|
+
:param logging_configuration: Contains information about the current rules and alerting logging configuration for the workspace. Note: These logging configurations are only for rules and alerting logs.
|
|
3399
|
+
:param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
|
|
3400
|
+
:param workspace_configuration: Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
|
|
3401
|
+
'''
|
|
3402
|
+
if __debug__:
|
|
3403
|
+
type_hints = typing.get_type_hints(_typecheckingstub__06e9f0a4ada069956fea79835fad029b7339fca1059f54a6118f01854e5e44ed)
|
|
3404
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3405
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3406
|
+
attrs = WorkspaceAttributes(
|
|
3407
|
+
workspace_arn=workspace_arn,
|
|
3408
|
+
alert_manager_definition=alert_manager_definition,
|
|
3409
|
+
alias=alias,
|
|
3410
|
+
kms_key=kms_key,
|
|
3411
|
+
logging_configuration=logging_configuration,
|
|
3412
|
+
query_logging_configuration=query_logging_configuration,
|
|
3413
|
+
workspace_configuration=workspace_configuration,
|
|
3414
|
+
)
|
|
3415
|
+
|
|
3416
|
+
return typing.cast("IWorkspace", jsii.sinvoke(cls, "fromWorkspaceAttributes", [scope, id, attrs]))
|
|
3417
|
+
|
|
3418
|
+
@jsii.member(jsii_name="isWorkspace")
|
|
3419
|
+
@builtins.classmethod
|
|
3420
|
+
def is_workspace(cls, x: typing.Any) -> builtins.bool:
|
|
3421
|
+
'''
|
|
3422
|
+
:param x: -
|
|
3423
|
+
'''
|
|
3424
|
+
if __debug__:
|
|
3425
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fe05f7c3509dfbf0a171e57ba19ea445d159aeb564d5e5a1ee5815df73224518)
|
|
3426
|
+
check_type(argname="argument x", value=x, expected_type=type_hints["x"])
|
|
3427
|
+
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isWorkspace", [x]))
|
|
3428
|
+
|
|
3429
|
+
@builtins.property
|
|
3430
|
+
@jsii.member(jsii_name="prometheusEndpoint")
|
|
3431
|
+
def prometheus_endpoint(self) -> builtins.str:
|
|
3432
|
+
'''The Prometheus endpoint available for this workspace..'''
|
|
3433
|
+
return typing.cast(builtins.str, jsii.get(self, "prometheusEndpoint"))
|
|
3434
|
+
|
|
3435
|
+
@builtins.property
|
|
3436
|
+
@jsii.member(jsii_name="workspaceArn")
|
|
3437
|
+
def workspace_arn(self) -> builtins.str:
|
|
3438
|
+
'''The ARN of the workspace.'''
|
|
3439
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
|
|
3440
|
+
|
|
3441
|
+
@builtins.property
|
|
3442
|
+
@jsii.member(jsii_name="workspaceId")
|
|
3443
|
+
def workspace_id(self) -> builtins.str:
|
|
3444
|
+
'''The unique ID for the workspace.'''
|
|
3445
|
+
return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
|
|
3446
|
+
|
|
3447
|
+
@builtins.property
|
|
3448
|
+
@jsii.member(jsii_name="alertManagerDefinition")
|
|
3449
|
+
def alert_manager_definition(self) -> typing.Optional[builtins.str]:
|
|
3450
|
+
'''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
|
|
3451
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
|
|
3452
|
+
|
|
3453
|
+
@builtins.property
|
|
3454
|
+
@jsii.member(jsii_name="alias")
|
|
3455
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
|
3456
|
+
'''The alias that is assigned to this workspace to help identify it.
|
|
3457
|
+
|
|
3458
|
+
It does not need to be
|
|
3459
|
+
unique.
|
|
3460
|
+
'''
|
|
3461
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
|
3462
|
+
|
|
3463
|
+
@builtins.property
|
|
3464
|
+
@jsii.member(jsii_name="kmsKey")
|
|
3465
|
+
def kms_key(self) -> typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"]:
|
|
3466
|
+
'''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
|
|
3467
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_kms_ceddda9d.IKey"], jsii.get(self, "kmsKey"))
|
|
3468
|
+
|
|
3469
|
+
@builtins.property
|
|
3470
|
+
@jsii.member(jsii_name="loggingConfiguration")
|
|
3471
|
+
def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
|
|
3472
|
+
'''Contains information about the current rules and alerting logging configuration for the workspace.
|
|
3473
|
+
|
|
3474
|
+
Note: These logging configurations are only for rules and alerting logs.
|
|
3475
|
+
'''
|
|
3476
|
+
return typing.cast(typing.Optional["LoggingConfiguration"], jsii.get(self, "loggingConfiguration"))
|
|
3477
|
+
|
|
3478
|
+
@builtins.property
|
|
3479
|
+
@jsii.member(jsii_name="queryLoggingConfiguration")
|
|
3480
|
+
def query_logging_configuration(
|
|
3481
|
+
self,
|
|
3482
|
+
) -> typing.Optional["QueryLoggingConfiguration"]:
|
|
3483
|
+
'''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
|
|
3484
|
+
return typing.cast(typing.Optional["QueryLoggingConfiguration"], jsii.get(self, "queryLoggingConfiguration"))
|
|
3485
|
+
|
|
3486
|
+
@builtins.property
|
|
3487
|
+
@jsii.member(jsii_name="workspaceConfiguration")
|
|
3488
|
+
def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
|
|
3489
|
+
'''Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.'''
|
|
3490
|
+
return typing.cast(typing.Optional["WorkspaceConfiguration"], jsii.get(self, "workspaceConfiguration"))
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
class AnomalyDetector(
|
|
3494
|
+
AnomalyDetectorBase,
|
|
3495
|
+
metaclass=jsii.JSIIMeta,
|
|
3496
|
+
jsii_type="@robhan-cdk-lib/aws_aps.AnomalyDetector",
|
|
3497
|
+
):
|
|
3498
|
+
def __init__(
|
|
3499
|
+
self,
|
|
3500
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
3501
|
+
id: builtins.str,
|
|
3502
|
+
*,
|
|
3503
|
+
alias: builtins.str,
|
|
3504
|
+
configuration: typing.Union["AnomalyDetectorConfiguration", typing.Dict[builtins.str, typing.Any]],
|
|
3505
|
+
workspace: "IWorkspace",
|
|
3506
|
+
evaluation_interval_in_seconds: typing.Optional[jsii.Number] = None,
|
|
3507
|
+
labels: typing.Optional[typing.Sequence[typing.Union["Label", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
3508
|
+
missing_data_action: typing.Optional[typing.Union["MissingDataAction", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3509
|
+
) -> None:
|
|
3510
|
+
'''
|
|
3511
|
+
:param scope: -
|
|
3512
|
+
:param id: -
|
|
3513
|
+
:param alias: The user-friendly name of the anomaly detector. 1 to 128 characters length.
|
|
3514
|
+
:param configuration: The algorithm configuration of the anomaly detector.
|
|
3515
|
+
:param workspace: An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
|
|
3516
|
+
:param evaluation_interval_in_seconds: The frequency, in seconds, at which the anomaly detector evaluates metrics. Minimum value of 30. Maximum value of 86400.
|
|
3517
|
+
:param labels: The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector. Map Entries: Minimum number of 0 items. Maximum number of 140 items. Key Length Constraints: Minimum length of 1. Maximum length of 7168. Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]* Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
3518
|
+
:param missing_data_action: The action taken when data is missing during evaluation.
|
|
3519
|
+
'''
|
|
3520
|
+
if __debug__:
|
|
3521
|
+
type_hints = typing.get_type_hints(_typecheckingstub__8e9cf951baecb48090e806ba79cfa6dec111ec6ec0305bb1c72f18f7e5a6cc4f)
|
|
3522
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
3523
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
3524
|
+
props = AnomalyDetectorProps(
|
|
3525
|
+
alias=alias,
|
|
3526
|
+
configuration=configuration,
|
|
3527
|
+
workspace=workspace,
|
|
3528
|
+
evaluation_interval_in_seconds=evaluation_interval_in_seconds,
|
|
3529
|
+
labels=labels,
|
|
3530
|
+
missing_data_action=missing_data_action,
|
|
3531
|
+
)
|
|
3532
|
+
|
|
3533
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
3534
|
+
|
|
3535
|
+
@jsii.member(jsii_name="isAnomalyDetector")
|
|
3536
|
+
@builtins.classmethod
|
|
3537
|
+
def is_anomaly_detector(cls, x: typing.Any) -> builtins.bool:
|
|
3538
|
+
'''
|
|
3539
|
+
:param x: -
|
|
3540
|
+
'''
|
|
3541
|
+
if __debug__:
|
|
3542
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c5a92d8e3a483a119470088f310c1ea46fcbcafd285ccfeed903da2461af3188)
|
|
3543
|
+
check_type(argname="argument x", value=x, expected_type=type_hints["x"])
|
|
3544
|
+
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isAnomalyDetector", [x]))
|
|
3545
|
+
|
|
3546
|
+
@builtins.property
|
|
3547
|
+
@jsii.member(jsii_name="alias")
|
|
3548
|
+
def alias(self) -> builtins.str:
|
|
3549
|
+
'''The user-friendly name of the anomaly detector. 1 to 64 characters length.
|
|
3550
|
+
|
|
3551
|
+
Minimum length of 1. Maximum length of 64.
|
|
3552
|
+
Pattern: [0-9A-Za-z][-.0-9A-Z_a-z]*
|
|
3553
|
+
'''
|
|
3554
|
+
return typing.cast(builtins.str, jsii.get(self, "alias"))
|
|
3555
|
+
|
|
3556
|
+
@builtins.property
|
|
3557
|
+
@jsii.member(jsii_name="anomalyDetectorArn")
|
|
3558
|
+
def anomaly_detector_arn(self) -> builtins.str:
|
|
3559
|
+
'''The Amazon Resource Name (ARN) of the anomaly detector.'''
|
|
3560
|
+
return typing.cast(builtins.str, jsii.get(self, "anomalyDetectorArn"))
|
|
3561
|
+
|
|
3562
|
+
@builtins.property
|
|
3563
|
+
@jsii.member(jsii_name="configuration")
|
|
3564
|
+
def configuration(self) -> "AnomalyDetectorConfiguration":
|
|
3565
|
+
'''The algorithm configuration of the anomaly detector.'''
|
|
3566
|
+
return typing.cast("AnomalyDetectorConfiguration", jsii.get(self, "configuration"))
|
|
3567
|
+
|
|
3568
|
+
@builtins.property
|
|
3569
|
+
@jsii.member(jsii_name="workspace")
|
|
3570
|
+
def workspace(self) -> "IWorkspace":
|
|
3571
|
+
'''An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.'''
|
|
3572
|
+
return typing.cast("IWorkspace", jsii.get(self, "workspace"))
|
|
3573
|
+
|
|
3574
|
+
@builtins.property
|
|
3575
|
+
@jsii.member(jsii_name="evaluationIntervalInSeconds")
|
|
3576
|
+
def evaluation_interval_in_seconds(self) -> typing.Optional[jsii.Number]:
|
|
3577
|
+
'''The frequency, in seconds, at which the anomaly detector evaluates metrics.
|
|
3578
|
+
|
|
3579
|
+
Minimum value of 30. Maximum value of 86400.
|
|
3580
|
+
'''
|
|
3581
|
+
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "evaluationIntervalInSeconds"))
|
|
3582
|
+
|
|
3583
|
+
@builtins.property
|
|
3584
|
+
@jsii.member(jsii_name="labels")
|
|
3585
|
+
def labels(self) -> typing.Optional[typing.List["Label"]]:
|
|
3586
|
+
'''The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
|
|
3587
|
+
|
|
3588
|
+
Map Entries: Minimum number of 0 items. Maximum number of 140 items.
|
|
3589
|
+
Key Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
3590
|
+
Key Pattern: (?!__)[a-zA-Z_][a-zA-Z0-9_]*
|
|
3591
|
+
Value Length Constraints: Minimum length of 1. Maximum length of 7168.
|
|
3592
|
+
'''
|
|
3593
|
+
return typing.cast(typing.Optional[typing.List["Label"]], jsii.get(self, "labels"))
|
|
3594
|
+
|
|
3595
|
+
@builtins.property
|
|
3596
|
+
@jsii.member(jsii_name="missingDataAction")
|
|
3597
|
+
def missing_data_action(self) -> typing.Optional["MissingDataAction"]:
|
|
3598
|
+
'''The action taken when data is missing during evaluation.'''
|
|
3599
|
+
return typing.cast(typing.Optional["MissingDataAction"], jsii.get(self, "missingDataAction"))
|
|
3600
|
+
|
|
3601
|
+
|
|
3602
|
+
__all__ = [
|
|
3603
|
+
"AmpConfiguration",
|
|
3604
|
+
"AnomalyDetector",
|
|
3605
|
+
"AnomalyDetectorBase",
|
|
3606
|
+
"AnomalyDetectorConfiguration",
|
|
3607
|
+
"AnomalyDetectorProps",
|
|
3608
|
+
"CloudWatchLogDestination",
|
|
3609
|
+
"Destination",
|
|
3610
|
+
"EksConfiguration",
|
|
3611
|
+
"IAnomalyDetector",
|
|
3612
|
+
"IResourcePolicy",
|
|
3613
|
+
"IRuleGroupsNamespace",
|
|
3614
|
+
"IScraper",
|
|
3615
|
+
"IWorkspace",
|
|
3616
|
+
"IgnoreNearExpected",
|
|
3617
|
+
"Label",
|
|
3618
|
+
"LimitsPerLabelSet",
|
|
3619
|
+
"LimitsPerLabelSetEntry",
|
|
3620
|
+
"LoggingConfiguration",
|
|
3621
|
+
"LoggingDestination",
|
|
3622
|
+
"LoggingFilter",
|
|
3623
|
+
"MissingDataAction",
|
|
3624
|
+
"QueryLoggingConfiguration",
|
|
3625
|
+
"RandomCutForestConfiguration",
|
|
3626
|
+
"ResourcePolicy",
|
|
3627
|
+
"ResourcePolicyBase",
|
|
3628
|
+
"ResourcePolicyProps",
|
|
3629
|
+
"RoleConfiguration",
|
|
3630
|
+
"RuleGroupsNamespace",
|
|
3631
|
+
"RuleGroupsNamespaceAttributes",
|
|
3632
|
+
"RuleGroupsNamespaceBase",
|
|
3633
|
+
"RuleGroupsNamespaceProps",
|
|
3634
|
+
"ScrapeConfiguration",
|
|
3635
|
+
"Scraper",
|
|
3636
|
+
"ScraperAttributes",
|
|
3637
|
+
"ScraperBase",
|
|
3638
|
+
"ScraperProps",
|
|
3639
|
+
"Source",
|
|
3640
|
+
"Workspace",
|
|
3641
|
+
"WorkspaceAttributes",
|
|
3642
|
+
"WorkspaceBase",
|
|
3643
|
+
"WorkspaceConfiguration",
|
|
3644
|
+
"WorkspaceProps",
|
|
3645
|
+
]
|
|
3646
|
+
|
|
3647
|
+
publication.publish()
|
|
3648
|
+
|
|
3649
|
+
def _typecheckingstub__9b57f1ed441699407024d3a67f6d0ecf1fd33175a38d466e4e90e190923b70a0(
|
|
3650
|
+
*,
|
|
3651
|
+
workspace: IWorkspace,
|
|
3652
|
+
) -> None:
|
|
3653
|
+
"""Type checking stubs"""
|
|
3654
|
+
pass
|
|
3655
|
+
|
|
3656
|
+
def _typecheckingstub__488e50421526d1e316a7bd2f186eccb1fc4bf1daba066e779c147e9e9dbc747a(
|
|
3657
|
+
*,
|
|
3658
|
+
random_cut_forest: typing.Union[RandomCutForestConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3659
|
+
) -> None:
|
|
3660
|
+
"""Type checking stubs"""
|
|
3661
|
+
pass
|
|
3662
|
+
|
|
3663
|
+
def _typecheckingstub__d73bc4f90dcbc90f45d5d011fc423d2638eb9cfe65810e23594184c620ce38aa(
|
|
3664
|
+
*,
|
|
3665
|
+
alias: builtins.str,
|
|
3666
|
+
configuration: typing.Union[AnomalyDetectorConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3667
|
+
workspace: IWorkspace,
|
|
3668
|
+
evaluation_interval_in_seconds: typing.Optional[jsii.Number] = None,
|
|
3669
|
+
labels: typing.Optional[typing.Sequence[typing.Union[Label, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
3670
|
+
missing_data_action: typing.Optional[typing.Union[MissingDataAction, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3671
|
+
) -> None:
|
|
3672
|
+
"""Type checking stubs"""
|
|
3673
|
+
pass
|
|
3674
|
+
|
|
3675
|
+
def _typecheckingstub__f4c8d116f44cd0ce0c010e39612b1f9f3d190e82d3f5f4c0372ae03517a31a79(
|
|
3676
|
+
*,
|
|
3677
|
+
log_group: _aws_cdk_aws_logs_ceddda9d.ILogGroup,
|
|
3678
|
+
) -> None:
|
|
3679
|
+
"""Type checking stubs"""
|
|
3680
|
+
pass
|
|
3681
|
+
|
|
3682
|
+
def _typecheckingstub__f247dc1883eff5c9525a2e09081bf65d9f34dc7f9581f5fcb643b104e14afa09(
|
|
3683
|
+
*,
|
|
3684
|
+
amp_configuration: typing.Union[AmpConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3685
|
+
) -> None:
|
|
3686
|
+
"""Type checking stubs"""
|
|
3687
|
+
pass
|
|
3688
|
+
|
|
3689
|
+
def _typecheckingstub__9e3526038ce65e3714e7b69cac8f1dac03b300f7ee7b6eb0a81f578bb9386261(
|
|
3690
|
+
*,
|
|
3691
|
+
cluster: _aws_cdk_aws_eks_ceddda9d.ICluster,
|
|
3692
|
+
subnets: typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISubnet],
|
|
3693
|
+
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
3694
|
+
) -> None:
|
|
3695
|
+
"""Type checking stubs"""
|
|
3696
|
+
pass
|
|
3697
|
+
|
|
3698
|
+
def _typecheckingstub__fa12ec68028f74d5d8f1d96a0b99090659c404c86bd0ec936014ab264467ca22(
|
|
3699
|
+
*,
|
|
3700
|
+
amount: typing.Optional[jsii.Number] = None,
|
|
3701
|
+
ratio: typing.Optional[jsii.Number] = None,
|
|
3702
|
+
) -> None:
|
|
3703
|
+
"""Type checking stubs"""
|
|
3704
|
+
pass
|
|
3705
|
+
|
|
3706
|
+
def _typecheckingstub__5c797aa51820ba19e3974b523e246d357e3b44ff0bc743b0f1171b5ae9bebdea(
|
|
3707
|
+
*,
|
|
3708
|
+
name: builtins.str,
|
|
3709
|
+
value: builtins.str,
|
|
3710
|
+
) -> None:
|
|
3711
|
+
"""Type checking stubs"""
|
|
3712
|
+
pass
|
|
3713
|
+
|
|
3714
|
+
def _typecheckingstub__6893b1308b220935b9f1ce7c4eae4ddc73c29be6663d247911732ccfcec7f4d9(
|
|
3715
|
+
*,
|
|
3716
|
+
label_set: typing.Sequence[typing.Union[Label, typing.Dict[builtins.str, typing.Any]]],
|
|
3717
|
+
limits: typing.Union[LimitsPerLabelSetEntry, typing.Dict[builtins.str, typing.Any]],
|
|
3718
|
+
) -> None:
|
|
3719
|
+
"""Type checking stubs"""
|
|
3720
|
+
pass
|
|
3721
|
+
|
|
3722
|
+
def _typecheckingstub__f53acc1bbc1fb66aa75ed0ff80395c4fd66be1563ee572788afab4e42af12da4(
|
|
3723
|
+
*,
|
|
3724
|
+
max_series: typing.Optional[jsii.Number] = None,
|
|
3725
|
+
) -> None:
|
|
3726
|
+
"""Type checking stubs"""
|
|
3727
|
+
pass
|
|
3728
|
+
|
|
3729
|
+
def _typecheckingstub__282c7cd599e82904024934838ca325999d8149f211c5885145973734c9c85b76(
|
|
3730
|
+
*,
|
|
3731
|
+
log_group: typing.Optional[_aws_cdk_aws_logs_ceddda9d.ILogGroup] = None,
|
|
3732
|
+
) -> None:
|
|
3733
|
+
"""Type checking stubs"""
|
|
3734
|
+
pass
|
|
3735
|
+
|
|
3736
|
+
def _typecheckingstub__2496000b19af109fb0c5c290e32ab9bbc75be51fbfa27d16758c01f8baf00891(
|
|
3737
|
+
*,
|
|
3738
|
+
cloud_watch_logs: typing.Union[CloudWatchLogDestination, typing.Dict[builtins.str, typing.Any]],
|
|
3739
|
+
filters: typing.Union[LoggingFilter, typing.Dict[builtins.str, typing.Any]],
|
|
3740
|
+
) -> None:
|
|
3741
|
+
"""Type checking stubs"""
|
|
3742
|
+
pass
|
|
3743
|
+
|
|
3744
|
+
def _typecheckingstub__c7beea1121128e5f35f0720b90b21713abba4beef8755e891bbf87c2ad9711a0(
|
|
3745
|
+
*,
|
|
3746
|
+
qsp_threshold: jsii.Number,
|
|
3747
|
+
) -> None:
|
|
3748
|
+
"""Type checking stubs"""
|
|
3749
|
+
pass
|
|
3750
|
+
|
|
3751
|
+
def _typecheckingstub__4de31fdb80b9646037b68b88ae1dae6b46be704ab84a3c61100b29e91fc959c2(
|
|
3752
|
+
*,
|
|
3753
|
+
mark_as_anomaly: typing.Optional[builtins.bool] = None,
|
|
3754
|
+
skip: typing.Optional[builtins.bool] = None,
|
|
3755
|
+
) -> None:
|
|
3756
|
+
"""Type checking stubs"""
|
|
3757
|
+
pass
|
|
3758
|
+
|
|
3759
|
+
def _typecheckingstub__092820c29e1435155b193e5488fd2841dcea5141110ab984fa14a237e2f4a4ae(
|
|
3760
|
+
*,
|
|
3761
|
+
destinations: typing.Sequence[typing.Union[LoggingDestination, typing.Dict[builtins.str, typing.Any]]],
|
|
3762
|
+
) -> None:
|
|
3763
|
+
"""Type checking stubs"""
|
|
3764
|
+
pass
|
|
3765
|
+
|
|
3766
|
+
def _typecheckingstub__c44dedd708a153df90c20f2738e66c34f510bb7ed036637ccb7a1bde1f3394b8(
|
|
3767
|
+
*,
|
|
3768
|
+
query: builtins.str,
|
|
3769
|
+
ignore_near_expected_from_above: typing.Optional[typing.Union[IgnoreNearExpected, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3770
|
+
ignore_near_expected_from_below: typing.Optional[typing.Union[IgnoreNearExpected, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3771
|
+
sample_size: typing.Optional[jsii.Number] = None,
|
|
3772
|
+
shingle_size: typing.Optional[jsii.Number] = None,
|
|
3773
|
+
) -> None:
|
|
3774
|
+
"""Type checking stubs"""
|
|
3775
|
+
pass
|
|
3776
|
+
|
|
3777
|
+
def _typecheckingstub__1705a6716ddb826f74670d4b351789ae363cbbc6a4fda6389f3fe972e4ad37e8(
|
|
3778
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3779
|
+
id: builtins.str,
|
|
3780
|
+
*,
|
|
3781
|
+
account: typing.Optional[builtins.str] = None,
|
|
3782
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
3783
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
3784
|
+
region: typing.Optional[builtins.str] = None,
|
|
3785
|
+
) -> None:
|
|
3786
|
+
"""Type checking stubs"""
|
|
3787
|
+
pass
|
|
3788
|
+
|
|
3789
|
+
def _typecheckingstub__e64bdaac8096e1f570bf3bdd34320a336689a41b7fadad148bbe26533f682a36(
|
|
3790
|
+
*,
|
|
3791
|
+
policy_document: builtins.str,
|
|
3792
|
+
workspace: IWorkspace,
|
|
3793
|
+
) -> None:
|
|
3794
|
+
"""Type checking stubs"""
|
|
3795
|
+
pass
|
|
3796
|
+
|
|
3797
|
+
def _typecheckingstub__e96c135bdcece9823caf073421082af151c59b6d52a5918bb38689bbca7ab2a3(
|
|
3798
|
+
*,
|
|
3799
|
+
source_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
|
|
3800
|
+
target_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
|
|
3801
|
+
) -> None:
|
|
3802
|
+
"""Type checking stubs"""
|
|
3803
|
+
pass
|
|
3804
|
+
|
|
3805
|
+
def _typecheckingstub__aca59ceb33a6b456771bcbba45d97752cb2f2f13917c19b7e97cd69b7f165a45(
|
|
3806
|
+
*,
|
|
3807
|
+
data: builtins.str,
|
|
3808
|
+
name: builtins.str,
|
|
3809
|
+
rule_groups_namespace_arn: builtins.str,
|
|
3810
|
+
workspace: IWorkspace,
|
|
3811
|
+
) -> None:
|
|
3812
|
+
"""Type checking stubs"""
|
|
3813
|
+
pass
|
|
3814
|
+
|
|
3815
|
+
def _typecheckingstub__54435341b8b1c3c7efe004b41ef5c6d515fe3983bc74fae1b1b26947b9d05f20(
|
|
3816
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3817
|
+
id: builtins.str,
|
|
3818
|
+
*,
|
|
3819
|
+
account: typing.Optional[builtins.str] = None,
|
|
3820
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
3821
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
3822
|
+
region: typing.Optional[builtins.str] = None,
|
|
3823
|
+
) -> None:
|
|
3824
|
+
"""Type checking stubs"""
|
|
3825
|
+
pass
|
|
3826
|
+
|
|
3827
|
+
def _typecheckingstub__38cadfd9b05a1407d50e98748f6488d0e79d3484e75c5786ea83b3235d73c3e1(
|
|
3828
|
+
*,
|
|
3829
|
+
data: builtins.str,
|
|
3830
|
+
name: builtins.str,
|
|
3831
|
+
workspace: IWorkspace,
|
|
3832
|
+
) -> None:
|
|
3833
|
+
"""Type checking stubs"""
|
|
3834
|
+
pass
|
|
3835
|
+
|
|
3836
|
+
def _typecheckingstub__6313d0a5d8e3eda66be90025eafb5520d36fb7fb11adbc40c4398cb56b0ce09d(
|
|
3837
|
+
*,
|
|
3838
|
+
configuration_blob: builtins.str,
|
|
3839
|
+
) -> None:
|
|
3840
|
+
"""Type checking stubs"""
|
|
3841
|
+
pass
|
|
3842
|
+
|
|
3843
|
+
def _typecheckingstub__2aab74937b2fefec81fb3f25317393581e00fbda88f9d176c61fd521a9189d81(
|
|
3844
|
+
*,
|
|
3845
|
+
destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
|
|
3846
|
+
scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3847
|
+
scraper_arn: builtins.str,
|
|
3848
|
+
source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
|
|
3849
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3850
|
+
role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3851
|
+
) -> None:
|
|
3852
|
+
"""Type checking stubs"""
|
|
3853
|
+
pass
|
|
3854
|
+
|
|
3855
|
+
def _typecheckingstub__79f44dd804edbb4f2d30815f15d40d8f8c94bc90ec7657ced6d4b8716930412f(
|
|
3856
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3857
|
+
id: builtins.str,
|
|
3858
|
+
*,
|
|
3859
|
+
account: typing.Optional[builtins.str] = None,
|
|
3860
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
3861
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
3862
|
+
region: typing.Optional[builtins.str] = None,
|
|
3863
|
+
) -> None:
|
|
3864
|
+
"""Type checking stubs"""
|
|
3865
|
+
pass
|
|
3866
|
+
|
|
3867
|
+
def _typecheckingstub__720023f01199e16b0b50b3928b380b6c70d0c625eb677c6631c94d1822effb36(
|
|
3868
|
+
scraper_arn: builtins.str,
|
|
3869
|
+
) -> None:
|
|
3870
|
+
"""Type checking stubs"""
|
|
3871
|
+
pass
|
|
3872
|
+
|
|
3873
|
+
def _typecheckingstub__e27ba8269266aa91c926829a5c485aaf203a6638ce54c2fced4fdf950ba2e944(
|
|
3874
|
+
*,
|
|
3875
|
+
destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
|
|
3876
|
+
scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3877
|
+
source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
|
|
3878
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3879
|
+
role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3880
|
+
) -> None:
|
|
3881
|
+
"""Type checking stubs"""
|
|
3882
|
+
pass
|
|
3883
|
+
|
|
3884
|
+
def _typecheckingstub__2f45388bb39e3b47ec674e4da970163a87c5fb85665ad1fc10517bafda034ad5(
|
|
3885
|
+
*,
|
|
3886
|
+
eks_configuration: typing.Union[EksConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
3887
|
+
) -> None:
|
|
3888
|
+
"""Type checking stubs"""
|
|
3889
|
+
pass
|
|
3890
|
+
|
|
3891
|
+
def _typecheckingstub__bbfa4d3de7b456e3faeccf136f83095036d68c2058e82076f7a678eeac164e17(
|
|
3892
|
+
*,
|
|
3893
|
+
workspace_arn: builtins.str,
|
|
3894
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
3895
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3896
|
+
kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
3897
|
+
logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3898
|
+
query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3899
|
+
workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3900
|
+
) -> None:
|
|
3901
|
+
"""Type checking stubs"""
|
|
3902
|
+
pass
|
|
3903
|
+
|
|
3904
|
+
def _typecheckingstub__26324cd5062f2f5ec83013af6d021bcb8f2e2c6d4df14147a97bf35d099c4a1b(
|
|
3905
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3906
|
+
id: builtins.str,
|
|
3907
|
+
*,
|
|
3908
|
+
account: typing.Optional[builtins.str] = None,
|
|
3909
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
3910
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
3911
|
+
region: typing.Optional[builtins.str] = None,
|
|
3912
|
+
) -> None:
|
|
3913
|
+
"""Type checking stubs"""
|
|
3914
|
+
pass
|
|
3915
|
+
|
|
3916
|
+
def _typecheckingstub__d3ac750f120961e0958cd690a53ccc4e09d55d88803a7e53ed9bc1e70a3a9a78(
|
|
3917
|
+
workspace_arn: builtins.str,
|
|
3918
|
+
) -> None:
|
|
3919
|
+
"""Type checking stubs"""
|
|
3920
|
+
pass
|
|
3921
|
+
|
|
3922
|
+
def _typecheckingstub__ae4d82a0bb8d7f12fbf4cbe9ccc1b9bdb2415b0517e902e2bdbf5e5546c092ce(
|
|
3923
|
+
*,
|
|
3924
|
+
limits_per_label_sets: typing.Optional[typing.Sequence[typing.Union[LimitsPerLabelSet, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
3925
|
+
retention_period_in_days: typing.Optional[jsii.Number] = None,
|
|
3926
|
+
) -> None:
|
|
3927
|
+
"""Type checking stubs"""
|
|
3928
|
+
pass
|
|
3929
|
+
|
|
3930
|
+
def _typecheckingstub__204cf0cc18e2fd2c643a33020d11a1d61cbfe8a2abd5cd5bda6a222e017e12ef(
|
|
3931
|
+
*,
|
|
3932
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
3933
|
+
alias: typing.Optional[builtins.str] = None,
|
|
3934
|
+
kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
3935
|
+
logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3936
|
+
query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3937
|
+
workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3938
|
+
) -> None:
|
|
3939
|
+
"""Type checking stubs"""
|
|
3940
|
+
pass
|
|
3941
|
+
|
|
3942
|
+
def _typecheckingstub__763ce8aef513d695a9ea5e157a4299be537296b8475d4cac315b4f595f7d0536(
|
|
3943
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3944
|
+
id: builtins.str,
|
|
3945
|
+
*,
|
|
3946
|
+
account: typing.Optional[builtins.str] = None,
|
|
3947
|
+
environment_from_arn: typing.Optional[builtins.str] = None,
|
|
3948
|
+
physical_name: typing.Optional[builtins.str] = None,
|
|
3949
|
+
region: typing.Optional[builtins.str] = None,
|
|
3950
|
+
) -> None:
|
|
3951
|
+
"""Type checking stubs"""
|
|
3952
|
+
pass
|
|
3953
|
+
|
|
3954
|
+
def _typecheckingstub__152018d2f86ee27c3ac817bf409dc2fae4034315290b87fd5d6c906625b633d3(
|
|
3955
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3956
|
+
id: builtins.str,
|
|
3957
|
+
*,
|
|
3958
|
+
policy_document: builtins.str,
|
|
3959
|
+
workspace: IWorkspace,
|
|
3960
|
+
) -> None:
|
|
3961
|
+
"""Type checking stubs"""
|
|
3962
|
+
pass
|
|
3963
|
+
|
|
3964
|
+
def _typecheckingstub__b7b7c7ca19cd491541f3243572cf47da8425bab13c98330c2653c2302cfa6b53(
|
|
3965
|
+
x: typing.Any,
|
|
3966
|
+
) -> None:
|
|
3967
|
+
"""Type checking stubs"""
|
|
3968
|
+
pass
|
|
3969
|
+
|
|
3970
|
+
def _typecheckingstub__6d20ad42e4be3f2ea717b0a2a018087c9c8a4437ea677e47f420ba1b0b9d445d(
|
|
3971
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3972
|
+
id: builtins.str,
|
|
3973
|
+
*,
|
|
3974
|
+
data: builtins.str,
|
|
3975
|
+
name: builtins.str,
|
|
3976
|
+
workspace: IWorkspace,
|
|
3977
|
+
) -> None:
|
|
3978
|
+
"""Type checking stubs"""
|
|
3979
|
+
pass
|
|
3980
|
+
|
|
3981
|
+
def _typecheckingstub__07bf6a97084316812dac20b3c71ddb45a75f79b4a8ec626bd6762069ada7d925(
|
|
3982
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
3983
|
+
id: builtins.str,
|
|
3984
|
+
*,
|
|
3985
|
+
data: builtins.str,
|
|
3986
|
+
name: builtins.str,
|
|
3987
|
+
rule_groups_namespace_arn: builtins.str,
|
|
3988
|
+
workspace: IWorkspace,
|
|
3989
|
+
) -> None:
|
|
3990
|
+
"""Type checking stubs"""
|
|
3991
|
+
pass
|
|
3992
|
+
|
|
3993
|
+
def _typecheckingstub__9f121730976c1abb9dd8b8aeb3d4783892a3f693e887909348c16a32681593f4(
|
|
3994
|
+
x: typing.Any,
|
|
3995
|
+
) -> None:
|
|
3996
|
+
"""Type checking stubs"""
|
|
3997
|
+
pass
|
|
3998
|
+
|
|
3999
|
+
def _typecheckingstub__420a8a3c500b6acbf7b84e9b716db0e0256ad4fe2f714daf764abfebb254c38a(
|
|
4000
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
4001
|
+
id: builtins.str,
|
|
4002
|
+
*,
|
|
4003
|
+
destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
|
|
4004
|
+
scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
4005
|
+
source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
|
|
4006
|
+
alias: typing.Optional[builtins.str] = None,
|
|
4007
|
+
role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4008
|
+
) -> None:
|
|
4009
|
+
"""Type checking stubs"""
|
|
4010
|
+
pass
|
|
4011
|
+
|
|
4012
|
+
def _typecheckingstub__a782eecfe3a632aac5c0103f9029c7ec8a0b5f2ac8b500e9a0257a762eda243d(
|
|
4013
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
4014
|
+
id: builtins.str,
|
|
4015
|
+
*,
|
|
4016
|
+
destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
|
|
4017
|
+
scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
4018
|
+
scraper_arn: builtins.str,
|
|
4019
|
+
source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
|
|
4020
|
+
alias: typing.Optional[builtins.str] = None,
|
|
4021
|
+
role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4022
|
+
) -> None:
|
|
4023
|
+
"""Type checking stubs"""
|
|
4024
|
+
pass
|
|
4025
|
+
|
|
4026
|
+
def _typecheckingstub__34e6af43e419cebdae94e53a8eb7f2112edcf143a28894ce155d8f3be94b5f49(
|
|
4027
|
+
x: typing.Any,
|
|
4028
|
+
) -> None:
|
|
4029
|
+
"""Type checking stubs"""
|
|
4030
|
+
pass
|
|
4031
|
+
|
|
4032
|
+
def _typecheckingstub__fce396480613eba99c44ddbc02181012d71649d36c3a0187e9437c5268bc1cd8(
|
|
4033
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
4034
|
+
id: builtins.str,
|
|
4035
|
+
*,
|
|
4036
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
4037
|
+
alias: typing.Optional[builtins.str] = None,
|
|
4038
|
+
kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
4039
|
+
logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4040
|
+
query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4041
|
+
workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4042
|
+
) -> None:
|
|
4043
|
+
"""Type checking stubs"""
|
|
4044
|
+
pass
|
|
4045
|
+
|
|
4046
|
+
def _typecheckingstub__06e9f0a4ada069956fea79835fad029b7339fca1059f54a6118f01854e5e44ed(
|
|
4047
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
4048
|
+
id: builtins.str,
|
|
4049
|
+
*,
|
|
4050
|
+
workspace_arn: builtins.str,
|
|
4051
|
+
alert_manager_definition: typing.Optional[builtins.str] = None,
|
|
4052
|
+
alias: typing.Optional[builtins.str] = None,
|
|
4053
|
+
kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
|
|
4054
|
+
logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4055
|
+
query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4056
|
+
workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4057
|
+
) -> None:
|
|
4058
|
+
"""Type checking stubs"""
|
|
4059
|
+
pass
|
|
4060
|
+
|
|
4061
|
+
def _typecheckingstub__fe05f7c3509dfbf0a171e57ba19ea445d159aeb564d5e5a1ee5815df73224518(
|
|
4062
|
+
x: typing.Any,
|
|
4063
|
+
) -> None:
|
|
4064
|
+
"""Type checking stubs"""
|
|
4065
|
+
pass
|
|
4066
|
+
|
|
4067
|
+
def _typecheckingstub__8e9cf951baecb48090e806ba79cfa6dec111ec6ec0305bb1c72f18f7e5a6cc4f(
|
|
4068
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
4069
|
+
id: builtins.str,
|
|
4070
|
+
*,
|
|
4071
|
+
alias: builtins.str,
|
|
4072
|
+
configuration: typing.Union[AnomalyDetectorConfiguration, typing.Dict[builtins.str, typing.Any]],
|
|
4073
|
+
workspace: IWorkspace,
|
|
4074
|
+
evaluation_interval_in_seconds: typing.Optional[jsii.Number] = None,
|
|
4075
|
+
labels: typing.Optional[typing.Sequence[typing.Union[Label, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
4076
|
+
missing_data_action: typing.Optional[typing.Union[MissingDataAction, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4077
|
+
) -> None:
|
|
4078
|
+
"""Type checking stubs"""
|
|
4079
|
+
pass
|
|
4080
|
+
|
|
4081
|
+
def _typecheckingstub__c5a92d8e3a483a119470088f310c1ea46fcbcafd285ccfeed903da2461af3188(
|
|
4082
|
+
x: typing.Any,
|
|
4083
|
+
) -> None:
|
|
4084
|
+
"""Type checking stubs"""
|
|
4085
|
+
pass
|
|
4086
|
+
|
|
4087
|
+
for cls in [IAnomalyDetector, IResourcePolicy, IRuleGroupsNamespace, IScraper, IWorkspace]:
|
|
4088
|
+
typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])
|