robhan-cdk-lib.aws-aps 0.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of robhan-cdk-lib.aws-aps might be problematic. Click here for more details.

@@ -0,0 +1,2954 @@
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.CloudWatchLogDestination",
147
+ jsii_struct_bases=[],
148
+ name_mapping={"log_group": "logGroup"},
149
+ )
150
+ class CloudWatchLogDestination:
151
+ def __init__(self, *, log_group: _aws_cdk_aws_logs_ceddda9d.ILogGroup) -> None:
152
+ '''Configuration details for logging to CloudWatch Logs.
153
+
154
+ :param log_group: The CloudWatch log group.
155
+ '''
156
+ if __debug__:
157
+ type_hints = typing.get_type_hints(_typecheckingstub__f4c8d116f44cd0ce0c010e39612b1f9f3d190e82d3f5f4c0372ae03517a31a79)
158
+ check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
159
+ self._values: typing.Dict[builtins.str, typing.Any] = {
160
+ "log_group": log_group,
161
+ }
162
+
163
+ @builtins.property
164
+ def log_group(self) -> _aws_cdk_aws_logs_ceddda9d.ILogGroup:
165
+ '''The CloudWatch log group.'''
166
+ result = self._values.get("log_group")
167
+ assert result is not None, "Required property 'log_group' is missing"
168
+ return typing.cast(_aws_cdk_aws_logs_ceddda9d.ILogGroup, result)
169
+
170
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
171
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
172
+
173
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
174
+ return not (rhs == self)
175
+
176
+ def __repr__(self) -> str:
177
+ return "CloudWatchLogDestination(%s)" % ", ".join(
178
+ k + "=" + repr(v) for k, v in self._values.items()
179
+ )
180
+
181
+
182
+ @jsii.data_type(
183
+ jsii_type="@robhan-cdk-lib/aws_aps.Destination",
184
+ jsii_struct_bases=[],
185
+ name_mapping={"amp_configuration": "ampConfiguration"},
186
+ )
187
+ class Destination:
188
+ def __init__(
189
+ self,
190
+ *,
191
+ amp_configuration: typing.Union[AmpConfiguration, typing.Dict[builtins.str, typing.Any]],
192
+ ) -> None:
193
+ '''Where to send the metrics from a scraper.
194
+
195
+ :param amp_configuration: The Amazon Managed Service for Prometheus workspace to send metrics to.
196
+ '''
197
+ if isinstance(amp_configuration, dict):
198
+ amp_configuration = AmpConfiguration(**amp_configuration)
199
+ if __debug__:
200
+ type_hints = typing.get_type_hints(_typecheckingstub__f247dc1883eff5c9525a2e09081bf65d9f34dc7f9581f5fcb643b104e14afa09)
201
+ check_type(argname="argument amp_configuration", value=amp_configuration, expected_type=type_hints["amp_configuration"])
202
+ self._values: typing.Dict[builtins.str, typing.Any] = {
203
+ "amp_configuration": amp_configuration,
204
+ }
205
+
206
+ @builtins.property
207
+ def amp_configuration(self) -> AmpConfiguration:
208
+ '''The Amazon Managed Service for Prometheus workspace to send metrics to.'''
209
+ result = self._values.get("amp_configuration")
210
+ assert result is not None, "Required property 'amp_configuration' is missing"
211
+ return typing.cast(AmpConfiguration, result)
212
+
213
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
214
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
215
+
216
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
217
+ return not (rhs == self)
218
+
219
+ def __repr__(self) -> str:
220
+ return "Destination(%s)" % ", ".join(
221
+ k + "=" + repr(v) for k, v in self._values.items()
222
+ )
223
+
224
+
225
+ @jsii.data_type(
226
+ jsii_type="@robhan-cdk-lib/aws_aps.EksConfiguration",
227
+ jsii_struct_bases=[],
228
+ name_mapping={
229
+ "cluster": "cluster",
230
+ "subnets": "subnets",
231
+ "security_groups": "securityGroups",
232
+ },
233
+ )
234
+ class EksConfiguration:
235
+ def __init__(
236
+ self,
237
+ *,
238
+ cluster: _aws_cdk_aws_eks_ceddda9d.ICluster,
239
+ subnets: typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISubnet],
240
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
241
+ ) -> None:
242
+ '''The EksConfiguration structure describes the connection to the Amazon EKS cluster from which a scraper collects metrics.
243
+
244
+ :param cluster: The Amazon EKS cluster.
245
+ :param subnets: A list of subnets for the Amazon EKS cluster VPC configuration. Min 1, max 5.
246
+ :param security_groups: A list of the security group IDs for the Amazon EKS cluster VPC configuration. Min 1, max 5.
247
+ '''
248
+ if __debug__:
249
+ type_hints = typing.get_type_hints(_typecheckingstub__9e3526038ce65e3714e7b69cac8f1dac03b300f7ee7b6eb0a81f578bb9386261)
250
+ check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
251
+ check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
252
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
253
+ self._values: typing.Dict[builtins.str, typing.Any] = {
254
+ "cluster": cluster,
255
+ "subnets": subnets,
256
+ }
257
+ if security_groups is not None:
258
+ self._values["security_groups"] = security_groups
259
+
260
+ @builtins.property
261
+ def cluster(self) -> _aws_cdk_aws_eks_ceddda9d.ICluster:
262
+ '''The Amazon EKS cluster.'''
263
+ result = self._values.get("cluster")
264
+ assert result is not None, "Required property 'cluster' is missing"
265
+ return typing.cast(_aws_cdk_aws_eks_ceddda9d.ICluster, result)
266
+
267
+ @builtins.property
268
+ def subnets(self) -> typing.List[_aws_cdk_aws_ec2_ceddda9d.ISubnet]:
269
+ '''A list of subnets for the Amazon EKS cluster VPC configuration.
270
+
271
+ Min 1, max 5.
272
+ '''
273
+ result = self._values.get("subnets")
274
+ assert result is not None, "Required property 'subnets' is missing"
275
+ return typing.cast(typing.List[_aws_cdk_aws_ec2_ceddda9d.ISubnet], result)
276
+
277
+ @builtins.property
278
+ def security_groups(
279
+ self,
280
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
281
+ '''A list of the security group IDs for the Amazon EKS cluster VPC configuration.
282
+
283
+ Min 1, max 5.
284
+ '''
285
+ result = self._values.get("security_groups")
286
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
287
+
288
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
289
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
290
+
291
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
292
+ return not (rhs == self)
293
+
294
+ def __repr__(self) -> str:
295
+ return "EksConfiguration(%s)" % ", ".join(
296
+ k + "=" + repr(v) for k, v in self._values.items()
297
+ )
298
+
299
+
300
+ @jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IRuleGroupsNamespace")
301
+ class IRuleGroupsNamespace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
302
+ @builtins.property
303
+ @jsii.member(jsii_name="data")
304
+ def data(self) -> builtins.str:
305
+ '''The rules file used in the namespace.'''
306
+ ...
307
+
308
+ @builtins.property
309
+ @jsii.member(jsii_name="name")
310
+ def name(self) -> builtins.str:
311
+ '''The name of the rule groups namespace.'''
312
+ ...
313
+
314
+ @builtins.property
315
+ @jsii.member(jsii_name="ruleGroupsNamespaceArn")
316
+ def rule_groups_namespace_arn(self) -> builtins.str:
317
+ '''The ARN of the rule groups namespace.
318
+
319
+ :attribute: true
320
+ '''
321
+ ...
322
+
323
+ @builtins.property
324
+ @jsii.member(jsii_name="workspace")
325
+ def workspace(self) -> "IWorkspace":
326
+ '''The workspace to add the rule groups namespace.'''
327
+ ...
328
+
329
+
330
+ class _IRuleGroupsNamespaceProxy(
331
+ jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
332
+ ):
333
+ __jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IRuleGroupsNamespace"
334
+
335
+ @builtins.property
336
+ @jsii.member(jsii_name="data")
337
+ def data(self) -> builtins.str:
338
+ '''The rules file used in the namespace.'''
339
+ return typing.cast(builtins.str, jsii.get(self, "data"))
340
+
341
+ @builtins.property
342
+ @jsii.member(jsii_name="name")
343
+ def name(self) -> builtins.str:
344
+ '''The name of the rule groups namespace.'''
345
+ return typing.cast(builtins.str, jsii.get(self, "name"))
346
+
347
+ @builtins.property
348
+ @jsii.member(jsii_name="ruleGroupsNamespaceArn")
349
+ def rule_groups_namespace_arn(self) -> builtins.str:
350
+ '''The ARN of the rule groups namespace.
351
+
352
+ :attribute: true
353
+ '''
354
+ return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
355
+
356
+ @builtins.property
357
+ @jsii.member(jsii_name="workspace")
358
+ def workspace(self) -> "IWorkspace":
359
+ '''The workspace to add the rule groups namespace.'''
360
+ return typing.cast("IWorkspace", jsii.get(self, "workspace"))
361
+
362
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
363
+ typing.cast(typing.Any, IRuleGroupsNamespace).__jsii_proxy_class__ = lambda : _IRuleGroupsNamespaceProxy
364
+
365
+
366
+ @jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IScraper")
367
+ class IScraper(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
368
+ @builtins.property
369
+ @jsii.member(jsii_name="destination")
370
+ def destination(self) -> Destination:
371
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
372
+ ...
373
+
374
+ @builtins.property
375
+ @jsii.member(jsii_name="scrapeConfiguration")
376
+ def scrape_configuration(self) -> "ScrapeConfiguration":
377
+ '''The configuration in use by the scraper.'''
378
+ ...
379
+
380
+ @builtins.property
381
+ @jsii.member(jsii_name="scraperArn")
382
+ def scraper_arn(self) -> builtins.str:
383
+ '''The ARN of the scraper.
384
+
385
+ :attribute: true
386
+ '''
387
+ ...
388
+
389
+ @builtins.property
390
+ @jsii.member(jsii_name="scraperId")
391
+ def scraper_id(self) -> builtins.str:
392
+ '''The ID of the scraper.
393
+
394
+ :attribute: true
395
+ '''
396
+ ...
397
+
398
+ @builtins.property
399
+ @jsii.member(jsii_name="source")
400
+ def source(self) -> "Source":
401
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
402
+ ...
403
+
404
+ @builtins.property
405
+ @jsii.member(jsii_name="alias")
406
+ def alias(self) -> typing.Optional[builtins.str]:
407
+ '''An optional user-assigned scraper alias.
408
+
409
+ 1-100 characters.
410
+
411
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
412
+ '''
413
+ ...
414
+
415
+ @builtins.property
416
+ @jsii.member(jsii_name="roleConfiguration")
417
+ def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
418
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
419
+ ...
420
+
421
+
422
+ class _IScraperProxy(
423
+ jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
424
+ ):
425
+ __jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IScraper"
426
+
427
+ @builtins.property
428
+ @jsii.member(jsii_name="destination")
429
+ def destination(self) -> Destination:
430
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
431
+ return typing.cast(Destination, jsii.get(self, "destination"))
432
+
433
+ @builtins.property
434
+ @jsii.member(jsii_name="scrapeConfiguration")
435
+ def scrape_configuration(self) -> "ScrapeConfiguration":
436
+ '''The configuration in use by the scraper.'''
437
+ return typing.cast("ScrapeConfiguration", jsii.get(self, "scrapeConfiguration"))
438
+
439
+ @builtins.property
440
+ @jsii.member(jsii_name="scraperArn")
441
+ def scraper_arn(self) -> builtins.str:
442
+ '''The ARN of the scraper.
443
+
444
+ :attribute: true
445
+ '''
446
+ return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
447
+
448
+ @builtins.property
449
+ @jsii.member(jsii_name="scraperId")
450
+ def scraper_id(self) -> builtins.str:
451
+ '''The ID of the scraper.
452
+
453
+ :attribute: true
454
+ '''
455
+ return typing.cast(builtins.str, jsii.get(self, "scraperId"))
456
+
457
+ @builtins.property
458
+ @jsii.member(jsii_name="source")
459
+ def source(self) -> "Source":
460
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
461
+ return typing.cast("Source", jsii.get(self, "source"))
462
+
463
+ @builtins.property
464
+ @jsii.member(jsii_name="alias")
465
+ def alias(self) -> typing.Optional[builtins.str]:
466
+ '''An optional user-assigned scraper alias.
467
+
468
+ 1-100 characters.
469
+
470
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
471
+ '''
472
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
473
+
474
+ @builtins.property
475
+ @jsii.member(jsii_name="roleConfiguration")
476
+ def role_configuration(self) -> typing.Optional["RoleConfiguration"]:
477
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
478
+ return typing.cast(typing.Optional["RoleConfiguration"], jsii.get(self, "roleConfiguration"))
479
+
480
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
481
+ typing.cast(typing.Any, IScraper).__jsii_proxy_class__ = lambda : _IScraperProxy
482
+
483
+
484
+ @jsii.interface(jsii_type="@robhan-cdk-lib/aws_aps.IWorkspace")
485
+ class IWorkspace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
486
+ @builtins.property
487
+ @jsii.member(jsii_name="workspaceArn")
488
+ def workspace_arn(self) -> builtins.str:
489
+ '''The ARN of the workspace.
490
+
491
+ :attribute: true
492
+ '''
493
+ ...
494
+
495
+ @builtins.property
496
+ @jsii.member(jsii_name="workspaceId")
497
+ def workspace_id(self) -> builtins.str:
498
+ '''The unique ID for the workspace.
499
+
500
+ :attribute: true
501
+ '''
502
+ ...
503
+
504
+ @builtins.property
505
+ @jsii.member(jsii_name="alertManagerDefinition")
506
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
507
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
508
+ ...
509
+
510
+ @builtins.property
511
+ @jsii.member(jsii_name="alias")
512
+ def alias(self) -> typing.Optional[builtins.str]:
513
+ '''The alias that is assigned to this workspace to help identify it.
514
+
515
+ It does not need to be
516
+ unique.
517
+ '''
518
+ ...
519
+
520
+ @builtins.property
521
+ @jsii.member(jsii_name="kmsKey")
522
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
523
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
524
+ ...
525
+
526
+ @builtins.property
527
+ @jsii.member(jsii_name="loggingConfiguration")
528
+ def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
529
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
530
+
531
+ Note: These logging configurations are only for rules and alerting logs.
532
+ '''
533
+ ...
534
+
535
+ @builtins.property
536
+ @jsii.member(jsii_name="queryLoggingConfiguration")
537
+ def query_logging_configuration(
538
+ self,
539
+ ) -> typing.Optional["QueryLoggingConfiguration"]:
540
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
541
+ ...
542
+
543
+ @builtins.property
544
+ @jsii.member(jsii_name="workspaceConfiguration")
545
+ def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
546
+ '''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.'''
547
+ ...
548
+
549
+
550
+ class _IWorkspaceProxy(
551
+ jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
552
+ ):
553
+ __jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_aps.IWorkspace"
554
+
555
+ @builtins.property
556
+ @jsii.member(jsii_name="workspaceArn")
557
+ def workspace_arn(self) -> builtins.str:
558
+ '''The ARN of the workspace.
559
+
560
+ :attribute: true
561
+ '''
562
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
563
+
564
+ @builtins.property
565
+ @jsii.member(jsii_name="workspaceId")
566
+ def workspace_id(self) -> builtins.str:
567
+ '''The unique ID for the workspace.
568
+
569
+ :attribute: true
570
+ '''
571
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
572
+
573
+ @builtins.property
574
+ @jsii.member(jsii_name="alertManagerDefinition")
575
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
576
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
577
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
578
+
579
+ @builtins.property
580
+ @jsii.member(jsii_name="alias")
581
+ def alias(self) -> typing.Optional[builtins.str]:
582
+ '''The alias that is assigned to this workspace to help identify it.
583
+
584
+ It does not need to be
585
+ unique.
586
+ '''
587
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
588
+
589
+ @builtins.property
590
+ @jsii.member(jsii_name="kmsKey")
591
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
592
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
593
+ return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "kmsKey"))
594
+
595
+ @builtins.property
596
+ @jsii.member(jsii_name="loggingConfiguration")
597
+ def logging_configuration(self) -> typing.Optional["LoggingConfiguration"]:
598
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
599
+
600
+ Note: These logging configurations are only for rules and alerting logs.
601
+ '''
602
+ return typing.cast(typing.Optional["LoggingConfiguration"], jsii.get(self, "loggingConfiguration"))
603
+
604
+ @builtins.property
605
+ @jsii.member(jsii_name="queryLoggingConfiguration")
606
+ def query_logging_configuration(
607
+ self,
608
+ ) -> typing.Optional["QueryLoggingConfiguration"]:
609
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
610
+ return typing.cast(typing.Optional["QueryLoggingConfiguration"], jsii.get(self, "queryLoggingConfiguration"))
611
+
612
+ @builtins.property
613
+ @jsii.member(jsii_name="workspaceConfiguration")
614
+ def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
615
+ '''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.'''
616
+ return typing.cast(typing.Optional["WorkspaceConfiguration"], jsii.get(self, "workspaceConfiguration"))
617
+
618
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
619
+ typing.cast(typing.Any, IWorkspace).__jsii_proxy_class__ = lambda : _IWorkspaceProxy
620
+
621
+
622
+ @jsii.data_type(
623
+ jsii_type="@robhan-cdk-lib/aws_aps.Label",
624
+ jsii_struct_bases=[],
625
+ name_mapping={"name": "name", "value": "value"},
626
+ )
627
+ class Label:
628
+ def __init__(self, *, name: builtins.str, value: builtins.str) -> None:
629
+ '''A label is a name:value pair used to add context to ingested metrics.
630
+
631
+ This structure defines the
632
+ name and value for one label that is used in a label set. You can set ingestion limits on time
633
+ series that match defined label sets, to help prevent a workspace from being overwhelmed with
634
+ unexpected spikes in time series ingestion.
635
+
636
+ :param name: The name for this label. Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ At least one character.
637
+ :param value: The value for this label. At least one character.
638
+ '''
639
+ if __debug__:
640
+ type_hints = typing.get_type_hints(_typecheckingstub__5c797aa51820ba19e3974b523e246d357e3b44ff0bc743b0f1171b5ae9bebdea)
641
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
642
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
643
+ self._values: typing.Dict[builtins.str, typing.Any] = {
644
+ "name": name,
645
+ "value": value,
646
+ }
647
+
648
+ @builtins.property
649
+ def name(self) -> builtins.str:
650
+ '''The name for this label.
651
+
652
+ Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
653
+
654
+ At least one character.
655
+ '''
656
+ result = self._values.get("name")
657
+ assert result is not None, "Required property 'name' is missing"
658
+ return typing.cast(builtins.str, result)
659
+
660
+ @builtins.property
661
+ def value(self) -> builtins.str:
662
+ '''The value for this label.
663
+
664
+ At least one character.
665
+ '''
666
+ result = self._values.get("value")
667
+ assert result is not None, "Required property 'value' is missing"
668
+ return typing.cast(builtins.str, result)
669
+
670
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
671
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
672
+
673
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
674
+ return not (rhs == self)
675
+
676
+ def __repr__(self) -> str:
677
+ return "Label(%s)" % ", ".join(
678
+ k + "=" + repr(v) for k, v in self._values.items()
679
+ )
680
+
681
+
682
+ @jsii.data_type(
683
+ jsii_type="@robhan-cdk-lib/aws_aps.LimitsPerLabelSet",
684
+ jsii_struct_bases=[],
685
+ name_mapping={"label_set": "labelSet", "limits": "limits"},
686
+ )
687
+ class LimitsPerLabelSet:
688
+ def __init__(
689
+ self,
690
+ *,
691
+ label_set: typing.Sequence[typing.Union[Label, typing.Dict[builtins.str, typing.Any]]],
692
+ limits: typing.Union["LimitsPerLabelSetEntry", typing.Dict[builtins.str, typing.Any]],
693
+ ) -> None:
694
+ '''This defines a label set for the workspace, and defines the ingestion limit for active time series that match that label set.
695
+
696
+ Each label name in a label set must be unique.
697
+
698
+ :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
699
+ :param limits: This structure contains the information about the limits that apply to time series that match this label set.
700
+ '''
701
+ if isinstance(limits, dict):
702
+ limits = LimitsPerLabelSetEntry(**limits)
703
+ if __debug__:
704
+ type_hints = typing.get_type_hints(_typecheckingstub__6893b1308b220935b9f1ce7c4eae4ddc73c29be6663d247911732ccfcec7f4d9)
705
+ check_type(argname="argument label_set", value=label_set, expected_type=type_hints["label_set"])
706
+ check_type(argname="argument limits", value=limits, expected_type=type_hints["limits"])
707
+ self._values: typing.Dict[builtins.str, typing.Any] = {
708
+ "label_set": label_set,
709
+ "limits": limits,
710
+ }
711
+
712
+ @builtins.property
713
+ def label_set(self) -> typing.List[Label]:
714
+ '''This defines one label set that will have an enforced ingestion limit.
715
+
716
+ You can set ingestion
717
+ limits on time series that match defined label sets, to help prevent a workspace from being
718
+ overwhelmed with unexpected spikes in time series ingestion.
719
+
720
+ Label values accept all UTF-8 characters with one exception. If the label name is metric
721
+ name label **name**, then the metric part of the name must conform to the following pattern:
722
+ [a-zA-Z_:][a-zA-Z0-9_:]*
723
+
724
+ Minimum 0
725
+ '''
726
+ result = self._values.get("label_set")
727
+ assert result is not None, "Required property 'label_set' is missing"
728
+ return typing.cast(typing.List[Label], result)
729
+
730
+ @builtins.property
731
+ def limits(self) -> "LimitsPerLabelSetEntry":
732
+ '''This structure contains the information about the limits that apply to time series that match this label set.'''
733
+ result = self._values.get("limits")
734
+ assert result is not None, "Required property 'limits' is missing"
735
+ return typing.cast("LimitsPerLabelSetEntry", result)
736
+
737
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
738
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
739
+
740
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
741
+ return not (rhs == self)
742
+
743
+ def __repr__(self) -> str:
744
+ return "LimitsPerLabelSet(%s)" % ", ".join(
745
+ k + "=" + repr(v) for k, v in self._values.items()
746
+ )
747
+
748
+
749
+ @jsii.data_type(
750
+ jsii_type="@robhan-cdk-lib/aws_aps.LimitsPerLabelSetEntry",
751
+ jsii_struct_bases=[],
752
+ name_mapping={"max_series": "maxSeries"},
753
+ )
754
+ class LimitsPerLabelSetEntry:
755
+ def __init__(self, *, max_series: typing.Optional[jsii.Number] = None) -> None:
756
+ '''This structure contains the limits that apply to time series that match one label set.
757
+
758
+ :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
759
+ '''
760
+ if __debug__:
761
+ type_hints = typing.get_type_hints(_typecheckingstub__f53acc1bbc1fb66aa75ed0ff80395c4fd66be1563ee572788afab4e42af12da4)
762
+ check_type(argname="argument max_series", value=max_series, expected_type=type_hints["max_series"])
763
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
764
+ if max_series is not None:
765
+ self._values["max_series"] = max_series
766
+
767
+ @builtins.property
768
+ def max_series(self) -> typing.Optional[jsii.Number]:
769
+ '''The maximum number of active series that can be ingested that match this label set.
770
+
771
+ Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed
772
+ Service for Prometheus to vend label set metrics to CloudWatch Logs.
773
+
774
+ Minimum 0
775
+ '''
776
+ result = self._values.get("max_series")
777
+ return typing.cast(typing.Optional[jsii.Number], result)
778
+
779
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
780
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
781
+
782
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
783
+ return not (rhs == self)
784
+
785
+ def __repr__(self) -> str:
786
+ return "LimitsPerLabelSetEntry(%s)" % ", ".join(
787
+ k + "=" + repr(v) for k, v in self._values.items()
788
+ )
789
+
790
+
791
+ @jsii.data_type(
792
+ jsii_type="@robhan-cdk-lib/aws_aps.LoggingConfiguration",
793
+ jsii_struct_bases=[],
794
+ name_mapping={"log_group": "logGroup"},
795
+ )
796
+ class LoggingConfiguration:
797
+ def __init__(
798
+ self,
799
+ *,
800
+ log_group: typing.Optional[_aws_cdk_aws_logs_ceddda9d.ILogGroup] = None,
801
+ ) -> None:
802
+ '''Contains information about the rules and alerting logging configuration for the workspace.
803
+
804
+ :param log_group: The CloudWatch log group to which the vended log data will be published.
805
+ '''
806
+ if __debug__:
807
+ type_hints = typing.get_type_hints(_typecheckingstub__282c7cd599e82904024934838ca325999d8149f211c5885145973734c9c85b76)
808
+ check_type(argname="argument log_group", value=log_group, expected_type=type_hints["log_group"])
809
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
810
+ if log_group is not None:
811
+ self._values["log_group"] = log_group
812
+
813
+ @builtins.property
814
+ def log_group(self) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.ILogGroup]:
815
+ '''The CloudWatch log group to which the vended log data will be published.'''
816
+ result = self._values.get("log_group")
817
+ return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.ILogGroup], result)
818
+
819
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
820
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
821
+
822
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
823
+ return not (rhs == self)
824
+
825
+ def __repr__(self) -> str:
826
+ return "LoggingConfiguration(%s)" % ", ".join(
827
+ k + "=" + repr(v) for k, v in self._values.items()
828
+ )
829
+
830
+
831
+ @jsii.data_type(
832
+ jsii_type="@robhan-cdk-lib/aws_aps.LoggingDestination",
833
+ jsii_struct_bases=[],
834
+ name_mapping={"cloud_watch_logs": "cloudWatchLogs", "filters": "filters"},
835
+ )
836
+ class LoggingDestination:
837
+ def __init__(
838
+ self,
839
+ *,
840
+ cloud_watch_logs: typing.Union[CloudWatchLogDestination, typing.Dict[builtins.str, typing.Any]],
841
+ filters: typing.Union["LoggingFilter", typing.Dict[builtins.str, typing.Any]],
842
+ ) -> None:
843
+ '''The logging destination in an Amazon Managed Service for Prometheus workspace.
844
+
845
+ :param cloud_watch_logs: Configuration details for logging to CloudWatch Logs.
846
+ :param filters: Filtering criteria that determine which queries are logged.
847
+ '''
848
+ if isinstance(cloud_watch_logs, dict):
849
+ cloud_watch_logs = CloudWatchLogDestination(**cloud_watch_logs)
850
+ if isinstance(filters, dict):
851
+ filters = LoggingFilter(**filters)
852
+ if __debug__:
853
+ type_hints = typing.get_type_hints(_typecheckingstub__2496000b19af109fb0c5c290e32ab9bbc75be51fbfa27d16758c01f8baf00891)
854
+ check_type(argname="argument cloud_watch_logs", value=cloud_watch_logs, expected_type=type_hints["cloud_watch_logs"])
855
+ check_type(argname="argument filters", value=filters, expected_type=type_hints["filters"])
856
+ self._values: typing.Dict[builtins.str, typing.Any] = {
857
+ "cloud_watch_logs": cloud_watch_logs,
858
+ "filters": filters,
859
+ }
860
+
861
+ @builtins.property
862
+ def cloud_watch_logs(self) -> CloudWatchLogDestination:
863
+ '''Configuration details for logging to CloudWatch Logs.'''
864
+ result = self._values.get("cloud_watch_logs")
865
+ assert result is not None, "Required property 'cloud_watch_logs' is missing"
866
+ return typing.cast(CloudWatchLogDestination, result)
867
+
868
+ @builtins.property
869
+ def filters(self) -> "LoggingFilter":
870
+ '''Filtering criteria that determine which queries are logged.'''
871
+ result = self._values.get("filters")
872
+ assert result is not None, "Required property 'filters' is missing"
873
+ return typing.cast("LoggingFilter", result)
874
+
875
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
876
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
877
+
878
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
879
+ return not (rhs == self)
880
+
881
+ def __repr__(self) -> str:
882
+ return "LoggingDestination(%s)" % ", ".join(
883
+ k + "=" + repr(v) for k, v in self._values.items()
884
+ )
885
+
886
+
887
+ @jsii.data_type(
888
+ jsii_type="@robhan-cdk-lib/aws_aps.LoggingFilter",
889
+ jsii_struct_bases=[],
890
+ name_mapping={"qsp_threshold": "qspThreshold"},
891
+ )
892
+ class LoggingFilter:
893
+ def __init__(self, *, qsp_threshold: jsii.Number) -> None:
894
+ '''Filtering criteria that determine which queries are logged.
895
+
896
+ :param qsp_threshold: Integer. Minimum 0
897
+ '''
898
+ if __debug__:
899
+ type_hints = typing.get_type_hints(_typecheckingstub__c7beea1121128e5f35f0720b90b21713abba4beef8755e891bbf87c2ad9711a0)
900
+ check_type(argname="argument qsp_threshold", value=qsp_threshold, expected_type=type_hints["qsp_threshold"])
901
+ self._values: typing.Dict[builtins.str, typing.Any] = {
902
+ "qsp_threshold": qsp_threshold,
903
+ }
904
+
905
+ @builtins.property
906
+ def qsp_threshold(self) -> jsii.Number:
907
+ '''Integer.
908
+
909
+ Minimum 0
910
+ '''
911
+ result = self._values.get("qsp_threshold")
912
+ assert result is not None, "Required property 'qsp_threshold' is missing"
913
+ return typing.cast(jsii.Number, result)
914
+
915
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
916
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
917
+
918
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
919
+ return not (rhs == self)
920
+
921
+ def __repr__(self) -> str:
922
+ return "LoggingFilter(%s)" % ", ".join(
923
+ k + "=" + repr(v) for k, v in self._values.items()
924
+ )
925
+
926
+
927
+ @jsii.data_type(
928
+ jsii_type="@robhan-cdk-lib/aws_aps.QueryLoggingConfiguration",
929
+ jsii_struct_bases=[],
930
+ name_mapping={"destinations": "destinations"},
931
+ )
932
+ class QueryLoggingConfiguration:
933
+ def __init__(
934
+ self,
935
+ *,
936
+ destinations: typing.Sequence[typing.Union[LoggingDestination, typing.Dict[builtins.str, typing.Any]]],
937
+ ) -> None:
938
+ '''The query logging configuration in an Amazon Managed Service for Prometheus workspace.
939
+
940
+ :param destinations: Defines a destination and its associated filtering criteria for query logging. Minimum 1 and maximum 1 item in array.
941
+ '''
942
+ if __debug__:
943
+ type_hints = typing.get_type_hints(_typecheckingstub__092820c29e1435155b193e5488fd2841dcea5141110ab984fa14a237e2f4a4ae)
944
+ check_type(argname="argument destinations", value=destinations, expected_type=type_hints["destinations"])
945
+ self._values: typing.Dict[builtins.str, typing.Any] = {
946
+ "destinations": destinations,
947
+ }
948
+
949
+ @builtins.property
950
+ def destinations(self) -> typing.List[LoggingDestination]:
951
+ '''Defines a destination and its associated filtering criteria for query logging.
952
+
953
+ Minimum 1 and maximum 1 item in array.
954
+ '''
955
+ result = self._values.get("destinations")
956
+ assert result is not None, "Required property 'destinations' is missing"
957
+ return typing.cast(typing.List[LoggingDestination], result)
958
+
959
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
960
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
961
+
962
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
963
+ return not (rhs == self)
964
+
965
+ def __repr__(self) -> str:
966
+ return "QueryLoggingConfiguration(%s)" % ", ".join(
967
+ k + "=" + repr(v) for k, v in self._values.items()
968
+ )
969
+
970
+
971
+ @jsii.data_type(
972
+ jsii_type="@robhan-cdk-lib/aws_aps.RoleConfiguration",
973
+ jsii_struct_bases=[],
974
+ name_mapping={"source_role": "sourceRole", "target_role": "targetRole"},
975
+ )
976
+ class RoleConfiguration:
977
+ def __init__(
978
+ self,
979
+ *,
980
+ source_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
981
+ target_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
982
+ ) -> None:
983
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.
984
+
985
+ :param source_role: The source role.
986
+ :param target_role: The target role.
987
+ '''
988
+ if __debug__:
989
+ type_hints = typing.get_type_hints(_typecheckingstub__e96c135bdcece9823caf073421082af151c59b6d52a5918bb38689bbca7ab2a3)
990
+ check_type(argname="argument source_role", value=source_role, expected_type=type_hints["source_role"])
991
+ check_type(argname="argument target_role", value=target_role, expected_type=type_hints["target_role"])
992
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
993
+ if source_role is not None:
994
+ self._values["source_role"] = source_role
995
+ if target_role is not None:
996
+ self._values["target_role"] = target_role
997
+
998
+ @builtins.property
999
+ def source_role(self) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole]:
1000
+ '''The source role.'''
1001
+ result = self._values.get("source_role")
1002
+ return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole], result)
1003
+
1004
+ @builtins.property
1005
+ def target_role(self) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole]:
1006
+ '''The target role.'''
1007
+ result = self._values.get("target_role")
1008
+ return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole], result)
1009
+
1010
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1011
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1012
+
1013
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1014
+ return not (rhs == self)
1015
+
1016
+ def __repr__(self) -> str:
1017
+ return "RoleConfiguration(%s)" % ", ".join(
1018
+ k + "=" + repr(v) for k, v in self._values.items()
1019
+ )
1020
+
1021
+
1022
+ @jsii.data_type(
1023
+ jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceAttributes",
1024
+ jsii_struct_bases=[],
1025
+ name_mapping={
1026
+ "data": "data",
1027
+ "name": "name",
1028
+ "rule_groups_namespace_arn": "ruleGroupsNamespaceArn",
1029
+ "workspace": "workspace",
1030
+ },
1031
+ )
1032
+ class RuleGroupsNamespaceAttributes:
1033
+ def __init__(
1034
+ self,
1035
+ *,
1036
+ data: builtins.str,
1037
+ name: builtins.str,
1038
+ rule_groups_namespace_arn: builtins.str,
1039
+ workspace: IWorkspace,
1040
+ ) -> None:
1041
+ '''Properties for importing a rule groups namespace in an Amazon Managed Service for Prometheus workspace from attributes.
1042
+
1043
+ :param data: The rules file used in the namespace.
1044
+ :param name: The name of the rule groups namespace. Between 1 and 64 characters.
1045
+ :param rule_groups_namespace_arn: The ARN of the rule groups namespace.
1046
+ :param workspace: The workspace to add the rule groups namespace.
1047
+ '''
1048
+ if __debug__:
1049
+ type_hints = typing.get_type_hints(_typecheckingstub__aca59ceb33a6b456771bcbba45d97752cb2f2f13917c19b7e97cd69b7f165a45)
1050
+ check_type(argname="argument data", value=data, expected_type=type_hints["data"])
1051
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1052
+ check_type(argname="argument rule_groups_namespace_arn", value=rule_groups_namespace_arn, expected_type=type_hints["rule_groups_namespace_arn"])
1053
+ check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
1054
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1055
+ "data": data,
1056
+ "name": name,
1057
+ "rule_groups_namespace_arn": rule_groups_namespace_arn,
1058
+ "workspace": workspace,
1059
+ }
1060
+
1061
+ @builtins.property
1062
+ def data(self) -> builtins.str:
1063
+ '''The rules file used in the namespace.'''
1064
+ result = self._values.get("data")
1065
+ assert result is not None, "Required property 'data' is missing"
1066
+ return typing.cast(builtins.str, result)
1067
+
1068
+ @builtins.property
1069
+ def name(self) -> builtins.str:
1070
+ '''The name of the rule groups namespace.
1071
+
1072
+ Between 1 and 64 characters.
1073
+ '''
1074
+ result = self._values.get("name")
1075
+ assert result is not None, "Required property 'name' is missing"
1076
+ return typing.cast(builtins.str, result)
1077
+
1078
+ @builtins.property
1079
+ def rule_groups_namespace_arn(self) -> builtins.str:
1080
+ '''The ARN of the rule groups namespace.'''
1081
+ result = self._values.get("rule_groups_namespace_arn")
1082
+ assert result is not None, "Required property 'rule_groups_namespace_arn' is missing"
1083
+ return typing.cast(builtins.str, result)
1084
+
1085
+ @builtins.property
1086
+ def workspace(self) -> IWorkspace:
1087
+ '''The workspace to add the rule groups namespace.'''
1088
+ result = self._values.get("workspace")
1089
+ assert result is not None, "Required property 'workspace' is missing"
1090
+ return typing.cast(IWorkspace, result)
1091
+
1092
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1093
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1094
+
1095
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1096
+ return not (rhs == self)
1097
+
1098
+ def __repr__(self) -> str:
1099
+ return "RuleGroupsNamespaceAttributes(%s)" % ", ".join(
1100
+ k + "=" + repr(v) for k, v in self._values.items()
1101
+ )
1102
+
1103
+
1104
+ @jsii.implements(IRuleGroupsNamespace)
1105
+ class RuleGroupsNamespaceBase(
1106
+ _aws_cdk_ceddda9d.Resource,
1107
+ metaclass=jsii.JSIIAbstractClass,
1108
+ jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceBase",
1109
+ ):
1110
+ def __init__(
1111
+ self,
1112
+ scope: _constructs_77d1e7e8.Construct,
1113
+ id: builtins.str,
1114
+ *,
1115
+ account: typing.Optional[builtins.str] = None,
1116
+ environment_from_arn: typing.Optional[builtins.str] = None,
1117
+ physical_name: typing.Optional[builtins.str] = None,
1118
+ region: typing.Optional[builtins.str] = None,
1119
+ ) -> None:
1120
+ '''
1121
+ :param scope: -
1122
+ :param id: -
1123
+ :param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
1124
+ :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.
1125
+ :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
1126
+ :param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
1127
+ '''
1128
+ if __debug__:
1129
+ type_hints = typing.get_type_hints(_typecheckingstub__54435341b8b1c3c7efe004b41ef5c6d515fe3983bc74fae1b1b26947b9d05f20)
1130
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1131
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1132
+ props = _aws_cdk_ceddda9d.ResourceProps(
1133
+ account=account,
1134
+ environment_from_arn=environment_from_arn,
1135
+ physical_name=physical_name,
1136
+ region=region,
1137
+ )
1138
+
1139
+ jsii.create(self.__class__, self, [scope, id, props])
1140
+
1141
+ @builtins.property
1142
+ @jsii.member(jsii_name="data")
1143
+ @abc.abstractmethod
1144
+ def data(self) -> builtins.str:
1145
+ '''The rules file used in the namespace.'''
1146
+ ...
1147
+
1148
+ @builtins.property
1149
+ @jsii.member(jsii_name="name")
1150
+ @abc.abstractmethod
1151
+ def name(self) -> builtins.str:
1152
+ '''The name of the rule groups namespace.'''
1153
+ ...
1154
+
1155
+ @builtins.property
1156
+ @jsii.member(jsii_name="ruleGroupsNamespaceArn")
1157
+ @abc.abstractmethod
1158
+ def rule_groups_namespace_arn(self) -> builtins.str:
1159
+ '''The ARN of the rule groups namespace.'''
1160
+ ...
1161
+
1162
+ @builtins.property
1163
+ @jsii.member(jsii_name="workspace")
1164
+ @abc.abstractmethod
1165
+ def workspace(self) -> IWorkspace:
1166
+ '''The workspace to add the rule groups namespace.'''
1167
+ ...
1168
+
1169
+
1170
+ class _RuleGroupsNamespaceBaseProxy(
1171
+ RuleGroupsNamespaceBase,
1172
+ jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
1173
+ ):
1174
+ @builtins.property
1175
+ @jsii.member(jsii_name="data")
1176
+ def data(self) -> builtins.str:
1177
+ '''The rules file used in the namespace.'''
1178
+ return typing.cast(builtins.str, jsii.get(self, "data"))
1179
+
1180
+ @builtins.property
1181
+ @jsii.member(jsii_name="name")
1182
+ def name(self) -> builtins.str:
1183
+ '''The name of the rule groups namespace.'''
1184
+ return typing.cast(builtins.str, jsii.get(self, "name"))
1185
+
1186
+ @builtins.property
1187
+ @jsii.member(jsii_name="ruleGroupsNamespaceArn")
1188
+ def rule_groups_namespace_arn(self) -> builtins.str:
1189
+ '''The ARN of the rule groups namespace.'''
1190
+ return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
1191
+
1192
+ @builtins.property
1193
+ @jsii.member(jsii_name="workspace")
1194
+ def workspace(self) -> IWorkspace:
1195
+ '''The workspace to add the rule groups namespace.'''
1196
+ return typing.cast(IWorkspace, jsii.get(self, "workspace"))
1197
+
1198
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
1199
+ typing.cast(typing.Any, RuleGroupsNamespaceBase).__jsii_proxy_class__ = lambda : _RuleGroupsNamespaceBaseProxy
1200
+
1201
+
1202
+ @jsii.data_type(
1203
+ jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespaceProps",
1204
+ jsii_struct_bases=[],
1205
+ name_mapping={"data": "data", "name": "name", "workspace": "workspace"},
1206
+ )
1207
+ class RuleGroupsNamespaceProps:
1208
+ def __init__(
1209
+ self,
1210
+ *,
1211
+ data: builtins.str,
1212
+ name: builtins.str,
1213
+ workspace: IWorkspace,
1214
+ ) -> None:
1215
+ '''Properties for creating a rule groups namespace in an Amazon Managed Service for Prometheus workspace.
1216
+
1217
+ :param data: The rules file used in the namespace.
1218
+ :param name: The name of the rule groups namespace. Between 1 and 64 characters.
1219
+ :param workspace: The workspace to add the rule groups namespace.
1220
+ '''
1221
+ if __debug__:
1222
+ type_hints = typing.get_type_hints(_typecheckingstub__38cadfd9b05a1407d50e98748f6488d0e79d3484e75c5786ea83b3235d73c3e1)
1223
+ check_type(argname="argument data", value=data, expected_type=type_hints["data"])
1224
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1225
+ check_type(argname="argument workspace", value=workspace, expected_type=type_hints["workspace"])
1226
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1227
+ "data": data,
1228
+ "name": name,
1229
+ "workspace": workspace,
1230
+ }
1231
+
1232
+ @builtins.property
1233
+ def data(self) -> builtins.str:
1234
+ '''The rules file used in the namespace.'''
1235
+ result = self._values.get("data")
1236
+ assert result is not None, "Required property 'data' is missing"
1237
+ return typing.cast(builtins.str, result)
1238
+
1239
+ @builtins.property
1240
+ def name(self) -> builtins.str:
1241
+ '''The name of the rule groups namespace.
1242
+
1243
+ Between 1 and 64 characters.
1244
+ '''
1245
+ result = self._values.get("name")
1246
+ assert result is not None, "Required property 'name' is missing"
1247
+ return typing.cast(builtins.str, result)
1248
+
1249
+ @builtins.property
1250
+ def workspace(self) -> IWorkspace:
1251
+ '''The workspace to add the rule groups namespace.'''
1252
+ result = self._values.get("workspace")
1253
+ assert result is not None, "Required property 'workspace' is missing"
1254
+ return typing.cast(IWorkspace, result)
1255
+
1256
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1257
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1258
+
1259
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1260
+ return not (rhs == self)
1261
+
1262
+ def __repr__(self) -> str:
1263
+ return "RuleGroupsNamespaceProps(%s)" % ", ".join(
1264
+ k + "=" + repr(v) for k, v in self._values.items()
1265
+ )
1266
+
1267
+
1268
+ @jsii.data_type(
1269
+ jsii_type="@robhan-cdk-lib/aws_aps.ScrapeConfiguration",
1270
+ jsii_struct_bases=[],
1271
+ name_mapping={"configuration_blob": "configurationBlob"},
1272
+ )
1273
+ class ScrapeConfiguration:
1274
+ def __init__(self, *, configuration_blob: builtins.str) -> None:
1275
+ '''A scrape configuration for a scraper, base 64 encoded.
1276
+
1277
+ :param configuration_blob: The base 64 encoded scrape configuration file.
1278
+ '''
1279
+ if __debug__:
1280
+ type_hints = typing.get_type_hints(_typecheckingstub__6313d0a5d8e3eda66be90025eafb5520d36fb7fb11adbc40c4398cb56b0ce09d)
1281
+ check_type(argname="argument configuration_blob", value=configuration_blob, expected_type=type_hints["configuration_blob"])
1282
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1283
+ "configuration_blob": configuration_blob,
1284
+ }
1285
+
1286
+ @builtins.property
1287
+ def configuration_blob(self) -> builtins.str:
1288
+ '''The base 64 encoded scrape configuration file.'''
1289
+ result = self._values.get("configuration_blob")
1290
+ assert result is not None, "Required property 'configuration_blob' is missing"
1291
+ return typing.cast(builtins.str, result)
1292
+
1293
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1294
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1295
+
1296
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1297
+ return not (rhs == self)
1298
+
1299
+ def __repr__(self) -> str:
1300
+ return "ScrapeConfiguration(%s)" % ", ".join(
1301
+ k + "=" + repr(v) for k, v in self._values.items()
1302
+ )
1303
+
1304
+
1305
+ @jsii.data_type(
1306
+ jsii_type="@robhan-cdk-lib/aws_aps.ScraperAttributes",
1307
+ jsii_struct_bases=[],
1308
+ name_mapping={
1309
+ "destination": "destination",
1310
+ "scrape_configuration": "scrapeConfiguration",
1311
+ "scraper_arn": "scraperArn",
1312
+ "source": "source",
1313
+ "alias": "alias",
1314
+ "role_configuration": "roleConfiguration",
1315
+ },
1316
+ )
1317
+ class ScraperAttributes:
1318
+ def __init__(
1319
+ self,
1320
+ *,
1321
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
1322
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
1323
+ scraper_arn: builtins.str,
1324
+ source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
1325
+ alias: typing.Optional[builtins.str] = None,
1326
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
1327
+ ) -> None:
1328
+ '''Properties for importing an Amazon Managed Service for Prometheus Scraper from attributes.
1329
+
1330
+ :param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
1331
+ :param scrape_configuration: The configuration in use by the scraper.
1332
+ :param scraper_arn: The ARN of the scraper.
1333
+ :param source: The Amazon EKS cluster from which the scraper collects metrics.
1334
+ :param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1335
+ :param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
1336
+ '''
1337
+ if isinstance(destination, dict):
1338
+ destination = Destination(**destination)
1339
+ if isinstance(scrape_configuration, dict):
1340
+ scrape_configuration = ScrapeConfiguration(**scrape_configuration)
1341
+ if isinstance(source, dict):
1342
+ source = Source(**source)
1343
+ if isinstance(role_configuration, dict):
1344
+ role_configuration = RoleConfiguration(**role_configuration)
1345
+ if __debug__:
1346
+ type_hints = typing.get_type_hints(_typecheckingstub__2aab74937b2fefec81fb3f25317393581e00fbda88f9d176c61fd521a9189d81)
1347
+ check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
1348
+ check_type(argname="argument scrape_configuration", value=scrape_configuration, expected_type=type_hints["scrape_configuration"])
1349
+ check_type(argname="argument scraper_arn", value=scraper_arn, expected_type=type_hints["scraper_arn"])
1350
+ check_type(argname="argument source", value=source, expected_type=type_hints["source"])
1351
+ check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
1352
+ check_type(argname="argument role_configuration", value=role_configuration, expected_type=type_hints["role_configuration"])
1353
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1354
+ "destination": destination,
1355
+ "scrape_configuration": scrape_configuration,
1356
+ "scraper_arn": scraper_arn,
1357
+ "source": source,
1358
+ }
1359
+ if alias is not None:
1360
+ self._values["alias"] = alias
1361
+ if role_configuration is not None:
1362
+ self._values["role_configuration"] = role_configuration
1363
+
1364
+ @builtins.property
1365
+ def destination(self) -> Destination:
1366
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
1367
+ result = self._values.get("destination")
1368
+ assert result is not None, "Required property 'destination' is missing"
1369
+ return typing.cast(Destination, result)
1370
+
1371
+ @builtins.property
1372
+ def scrape_configuration(self) -> ScrapeConfiguration:
1373
+ '''The configuration in use by the scraper.'''
1374
+ result = self._values.get("scrape_configuration")
1375
+ assert result is not None, "Required property 'scrape_configuration' is missing"
1376
+ return typing.cast(ScrapeConfiguration, result)
1377
+
1378
+ @builtins.property
1379
+ def scraper_arn(self) -> builtins.str:
1380
+ '''The ARN of the scraper.'''
1381
+ result = self._values.get("scraper_arn")
1382
+ assert result is not None, "Required property 'scraper_arn' is missing"
1383
+ return typing.cast(builtins.str, result)
1384
+
1385
+ @builtins.property
1386
+ def source(self) -> "Source":
1387
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
1388
+ result = self._values.get("source")
1389
+ assert result is not None, "Required property 'source' is missing"
1390
+ return typing.cast("Source", result)
1391
+
1392
+ @builtins.property
1393
+ def alias(self) -> typing.Optional[builtins.str]:
1394
+ '''An optional user-assigned scraper alias.
1395
+
1396
+ 1-100 characters.
1397
+
1398
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1399
+ '''
1400
+ result = self._values.get("alias")
1401
+ return typing.cast(typing.Optional[builtins.str], result)
1402
+
1403
+ @builtins.property
1404
+ def role_configuration(self) -> typing.Optional[RoleConfiguration]:
1405
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
1406
+ result = self._values.get("role_configuration")
1407
+ return typing.cast(typing.Optional[RoleConfiguration], result)
1408
+
1409
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1410
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1411
+
1412
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1413
+ return not (rhs == self)
1414
+
1415
+ def __repr__(self) -> str:
1416
+ return "ScraperAttributes(%s)" % ", ".join(
1417
+ k + "=" + repr(v) for k, v in self._values.items()
1418
+ )
1419
+
1420
+
1421
+ @jsii.implements(IScraper)
1422
+ class ScraperBase(
1423
+ _aws_cdk_ceddda9d.Resource,
1424
+ metaclass=jsii.JSIIAbstractClass,
1425
+ jsii_type="@robhan-cdk-lib/aws_aps.ScraperBase",
1426
+ ):
1427
+ def __init__(
1428
+ self,
1429
+ scope: _constructs_77d1e7e8.Construct,
1430
+ id: builtins.str,
1431
+ *,
1432
+ account: typing.Optional[builtins.str] = None,
1433
+ environment_from_arn: typing.Optional[builtins.str] = None,
1434
+ physical_name: typing.Optional[builtins.str] = None,
1435
+ region: typing.Optional[builtins.str] = None,
1436
+ ) -> None:
1437
+ '''
1438
+ :param scope: -
1439
+ :param id: -
1440
+ :param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
1441
+ :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.
1442
+ :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
1443
+ :param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
1444
+ '''
1445
+ if __debug__:
1446
+ type_hints = typing.get_type_hints(_typecheckingstub__79f44dd804edbb4f2d30815f15d40d8f8c94bc90ec7657ced6d4b8716930412f)
1447
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1448
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1449
+ props = _aws_cdk_ceddda9d.ResourceProps(
1450
+ account=account,
1451
+ environment_from_arn=environment_from_arn,
1452
+ physical_name=physical_name,
1453
+ region=region,
1454
+ )
1455
+
1456
+ jsii.create(self.__class__, self, [scope, id, props])
1457
+
1458
+ @jsii.member(jsii_name="getScraperId")
1459
+ def _get_scraper_id(self, scraper_arn: builtins.str) -> builtins.str:
1460
+ '''
1461
+ :param scraper_arn: -
1462
+ '''
1463
+ if __debug__:
1464
+ type_hints = typing.get_type_hints(_typecheckingstub__720023f01199e16b0b50b3928b380b6c70d0c625eb677c6631c94d1822effb36)
1465
+ check_type(argname="argument scraper_arn", value=scraper_arn, expected_type=type_hints["scraper_arn"])
1466
+ return typing.cast(builtins.str, jsii.invoke(self, "getScraperId", [scraper_arn]))
1467
+
1468
+ @builtins.property
1469
+ @jsii.member(jsii_name="destination")
1470
+ @abc.abstractmethod
1471
+ def destination(self) -> Destination:
1472
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
1473
+ ...
1474
+
1475
+ @builtins.property
1476
+ @jsii.member(jsii_name="scrapeConfiguration")
1477
+ @abc.abstractmethod
1478
+ def scrape_configuration(self) -> ScrapeConfiguration:
1479
+ '''The configuration in use by the scraper.'''
1480
+ ...
1481
+
1482
+ @builtins.property
1483
+ @jsii.member(jsii_name="scraperArn")
1484
+ @abc.abstractmethod
1485
+ def scraper_arn(self) -> builtins.str:
1486
+ '''The ARN of the scraper.'''
1487
+ ...
1488
+
1489
+ @builtins.property
1490
+ @jsii.member(jsii_name="scraperId")
1491
+ @abc.abstractmethod
1492
+ def scraper_id(self) -> builtins.str:
1493
+ '''The ID of the scraper.'''
1494
+ ...
1495
+
1496
+ @builtins.property
1497
+ @jsii.member(jsii_name="source")
1498
+ @abc.abstractmethod
1499
+ def source(self) -> "Source":
1500
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
1501
+ ...
1502
+
1503
+ @builtins.property
1504
+ @jsii.member(jsii_name="alias")
1505
+ @abc.abstractmethod
1506
+ def alias(self) -> typing.Optional[builtins.str]:
1507
+ '''An optional user-assigned scraper alias.
1508
+
1509
+ 1-100 characters.
1510
+
1511
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1512
+ '''
1513
+ ...
1514
+
1515
+ @builtins.property
1516
+ @jsii.member(jsii_name="roleConfiguration")
1517
+ @abc.abstractmethod
1518
+ def role_configuration(self) -> typing.Optional[RoleConfiguration]:
1519
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
1520
+ ...
1521
+
1522
+
1523
+ class _ScraperBaseProxy(
1524
+ ScraperBase,
1525
+ jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
1526
+ ):
1527
+ @builtins.property
1528
+ @jsii.member(jsii_name="destination")
1529
+ def destination(self) -> Destination:
1530
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
1531
+ return typing.cast(Destination, jsii.get(self, "destination"))
1532
+
1533
+ @builtins.property
1534
+ @jsii.member(jsii_name="scrapeConfiguration")
1535
+ def scrape_configuration(self) -> ScrapeConfiguration:
1536
+ '''The configuration in use by the scraper.'''
1537
+ return typing.cast(ScrapeConfiguration, jsii.get(self, "scrapeConfiguration"))
1538
+
1539
+ @builtins.property
1540
+ @jsii.member(jsii_name="scraperArn")
1541
+ def scraper_arn(self) -> builtins.str:
1542
+ '''The ARN of the scraper.'''
1543
+ return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
1544
+
1545
+ @builtins.property
1546
+ @jsii.member(jsii_name="scraperId")
1547
+ def scraper_id(self) -> builtins.str:
1548
+ '''The ID of the scraper.'''
1549
+ return typing.cast(builtins.str, jsii.get(self, "scraperId"))
1550
+
1551
+ @builtins.property
1552
+ @jsii.member(jsii_name="source")
1553
+ def source(self) -> "Source":
1554
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
1555
+ return typing.cast("Source", jsii.get(self, "source"))
1556
+
1557
+ @builtins.property
1558
+ @jsii.member(jsii_name="alias")
1559
+ def alias(self) -> typing.Optional[builtins.str]:
1560
+ '''An optional user-assigned scraper alias.
1561
+
1562
+ 1-100 characters.
1563
+
1564
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1565
+ '''
1566
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
1567
+
1568
+ @builtins.property
1569
+ @jsii.member(jsii_name="roleConfiguration")
1570
+ def role_configuration(self) -> typing.Optional[RoleConfiguration]:
1571
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
1572
+ return typing.cast(typing.Optional[RoleConfiguration], jsii.get(self, "roleConfiguration"))
1573
+
1574
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
1575
+ typing.cast(typing.Any, ScraperBase).__jsii_proxy_class__ = lambda : _ScraperBaseProxy
1576
+
1577
+
1578
+ @jsii.data_type(
1579
+ jsii_type="@robhan-cdk-lib/aws_aps.ScraperProps",
1580
+ jsii_struct_bases=[],
1581
+ name_mapping={
1582
+ "destination": "destination",
1583
+ "scrape_configuration": "scrapeConfiguration",
1584
+ "source": "source",
1585
+ "alias": "alias",
1586
+ "role_configuration": "roleConfiguration",
1587
+ },
1588
+ )
1589
+ class ScraperProps:
1590
+ def __init__(
1591
+ self,
1592
+ *,
1593
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
1594
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
1595
+ source: typing.Union["Source", typing.Dict[builtins.str, typing.Any]],
1596
+ alias: typing.Optional[builtins.str] = None,
1597
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
1598
+ ) -> None:
1599
+ '''Properties for creating an Amazon Managed Service for Prometheus Scraper.
1600
+
1601
+ :param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
1602
+ :param scrape_configuration: The configuration in use by the scraper.
1603
+ :param source: The Amazon EKS cluster from which the scraper collects metrics.
1604
+ :param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1605
+ :param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
1606
+ '''
1607
+ if isinstance(destination, dict):
1608
+ destination = Destination(**destination)
1609
+ if isinstance(scrape_configuration, dict):
1610
+ scrape_configuration = ScrapeConfiguration(**scrape_configuration)
1611
+ if isinstance(source, dict):
1612
+ source = Source(**source)
1613
+ if isinstance(role_configuration, dict):
1614
+ role_configuration = RoleConfiguration(**role_configuration)
1615
+ if __debug__:
1616
+ type_hints = typing.get_type_hints(_typecheckingstub__e27ba8269266aa91c926829a5c485aaf203a6638ce54c2fced4fdf950ba2e944)
1617
+ check_type(argname="argument destination", value=destination, expected_type=type_hints["destination"])
1618
+ check_type(argname="argument scrape_configuration", value=scrape_configuration, expected_type=type_hints["scrape_configuration"])
1619
+ check_type(argname="argument source", value=source, expected_type=type_hints["source"])
1620
+ check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
1621
+ check_type(argname="argument role_configuration", value=role_configuration, expected_type=type_hints["role_configuration"])
1622
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1623
+ "destination": destination,
1624
+ "scrape_configuration": scrape_configuration,
1625
+ "source": source,
1626
+ }
1627
+ if alias is not None:
1628
+ self._values["alias"] = alias
1629
+ if role_configuration is not None:
1630
+ self._values["role_configuration"] = role_configuration
1631
+
1632
+ @builtins.property
1633
+ def destination(self) -> Destination:
1634
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
1635
+ result = self._values.get("destination")
1636
+ assert result is not None, "Required property 'destination' is missing"
1637
+ return typing.cast(Destination, result)
1638
+
1639
+ @builtins.property
1640
+ def scrape_configuration(self) -> ScrapeConfiguration:
1641
+ '''The configuration in use by the scraper.'''
1642
+ result = self._values.get("scrape_configuration")
1643
+ assert result is not None, "Required property 'scrape_configuration' is missing"
1644
+ return typing.cast(ScrapeConfiguration, result)
1645
+
1646
+ @builtins.property
1647
+ def source(self) -> "Source":
1648
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
1649
+ result = self._values.get("source")
1650
+ assert result is not None, "Required property 'source' is missing"
1651
+ return typing.cast("Source", result)
1652
+
1653
+ @builtins.property
1654
+ def alias(self) -> typing.Optional[builtins.str]:
1655
+ '''An optional user-assigned scraper alias.
1656
+
1657
+ 1-100 characters.
1658
+
1659
+ Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
1660
+ '''
1661
+ result = self._values.get("alias")
1662
+ return typing.cast(typing.Optional[builtins.str], result)
1663
+
1664
+ @builtins.property
1665
+ def role_configuration(self) -> typing.Optional[RoleConfiguration]:
1666
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
1667
+ result = self._values.get("role_configuration")
1668
+ return typing.cast(typing.Optional[RoleConfiguration], result)
1669
+
1670
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1671
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1672
+
1673
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1674
+ return not (rhs == self)
1675
+
1676
+ def __repr__(self) -> str:
1677
+ return "ScraperProps(%s)" % ", ".join(
1678
+ k + "=" + repr(v) for k, v in self._values.items()
1679
+ )
1680
+
1681
+
1682
+ @jsii.data_type(
1683
+ jsii_type="@robhan-cdk-lib/aws_aps.Source",
1684
+ jsii_struct_bases=[],
1685
+ name_mapping={"eks_configuration": "eksConfiguration"},
1686
+ )
1687
+ class Source:
1688
+ def __init__(
1689
+ self,
1690
+ *,
1691
+ eks_configuration: typing.Union[EksConfiguration, typing.Dict[builtins.str, typing.Any]],
1692
+ ) -> None:
1693
+ '''The source of collected metrics for a scraper.
1694
+
1695
+ :param eks_configuration: The Amazon EKS cluster from which a scraper collects metrics.
1696
+ '''
1697
+ if isinstance(eks_configuration, dict):
1698
+ eks_configuration = EksConfiguration(**eks_configuration)
1699
+ if __debug__:
1700
+ type_hints = typing.get_type_hints(_typecheckingstub__2f45388bb39e3b47ec674e4da970163a87c5fb85665ad1fc10517bafda034ad5)
1701
+ check_type(argname="argument eks_configuration", value=eks_configuration, expected_type=type_hints["eks_configuration"])
1702
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1703
+ "eks_configuration": eks_configuration,
1704
+ }
1705
+
1706
+ @builtins.property
1707
+ def eks_configuration(self) -> EksConfiguration:
1708
+ '''The Amazon EKS cluster from which a scraper collects metrics.'''
1709
+ result = self._values.get("eks_configuration")
1710
+ assert result is not None, "Required property 'eks_configuration' is missing"
1711
+ return typing.cast(EksConfiguration, result)
1712
+
1713
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1714
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1715
+
1716
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1717
+ return not (rhs == self)
1718
+
1719
+ def __repr__(self) -> str:
1720
+ return "Source(%s)" % ", ".join(
1721
+ k + "=" + repr(v) for k, v in self._values.items()
1722
+ )
1723
+
1724
+
1725
+ @jsii.data_type(
1726
+ jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceAttributes",
1727
+ jsii_struct_bases=[],
1728
+ name_mapping={
1729
+ "workspace_arn": "workspaceArn",
1730
+ "alert_manager_definition": "alertManagerDefinition",
1731
+ "alias": "alias",
1732
+ "kms_key": "kmsKey",
1733
+ "logging_configuration": "loggingConfiguration",
1734
+ "query_logging_configuration": "queryLoggingConfiguration",
1735
+ "workspace_configuration": "workspaceConfiguration",
1736
+ },
1737
+ )
1738
+ class WorkspaceAttributes:
1739
+ def __init__(
1740
+ self,
1741
+ *,
1742
+ workspace_arn: builtins.str,
1743
+ alert_manager_definition: typing.Optional[builtins.str] = None,
1744
+ alias: typing.Optional[builtins.str] = None,
1745
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
1746
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
1747
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
1748
+ workspace_configuration: typing.Optional[typing.Union["WorkspaceConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1749
+ ) -> None:
1750
+ '''Properties for importing an Amazon Managed Service for Prometheus Workspace from attributes.
1751
+
1752
+ :param workspace_arn: The arn of this workspace.
1753
+ :param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
1754
+ :param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique.
1755
+ :param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
1756
+ :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.
1757
+ :param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
1758
+ :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.
1759
+ '''
1760
+ if isinstance(logging_configuration, dict):
1761
+ logging_configuration = LoggingConfiguration(**logging_configuration)
1762
+ if isinstance(query_logging_configuration, dict):
1763
+ query_logging_configuration = QueryLoggingConfiguration(**query_logging_configuration)
1764
+ if isinstance(workspace_configuration, dict):
1765
+ workspace_configuration = WorkspaceConfiguration(**workspace_configuration)
1766
+ if __debug__:
1767
+ type_hints = typing.get_type_hints(_typecheckingstub__bbfa4d3de7b456e3faeccf136f83095036d68c2058e82076f7a678eeac164e17)
1768
+ check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
1769
+ check_type(argname="argument alert_manager_definition", value=alert_manager_definition, expected_type=type_hints["alert_manager_definition"])
1770
+ check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
1771
+ check_type(argname="argument kms_key", value=kms_key, expected_type=type_hints["kms_key"])
1772
+ check_type(argname="argument logging_configuration", value=logging_configuration, expected_type=type_hints["logging_configuration"])
1773
+ check_type(argname="argument query_logging_configuration", value=query_logging_configuration, expected_type=type_hints["query_logging_configuration"])
1774
+ check_type(argname="argument workspace_configuration", value=workspace_configuration, expected_type=type_hints["workspace_configuration"])
1775
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1776
+ "workspace_arn": workspace_arn,
1777
+ }
1778
+ if alert_manager_definition is not None:
1779
+ self._values["alert_manager_definition"] = alert_manager_definition
1780
+ if alias is not None:
1781
+ self._values["alias"] = alias
1782
+ if kms_key is not None:
1783
+ self._values["kms_key"] = kms_key
1784
+ if logging_configuration is not None:
1785
+ self._values["logging_configuration"] = logging_configuration
1786
+ if query_logging_configuration is not None:
1787
+ self._values["query_logging_configuration"] = query_logging_configuration
1788
+ if workspace_configuration is not None:
1789
+ self._values["workspace_configuration"] = workspace_configuration
1790
+
1791
+ @builtins.property
1792
+ def workspace_arn(self) -> builtins.str:
1793
+ '''The arn of this workspace.'''
1794
+ result = self._values.get("workspace_arn")
1795
+ assert result is not None, "Required property 'workspace_arn' is missing"
1796
+ return typing.cast(builtins.str, result)
1797
+
1798
+ @builtins.property
1799
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
1800
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
1801
+ result = self._values.get("alert_manager_definition")
1802
+ return typing.cast(typing.Optional[builtins.str], result)
1803
+
1804
+ @builtins.property
1805
+ def alias(self) -> typing.Optional[builtins.str]:
1806
+ '''The alias that is assigned to this workspace to help identify it.
1807
+
1808
+ It does not need to be
1809
+ unique.
1810
+ '''
1811
+ result = self._values.get("alias")
1812
+ return typing.cast(typing.Optional[builtins.str], result)
1813
+
1814
+ @builtins.property
1815
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
1816
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
1817
+ result = self._values.get("kms_key")
1818
+ return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], result)
1819
+
1820
+ @builtins.property
1821
+ def logging_configuration(self) -> typing.Optional[LoggingConfiguration]:
1822
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
1823
+
1824
+ Note: These logging configurations are only for rules and alerting logs.
1825
+ '''
1826
+ result = self._values.get("logging_configuration")
1827
+ return typing.cast(typing.Optional[LoggingConfiguration], result)
1828
+
1829
+ @builtins.property
1830
+ def query_logging_configuration(self) -> typing.Optional[QueryLoggingConfiguration]:
1831
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
1832
+ result = self._values.get("query_logging_configuration")
1833
+ return typing.cast(typing.Optional[QueryLoggingConfiguration], result)
1834
+
1835
+ @builtins.property
1836
+ def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
1837
+ '''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.'''
1838
+ result = self._values.get("workspace_configuration")
1839
+ return typing.cast(typing.Optional["WorkspaceConfiguration"], result)
1840
+
1841
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1842
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1843
+
1844
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1845
+ return not (rhs == self)
1846
+
1847
+ def __repr__(self) -> str:
1848
+ return "WorkspaceAttributes(%s)" % ", ".join(
1849
+ k + "=" + repr(v) for k, v in self._values.items()
1850
+ )
1851
+
1852
+
1853
+ @jsii.implements(IWorkspace)
1854
+ class WorkspaceBase(
1855
+ _aws_cdk_ceddda9d.Resource,
1856
+ metaclass=jsii.JSIIAbstractClass,
1857
+ jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceBase",
1858
+ ):
1859
+ def __init__(
1860
+ self,
1861
+ scope: _constructs_77d1e7e8.Construct,
1862
+ id: builtins.str,
1863
+ *,
1864
+ account: typing.Optional[builtins.str] = None,
1865
+ environment_from_arn: typing.Optional[builtins.str] = None,
1866
+ physical_name: typing.Optional[builtins.str] = None,
1867
+ region: typing.Optional[builtins.str] = None,
1868
+ ) -> None:
1869
+ '''
1870
+ :param scope: -
1871
+ :param id: -
1872
+ :param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
1873
+ :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.
1874
+ :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
1875
+ :param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
1876
+ '''
1877
+ if __debug__:
1878
+ type_hints = typing.get_type_hints(_typecheckingstub__26324cd5062f2f5ec83013af6d021bcb8f2e2c6d4df14147a97bf35d099c4a1b)
1879
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1880
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1881
+ props = _aws_cdk_ceddda9d.ResourceProps(
1882
+ account=account,
1883
+ environment_from_arn=environment_from_arn,
1884
+ physical_name=physical_name,
1885
+ region=region,
1886
+ )
1887
+
1888
+ jsii.create(self.__class__, self, [scope, id, props])
1889
+
1890
+ @jsii.member(jsii_name="getWorkspaceId")
1891
+ def _get_workspace_id(self, workspace_arn: builtins.str) -> builtins.str:
1892
+ '''
1893
+ :param workspace_arn: -
1894
+ '''
1895
+ if __debug__:
1896
+ type_hints = typing.get_type_hints(_typecheckingstub__d3ac750f120961e0958cd690a53ccc4e09d55d88803a7e53ed9bc1e70a3a9a78)
1897
+ check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
1898
+ return typing.cast(builtins.str, jsii.invoke(self, "getWorkspaceId", [workspace_arn]))
1899
+
1900
+ @builtins.property
1901
+ @jsii.member(jsii_name="workspaceArn")
1902
+ @abc.abstractmethod
1903
+ def workspace_arn(self) -> builtins.str:
1904
+ '''The ARN of the workspace.'''
1905
+ ...
1906
+
1907
+ @builtins.property
1908
+ @jsii.member(jsii_name="workspaceId")
1909
+ @abc.abstractmethod
1910
+ def workspace_id(self) -> builtins.str:
1911
+ '''The unique ID for the workspace.'''
1912
+ ...
1913
+
1914
+ @builtins.property
1915
+ @jsii.member(jsii_name="alertManagerDefinition")
1916
+ @abc.abstractmethod
1917
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
1918
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
1919
+ ...
1920
+
1921
+ @builtins.property
1922
+ @jsii.member(jsii_name="alias")
1923
+ @abc.abstractmethod
1924
+ def alias(self) -> typing.Optional[builtins.str]:
1925
+ '''The alias that is assigned to this workspace to help identify it.
1926
+
1927
+ It does not need to be
1928
+ unique.
1929
+ '''
1930
+ ...
1931
+
1932
+ @builtins.property
1933
+ @jsii.member(jsii_name="kmsKey")
1934
+ @abc.abstractmethod
1935
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
1936
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
1937
+ ...
1938
+
1939
+ @builtins.property
1940
+ @jsii.member(jsii_name="loggingConfiguration")
1941
+ @abc.abstractmethod
1942
+ def logging_configuration(self) -> typing.Optional[LoggingConfiguration]:
1943
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
1944
+
1945
+ Note: These logging configurations are only for rules and alerting logs.
1946
+ '''
1947
+ ...
1948
+
1949
+ @builtins.property
1950
+ @jsii.member(jsii_name="queryLoggingConfiguration")
1951
+ @abc.abstractmethod
1952
+ def query_logging_configuration(self) -> typing.Optional[QueryLoggingConfiguration]:
1953
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
1954
+ ...
1955
+
1956
+ @builtins.property
1957
+ @jsii.member(jsii_name="workspaceConfiguration")
1958
+ @abc.abstractmethod
1959
+ def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
1960
+ '''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.'''
1961
+ ...
1962
+
1963
+
1964
+ class _WorkspaceBaseProxy(
1965
+ WorkspaceBase,
1966
+ jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
1967
+ ):
1968
+ @builtins.property
1969
+ @jsii.member(jsii_name="workspaceArn")
1970
+ def workspace_arn(self) -> builtins.str:
1971
+ '''The ARN of the workspace.'''
1972
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
1973
+
1974
+ @builtins.property
1975
+ @jsii.member(jsii_name="workspaceId")
1976
+ def workspace_id(self) -> builtins.str:
1977
+ '''The unique ID for the workspace.'''
1978
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
1979
+
1980
+ @builtins.property
1981
+ @jsii.member(jsii_name="alertManagerDefinition")
1982
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
1983
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
1984
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
1985
+
1986
+ @builtins.property
1987
+ @jsii.member(jsii_name="alias")
1988
+ def alias(self) -> typing.Optional[builtins.str]:
1989
+ '''The alias that is assigned to this workspace to help identify it.
1990
+
1991
+ It does not need to be
1992
+ unique.
1993
+ '''
1994
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
1995
+
1996
+ @builtins.property
1997
+ @jsii.member(jsii_name="kmsKey")
1998
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
1999
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
2000
+ return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "kmsKey"))
2001
+
2002
+ @builtins.property
2003
+ @jsii.member(jsii_name="loggingConfiguration")
2004
+ def logging_configuration(self) -> typing.Optional[LoggingConfiguration]:
2005
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
2006
+
2007
+ Note: These logging configurations are only for rules and alerting logs.
2008
+ '''
2009
+ return typing.cast(typing.Optional[LoggingConfiguration], jsii.get(self, "loggingConfiguration"))
2010
+
2011
+ @builtins.property
2012
+ @jsii.member(jsii_name="queryLoggingConfiguration")
2013
+ def query_logging_configuration(self) -> typing.Optional[QueryLoggingConfiguration]:
2014
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
2015
+ return typing.cast(typing.Optional[QueryLoggingConfiguration], jsii.get(self, "queryLoggingConfiguration"))
2016
+
2017
+ @builtins.property
2018
+ @jsii.member(jsii_name="workspaceConfiguration")
2019
+ def workspace_configuration(self) -> typing.Optional["WorkspaceConfiguration"]:
2020
+ '''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.'''
2021
+ return typing.cast(typing.Optional["WorkspaceConfiguration"], jsii.get(self, "workspaceConfiguration"))
2022
+
2023
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
2024
+ typing.cast(typing.Any, WorkspaceBase).__jsii_proxy_class__ = lambda : _WorkspaceBaseProxy
2025
+
2026
+
2027
+ @jsii.data_type(
2028
+ jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceConfiguration",
2029
+ jsii_struct_bases=[],
2030
+ name_mapping={
2031
+ "limits_per_label_sets": "limitsPerLabelSets",
2032
+ "retention_period_in_days": "retentionPeriodInDays",
2033
+ },
2034
+ )
2035
+ class WorkspaceConfiguration:
2036
+ def __init__(
2037
+ self,
2038
+ *,
2039
+ limits_per_label_sets: typing.Optional[typing.Sequence[typing.Union[LimitsPerLabelSet, typing.Dict[builtins.str, typing.Any]]]] = None,
2040
+ retention_period_in_days: typing.Optional[jsii.Number] = None,
2041
+ ) -> None:
2042
+ '''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.
2043
+
2044
+ :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
2045
+ :param retention_period_in_days: Specifies how many days that metrics will be retained in the workspace. Minimum 1
2046
+ '''
2047
+ if __debug__:
2048
+ type_hints = typing.get_type_hints(_typecheckingstub__ae4d82a0bb8d7f12fbf4cbe9ccc1b9bdb2415b0517e902e2bdbf5e5546c092ce)
2049
+ check_type(argname="argument limits_per_label_sets", value=limits_per_label_sets, expected_type=type_hints["limits_per_label_sets"])
2050
+ check_type(argname="argument retention_period_in_days", value=retention_period_in_days, expected_type=type_hints["retention_period_in_days"])
2051
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
2052
+ if limits_per_label_sets is not None:
2053
+ self._values["limits_per_label_sets"] = limits_per_label_sets
2054
+ if retention_period_in_days is not None:
2055
+ self._values["retention_period_in_days"] = retention_period_in_days
2056
+
2057
+ @builtins.property
2058
+ def limits_per_label_sets(self) -> typing.Optional[typing.List[LimitsPerLabelSet]]:
2059
+ '''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.
2060
+
2061
+ Each
2062
+ label name in a label set must be unique.
2063
+
2064
+ Minimum 0
2065
+ '''
2066
+ result = self._values.get("limits_per_label_sets")
2067
+ return typing.cast(typing.Optional[typing.List[LimitsPerLabelSet]], result)
2068
+
2069
+ @builtins.property
2070
+ def retention_period_in_days(self) -> typing.Optional[jsii.Number]:
2071
+ '''Specifies how many days that metrics will be retained in the workspace.
2072
+
2073
+ Minimum 1
2074
+ '''
2075
+ result = self._values.get("retention_period_in_days")
2076
+ return typing.cast(typing.Optional[jsii.Number], result)
2077
+
2078
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
2079
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
2080
+
2081
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
2082
+ return not (rhs == self)
2083
+
2084
+ def __repr__(self) -> str:
2085
+ return "WorkspaceConfiguration(%s)" % ", ".join(
2086
+ k + "=" + repr(v) for k, v in self._values.items()
2087
+ )
2088
+
2089
+
2090
+ @jsii.data_type(
2091
+ jsii_type="@robhan-cdk-lib/aws_aps.WorkspaceProps",
2092
+ jsii_struct_bases=[],
2093
+ name_mapping={
2094
+ "alert_manager_definition": "alertManagerDefinition",
2095
+ "alias": "alias",
2096
+ "kms_key": "kmsKey",
2097
+ "logging_configuration": "loggingConfiguration",
2098
+ "query_logging_configuration": "queryLoggingConfiguration",
2099
+ "workspace_configuration": "workspaceConfiguration",
2100
+ },
2101
+ )
2102
+ class WorkspaceProps:
2103
+ def __init__(
2104
+ self,
2105
+ *,
2106
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2107
+ alias: typing.Optional[builtins.str] = None,
2108
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2109
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2110
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2111
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2112
+ ) -> None:
2113
+ '''Properties for creating an Amazon Managed Service for Prometheus Workspace.
2114
+
2115
+ :param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
2116
+ :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
2117
+ :param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
2118
+ :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.
2119
+ :param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
2120
+ :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.
2121
+ '''
2122
+ if isinstance(logging_configuration, dict):
2123
+ logging_configuration = LoggingConfiguration(**logging_configuration)
2124
+ if isinstance(query_logging_configuration, dict):
2125
+ query_logging_configuration = QueryLoggingConfiguration(**query_logging_configuration)
2126
+ if isinstance(workspace_configuration, dict):
2127
+ workspace_configuration = WorkspaceConfiguration(**workspace_configuration)
2128
+ if __debug__:
2129
+ type_hints = typing.get_type_hints(_typecheckingstub__204cf0cc18e2fd2c643a33020d11a1d61cbfe8a2abd5cd5bda6a222e017e12ef)
2130
+ check_type(argname="argument alert_manager_definition", value=alert_manager_definition, expected_type=type_hints["alert_manager_definition"])
2131
+ check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
2132
+ check_type(argname="argument kms_key", value=kms_key, expected_type=type_hints["kms_key"])
2133
+ check_type(argname="argument logging_configuration", value=logging_configuration, expected_type=type_hints["logging_configuration"])
2134
+ check_type(argname="argument query_logging_configuration", value=query_logging_configuration, expected_type=type_hints["query_logging_configuration"])
2135
+ check_type(argname="argument workspace_configuration", value=workspace_configuration, expected_type=type_hints["workspace_configuration"])
2136
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
2137
+ if alert_manager_definition is not None:
2138
+ self._values["alert_manager_definition"] = alert_manager_definition
2139
+ if alias is not None:
2140
+ self._values["alias"] = alias
2141
+ if kms_key is not None:
2142
+ self._values["kms_key"] = kms_key
2143
+ if logging_configuration is not None:
2144
+ self._values["logging_configuration"] = logging_configuration
2145
+ if query_logging_configuration is not None:
2146
+ self._values["query_logging_configuration"] = query_logging_configuration
2147
+ if workspace_configuration is not None:
2148
+ self._values["workspace_configuration"] = workspace_configuration
2149
+
2150
+ @builtins.property
2151
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
2152
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
2153
+ result = self._values.get("alert_manager_definition")
2154
+ return typing.cast(typing.Optional[builtins.str], result)
2155
+
2156
+ @builtins.property
2157
+ def alias(self) -> typing.Optional[builtins.str]:
2158
+ '''The alias that is assigned to this workspace to help identify it. It does not need to be unique.
2159
+
2160
+ 0 to 100 characters
2161
+ '''
2162
+ result = self._values.get("alias")
2163
+ return typing.cast(typing.Optional[builtins.str], result)
2164
+
2165
+ @builtins.property
2166
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
2167
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
2168
+ result = self._values.get("kms_key")
2169
+ return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], result)
2170
+
2171
+ @builtins.property
2172
+ def logging_configuration(self) -> typing.Optional[LoggingConfiguration]:
2173
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
2174
+
2175
+ Note: These logging configurations are only for rules and alerting logs.
2176
+ '''
2177
+ result = self._values.get("logging_configuration")
2178
+ return typing.cast(typing.Optional[LoggingConfiguration], result)
2179
+
2180
+ @builtins.property
2181
+ def query_logging_configuration(self) -> typing.Optional[QueryLoggingConfiguration]:
2182
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
2183
+ result = self._values.get("query_logging_configuration")
2184
+ return typing.cast(typing.Optional[QueryLoggingConfiguration], result)
2185
+
2186
+ @builtins.property
2187
+ def workspace_configuration(self) -> typing.Optional[WorkspaceConfiguration]:
2188
+ '''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.'''
2189
+ result = self._values.get("workspace_configuration")
2190
+ return typing.cast(typing.Optional[WorkspaceConfiguration], result)
2191
+
2192
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
2193
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
2194
+
2195
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
2196
+ return not (rhs == self)
2197
+
2198
+ def __repr__(self) -> str:
2199
+ return "WorkspaceProps(%s)" % ", ".join(
2200
+ k + "=" + repr(v) for k, v in self._values.items()
2201
+ )
2202
+
2203
+
2204
+ class RuleGroupsNamespace(
2205
+ RuleGroupsNamespaceBase,
2206
+ metaclass=jsii.JSIIMeta,
2207
+ jsii_type="@robhan-cdk-lib/aws_aps.RuleGroupsNamespace",
2208
+ ):
2209
+ '''The definition of a rule groups namespace in an Amazon Managed Service for Prometheus workspace.
2210
+
2211
+ A rule groups namespace is associated with exactly one rules file. A workspace can have multiple
2212
+ rule groups namespaces.
2213
+ '''
2214
+
2215
+ def __init__(
2216
+ self,
2217
+ scope: _constructs_77d1e7e8.Construct,
2218
+ id: builtins.str,
2219
+ *,
2220
+ data: builtins.str,
2221
+ name: builtins.str,
2222
+ workspace: IWorkspace,
2223
+ ) -> None:
2224
+ '''
2225
+ :param scope: -
2226
+ :param id: -
2227
+ :param data: The rules file used in the namespace.
2228
+ :param name: The name of the rule groups namespace. Between 1 and 64 characters.
2229
+ :param workspace: The workspace to add the rule groups namespace.
2230
+ '''
2231
+ if __debug__:
2232
+ type_hints = typing.get_type_hints(_typecheckingstub__6d20ad42e4be3f2ea717b0a2a018087c9c8a4437ea677e47f420ba1b0b9d445d)
2233
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2234
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2235
+ props = RuleGroupsNamespaceProps(data=data, name=name, workspace=workspace)
2236
+
2237
+ jsii.create(self.__class__, self, [scope, id, props])
2238
+
2239
+ @jsii.member(jsii_name="fromRuleGroupsNamespaceAttributes")
2240
+ @builtins.classmethod
2241
+ def from_rule_groups_namespace_attributes(
2242
+ cls,
2243
+ scope: _constructs_77d1e7e8.Construct,
2244
+ id: builtins.str,
2245
+ *,
2246
+ data: builtins.str,
2247
+ name: builtins.str,
2248
+ rule_groups_namespace_arn: builtins.str,
2249
+ workspace: IWorkspace,
2250
+ ) -> IRuleGroupsNamespace:
2251
+ '''
2252
+ :param scope: -
2253
+ :param id: -
2254
+ :param data: The rules file used in the namespace.
2255
+ :param name: The name of the rule groups namespace. Between 1 and 64 characters.
2256
+ :param rule_groups_namespace_arn: The ARN of the rule groups namespace.
2257
+ :param workspace: The workspace to add the rule groups namespace.
2258
+ '''
2259
+ if __debug__:
2260
+ type_hints = typing.get_type_hints(_typecheckingstub__07bf6a97084316812dac20b3c71ddb45a75f79b4a8ec626bd6762069ada7d925)
2261
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2262
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2263
+ attrs = RuleGroupsNamespaceAttributes(
2264
+ data=data,
2265
+ name=name,
2266
+ rule_groups_namespace_arn=rule_groups_namespace_arn,
2267
+ workspace=workspace,
2268
+ )
2269
+
2270
+ return typing.cast(IRuleGroupsNamespace, jsii.sinvoke(cls, "fromRuleGroupsNamespaceAttributes", [scope, id, attrs]))
2271
+
2272
+ @jsii.member(jsii_name="isRuleGroupsNamespace")
2273
+ @builtins.classmethod
2274
+ def is_rule_groups_namespace(cls, x: typing.Any) -> builtins.bool:
2275
+ '''
2276
+ :param x: -
2277
+ '''
2278
+ if __debug__:
2279
+ type_hints = typing.get_type_hints(_typecheckingstub__9f121730976c1abb9dd8b8aeb3d4783892a3f693e887909348c16a32681593f4)
2280
+ check_type(argname="argument x", value=x, expected_type=type_hints["x"])
2281
+ return typing.cast(builtins.bool, jsii.sinvoke(cls, "isRuleGroupsNamespace", [x]))
2282
+
2283
+ @builtins.property
2284
+ @jsii.member(jsii_name="data")
2285
+ def data(self) -> builtins.str:
2286
+ '''The rules file used in the namespace.'''
2287
+ return typing.cast(builtins.str, jsii.get(self, "data"))
2288
+
2289
+ @builtins.property
2290
+ @jsii.member(jsii_name="name")
2291
+ def name(self) -> builtins.str:
2292
+ '''The name of the rule groups namespace.'''
2293
+ return typing.cast(builtins.str, jsii.get(self, "name"))
2294
+
2295
+ @builtins.property
2296
+ @jsii.member(jsii_name="ruleGroupsNamespaceArn")
2297
+ def rule_groups_namespace_arn(self) -> builtins.str:
2298
+ '''The workspace to add the rule groups namespace.'''
2299
+ return typing.cast(builtins.str, jsii.get(self, "ruleGroupsNamespaceArn"))
2300
+
2301
+ @builtins.property
2302
+ @jsii.member(jsii_name="workspace")
2303
+ def workspace(self) -> IWorkspace:
2304
+ '''The workspace to add the rule groups namespace.'''
2305
+ return typing.cast(IWorkspace, jsii.get(self, "workspace"))
2306
+
2307
+
2308
+ class Scraper(
2309
+ ScraperBase,
2310
+ metaclass=jsii.JSIIMeta,
2311
+ jsii_type="@robhan-cdk-lib/aws_aps.Scraper",
2312
+ ):
2313
+ def __init__(
2314
+ self,
2315
+ scope: _constructs_77d1e7e8.Construct,
2316
+ id: builtins.str,
2317
+ *,
2318
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2319
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2320
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2321
+ alias: typing.Optional[builtins.str] = None,
2322
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2323
+ ) -> None:
2324
+ '''
2325
+ :param scope: -
2326
+ :param id: -
2327
+ :param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
2328
+ :param scrape_configuration: The configuration in use by the scraper.
2329
+ :param source: The Amazon EKS cluster from which the scraper collects metrics.
2330
+ :param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
2331
+ :param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
2332
+ '''
2333
+ if __debug__:
2334
+ type_hints = typing.get_type_hints(_typecheckingstub__420a8a3c500b6acbf7b84e9b716db0e0256ad4fe2f714daf764abfebb254c38a)
2335
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2336
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2337
+ props = ScraperProps(
2338
+ destination=destination,
2339
+ scrape_configuration=scrape_configuration,
2340
+ source=source,
2341
+ alias=alias,
2342
+ role_configuration=role_configuration,
2343
+ )
2344
+
2345
+ jsii.create(self.__class__, self, [scope, id, props])
2346
+
2347
+ @jsii.member(jsii_name="frommScraperAttributes")
2348
+ @builtins.classmethod
2349
+ def fromm_scraper_attributes(
2350
+ cls,
2351
+ scope: _constructs_77d1e7e8.Construct,
2352
+ id: builtins.str,
2353
+ *,
2354
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2355
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2356
+ scraper_arn: builtins.str,
2357
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2358
+ alias: typing.Optional[builtins.str] = None,
2359
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2360
+ ) -> IScraper:
2361
+ '''
2362
+ :param scope: -
2363
+ :param id: -
2364
+ :param destination: The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
2365
+ :param scrape_configuration: The configuration in use by the scraper.
2366
+ :param scraper_arn: The ARN of the scraper.
2367
+ :param source: The Amazon EKS cluster from which the scraper collects metrics.
2368
+ :param alias: An optional user-assigned scraper alias. 1-100 characters. Pattern: ^[0-9A-Za-z][-.0-9A-Z_a-z]*$
2369
+ :param role_configuration: The role configuration in an Amazon Managed Service for Prometheus scraper.
2370
+ '''
2371
+ if __debug__:
2372
+ type_hints = typing.get_type_hints(_typecheckingstub__9042463e302e8d5b545ef0b98a65f1ad3e96f26564deaee8cf8be814acdc93d9)
2373
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2374
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2375
+ attrs = ScraperAttributes(
2376
+ destination=destination,
2377
+ scrape_configuration=scrape_configuration,
2378
+ scraper_arn=scraper_arn,
2379
+ source=source,
2380
+ alias=alias,
2381
+ role_configuration=role_configuration,
2382
+ )
2383
+
2384
+ return typing.cast(IScraper, jsii.sinvoke(cls, "frommScraperAttributes", [scope, id, attrs]))
2385
+
2386
+ @jsii.member(jsii_name="isScraper")
2387
+ @builtins.classmethod
2388
+ def is_scraper(cls, x: typing.Any) -> builtins.bool:
2389
+ '''
2390
+ :param x: -
2391
+ '''
2392
+ if __debug__:
2393
+ type_hints = typing.get_type_hints(_typecheckingstub__34e6af43e419cebdae94e53a8eb7f2112edcf143a28894ce155d8f3be94b5f49)
2394
+ check_type(argname="argument x", value=x, expected_type=type_hints["x"])
2395
+ return typing.cast(builtins.bool, jsii.sinvoke(cls, "isScraper", [x]))
2396
+
2397
+ @builtins.property
2398
+ @jsii.member(jsii_name="destination")
2399
+ def destination(self) -> Destination:
2400
+ '''The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.'''
2401
+ return typing.cast(Destination, jsii.get(self, "destination"))
2402
+
2403
+ @builtins.property
2404
+ @jsii.member(jsii_name="scrapeConfiguration")
2405
+ def scrape_configuration(self) -> ScrapeConfiguration:
2406
+ '''The configuration in use by the scraper.'''
2407
+ return typing.cast(ScrapeConfiguration, jsii.get(self, "scrapeConfiguration"))
2408
+
2409
+ @builtins.property
2410
+ @jsii.member(jsii_name="scraperArn")
2411
+ def scraper_arn(self) -> builtins.str:
2412
+ '''The ARN of the scraper.'''
2413
+ return typing.cast(builtins.str, jsii.get(self, "scraperArn"))
2414
+
2415
+ @builtins.property
2416
+ @jsii.member(jsii_name="scraperId")
2417
+ def scraper_id(self) -> builtins.str:
2418
+ '''The ID of the scraper.'''
2419
+ return typing.cast(builtins.str, jsii.get(self, "scraperId"))
2420
+
2421
+ @builtins.property
2422
+ @jsii.member(jsii_name="source")
2423
+ def source(self) -> Source:
2424
+ '''The Amazon EKS cluster from which the scraper collects metrics.'''
2425
+ return typing.cast(Source, jsii.get(self, "source"))
2426
+
2427
+ @builtins.property
2428
+ @jsii.member(jsii_name="alias")
2429
+ def alias(self) -> typing.Optional[builtins.str]:
2430
+ '''An optional user-assigned scraper alias.'''
2431
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
2432
+
2433
+ @builtins.property
2434
+ @jsii.member(jsii_name="roleConfiguration")
2435
+ def role_configuration(self) -> typing.Optional[RoleConfiguration]:
2436
+ '''The role configuration in an Amazon Managed Service for Prometheus scraper.'''
2437
+ return typing.cast(typing.Optional[RoleConfiguration], jsii.get(self, "roleConfiguration"))
2438
+
2439
+
2440
+ class Workspace(
2441
+ WorkspaceBase,
2442
+ metaclass=jsii.JSIIMeta,
2443
+ jsii_type="@robhan-cdk-lib/aws_aps.Workspace",
2444
+ ):
2445
+ def __init__(
2446
+ self,
2447
+ scope: _constructs_77d1e7e8.Construct,
2448
+ id: builtins.str,
2449
+ *,
2450
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2451
+ alias: typing.Optional[builtins.str] = None,
2452
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2453
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2454
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2455
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2456
+ ) -> None:
2457
+ '''
2458
+ :param scope: -
2459
+ :param id: -
2460
+ :param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
2461
+ :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
2462
+ :param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
2463
+ :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.
2464
+ :param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
2465
+ :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.
2466
+ '''
2467
+ if __debug__:
2468
+ type_hints = typing.get_type_hints(_typecheckingstub__fce396480613eba99c44ddbc02181012d71649d36c3a0187e9437c5268bc1cd8)
2469
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2470
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2471
+ props = WorkspaceProps(
2472
+ alert_manager_definition=alert_manager_definition,
2473
+ alias=alias,
2474
+ kms_key=kms_key,
2475
+ logging_configuration=logging_configuration,
2476
+ query_logging_configuration=query_logging_configuration,
2477
+ workspace_configuration=workspace_configuration,
2478
+ )
2479
+
2480
+ jsii.create(self.__class__, self, [scope, id, props])
2481
+
2482
+ @jsii.member(jsii_name="frommWorkspaceAttributes")
2483
+ @builtins.classmethod
2484
+ def fromm_workspace_attributes(
2485
+ cls,
2486
+ scope: _constructs_77d1e7e8.Construct,
2487
+ id: builtins.str,
2488
+ *,
2489
+ workspace_arn: builtins.str,
2490
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2491
+ alias: typing.Optional[builtins.str] = None,
2492
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2493
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2494
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2495
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2496
+ ) -> IWorkspace:
2497
+ '''
2498
+ :param scope: -
2499
+ :param id: -
2500
+ :param workspace_arn: The arn of this workspace.
2501
+ :param alert_manager_definition: The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
2502
+ :param alias: The alias that is assigned to this workspace to help identify it. It does not need to be unique.
2503
+ :param kms_key: The customer managed AWS KMS key to use for encrypting data within your workspace.
2504
+ :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.
2505
+ :param query_logging_configuration: The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
2506
+ :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.
2507
+ '''
2508
+ if __debug__:
2509
+ type_hints = typing.get_type_hints(_typecheckingstub__1c50e7638e8bb3bf822a899f34fed4b617b43ec46db0dae395a20c7ba16636bf)
2510
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
2511
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
2512
+ attrs = WorkspaceAttributes(
2513
+ workspace_arn=workspace_arn,
2514
+ alert_manager_definition=alert_manager_definition,
2515
+ alias=alias,
2516
+ kms_key=kms_key,
2517
+ logging_configuration=logging_configuration,
2518
+ query_logging_configuration=query_logging_configuration,
2519
+ workspace_configuration=workspace_configuration,
2520
+ )
2521
+
2522
+ return typing.cast(IWorkspace, jsii.sinvoke(cls, "frommWorkspaceAttributes", [scope, id, attrs]))
2523
+
2524
+ @jsii.member(jsii_name="isWorkspace")
2525
+ @builtins.classmethod
2526
+ def is_workspace(cls, x: typing.Any) -> builtins.bool:
2527
+ '''
2528
+ :param x: -
2529
+ '''
2530
+ if __debug__:
2531
+ type_hints = typing.get_type_hints(_typecheckingstub__fe05f7c3509dfbf0a171e57ba19ea445d159aeb564d5e5a1ee5815df73224518)
2532
+ check_type(argname="argument x", value=x, expected_type=type_hints["x"])
2533
+ return typing.cast(builtins.bool, jsii.sinvoke(cls, "isWorkspace", [x]))
2534
+
2535
+ @builtins.property
2536
+ @jsii.member(jsii_name="prometheusEndpoint")
2537
+ def prometheus_endpoint(self) -> builtins.str:
2538
+ '''The Prometheus endpoint available for this workspace..'''
2539
+ return typing.cast(builtins.str, jsii.get(self, "prometheusEndpoint"))
2540
+
2541
+ @builtins.property
2542
+ @jsii.member(jsii_name="workspaceArn")
2543
+ def workspace_arn(self) -> builtins.str:
2544
+ '''The ARN of the workspace.'''
2545
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
2546
+
2547
+ @builtins.property
2548
+ @jsii.member(jsii_name="workspaceId")
2549
+ def workspace_id(self) -> builtins.str:
2550
+ '''The unique ID for the workspace.'''
2551
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
2552
+
2553
+ @builtins.property
2554
+ @jsii.member(jsii_name="alertManagerDefinition")
2555
+ def alert_manager_definition(self) -> typing.Optional[builtins.str]:
2556
+ '''The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.'''
2557
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alertManagerDefinition"))
2558
+
2559
+ @builtins.property
2560
+ @jsii.member(jsii_name="alias")
2561
+ def alias(self) -> typing.Optional[builtins.str]:
2562
+ '''The alias that is assigned to this workspace to help identify it.
2563
+
2564
+ It does not need to be
2565
+ unique.
2566
+ '''
2567
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
2568
+
2569
+ @builtins.property
2570
+ @jsii.member(jsii_name="kmsKey")
2571
+ def kms_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey]:
2572
+ '''The customer managed AWS KMS key to use for encrypting data within your workspace.'''
2573
+ return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey], jsii.get(self, "kmsKey"))
2574
+
2575
+ @builtins.property
2576
+ @jsii.member(jsii_name="loggingConfiguration")
2577
+ def logging_configuration(self) -> typing.Optional[LoggingConfiguration]:
2578
+ '''Contains information about the current rules and alerting logging configuration for the workspace.
2579
+
2580
+ Note: These logging configurations are only for rules and alerting logs.
2581
+ '''
2582
+ return typing.cast(typing.Optional[LoggingConfiguration], jsii.get(self, "loggingConfiguration"))
2583
+
2584
+ @builtins.property
2585
+ @jsii.member(jsii_name="queryLoggingConfiguration")
2586
+ def query_logging_configuration(self) -> typing.Optional[QueryLoggingConfiguration]:
2587
+ '''The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.'''
2588
+ return typing.cast(typing.Optional[QueryLoggingConfiguration], jsii.get(self, "queryLoggingConfiguration"))
2589
+
2590
+ @builtins.property
2591
+ @jsii.member(jsii_name="workspaceConfiguration")
2592
+ def workspace_configuration(self) -> typing.Optional[WorkspaceConfiguration]:
2593
+ '''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.'''
2594
+ return typing.cast(typing.Optional[WorkspaceConfiguration], jsii.get(self, "workspaceConfiguration"))
2595
+
2596
+
2597
+ __all__ = [
2598
+ "AmpConfiguration",
2599
+ "CloudWatchLogDestination",
2600
+ "Destination",
2601
+ "EksConfiguration",
2602
+ "IRuleGroupsNamespace",
2603
+ "IScraper",
2604
+ "IWorkspace",
2605
+ "Label",
2606
+ "LimitsPerLabelSet",
2607
+ "LimitsPerLabelSetEntry",
2608
+ "LoggingConfiguration",
2609
+ "LoggingDestination",
2610
+ "LoggingFilter",
2611
+ "QueryLoggingConfiguration",
2612
+ "RoleConfiguration",
2613
+ "RuleGroupsNamespace",
2614
+ "RuleGroupsNamespaceAttributes",
2615
+ "RuleGroupsNamespaceBase",
2616
+ "RuleGroupsNamespaceProps",
2617
+ "ScrapeConfiguration",
2618
+ "Scraper",
2619
+ "ScraperAttributes",
2620
+ "ScraperBase",
2621
+ "ScraperProps",
2622
+ "Source",
2623
+ "Workspace",
2624
+ "WorkspaceAttributes",
2625
+ "WorkspaceBase",
2626
+ "WorkspaceConfiguration",
2627
+ "WorkspaceProps",
2628
+ ]
2629
+
2630
+ publication.publish()
2631
+
2632
+ def _typecheckingstub__9b57f1ed441699407024d3a67f6d0ecf1fd33175a38d466e4e90e190923b70a0(
2633
+ *,
2634
+ workspace: IWorkspace,
2635
+ ) -> None:
2636
+ """Type checking stubs"""
2637
+ pass
2638
+
2639
+ def _typecheckingstub__f4c8d116f44cd0ce0c010e39612b1f9f3d190e82d3f5f4c0372ae03517a31a79(
2640
+ *,
2641
+ log_group: _aws_cdk_aws_logs_ceddda9d.ILogGroup,
2642
+ ) -> None:
2643
+ """Type checking stubs"""
2644
+ pass
2645
+
2646
+ def _typecheckingstub__f247dc1883eff5c9525a2e09081bf65d9f34dc7f9581f5fcb643b104e14afa09(
2647
+ *,
2648
+ amp_configuration: typing.Union[AmpConfiguration, typing.Dict[builtins.str, typing.Any]],
2649
+ ) -> None:
2650
+ """Type checking stubs"""
2651
+ pass
2652
+
2653
+ def _typecheckingstub__9e3526038ce65e3714e7b69cac8f1dac03b300f7ee7b6eb0a81f578bb9386261(
2654
+ *,
2655
+ cluster: _aws_cdk_aws_eks_ceddda9d.ICluster,
2656
+ subnets: typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISubnet],
2657
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
2658
+ ) -> None:
2659
+ """Type checking stubs"""
2660
+ pass
2661
+
2662
+ def _typecheckingstub__5c797aa51820ba19e3974b523e246d357e3b44ff0bc743b0f1171b5ae9bebdea(
2663
+ *,
2664
+ name: builtins.str,
2665
+ value: builtins.str,
2666
+ ) -> None:
2667
+ """Type checking stubs"""
2668
+ pass
2669
+
2670
+ def _typecheckingstub__6893b1308b220935b9f1ce7c4eae4ddc73c29be6663d247911732ccfcec7f4d9(
2671
+ *,
2672
+ label_set: typing.Sequence[typing.Union[Label, typing.Dict[builtins.str, typing.Any]]],
2673
+ limits: typing.Union[LimitsPerLabelSetEntry, typing.Dict[builtins.str, typing.Any]],
2674
+ ) -> None:
2675
+ """Type checking stubs"""
2676
+ pass
2677
+
2678
+ def _typecheckingstub__f53acc1bbc1fb66aa75ed0ff80395c4fd66be1563ee572788afab4e42af12da4(
2679
+ *,
2680
+ max_series: typing.Optional[jsii.Number] = None,
2681
+ ) -> None:
2682
+ """Type checking stubs"""
2683
+ pass
2684
+
2685
+ def _typecheckingstub__282c7cd599e82904024934838ca325999d8149f211c5885145973734c9c85b76(
2686
+ *,
2687
+ log_group: typing.Optional[_aws_cdk_aws_logs_ceddda9d.ILogGroup] = None,
2688
+ ) -> None:
2689
+ """Type checking stubs"""
2690
+ pass
2691
+
2692
+ def _typecheckingstub__2496000b19af109fb0c5c290e32ab9bbc75be51fbfa27d16758c01f8baf00891(
2693
+ *,
2694
+ cloud_watch_logs: typing.Union[CloudWatchLogDestination, typing.Dict[builtins.str, typing.Any]],
2695
+ filters: typing.Union[LoggingFilter, typing.Dict[builtins.str, typing.Any]],
2696
+ ) -> None:
2697
+ """Type checking stubs"""
2698
+ pass
2699
+
2700
+ def _typecheckingstub__c7beea1121128e5f35f0720b90b21713abba4beef8755e891bbf87c2ad9711a0(
2701
+ *,
2702
+ qsp_threshold: jsii.Number,
2703
+ ) -> None:
2704
+ """Type checking stubs"""
2705
+ pass
2706
+
2707
+ def _typecheckingstub__092820c29e1435155b193e5488fd2841dcea5141110ab984fa14a237e2f4a4ae(
2708
+ *,
2709
+ destinations: typing.Sequence[typing.Union[LoggingDestination, typing.Dict[builtins.str, typing.Any]]],
2710
+ ) -> None:
2711
+ """Type checking stubs"""
2712
+ pass
2713
+
2714
+ def _typecheckingstub__e96c135bdcece9823caf073421082af151c59b6d52a5918bb38689bbca7ab2a3(
2715
+ *,
2716
+ source_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2717
+ target_role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2718
+ ) -> None:
2719
+ """Type checking stubs"""
2720
+ pass
2721
+
2722
+ def _typecheckingstub__aca59ceb33a6b456771bcbba45d97752cb2f2f13917c19b7e97cd69b7f165a45(
2723
+ *,
2724
+ data: builtins.str,
2725
+ name: builtins.str,
2726
+ rule_groups_namespace_arn: builtins.str,
2727
+ workspace: IWorkspace,
2728
+ ) -> None:
2729
+ """Type checking stubs"""
2730
+ pass
2731
+
2732
+ def _typecheckingstub__54435341b8b1c3c7efe004b41ef5c6d515fe3983bc74fae1b1b26947b9d05f20(
2733
+ scope: _constructs_77d1e7e8.Construct,
2734
+ id: builtins.str,
2735
+ *,
2736
+ account: typing.Optional[builtins.str] = None,
2737
+ environment_from_arn: typing.Optional[builtins.str] = None,
2738
+ physical_name: typing.Optional[builtins.str] = None,
2739
+ region: typing.Optional[builtins.str] = None,
2740
+ ) -> None:
2741
+ """Type checking stubs"""
2742
+ pass
2743
+
2744
+ def _typecheckingstub__38cadfd9b05a1407d50e98748f6488d0e79d3484e75c5786ea83b3235d73c3e1(
2745
+ *,
2746
+ data: builtins.str,
2747
+ name: builtins.str,
2748
+ workspace: IWorkspace,
2749
+ ) -> None:
2750
+ """Type checking stubs"""
2751
+ pass
2752
+
2753
+ def _typecheckingstub__6313d0a5d8e3eda66be90025eafb5520d36fb7fb11adbc40c4398cb56b0ce09d(
2754
+ *,
2755
+ configuration_blob: builtins.str,
2756
+ ) -> None:
2757
+ """Type checking stubs"""
2758
+ pass
2759
+
2760
+ def _typecheckingstub__2aab74937b2fefec81fb3f25317393581e00fbda88f9d176c61fd521a9189d81(
2761
+ *,
2762
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2763
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2764
+ scraper_arn: builtins.str,
2765
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2766
+ alias: typing.Optional[builtins.str] = None,
2767
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2768
+ ) -> None:
2769
+ """Type checking stubs"""
2770
+ pass
2771
+
2772
+ def _typecheckingstub__79f44dd804edbb4f2d30815f15d40d8f8c94bc90ec7657ced6d4b8716930412f(
2773
+ scope: _constructs_77d1e7e8.Construct,
2774
+ id: builtins.str,
2775
+ *,
2776
+ account: typing.Optional[builtins.str] = None,
2777
+ environment_from_arn: typing.Optional[builtins.str] = None,
2778
+ physical_name: typing.Optional[builtins.str] = None,
2779
+ region: typing.Optional[builtins.str] = None,
2780
+ ) -> None:
2781
+ """Type checking stubs"""
2782
+ pass
2783
+
2784
+ def _typecheckingstub__720023f01199e16b0b50b3928b380b6c70d0c625eb677c6631c94d1822effb36(
2785
+ scraper_arn: builtins.str,
2786
+ ) -> None:
2787
+ """Type checking stubs"""
2788
+ pass
2789
+
2790
+ def _typecheckingstub__e27ba8269266aa91c926829a5c485aaf203a6638ce54c2fced4fdf950ba2e944(
2791
+ *,
2792
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2793
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2794
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2795
+ alias: typing.Optional[builtins.str] = None,
2796
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2797
+ ) -> None:
2798
+ """Type checking stubs"""
2799
+ pass
2800
+
2801
+ def _typecheckingstub__2f45388bb39e3b47ec674e4da970163a87c5fb85665ad1fc10517bafda034ad5(
2802
+ *,
2803
+ eks_configuration: typing.Union[EksConfiguration, typing.Dict[builtins.str, typing.Any]],
2804
+ ) -> None:
2805
+ """Type checking stubs"""
2806
+ pass
2807
+
2808
+ def _typecheckingstub__bbfa4d3de7b456e3faeccf136f83095036d68c2058e82076f7a678eeac164e17(
2809
+ *,
2810
+ workspace_arn: builtins.str,
2811
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2812
+ alias: typing.Optional[builtins.str] = None,
2813
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2814
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2815
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2816
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2817
+ ) -> None:
2818
+ """Type checking stubs"""
2819
+ pass
2820
+
2821
+ def _typecheckingstub__26324cd5062f2f5ec83013af6d021bcb8f2e2c6d4df14147a97bf35d099c4a1b(
2822
+ scope: _constructs_77d1e7e8.Construct,
2823
+ id: builtins.str,
2824
+ *,
2825
+ account: typing.Optional[builtins.str] = None,
2826
+ environment_from_arn: typing.Optional[builtins.str] = None,
2827
+ physical_name: typing.Optional[builtins.str] = None,
2828
+ region: typing.Optional[builtins.str] = None,
2829
+ ) -> None:
2830
+ """Type checking stubs"""
2831
+ pass
2832
+
2833
+ def _typecheckingstub__d3ac750f120961e0958cd690a53ccc4e09d55d88803a7e53ed9bc1e70a3a9a78(
2834
+ workspace_arn: builtins.str,
2835
+ ) -> None:
2836
+ """Type checking stubs"""
2837
+ pass
2838
+
2839
+ def _typecheckingstub__ae4d82a0bb8d7f12fbf4cbe9ccc1b9bdb2415b0517e902e2bdbf5e5546c092ce(
2840
+ *,
2841
+ limits_per_label_sets: typing.Optional[typing.Sequence[typing.Union[LimitsPerLabelSet, typing.Dict[builtins.str, typing.Any]]]] = None,
2842
+ retention_period_in_days: typing.Optional[jsii.Number] = None,
2843
+ ) -> None:
2844
+ """Type checking stubs"""
2845
+ pass
2846
+
2847
+ def _typecheckingstub__204cf0cc18e2fd2c643a33020d11a1d61cbfe8a2abd5cd5bda6a222e017e12ef(
2848
+ *,
2849
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2850
+ alias: typing.Optional[builtins.str] = None,
2851
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2852
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2853
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2854
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2855
+ ) -> None:
2856
+ """Type checking stubs"""
2857
+ pass
2858
+
2859
+ def _typecheckingstub__6d20ad42e4be3f2ea717b0a2a018087c9c8a4437ea677e47f420ba1b0b9d445d(
2860
+ scope: _constructs_77d1e7e8.Construct,
2861
+ id: builtins.str,
2862
+ *,
2863
+ data: builtins.str,
2864
+ name: builtins.str,
2865
+ workspace: IWorkspace,
2866
+ ) -> None:
2867
+ """Type checking stubs"""
2868
+ pass
2869
+
2870
+ def _typecheckingstub__07bf6a97084316812dac20b3c71ddb45a75f79b4a8ec626bd6762069ada7d925(
2871
+ scope: _constructs_77d1e7e8.Construct,
2872
+ id: builtins.str,
2873
+ *,
2874
+ data: builtins.str,
2875
+ name: builtins.str,
2876
+ rule_groups_namespace_arn: builtins.str,
2877
+ workspace: IWorkspace,
2878
+ ) -> None:
2879
+ """Type checking stubs"""
2880
+ pass
2881
+
2882
+ def _typecheckingstub__9f121730976c1abb9dd8b8aeb3d4783892a3f693e887909348c16a32681593f4(
2883
+ x: typing.Any,
2884
+ ) -> None:
2885
+ """Type checking stubs"""
2886
+ pass
2887
+
2888
+ def _typecheckingstub__420a8a3c500b6acbf7b84e9b716db0e0256ad4fe2f714daf764abfebb254c38a(
2889
+ scope: _constructs_77d1e7e8.Construct,
2890
+ id: builtins.str,
2891
+ *,
2892
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2893
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2894
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2895
+ alias: typing.Optional[builtins.str] = None,
2896
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2897
+ ) -> None:
2898
+ """Type checking stubs"""
2899
+ pass
2900
+
2901
+ def _typecheckingstub__9042463e302e8d5b545ef0b98a65f1ad3e96f26564deaee8cf8be814acdc93d9(
2902
+ scope: _constructs_77d1e7e8.Construct,
2903
+ id: builtins.str,
2904
+ *,
2905
+ destination: typing.Union[Destination, typing.Dict[builtins.str, typing.Any]],
2906
+ scrape_configuration: typing.Union[ScrapeConfiguration, typing.Dict[builtins.str, typing.Any]],
2907
+ scraper_arn: builtins.str,
2908
+ source: typing.Union[Source, typing.Dict[builtins.str, typing.Any]],
2909
+ alias: typing.Optional[builtins.str] = None,
2910
+ role_configuration: typing.Optional[typing.Union[RoleConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2911
+ ) -> None:
2912
+ """Type checking stubs"""
2913
+ pass
2914
+
2915
+ def _typecheckingstub__34e6af43e419cebdae94e53a8eb7f2112edcf143a28894ce155d8f3be94b5f49(
2916
+ x: typing.Any,
2917
+ ) -> None:
2918
+ """Type checking stubs"""
2919
+ pass
2920
+
2921
+ def _typecheckingstub__fce396480613eba99c44ddbc02181012d71649d36c3a0187e9437c5268bc1cd8(
2922
+ scope: _constructs_77d1e7e8.Construct,
2923
+ id: builtins.str,
2924
+ *,
2925
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2926
+ alias: typing.Optional[builtins.str] = None,
2927
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2928
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2929
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2930
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2931
+ ) -> None:
2932
+ """Type checking stubs"""
2933
+ pass
2934
+
2935
+ def _typecheckingstub__1c50e7638e8bb3bf822a899f34fed4b617b43ec46db0dae395a20c7ba16636bf(
2936
+ scope: _constructs_77d1e7e8.Construct,
2937
+ id: builtins.str,
2938
+ *,
2939
+ workspace_arn: builtins.str,
2940
+ alert_manager_definition: typing.Optional[builtins.str] = None,
2941
+ alias: typing.Optional[builtins.str] = None,
2942
+ kms_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.IKey] = None,
2943
+ logging_configuration: typing.Optional[typing.Union[LoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2944
+ query_logging_configuration: typing.Optional[typing.Union[QueryLoggingConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2945
+ workspace_configuration: typing.Optional[typing.Union[WorkspaceConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2946
+ ) -> None:
2947
+ """Type checking stubs"""
2948
+ pass
2949
+
2950
+ def _typecheckingstub__fe05f7c3509dfbf0a171e57ba19ea445d159aeb564d5e5a1ee5815df73224518(
2951
+ x: typing.Any,
2952
+ ) -> None:
2953
+ """Type checking stubs"""
2954
+ pass