aws-cdk-lib 2.207.0__py3-none-any.whl → 2.209.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 aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +31 -3
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.207.0.jsii.tgz → aws-cdk-lib@2.209.0.jsii.tgz} +0 -0
- aws_cdk/aws_aiops/__init__.py +16 -12
- aws_cdk/aws_amazonmq/__init__.py +8 -18
- aws_cdk/aws_appstream/__init__.py +36 -4
- aws_cdk/aws_bedrock/__init__.py +227 -102
- aws_cdk/aws_certificatemanager/__init__.py +45 -0
- aws_cdk/aws_cloudfront/__init__.py +12 -2
- aws_cdk/aws_connect/__init__.py +107 -3
- aws_cdk/aws_customerprofiles/__init__.py +27 -22
- aws_cdk/aws_docdb/__init__.py +5 -3
- aws_cdk/aws_ec2/__init__.py +58 -16
- aws_cdk/aws_ecs/__init__.py +1554 -78
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +27 -15
- aws_cdk/aws_events/__init__.py +142 -0
- aws_cdk/aws_gamelift/__init__.py +2 -2
- aws_cdk/aws_guardduty/__init__.py +86 -0
- aws_cdk/aws_kinesisfirehose/__init__.py +377 -4
- aws_cdk/aws_lambda/__init__.py +76 -67
- aws_cdk/aws_logs/__init__.py +53 -4
- aws_cdk/aws_mediapackagev2/__init__.py +881 -0
- aws_cdk/aws_omics/__init__.py +13 -10
- aws_cdk/aws_quicksight/__init__.py +111 -4
- aws_cdk/aws_rds/__init__.py +214 -10
- aws_cdk/aws_route53/__init__.py +97 -41
- aws_cdk/aws_s3/__init__.py +775 -5
- aws_cdk/aws_s3express/__init__.py +61 -3
- aws_cdk/aws_s3tables/__init__.py +254 -0
- aws_cdk/aws_sagemaker/__init__.py +524 -137
- aws_cdk/aws_ssm/__init__.py +48 -0
- aws_cdk/aws_transfer/__init__.py +49 -0
- aws_cdk/aws_wisdom/__init__.py +1185 -100
- aws_cdk/cloud_assembly_schema/__init__.py +28 -2
- aws_cdk/custom_resources/__init__.py +1 -1
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/RECORD +41 -41
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_lambda/__init__.py
CHANGED
|
@@ -11698,32 +11698,30 @@ class CfnVersionProps:
|
|
|
11698
11698
|
class Code(metaclass=jsii.JSIIAbstractClass, jsii_type="aws-cdk-lib.aws_lambda.Code"):
|
|
11699
11699
|
'''Represents the Lambda Handler Code.
|
|
11700
11700
|
|
|
11701
|
-
:exampleMetadata: infused
|
|
11701
|
+
:exampleMetadata: fixture=default infused
|
|
11702
11702
|
|
|
11703
11703
|
Example::
|
|
11704
11704
|
|
|
11705
|
-
|
|
11705
|
+
# Create or reference an existing L1 CfnApplicationInferenceProfile
|
|
11706
|
+
cfn_profile = aws_bedrock_cfn.CfnApplicationInferenceProfile(self, "CfnProfile",
|
|
11707
|
+
inference_profile_name="my-cfn-profile",
|
|
11708
|
+
model_source=aws_bedrock_cfn.CfnApplicationInferenceProfile.InferenceProfileModelSourceProperty(
|
|
11709
|
+
copy_from=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0.invokable_arn
|
|
11710
|
+
),
|
|
11711
|
+
description="Profile created via L1 construct"
|
|
11712
|
+
)
|
|
11706
11713
|
|
|
11714
|
+
# Import the L1 construct as an L2 ApplicationInferenceProfile
|
|
11715
|
+
imported_from_cfn = bedrock.ApplicationInferenceProfile.from_cfn_application_inference_profile(cfn_profile)
|
|
11707
11716
|
|
|
11708
|
-
|
|
11709
|
-
|
|
11717
|
+
# Grant permissions to use the imported profile
|
|
11718
|
+
lambda_function = lambda_.Function(self, "MyFunction",
|
|
11719
|
+
runtime=lambda_.Runtime.PYTHON_3_11,
|
|
11710
11720
|
handler="index.handler",
|
|
11711
|
-
code=lambda_.Code.from_inline("
|
|
11712
|
-
)
|
|
11713
|
-
|
|
11714
|
-
rule = events.Rule(self, "rule",
|
|
11715
|
-
event_pattern=events.EventPattern(
|
|
11716
|
-
source=["aws.ec2"]
|
|
11717
|
-
)
|
|
11721
|
+
code=lambda_.Code.from_inline("def handler(event, context): return \"Hello\"")
|
|
11718
11722
|
)
|
|
11719
11723
|
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
rule.add_target(targets.LambdaFunction(fn,
|
|
11723
|
-
dead_letter_queue=queue, # Optional: add a dead letter queue
|
|
11724
|
-
max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
|
|
11725
|
-
retry_attempts=2
|
|
11726
|
-
))
|
|
11724
|
+
imported_from_cfn.grant_profile_usage(lambda_function)
|
|
11727
11725
|
'''
|
|
11728
11726
|
|
|
11729
11727
|
def __init__(self) -> None:
|
|
@@ -16838,32 +16836,30 @@ class FunctionProps(FunctionOptions):
|
|
|
16838
16836
|
:param handler: The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html. Use ``Handler.FROM_IMAGE`` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
|
|
16839
16837
|
:param runtime: The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use ``Runtime.FROM_IMAGE`` when defining a function from a Docker image.
|
|
16840
16838
|
|
|
16841
|
-
:exampleMetadata: infused
|
|
16839
|
+
:exampleMetadata: fixture=default infused
|
|
16842
16840
|
|
|
16843
16841
|
Example::
|
|
16844
16842
|
|
|
16845
|
-
|
|
16843
|
+
# Create or reference an existing L1 CfnApplicationInferenceProfile
|
|
16844
|
+
cfn_profile = aws_bedrock_cfn.CfnApplicationInferenceProfile(self, "CfnProfile",
|
|
16845
|
+
inference_profile_name="my-cfn-profile",
|
|
16846
|
+
model_source=aws_bedrock_cfn.CfnApplicationInferenceProfile.InferenceProfileModelSourceProperty(
|
|
16847
|
+
copy_from=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0.invokable_arn
|
|
16848
|
+
),
|
|
16849
|
+
description="Profile created via L1 construct"
|
|
16850
|
+
)
|
|
16846
16851
|
|
|
16852
|
+
# Import the L1 construct as an L2 ApplicationInferenceProfile
|
|
16853
|
+
imported_from_cfn = bedrock.ApplicationInferenceProfile.from_cfn_application_inference_profile(cfn_profile)
|
|
16847
16854
|
|
|
16848
|
-
|
|
16849
|
-
|
|
16855
|
+
# Grant permissions to use the imported profile
|
|
16856
|
+
lambda_function = lambda_.Function(self, "MyFunction",
|
|
16857
|
+
runtime=lambda_.Runtime.PYTHON_3_11,
|
|
16850
16858
|
handler="index.handler",
|
|
16851
|
-
code=lambda_.Code.from_inline("
|
|
16859
|
+
code=lambda_.Code.from_inline("def handler(event, context): return \"Hello\"")
|
|
16852
16860
|
)
|
|
16853
16861
|
|
|
16854
|
-
|
|
16855
|
-
event_pattern=events.EventPattern(
|
|
16856
|
-
source=["aws.ec2"]
|
|
16857
|
-
)
|
|
16858
|
-
)
|
|
16859
|
-
|
|
16860
|
-
queue = sqs.Queue(self, "Queue")
|
|
16861
|
-
|
|
16862
|
-
rule.add_target(targets.LambdaFunction(fn,
|
|
16863
|
-
dead_letter_queue=queue, # Optional: add a dead letter queue
|
|
16864
|
-
max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
|
|
16865
|
-
retry_attempts=2
|
|
16866
|
-
))
|
|
16862
|
+
imported_from_cfn.grant_profile_usage(lambda_function)
|
|
16867
16863
|
'''
|
|
16868
16864
|
if isinstance(adot_instrumentation, dict):
|
|
16869
16865
|
adot_instrumentation = AdotInstrumentationConfig(**adot_instrumentation)
|
|
@@ -20553,6 +20549,18 @@ class LambdaInsightsVersion(
|
|
|
20553
20549
|
'''Version 1.0.333.0.'''
|
|
20554
20550
|
return typing.cast("LambdaInsightsVersion", jsii.sget(cls, "VERSION_1_0_333_0"))
|
|
20555
20551
|
|
|
20552
|
+
@jsii.python.classproperty
|
|
20553
|
+
@jsii.member(jsii_name="VERSION_1_0_391_0")
|
|
20554
|
+
def VERSION_1_0_391_0(cls) -> "LambdaInsightsVersion":
|
|
20555
|
+
'''Version 1.0.391.0.'''
|
|
20556
|
+
return typing.cast("LambdaInsightsVersion", jsii.sget(cls, "VERSION_1_0_391_0"))
|
|
20557
|
+
|
|
20558
|
+
@jsii.python.classproperty
|
|
20559
|
+
@jsii.member(jsii_name="VERSION_1_0_404_0")
|
|
20560
|
+
def VERSION_1_0_404_0(cls) -> "LambdaInsightsVersion":
|
|
20561
|
+
'''Version 1.0.404.0.'''
|
|
20562
|
+
return typing.cast("LambdaInsightsVersion", jsii.sget(cls, "VERSION_1_0_404_0"))
|
|
20563
|
+
|
|
20556
20564
|
@jsii.python.classproperty
|
|
20557
20565
|
@jsii.member(jsii_name="VERSION_1_0_54_0")
|
|
20558
20566
|
def VERSION_1_0_54_0(cls) -> "LambdaInsightsVersion":
|
|
@@ -22317,27 +22325,30 @@ class Runtime(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_lambda.Runtime
|
|
|
22317
22325
|
If you need to use a runtime name that doesn't exist as a static member, you
|
|
22318
22326
|
can instantiate a ``Runtime`` object, e.g: ``new Runtime('nodejs99.99')``.
|
|
22319
22327
|
|
|
22320
|
-
:exampleMetadata: infused
|
|
22328
|
+
:exampleMetadata: fixture=default infused
|
|
22321
22329
|
|
|
22322
22330
|
Example::
|
|
22323
22331
|
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22328
|
-
|
|
22332
|
+
# Create or reference an existing L1 CfnApplicationInferenceProfile
|
|
22333
|
+
cfn_profile = aws_bedrock_cfn.CfnApplicationInferenceProfile(self, "CfnProfile",
|
|
22334
|
+
inference_profile_name="my-cfn-profile",
|
|
22335
|
+
model_source=aws_bedrock_cfn.CfnApplicationInferenceProfile.InferenceProfileModelSourceProperty(
|
|
22336
|
+
copy_from=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0.invokable_arn
|
|
22337
|
+
),
|
|
22338
|
+
description="Profile created via L1 construct"
|
|
22329
22339
|
)
|
|
22330
22340
|
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
)
|
|
22341
|
+
# Import the L1 construct as an L2 ApplicationInferenceProfile
|
|
22342
|
+
imported_from_cfn = bedrock.ApplicationInferenceProfile.from_cfn_application_inference_profile(cfn_profile)
|
|
22334
22343
|
|
|
22335
|
-
|
|
22336
|
-
|
|
22337
|
-
runtime=lambda_.Runtime.
|
|
22344
|
+
# Grant permissions to use the imported profile
|
|
22345
|
+
lambda_function = lambda_.Function(self, "MyFunction",
|
|
22346
|
+
runtime=lambda_.Runtime.PYTHON_3_11,
|
|
22338
22347
|
handler="index.handler",
|
|
22339
|
-
code=lambda_.Code.
|
|
22348
|
+
code=lambda_.Code.from_inline("def handler(event, context): return \"Hello\"")
|
|
22340
22349
|
)
|
|
22350
|
+
|
|
22351
|
+
imported_from_cfn.grant_profile_usage(lambda_function)
|
|
22341
22352
|
'''
|
|
22342
22353
|
|
|
22343
22354
|
def __init__(
|
|
@@ -29414,32 +29425,30 @@ class Function(
|
|
|
29414
29425
|
This construct does not yet reproduce all features from the underlying resource
|
|
29415
29426
|
library.
|
|
29416
29427
|
|
|
29417
|
-
:exampleMetadata: infused
|
|
29428
|
+
:exampleMetadata: fixture=default infused
|
|
29418
29429
|
|
|
29419
29430
|
Example::
|
|
29420
29431
|
|
|
29421
|
-
|
|
29432
|
+
# Create or reference an existing L1 CfnApplicationInferenceProfile
|
|
29433
|
+
cfn_profile = aws_bedrock_cfn.CfnApplicationInferenceProfile(self, "CfnProfile",
|
|
29434
|
+
inference_profile_name="my-cfn-profile",
|
|
29435
|
+
model_source=aws_bedrock_cfn.CfnApplicationInferenceProfile.InferenceProfileModelSourceProperty(
|
|
29436
|
+
copy_from=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0.invokable_arn
|
|
29437
|
+
),
|
|
29438
|
+
description="Profile created via L1 construct"
|
|
29439
|
+
)
|
|
29422
29440
|
|
|
29441
|
+
# Import the L1 construct as an L2 ApplicationInferenceProfile
|
|
29442
|
+
imported_from_cfn = bedrock.ApplicationInferenceProfile.from_cfn_application_inference_profile(cfn_profile)
|
|
29423
29443
|
|
|
29424
|
-
|
|
29425
|
-
|
|
29444
|
+
# Grant permissions to use the imported profile
|
|
29445
|
+
lambda_function = lambda_.Function(self, "MyFunction",
|
|
29446
|
+
runtime=lambda_.Runtime.PYTHON_3_11,
|
|
29426
29447
|
handler="index.handler",
|
|
29427
|
-
code=lambda_.Code.from_inline("
|
|
29428
|
-
)
|
|
29429
|
-
|
|
29430
|
-
rule = events.Rule(self, "rule",
|
|
29431
|
-
event_pattern=events.EventPattern(
|
|
29432
|
-
source=["aws.ec2"]
|
|
29433
|
-
)
|
|
29448
|
+
code=lambda_.Code.from_inline("def handler(event, context): return \"Hello\"")
|
|
29434
29449
|
)
|
|
29435
29450
|
|
|
29436
|
-
|
|
29437
|
-
|
|
29438
|
-
rule.add_target(targets.LambdaFunction(fn,
|
|
29439
|
-
dead_letter_queue=queue, # Optional: add a dead letter queue
|
|
29440
|
-
max_event_age=Duration.hours(2), # Optional: set the maxEventAge retry policy
|
|
29441
|
-
retry_attempts=2
|
|
29442
|
-
))
|
|
29451
|
+
imported_from_cfn.grant_profile_usage(lambda_function)
|
|
29443
29452
|
'''
|
|
29444
29453
|
|
|
29445
29454
|
def __init__(
|
aws_cdk/aws_logs/__init__.py
CHANGED
|
@@ -221,7 +221,6 @@ the name `Namespace/MetricName`.
|
|
|
221
221
|
|
|
222
222
|
You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API.
|
|
223
223
|
This has a default of `statistic = 'avg'` if the statistic is not set in the `props`.
|
|
224
|
-
Additionally, if the metric filter was created with a dimension map, those dimensions will be included in the metric.
|
|
225
224
|
|
|
226
225
|
```python
|
|
227
226
|
# log_group: logs.LogGroup
|
|
@@ -418,6 +417,8 @@ logs.QueryDefinition(self, "QueryDefinition",
|
|
|
418
417
|
],
|
|
419
418
|
filter_statements=["loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""
|
|
420
419
|
],
|
|
420
|
+
stats_statements=["count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"
|
|
421
|
+
],
|
|
421
422
|
sort="@timestamp desc",
|
|
422
423
|
limit=20
|
|
423
424
|
)
|
|
@@ -15055,6 +15056,8 @@ class QueryDefinition(
|
|
|
15055
15056
|
],
|
|
15056
15057
|
filter_statements=["loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""
|
|
15057
15058
|
],
|
|
15059
|
+
stats_statements=["count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"
|
|
15060
|
+
],
|
|
15058
15061
|
sort="@timestamp desc",
|
|
15059
15062
|
limit=20
|
|
15060
15063
|
)
|
|
@@ -15140,6 +15143,8 @@ class QueryDefinitionProps:
|
|
|
15140
15143
|
],
|
|
15141
15144
|
filter_statements=["loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""
|
|
15142
15145
|
],
|
|
15146
|
+
stats_statements=["count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"
|
|
15147
|
+
],
|
|
15143
15148
|
sort="@timestamp desc",
|
|
15144
15149
|
limit=20
|
|
15145
15150
|
)
|
|
@@ -15210,6 +15215,8 @@ class QueryString(
|
|
|
15210
15215
|
],
|
|
15211
15216
|
filter_statements=["loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""
|
|
15212
15217
|
],
|
|
15218
|
+
stats_statements=["count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"
|
|
15219
|
+
],
|
|
15213
15220
|
sort="@timestamp desc",
|
|
15214
15221
|
limit=20
|
|
15215
15222
|
)
|
|
@@ -15228,6 +15235,7 @@ class QueryString(
|
|
|
15228
15235
|
parse_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
15229
15236
|
sort: typing.Optional[builtins.str] = None,
|
|
15230
15237
|
stats: typing.Optional[builtins.str] = None,
|
|
15238
|
+
stats_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
15231
15239
|
) -> None:
|
|
15232
15240
|
'''
|
|
15233
15241
|
:param display: Specifies which fields to display in the query results. Default: - no display in QueryString
|
|
@@ -15238,7 +15246,8 @@ class QueryString(
|
|
|
15238
15246
|
:param parse: (deprecated) A single statement for parsing data from a log field and creating ephemeral fields that can be processed further in the query. Default: - no parse in QueryString
|
|
15239
15247
|
:param parse_statements: An array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query. Each provided statement generates a separate parse line in the query string. Note: If provided, this property overrides any value provided for the ``parse`` property. Default: - no parse in QueryString
|
|
15240
15248
|
:param sort: Sorts the retrieved log events. Default: - no sort in QueryString
|
|
15241
|
-
:param stats:
|
|
15249
|
+
:param stats: (deprecated) A single statement for using log field values to calculate aggregate statistics. Default: - no stats in QueryString
|
|
15250
|
+
:param stats_statements: An array of one or more statements for calculating aggregate statistics. CloudWatch Logs Insights supports up to two stats commands in a single query. Each provided statement generates a separate stats line in the query string. Note: If provided, this property overrides any value provided for the ``stats`` property. Default: - no stats in QueryString
|
|
15242
15251
|
'''
|
|
15243
15252
|
props = QueryStringProps(
|
|
15244
15253
|
display=display,
|
|
@@ -15250,6 +15259,7 @@ class QueryString(
|
|
|
15250
15259
|
parse_statements=parse_statements,
|
|
15251
15260
|
sort=sort,
|
|
15252
15261
|
stats=stats,
|
|
15262
|
+
stats_statements=stats_statements,
|
|
15253
15263
|
)
|
|
15254
15264
|
|
|
15255
15265
|
jsii.create(self.__class__, self, [props])
|
|
@@ -15259,6 +15269,18 @@ class QueryString(
|
|
|
15259
15269
|
'''String representation of this QueryString.'''
|
|
15260
15270
|
return typing.cast(builtins.str, jsii.invoke(self, "toString", []))
|
|
15261
15271
|
|
|
15272
|
+
@builtins.property
|
|
15273
|
+
@jsii.member(jsii_name="hasStatsAndStatsStatements")
|
|
15274
|
+
def has_stats_and_stats_statements(self) -> builtins.bool:
|
|
15275
|
+
'''If the props for the query string have both stats and statsStatements.'''
|
|
15276
|
+
return typing.cast(builtins.bool, jsii.get(self, "hasStatsAndStatsStatements"))
|
|
15277
|
+
|
|
15278
|
+
@builtins.property
|
|
15279
|
+
@jsii.member(jsii_name="statsStatementsLength")
|
|
15280
|
+
def stats_statements_length(self) -> typing.Optional[jsii.Number]:
|
|
15281
|
+
'''Length of statsStatements.'''
|
|
15282
|
+
return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "statsStatementsLength"))
|
|
15283
|
+
|
|
15262
15284
|
|
|
15263
15285
|
@jsii.data_type(
|
|
15264
15286
|
jsii_type="aws-cdk-lib.aws_logs.QueryStringProps",
|
|
@@ -15273,6 +15295,7 @@ class QueryString(
|
|
|
15273
15295
|
"parse_statements": "parseStatements",
|
|
15274
15296
|
"sort": "sort",
|
|
15275
15297
|
"stats": "stats",
|
|
15298
|
+
"stats_statements": "statsStatements",
|
|
15276
15299
|
},
|
|
15277
15300
|
)
|
|
15278
15301
|
class QueryStringProps:
|
|
@@ -15288,6 +15311,7 @@ class QueryStringProps:
|
|
|
15288
15311
|
parse_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
15289
15312
|
sort: typing.Optional[builtins.str] = None,
|
|
15290
15313
|
stats: typing.Optional[builtins.str] = None,
|
|
15314
|
+
stats_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
15291
15315
|
) -> None:
|
|
15292
15316
|
'''Properties for a QueryString.
|
|
15293
15317
|
|
|
@@ -15299,7 +15323,8 @@ class QueryStringProps:
|
|
|
15299
15323
|
:param parse: (deprecated) A single statement for parsing data from a log field and creating ephemeral fields that can be processed further in the query. Default: - no parse in QueryString
|
|
15300
15324
|
:param parse_statements: An array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query. Each provided statement generates a separate parse line in the query string. Note: If provided, this property overrides any value provided for the ``parse`` property. Default: - no parse in QueryString
|
|
15301
15325
|
:param sort: Sorts the retrieved log events. Default: - no sort in QueryString
|
|
15302
|
-
:param stats:
|
|
15326
|
+
:param stats: (deprecated) A single statement for using log field values to calculate aggregate statistics. Default: - no stats in QueryString
|
|
15327
|
+
:param stats_statements: An array of one or more statements for calculating aggregate statistics. CloudWatch Logs Insights supports up to two stats commands in a single query. Each provided statement generates a separate stats line in the query string. Note: If provided, this property overrides any value provided for the ``stats`` property. Default: - no stats in QueryString
|
|
15303
15328
|
|
|
15304
15329
|
:exampleMetadata: infused
|
|
15305
15330
|
|
|
@@ -15313,6 +15338,8 @@ class QueryStringProps:
|
|
|
15313
15338
|
],
|
|
15314
15339
|
filter_statements=["loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""
|
|
15315
15340
|
],
|
|
15341
|
+
stats_statements=["count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"
|
|
15342
|
+
],
|
|
15316
15343
|
sort="@timestamp desc",
|
|
15317
15344
|
limit=20
|
|
15318
15345
|
)
|
|
@@ -15329,6 +15356,7 @@ class QueryStringProps:
|
|
|
15329
15356
|
check_type(argname="argument parse_statements", value=parse_statements, expected_type=type_hints["parse_statements"])
|
|
15330
15357
|
check_type(argname="argument sort", value=sort, expected_type=type_hints["sort"])
|
|
15331
15358
|
check_type(argname="argument stats", value=stats, expected_type=type_hints["stats"])
|
|
15359
|
+
check_type(argname="argument stats_statements", value=stats_statements, expected_type=type_hints["stats_statements"])
|
|
15332
15360
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
15333
15361
|
if display is not None:
|
|
15334
15362
|
self._values["display"] = display
|
|
@@ -15348,6 +15376,8 @@ class QueryStringProps:
|
|
|
15348
15376
|
self._values["sort"] = sort
|
|
15349
15377
|
if stats is not None:
|
|
15350
15378
|
self._values["stats"] = stats
|
|
15379
|
+
if stats_statements is not None:
|
|
15380
|
+
self._values["stats_statements"] = stats_statements
|
|
15351
15381
|
|
|
15352
15382
|
@builtins.property
|
|
15353
15383
|
def display(self) -> typing.Optional[builtins.str]:
|
|
@@ -15440,13 +15470,31 @@ class QueryStringProps:
|
|
|
15440
15470
|
|
|
15441
15471
|
@builtins.property
|
|
15442
15472
|
def stats(self) -> typing.Optional[builtins.str]:
|
|
15443
|
-
'''
|
|
15473
|
+
'''(deprecated) A single statement for using log field values to calculate aggregate statistics.
|
|
15444
15474
|
|
|
15445
15475
|
:default: - no stats in QueryString
|
|
15476
|
+
|
|
15477
|
+
:deprecated: Use ``statsStatements`` instead
|
|
15478
|
+
|
|
15479
|
+
:stability: deprecated
|
|
15446
15480
|
'''
|
|
15447
15481
|
result = self._values.get("stats")
|
|
15448
15482
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
15449
15483
|
|
|
15484
|
+
@builtins.property
|
|
15485
|
+
def stats_statements(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
15486
|
+
'''An array of one or more statements for calculating aggregate statistics.
|
|
15487
|
+
|
|
15488
|
+
CloudWatch Logs Insights supports up to two stats commands in a single query.
|
|
15489
|
+
Each provided statement generates a separate stats line in the query string.
|
|
15490
|
+
|
|
15491
|
+
Note: If provided, this property overrides any value provided for the ``stats`` property.
|
|
15492
|
+
|
|
15493
|
+
:default: - no stats in QueryString
|
|
15494
|
+
'''
|
|
15495
|
+
result = self._values.get("stats_statements")
|
|
15496
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
15497
|
+
|
|
15450
15498
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
15451
15499
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
15452
15500
|
|
|
@@ -19645,6 +19693,7 @@ def _typecheckingstub__d205eb2ac9b46de0083e3387b95b00f2362e2ade91d5c581e5d8cde68
|
|
|
19645
19693
|
parse_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
19646
19694
|
sort: typing.Optional[builtins.str] = None,
|
|
19647
19695
|
stats: typing.Optional[builtins.str] = None,
|
|
19696
|
+
stats_statements: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
19648
19697
|
) -> None:
|
|
19649
19698
|
"""Type checking stubs"""
|
|
19650
19699
|
pass
|