aws-cdk-lib 2.150.0__py3-none-any.whl → 2.151.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 +4 -10
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.150.0.jsii.tgz → aws-cdk-lib@2.151.0.jsii.tgz} +0 -0
- aws_cdk/aws_apigatewayv2/__init__.py +94 -21
- aws_cdk/aws_appconfig/__init__.py +3 -3
- aws_cdk/aws_backup/__init__.py +3 -3
- aws_cdk/aws_bedrock/__init__.py +28 -20
- aws_cdk/aws_cleanrooms/__init__.py +5 -5
- aws_cdk/aws_cloudformation/__init__.py +2 -2
- aws_cdk/aws_cloudfront/__init__.py +102 -32
- aws_cdk/aws_cloudtrail/__init__.py +6 -2
- aws_cdk/aws_ec2/__init__.py +181 -3
- aws_cdk/aws_ecs/__init__.py +6 -2
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +104 -9
- aws_cdk/aws_entityresolution/__init__.py +27 -21
- aws_cdk/aws_events/__init__.py +83 -16
- aws_cdk/aws_iam/__init__.py +11 -24
- aws_cdk/aws_iotsitewise/__init__.py +8 -8
- aws_cdk/aws_lambda/__init__.py +2 -0
- aws_cdk/aws_mwaa/__init__.py +3 -3
- aws_cdk/aws_pipes/__init__.py +2 -2
- aws_cdk/aws_rds/__init__.py +237 -197
- aws_cdk/aws_s3/__init__.py +8 -2
- aws_cdk/aws_ses/__init__.py +3 -3
- aws_cdk/aws_sns/__init__.py +5 -2
- aws_cdk/aws_stepfunctions/__init__.py +5 -2
- aws_cdk/aws_stepfunctions_tasks/__init__.py +17 -0
- aws_cdk/aws_synthetics/__init__.py +159 -21
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/RECORD +34 -34
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.150.0.dist-info → aws_cdk_lib-2.151.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_s3/__init__.py
CHANGED
|
@@ -4014,7 +4014,7 @@ class CfnBucket(
|
|
|
4014
4014
|
:param public_access_block_configuration: Configuration that defines how Amazon S3 handles public access.
|
|
4015
4015
|
:param replication_configuration: Configuration for replicating objects in an S3 bucket. To enable replication, you must also enable versioning by using the ``VersioningConfiguration`` property. Amazon S3 can store replicated objects in a single destination bucket or multiple destination buckets. The destination bucket or buckets must already exist.
|
|
4016
4016
|
:param tags: An arbitrary set of tags (key-value pairs) for this S3 bucket.
|
|
4017
|
-
:param versioning_configuration: Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.
|
|
4017
|
+
:param versioning_configuration: Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them. .. epigraph:: When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations ( ``PUT`` or ``DELETE`` ) on objects in the bucket.
|
|
4018
4018
|
:param website_configuration: Information used to configure the bucket as a static website. For more information, see `Hosting Websites on Amazon S3 <https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html>`_ .
|
|
4019
4019
|
'''
|
|
4020
4020
|
if __debug__:
|
|
@@ -10049,6 +10049,9 @@ class CfnBucket(
|
|
|
10049
10049
|
'''Describes the versioning state of an Amazon S3 bucket.
|
|
10050
10050
|
|
|
10051
10051
|
For more information, see `PUT Bucket versioning <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html>`_ in the *Amazon S3 API Reference* .
|
|
10052
|
+
.. epigraph::
|
|
10053
|
+
|
|
10054
|
+
When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations ( ``PUT`` or ``DELETE`` ) on objects in the bucket.
|
|
10052
10055
|
|
|
10053
10056
|
:param status: The versioning state of the bucket. Default: - "Suspended"
|
|
10054
10057
|
|
|
@@ -10494,7 +10497,7 @@ class CfnBucketProps:
|
|
|
10494
10497
|
:param public_access_block_configuration: Configuration that defines how Amazon S3 handles public access.
|
|
10495
10498
|
:param replication_configuration: Configuration for replicating objects in an S3 bucket. To enable replication, you must also enable versioning by using the ``VersioningConfiguration`` property. Amazon S3 can store replicated objects in a single destination bucket or multiple destination buckets. The destination bucket or buckets must already exist.
|
|
10496
10499
|
:param tags: An arbitrary set of tags (key-value pairs) for this S3 bucket.
|
|
10497
|
-
:param versioning_configuration: Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.
|
|
10500
|
+
:param versioning_configuration: Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them. .. epigraph:: When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations ( ``PUT`` or ``DELETE`` ) on objects in the bucket.
|
|
10498
10501
|
:param website_configuration: Information used to configure the bucket as a static website. For more information, see `Hosting Websites on Amazon S3 <https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html>`_ .
|
|
10499
10502
|
|
|
10500
10503
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html
|
|
@@ -10817,6 +10820,9 @@ class CfnBucketProps:
|
|
|
10817
10820
|
'''Enables multiple versions of all objects in this bucket.
|
|
10818
10821
|
|
|
10819
10822
|
You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.
|
|
10823
|
+
.. epigraph::
|
|
10824
|
+
|
|
10825
|
+
When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations ( ``PUT`` or ``DELETE`` ) on objects in the bucket.
|
|
10820
10826
|
|
|
10821
10827
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html#cfn-s3-bucket-versioningconfiguration
|
|
10822
10828
|
'''
|
aws_cdk/aws_ses/__init__.py
CHANGED
|
@@ -6759,7 +6759,7 @@ class ConfigurationSetProps:
|
|
|
6759
6759
|
:param configuration_set_name: A name for the configuration set. Default: - a CloudFormation generated name
|
|
6760
6760
|
:param custom_tracking_redirect_domain: The custom subdomain that is used to redirect email recipients to the Amazon SES event tracking domain. Default: - use the default awstrack.me domain
|
|
6761
6761
|
:param dedicated_ip_pool: The dedicated IP pool to associate with the configuration set. Default: - do not use a dedicated IP pool
|
|
6762
|
-
:param reputation_metrics: Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. Default:
|
|
6762
|
+
:param reputation_metrics: Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. Default: true
|
|
6763
6763
|
:param sending_enabled: Whether email sending is enabled. Default: true
|
|
6764
6764
|
:param suppression_reasons: The reasons for which recipient email addresses should be automatically added to your account's suppression list. Default: - use account level settings
|
|
6765
6765
|
:param tls_policy: Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). Default: ConfigurationSetTlsPolicy.OPTIONAL
|
|
@@ -6840,7 +6840,7 @@ class ConfigurationSetProps:
|
|
|
6840
6840
|
def reputation_metrics(self) -> typing.Optional[builtins.bool]:
|
|
6841
6841
|
'''Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch.
|
|
6842
6842
|
|
|
6843
|
-
:default:
|
|
6843
|
+
:default: true
|
|
6844
6844
|
'''
|
|
6845
6845
|
result = self._values.get("reputation_metrics")
|
|
6846
6846
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
@@ -9912,7 +9912,7 @@ class ConfigurationSet(
|
|
|
9912
9912
|
:param configuration_set_name: A name for the configuration set. Default: - a CloudFormation generated name
|
|
9913
9913
|
:param custom_tracking_redirect_domain: The custom subdomain that is used to redirect email recipients to the Amazon SES event tracking domain. Default: - use the default awstrack.me domain
|
|
9914
9914
|
:param dedicated_ip_pool: The dedicated IP pool to associate with the configuration set. Default: - do not use a dedicated IP pool
|
|
9915
|
-
:param reputation_metrics: Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. Default:
|
|
9915
|
+
:param reputation_metrics: Whether to publish reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch. Default: true
|
|
9916
9916
|
:param sending_enabled: Whether email sending is enabled. Default: true
|
|
9917
9917
|
:param suppression_reasons: The reasons for which recipient email addresses should be automatically added to your account's suppression list. Default: - use account level settings
|
|
9918
9918
|
:param tls_policy: Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). Default: ConfigurationSetTlsPolicy.OPTIONAL
|
aws_cdk/aws_sns/__init__.py
CHANGED
|
@@ -5248,7 +5248,7 @@ class TopicProps:
|
|
|
5248
5248
|
'''Properties for a new SNS topic.
|
|
5249
5249
|
|
|
5250
5250
|
:param content_based_deduplication: Enables content-based deduplication for FIFO topics. Default: None
|
|
5251
|
-
:param display_name: A developer-defined string that can be used to identify this SNS topic. Default: None
|
|
5251
|
+
:param display_name: A developer-defined string that can be used to identify this SNS topic. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs. Default: None
|
|
5252
5252
|
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. Default: false
|
|
5253
5253
|
:param fifo: Set to true to create a FIFO topic. Default: None
|
|
5254
5254
|
:param logging_configs: The list of delivery status logging configurations for the topic. Default: None
|
|
@@ -5313,6 +5313,9 @@ class TopicProps:
|
|
|
5313
5313
|
def display_name(self) -> typing.Optional[builtins.str]:
|
|
5314
5314
|
'''A developer-defined string that can be used to identify this SNS topic.
|
|
5315
5315
|
|
|
5316
|
+
The display name must be maximum 100 characters long, including hyphens (-),
|
|
5317
|
+
underscores (_), spaces, and tabs.
|
|
5318
|
+
|
|
5316
5319
|
:default: None
|
|
5317
5320
|
'''
|
|
5318
5321
|
result = self._values.get("display_name")
|
|
@@ -5780,7 +5783,7 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5780
5783
|
:param scope: -
|
|
5781
5784
|
:param id: -
|
|
5782
5785
|
:param content_based_deduplication: Enables content-based deduplication for FIFO topics. Default: None
|
|
5783
|
-
:param display_name: A developer-defined string that can be used to identify this SNS topic. Default: None
|
|
5786
|
+
:param display_name: A developer-defined string that can be used to identify this SNS topic. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs. Default: None
|
|
5784
5787
|
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. Default: false
|
|
5785
5788
|
:param fifo: Set to true to create a FIFO topic. Default: None
|
|
5786
5789
|
:param logging_configs: The list of delivery status logging configurations for the topic. Default: None
|
|
@@ -2649,7 +2649,7 @@ class CfnStateMachineAlias(
|
|
|
2649
2649
|
|
|
2650
2650
|
:param state_machine_version_arn: The Amazon Resource Name (ARN) of the ```AWS::StepFunctions::StateMachineVersion`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html>`_ resource that will be the final version to which the alias points to when the traffic shifting is complete. While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use ``RoutingConfiguration`` instead.
|
|
2651
2651
|
:param type: The type of deployment you want to perform. You can specify one of the following types:. - ``LINEAR`` - Shifts traffic to the new version in equal increments with an equal number of minutes between each increment. For example, if you specify the increment percent as ``20`` with an interval of ``600`` minutes, this deployment increases traffic by 20 percent every 600 minutes until the new version receives 100 percent of the traffic. This deployment immediately rolls back the new version if any CloudWatch alarms are triggered. - ``ALL_AT_ONCE`` - Shifts 100 percent of traffic to the new version immediately. CloudFormation monitors the new version and rolls it back automatically to the previous version if any CloudWatch alarms are triggered. - ``CANARY`` - Shifts traffic in two increments. In the first increment, a small percentage of traffic, for example, 10 percent is shifted to the new version. In the second increment, before a specified time interval in seconds gets over, the remaining traffic is shifted to the new version. The shift to the new version for the remaining traffic takes place only if no CloudWatch alarms are triggered during the specified time interval.
|
|
2652
|
-
:param alarms: A list of Amazon CloudWatch
|
|
2652
|
+
:param alarms: A list of Amazon CloudWatch alarm names to be monitored during the deployment. The deployment fails and rolls back if any of these alarms go into the ``ALARM`` state. .. epigraph:: Amazon CloudWatch considers nonexistent alarms to have an ``OK`` state. If you provide an invalid alarm name or provide the ARN of an alarm instead of its name, your deployment may not roll back correctly.
|
|
2653
2653
|
:param interval: The time in minutes between each traffic shifting increment.
|
|
2654
2654
|
:param percentage: The percentage of traffic to shift to the new version in each increment.
|
|
2655
2655
|
|
|
@@ -2723,9 +2723,12 @@ class CfnStateMachineAlias(
|
|
|
2723
2723
|
|
|
2724
2724
|
@builtins.property
|
|
2725
2725
|
def alarms(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
2726
|
-
'''A list of Amazon CloudWatch
|
|
2726
|
+
'''A list of Amazon CloudWatch alarm names to be monitored during the deployment.
|
|
2727
2727
|
|
|
2728
2728
|
The deployment fails and rolls back if any of these alarms go into the ``ALARM`` state.
|
|
2729
|
+
.. epigraph::
|
|
2730
|
+
|
|
2731
|
+
Amazon CloudWatch considers nonexistent alarms to have an ``OK`` state. If you provide an invalid alarm name or provide the ARN of an alarm instead of its name, your deployment may not roll back correctly.
|
|
2729
2732
|
|
|
2730
2733
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-alarms
|
|
2731
2734
|
'''
|
|
@@ -420,6 +420,23 @@ task = tasks.BedrockInvokeModel(self, "Prompt Model",
|
|
|
420
420
|
)
|
|
421
421
|
```
|
|
422
422
|
|
|
423
|
+
### Using Input Path
|
|
424
|
+
|
|
425
|
+
Provide S3 URI as an input or output path to invoke a model
|
|
426
|
+
|
|
427
|
+
```python
|
|
428
|
+
import aws_cdk.aws_bedrock as bedrock
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
model = bedrock.FoundationModel.from_foundation_model_id(self, "Model", bedrock.FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1)
|
|
432
|
+
|
|
433
|
+
task = tasks.BedrockInvokeModel(self, "Prompt Model",
|
|
434
|
+
model=model,
|
|
435
|
+
input_path=sfn.JsonPath.string_at("$.prompt"),
|
|
436
|
+
output_path=sfn.JsonPath.string_at("$.prompt")
|
|
437
|
+
)
|
|
438
|
+
```
|
|
439
|
+
|
|
423
440
|
You can apply a guardrail to the invocation by setting `guardrail`.
|
|
424
441
|
|
|
425
442
|
```python
|
|
@@ -88,6 +88,64 @@ schedule = synthetics.Schedule.cron(
|
|
|
88
88
|
|
|
89
89
|
If you want the canary to run just once upon deployment, you can use `Schedule.once()`.
|
|
90
90
|
|
|
91
|
+
### Active Tracing
|
|
92
|
+
|
|
93
|
+
You can choose to enable active AWS X-Ray tracing on canaries that use the `syn-nodejs-2.0` or later runtime by setting `activeTracing` to `true`.
|
|
94
|
+
|
|
95
|
+
With tracing enabled, traces are sent for all calls made by the canary that use the browser, the AWS SDK, or HTTP or HTTPS modules.
|
|
96
|
+
|
|
97
|
+
For more information, see [Canaries and X-Ray tracing](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html).
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
canary = synthetics.Canary(self, "MyCanary",
|
|
101
|
+
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
102
|
+
test=synthetics.Test.custom(
|
|
103
|
+
code=synthetics.Code.from_asset(path.join(__dirname, "canary")),
|
|
104
|
+
handler="index.handler"
|
|
105
|
+
),
|
|
106
|
+
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
107
|
+
active_tracing=True
|
|
108
|
+
)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Memory
|
|
112
|
+
|
|
113
|
+
You can set the maximum amount of memory the canary can use while running with the `memory` property.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
import aws_cdk as cdk
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
canary = synthetics.Canary(self, "MyCanary",
|
|
120
|
+
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
121
|
+
test=synthetics.Test.custom(
|
|
122
|
+
code=synthetics.Code.from_asset(path.join(__dirname, "canary")),
|
|
123
|
+
handler="index.handler"
|
|
124
|
+
),
|
|
125
|
+
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
126
|
+
memory=cdk.Size.mebibytes(1024)
|
|
127
|
+
)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Timeout
|
|
131
|
+
|
|
132
|
+
You can set how long the canary is allowed to run before it must stop with the `timeout` property.
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
import aws_cdk as cdk
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
canary = synthetics.Canary(self, "MyCanary",
|
|
139
|
+
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
140
|
+
test=synthetics.Test.custom(
|
|
141
|
+
code=synthetics.Code.from_asset(path.join(__dirname, "canary")),
|
|
142
|
+
handler="index.handler"
|
|
143
|
+
),
|
|
144
|
+
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
145
|
+
timeout=cdk.Duration.seconds(60)
|
|
146
|
+
)
|
|
147
|
+
```
|
|
148
|
+
|
|
91
149
|
### Deleting underlying resources on canary deletion
|
|
92
150
|
|
|
93
151
|
When you delete a lambda, the following underlying resources are isolated in your AWS account:
|
|
@@ -279,6 +337,7 @@ from .. import (
|
|
|
279
337
|
ITaggable as _ITaggable_36806126,
|
|
280
338
|
IgnoreMode as _IgnoreMode_655a98e8,
|
|
281
339
|
Resource as _Resource_45bc6135,
|
|
340
|
+
Size as _Size_7b441c34,
|
|
282
341
|
SymlinkFollowMode as _SymlinkFollowMode_047ec1f6,
|
|
283
342
|
TagManager as _TagManager_0a598cb3,
|
|
284
343
|
TreeInspector as _TreeInspector_488e0dd5,
|
|
@@ -394,6 +453,9 @@ class Canary(
|
|
|
394
453
|
|
|
395
454
|
Example::
|
|
396
455
|
|
|
456
|
+
import aws_cdk as cdk
|
|
457
|
+
|
|
458
|
+
|
|
397
459
|
canary = synthetics.Canary(self, "MyCanary",
|
|
398
460
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
399
461
|
test=synthetics.Test.custom(
|
|
@@ -401,9 +463,7 @@ class Canary(
|
|
|
401
463
|
handler="index.handler"
|
|
402
464
|
),
|
|
403
465
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
404
|
-
|
|
405
|
-
"stage": "prod"
|
|
406
|
-
}
|
|
466
|
+
memory=cdk.Size.mebibytes(1024)
|
|
407
467
|
)
|
|
408
468
|
'''
|
|
409
469
|
|
|
@@ -414,17 +474,20 @@ class Canary(
|
|
|
414
474
|
*,
|
|
415
475
|
runtime: "Runtime",
|
|
416
476
|
test: "Test",
|
|
477
|
+
active_tracing: typing.Optional[builtins.bool] = None,
|
|
417
478
|
artifacts_bucket_lifecycle_rules: typing.Optional[typing.Sequence[typing.Union[_LifecycleRule_bb74e6ff, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
418
479
|
artifacts_bucket_location: typing.Optional[typing.Union[ArtifactsBucketLocation, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
419
480
|
canary_name: typing.Optional[builtins.str] = None,
|
|
420
481
|
cleanup: typing.Optional["Cleanup"] = None,
|
|
421
482
|
environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
422
483
|
failure_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
484
|
+
memory: typing.Optional[_Size_7b441c34] = None,
|
|
423
485
|
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
424
486
|
schedule: typing.Optional["Schedule"] = None,
|
|
425
487
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
426
488
|
start_after_creation: typing.Optional[builtins.bool] = None,
|
|
427
489
|
success_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
490
|
+
timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
428
491
|
time_to_live: typing.Optional[_Duration_4839e8c3] = None,
|
|
429
492
|
vpc: typing.Optional[_IVpc_f30d5663] = None,
|
|
430
493
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -434,17 +497,20 @@ class Canary(
|
|
|
434
497
|
:param id: -
|
|
435
498
|
:param runtime: Specify the runtime version to use for the canary.
|
|
436
499
|
:param test: The type of test that you want your canary to run. Use ``Test.custom()`` to specify the test to run.
|
|
500
|
+
:param active_tracing: Specifies whether this canary is to use active AWS X-Ray tracing when it runs. Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the canary does not hit an endpoint that has X-Ray tracing enabled. Using X-Ray tracing incurs charges. You can enable active tracing only for canaries that use version ``syn-nodejs-2.0`` or later for their canary runtime. Default: false
|
|
437
501
|
:param artifacts_bucket_lifecycle_rules: Lifecycle rules for the generated canary artifact bucket. Has no effect if a bucket is passed to ``artifactsBucketLocation``. If you pass a bucket to ``artifactsBucketLocation``, you can add lifecycle rules to the bucket itself. Default: - no rules applied to the generated bucket.
|
|
438
502
|
:param artifacts_bucket_location: The s3 location that stores the data of the canary runs. Default: - A new s3 bucket will be created without a prefix.
|
|
439
503
|
:param canary_name: The name of the canary. Be sure to give it a descriptive name that distinguishes it from other canaries in your account. Do not include secrets or proprietary information in your canary name. The canary name makes up part of the canary ARN, which is included in outbound calls over the internet. Default: - A unique name will be generated from the construct ID
|
|
440
504
|
:param cleanup: Specify the underlying resources to be cleaned up when the canary is deleted. Using ``Cleanup.LAMBDA`` will create a Custom Resource to achieve this. Default: Cleanup.NOTHING
|
|
441
505
|
:param environment_variables: Key-value pairs that the Synthetics caches and makes available for your canary scripts. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Canary script source code. Default: - No environment variables.
|
|
442
506
|
:param failure_retention_period: How many days should failed runs be retained. Default: Duration.days(31)
|
|
507
|
+
:param memory: The maximum amount of memory that the canary can use while running. This value must be a multiple of 64 Mib. The range is 960 MiB to 3008 MiB. Default: Size.mebibytes(1024)
|
|
443
508
|
:param role: Canary execution role. This is the role that will be assumed by the canary upon execution. It controls the permissions that the canary will have. The role must be assumable by the AWS Lambda service principal. If not supplied, a role will be created with all the required permissions. If you provide a Role, you must add the required permissions. Default: - A unique role will be generated for this canary. You can add permissions to roles by calling 'addToRolePolicy'.
|
|
444
509
|
:param schedule: Specify the schedule for how often the canary runs. For example, if you set ``schedule`` to ``rate(10 minutes)``, then the canary will run every 10 minutes. You can set the schedule with ``Schedule.rate(Duration)`` (recommended) or you can specify an expression using ``Schedule.expression()``. Default: 'rate(5 minutes)'
|
|
445
510
|
:param security_groups: The list of security groups to associate with the canary's network interfaces. You must provide ``vpc`` when using this prop. Default: - If the canary is placed within a VPC and a security group is not specified a dedicated security group will be created for this canary.
|
|
446
511
|
:param start_after_creation: Whether or not the canary should start after creation. Default: true
|
|
447
512
|
:param success_retention_period: How many days should successful runs be retained. Default: Duration.days(31)
|
|
513
|
+
:param timeout: How long the canary is allowed to run before it must stop. You can't set this time to be longer than the frequency of the runs of this canary. The minimum allowed value is 3 seconds. The maximum allowed value is 840 seconds (14 minutes). Default: - the frequency of the canary is used as this value, up to a maximum of 900 seconds.
|
|
448
514
|
:param time_to_live: How long the canary will be in a 'RUNNING' state. For example, if you set ``timeToLive`` to be 1 hour and ``schedule`` to be ``rate(10 minutes)``, your canary will run at 10 minute intervals for an hour, for a total of 6 times. Default: - no limit
|
|
449
515
|
:param vpc: The VPC where this canary is run. Specify this if the canary needs to access resources in a VPC. Default: - Not in VPC
|
|
450
516
|
:param vpc_subnets: Where to place the network interfaces within the VPC. You must provide ``vpc`` when using this prop. Default: - the Vpc default strategy if not specified
|
|
@@ -456,17 +522,20 @@ class Canary(
|
|
|
456
522
|
props = CanaryProps(
|
|
457
523
|
runtime=runtime,
|
|
458
524
|
test=test,
|
|
525
|
+
active_tracing=active_tracing,
|
|
459
526
|
artifacts_bucket_lifecycle_rules=artifacts_bucket_lifecycle_rules,
|
|
460
527
|
artifacts_bucket_location=artifacts_bucket_location,
|
|
461
528
|
canary_name=canary_name,
|
|
462
529
|
cleanup=cleanup,
|
|
463
530
|
environment_variables=environment_variables,
|
|
464
531
|
failure_retention_period=failure_retention_period,
|
|
532
|
+
memory=memory,
|
|
465
533
|
role=role,
|
|
466
534
|
schedule=schedule,
|
|
467
535
|
security_groups=security_groups,
|
|
468
536
|
start_after_creation=start_after_creation,
|
|
469
537
|
success_retention_period=success_retention_period,
|
|
538
|
+
timeout=timeout,
|
|
470
539
|
time_to_live=time_to_live,
|
|
471
540
|
vpc=vpc,
|
|
472
541
|
vpc_subnets=vpc_subnets,
|
|
@@ -648,17 +717,20 @@ class Canary(
|
|
|
648
717
|
name_mapping={
|
|
649
718
|
"runtime": "runtime",
|
|
650
719
|
"test": "test",
|
|
720
|
+
"active_tracing": "activeTracing",
|
|
651
721
|
"artifacts_bucket_lifecycle_rules": "artifactsBucketLifecycleRules",
|
|
652
722
|
"artifacts_bucket_location": "artifactsBucketLocation",
|
|
653
723
|
"canary_name": "canaryName",
|
|
654
724
|
"cleanup": "cleanup",
|
|
655
725
|
"environment_variables": "environmentVariables",
|
|
656
726
|
"failure_retention_period": "failureRetentionPeriod",
|
|
727
|
+
"memory": "memory",
|
|
657
728
|
"role": "role",
|
|
658
729
|
"schedule": "schedule",
|
|
659
730
|
"security_groups": "securityGroups",
|
|
660
731
|
"start_after_creation": "startAfterCreation",
|
|
661
732
|
"success_retention_period": "successRetentionPeriod",
|
|
733
|
+
"timeout": "timeout",
|
|
662
734
|
"time_to_live": "timeToLive",
|
|
663
735
|
"vpc": "vpc",
|
|
664
736
|
"vpc_subnets": "vpcSubnets",
|
|
@@ -670,17 +742,20 @@ class CanaryProps:
|
|
|
670
742
|
*,
|
|
671
743
|
runtime: "Runtime",
|
|
672
744
|
test: "Test",
|
|
745
|
+
active_tracing: typing.Optional[builtins.bool] = None,
|
|
673
746
|
artifacts_bucket_lifecycle_rules: typing.Optional[typing.Sequence[typing.Union[_LifecycleRule_bb74e6ff, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
674
747
|
artifacts_bucket_location: typing.Optional[typing.Union[ArtifactsBucketLocation, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
675
748
|
canary_name: typing.Optional[builtins.str] = None,
|
|
676
749
|
cleanup: typing.Optional["Cleanup"] = None,
|
|
677
750
|
environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
678
751
|
failure_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
752
|
+
memory: typing.Optional[_Size_7b441c34] = None,
|
|
679
753
|
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
680
754
|
schedule: typing.Optional["Schedule"] = None,
|
|
681
755
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
682
756
|
start_after_creation: typing.Optional[builtins.bool] = None,
|
|
683
757
|
success_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
758
|
+
timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
684
759
|
time_to_live: typing.Optional[_Duration_4839e8c3] = None,
|
|
685
760
|
vpc: typing.Optional[_IVpc_f30d5663] = None,
|
|
686
761
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -689,17 +764,20 @@ class CanaryProps:
|
|
|
689
764
|
|
|
690
765
|
:param runtime: Specify the runtime version to use for the canary.
|
|
691
766
|
:param test: The type of test that you want your canary to run. Use ``Test.custom()`` to specify the test to run.
|
|
767
|
+
:param active_tracing: Specifies whether this canary is to use active AWS X-Ray tracing when it runs. Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the canary does not hit an endpoint that has X-Ray tracing enabled. Using X-Ray tracing incurs charges. You can enable active tracing only for canaries that use version ``syn-nodejs-2.0`` or later for their canary runtime. Default: false
|
|
692
768
|
:param artifacts_bucket_lifecycle_rules: Lifecycle rules for the generated canary artifact bucket. Has no effect if a bucket is passed to ``artifactsBucketLocation``. If you pass a bucket to ``artifactsBucketLocation``, you can add lifecycle rules to the bucket itself. Default: - no rules applied to the generated bucket.
|
|
693
769
|
:param artifacts_bucket_location: The s3 location that stores the data of the canary runs. Default: - A new s3 bucket will be created without a prefix.
|
|
694
770
|
:param canary_name: The name of the canary. Be sure to give it a descriptive name that distinguishes it from other canaries in your account. Do not include secrets or proprietary information in your canary name. The canary name makes up part of the canary ARN, which is included in outbound calls over the internet. Default: - A unique name will be generated from the construct ID
|
|
695
771
|
:param cleanup: Specify the underlying resources to be cleaned up when the canary is deleted. Using ``Cleanup.LAMBDA`` will create a Custom Resource to achieve this. Default: Cleanup.NOTHING
|
|
696
772
|
:param environment_variables: Key-value pairs that the Synthetics caches and makes available for your canary scripts. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Canary script source code. Default: - No environment variables.
|
|
697
773
|
:param failure_retention_period: How many days should failed runs be retained. Default: Duration.days(31)
|
|
774
|
+
:param memory: The maximum amount of memory that the canary can use while running. This value must be a multiple of 64 Mib. The range is 960 MiB to 3008 MiB. Default: Size.mebibytes(1024)
|
|
698
775
|
:param role: Canary execution role. This is the role that will be assumed by the canary upon execution. It controls the permissions that the canary will have. The role must be assumable by the AWS Lambda service principal. If not supplied, a role will be created with all the required permissions. If you provide a Role, you must add the required permissions. Default: - A unique role will be generated for this canary. You can add permissions to roles by calling 'addToRolePolicy'.
|
|
699
776
|
:param schedule: Specify the schedule for how often the canary runs. For example, if you set ``schedule`` to ``rate(10 minutes)``, then the canary will run every 10 minutes. You can set the schedule with ``Schedule.rate(Duration)`` (recommended) or you can specify an expression using ``Schedule.expression()``. Default: 'rate(5 minutes)'
|
|
700
777
|
:param security_groups: The list of security groups to associate with the canary's network interfaces. You must provide ``vpc`` when using this prop. Default: - If the canary is placed within a VPC and a security group is not specified a dedicated security group will be created for this canary.
|
|
701
778
|
:param start_after_creation: Whether or not the canary should start after creation. Default: true
|
|
702
779
|
:param success_retention_period: How many days should successful runs be retained. Default: Duration.days(31)
|
|
780
|
+
:param timeout: How long the canary is allowed to run before it must stop. You can't set this time to be longer than the frequency of the runs of this canary. The minimum allowed value is 3 seconds. The maximum allowed value is 840 seconds (14 minutes). Default: - the frequency of the canary is used as this value, up to a maximum of 900 seconds.
|
|
703
781
|
:param time_to_live: How long the canary will be in a 'RUNNING' state. For example, if you set ``timeToLive`` to be 1 hour and ``schedule`` to be ``rate(10 minutes)``, your canary will run at 10 minute intervals for an hour, for a total of 6 times. Default: - no limit
|
|
704
782
|
:param vpc: The VPC where this canary is run. Specify this if the canary needs to access resources in a VPC. Default: - Not in VPC
|
|
705
783
|
:param vpc_subnets: Where to place the network interfaces within the VPC. You must provide ``vpc`` when using this prop. Default: - the Vpc default strategy if not specified
|
|
@@ -708,6 +786,9 @@ class CanaryProps:
|
|
|
708
786
|
|
|
709
787
|
Example::
|
|
710
788
|
|
|
789
|
+
import aws_cdk as cdk
|
|
790
|
+
|
|
791
|
+
|
|
711
792
|
canary = synthetics.Canary(self, "MyCanary",
|
|
712
793
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
713
794
|
test=synthetics.Test.custom(
|
|
@@ -715,9 +796,7 @@ class CanaryProps:
|
|
|
715
796
|
handler="index.handler"
|
|
716
797
|
),
|
|
717
798
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
718
|
-
|
|
719
|
-
"stage": "prod"
|
|
720
|
-
}
|
|
799
|
+
memory=cdk.Size.mebibytes(1024)
|
|
721
800
|
)
|
|
722
801
|
'''
|
|
723
802
|
if isinstance(artifacts_bucket_location, dict):
|
|
@@ -728,17 +807,20 @@ class CanaryProps:
|
|
|
728
807
|
type_hints = typing.get_type_hints(_typecheckingstub__44ec0b14d52b66927d4daebe6f97bb070f3629bb0eb86e21668ca7862bb5f5bd)
|
|
729
808
|
check_type(argname="argument runtime", value=runtime, expected_type=type_hints["runtime"])
|
|
730
809
|
check_type(argname="argument test", value=test, expected_type=type_hints["test"])
|
|
810
|
+
check_type(argname="argument active_tracing", value=active_tracing, expected_type=type_hints["active_tracing"])
|
|
731
811
|
check_type(argname="argument artifacts_bucket_lifecycle_rules", value=artifacts_bucket_lifecycle_rules, expected_type=type_hints["artifacts_bucket_lifecycle_rules"])
|
|
732
812
|
check_type(argname="argument artifacts_bucket_location", value=artifacts_bucket_location, expected_type=type_hints["artifacts_bucket_location"])
|
|
733
813
|
check_type(argname="argument canary_name", value=canary_name, expected_type=type_hints["canary_name"])
|
|
734
814
|
check_type(argname="argument cleanup", value=cleanup, expected_type=type_hints["cleanup"])
|
|
735
815
|
check_type(argname="argument environment_variables", value=environment_variables, expected_type=type_hints["environment_variables"])
|
|
736
816
|
check_type(argname="argument failure_retention_period", value=failure_retention_period, expected_type=type_hints["failure_retention_period"])
|
|
817
|
+
check_type(argname="argument memory", value=memory, expected_type=type_hints["memory"])
|
|
737
818
|
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
738
819
|
check_type(argname="argument schedule", value=schedule, expected_type=type_hints["schedule"])
|
|
739
820
|
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
740
821
|
check_type(argname="argument start_after_creation", value=start_after_creation, expected_type=type_hints["start_after_creation"])
|
|
741
822
|
check_type(argname="argument success_retention_period", value=success_retention_period, expected_type=type_hints["success_retention_period"])
|
|
823
|
+
check_type(argname="argument timeout", value=timeout, expected_type=type_hints["timeout"])
|
|
742
824
|
check_type(argname="argument time_to_live", value=time_to_live, expected_type=type_hints["time_to_live"])
|
|
743
825
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
744
826
|
check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
|
|
@@ -746,6 +828,8 @@ class CanaryProps:
|
|
|
746
828
|
"runtime": runtime,
|
|
747
829
|
"test": test,
|
|
748
830
|
}
|
|
831
|
+
if active_tracing is not None:
|
|
832
|
+
self._values["active_tracing"] = active_tracing
|
|
749
833
|
if artifacts_bucket_lifecycle_rules is not None:
|
|
750
834
|
self._values["artifacts_bucket_lifecycle_rules"] = artifacts_bucket_lifecycle_rules
|
|
751
835
|
if artifacts_bucket_location is not None:
|
|
@@ -758,6 +842,8 @@ class CanaryProps:
|
|
|
758
842
|
self._values["environment_variables"] = environment_variables
|
|
759
843
|
if failure_retention_period is not None:
|
|
760
844
|
self._values["failure_retention_period"] = failure_retention_period
|
|
845
|
+
if memory is not None:
|
|
846
|
+
self._values["memory"] = memory
|
|
761
847
|
if role is not None:
|
|
762
848
|
self._values["role"] = role
|
|
763
849
|
if schedule is not None:
|
|
@@ -768,6 +854,8 @@ class CanaryProps:
|
|
|
768
854
|
self._values["start_after_creation"] = start_after_creation
|
|
769
855
|
if success_retention_period is not None:
|
|
770
856
|
self._values["success_retention_period"] = success_retention_period
|
|
857
|
+
if timeout is not None:
|
|
858
|
+
self._values["timeout"] = timeout
|
|
771
859
|
if time_to_live is not None:
|
|
772
860
|
self._values["time_to_live"] = time_to_live
|
|
773
861
|
if vpc is not None:
|
|
@@ -795,6 +883,22 @@ class CanaryProps:
|
|
|
795
883
|
assert result is not None, "Required property 'test' is missing"
|
|
796
884
|
return typing.cast("Test", result)
|
|
797
885
|
|
|
886
|
+
@builtins.property
|
|
887
|
+
def active_tracing(self) -> typing.Optional[builtins.bool]:
|
|
888
|
+
'''Specifies whether this canary is to use active AWS X-Ray tracing when it runs.
|
|
889
|
+
|
|
890
|
+
Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the
|
|
891
|
+
canary does not hit an endpoint that has X-Ray tracing enabled. Using X-Ray tracing incurs charges.
|
|
892
|
+
|
|
893
|
+
You can enable active tracing only for canaries that use version ``syn-nodejs-2.0`` or later for their canary runtime.
|
|
894
|
+
|
|
895
|
+
:default: false
|
|
896
|
+
|
|
897
|
+
:see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html
|
|
898
|
+
'''
|
|
899
|
+
result = self._values.get("active_tracing")
|
|
900
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
901
|
+
|
|
798
902
|
@builtins.property
|
|
799
903
|
def artifacts_bucket_lifecycle_rules(
|
|
800
904
|
self,
|
|
@@ -872,6 +976,18 @@ class CanaryProps:
|
|
|
872
976
|
result = self._values.get("failure_retention_period")
|
|
873
977
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
874
978
|
|
|
979
|
+
@builtins.property
|
|
980
|
+
def memory(self) -> typing.Optional[_Size_7b441c34]:
|
|
981
|
+
'''The maximum amount of memory that the canary can use while running.
|
|
982
|
+
|
|
983
|
+
This value must be a multiple of 64 Mib.
|
|
984
|
+
The range is 960 MiB to 3008 MiB.
|
|
985
|
+
|
|
986
|
+
:default: Size.mebibytes(1024)
|
|
987
|
+
'''
|
|
988
|
+
result = self._values.get("memory")
|
|
989
|
+
return typing.cast(typing.Optional[_Size_7b441c34], result)
|
|
990
|
+
|
|
875
991
|
@builtins.property
|
|
876
992
|
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
877
993
|
'''Canary execution role.
|
|
@@ -937,6 +1053,20 @@ class CanaryProps:
|
|
|
937
1053
|
result = self._values.get("success_retention_period")
|
|
938
1054
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
939
1055
|
|
|
1056
|
+
@builtins.property
|
|
1057
|
+
def timeout(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
1058
|
+
'''How long the canary is allowed to run before it must stop.
|
|
1059
|
+
|
|
1060
|
+
You can't set this time to be longer than the frequency of the runs of this canary.
|
|
1061
|
+
|
|
1062
|
+
The minimum allowed value is 3 seconds.
|
|
1063
|
+
The maximum allowed value is 840 seconds (14 minutes).
|
|
1064
|
+
|
|
1065
|
+
:default: - the frequency of the canary is used as this value, up to a maximum of 900 seconds.
|
|
1066
|
+
'''
|
|
1067
|
+
result = self._values.get("timeout")
|
|
1068
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
1069
|
+
|
|
940
1070
|
@builtins.property
|
|
941
1071
|
def time_to_live(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
942
1072
|
'''How long the canary will be in a 'RUNNING' state.
|
|
@@ -2881,6 +3011,9 @@ class Code(
|
|
|
2881
3011
|
|
|
2882
3012
|
Example::
|
|
2883
3013
|
|
|
3014
|
+
import aws_cdk as cdk
|
|
3015
|
+
|
|
3016
|
+
|
|
2884
3017
|
canary = synthetics.Canary(self, "MyCanary",
|
|
2885
3018
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
2886
3019
|
test=synthetics.Test.custom(
|
|
@@ -2888,9 +3021,7 @@ class Code(
|
|
|
2888
3021
|
handler="index.handler"
|
|
2889
3022
|
),
|
|
2890
3023
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
2891
|
-
|
|
2892
|
-
"stage": "prod"
|
|
2893
|
-
}
|
|
3024
|
+
memory=cdk.Size.mebibytes(1024)
|
|
2894
3025
|
)
|
|
2895
3026
|
'''
|
|
2896
3027
|
|
|
@@ -3245,6 +3376,9 @@ class CustomTestOptions:
|
|
|
3245
3376
|
|
|
3246
3377
|
Example::
|
|
3247
3378
|
|
|
3379
|
+
import aws_cdk as cdk
|
|
3380
|
+
|
|
3381
|
+
|
|
3248
3382
|
canary = synthetics.Canary(self, "MyCanary",
|
|
3249
3383
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
3250
3384
|
test=synthetics.Test.custom(
|
|
@@ -3252,9 +3386,7 @@ class CustomTestOptions:
|
|
|
3252
3386
|
handler="index.handler"
|
|
3253
3387
|
),
|
|
3254
3388
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
3255
|
-
|
|
3256
|
-
"stage": "prod"
|
|
3257
|
-
}
|
|
3389
|
+
memory=cdk.Size.mebibytes(1024)
|
|
3258
3390
|
)
|
|
3259
3391
|
'''
|
|
3260
3392
|
if __debug__:
|
|
@@ -3350,6 +3482,9 @@ class Runtime(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_synthetics.Run
|
|
|
3350
3482
|
|
|
3351
3483
|
Example::
|
|
3352
3484
|
|
|
3485
|
+
import aws_cdk as cdk
|
|
3486
|
+
|
|
3487
|
+
|
|
3353
3488
|
canary = synthetics.Canary(self, "MyCanary",
|
|
3354
3489
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
3355
3490
|
test=synthetics.Test.custom(
|
|
@@ -3357,9 +3492,7 @@ class Runtime(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_synthetics.Run
|
|
|
3357
3492
|
handler="index.handler"
|
|
3358
3493
|
),
|
|
3359
3494
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
3360
|
-
|
|
3361
|
-
"stage": "prod"
|
|
3362
|
-
}
|
|
3495
|
+
memory=cdk.Size.mebibytes(1024)
|
|
3363
3496
|
)
|
|
3364
3497
|
'''
|
|
3365
3498
|
|
|
@@ -3808,9 +3941,7 @@ class Schedule(
|
|
|
3808
3941
|
handler="index.handler"
|
|
3809
3942
|
),
|
|
3810
3943
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
3811
|
-
|
|
3812
|
-
"stage": "prod"
|
|
3813
|
-
}
|
|
3944
|
+
active_tracing=True
|
|
3814
3945
|
)
|
|
3815
3946
|
'''
|
|
3816
3947
|
|
|
@@ -3889,6 +4020,9 @@ class Test(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_synthetics.Test")
|
|
|
3889
4020
|
|
|
3890
4021
|
Example::
|
|
3891
4022
|
|
|
4023
|
+
import aws_cdk as cdk
|
|
4024
|
+
|
|
4025
|
+
|
|
3892
4026
|
canary = synthetics.Canary(self, "MyCanary",
|
|
3893
4027
|
schedule=synthetics.Schedule.rate(Duration.minutes(5)),
|
|
3894
4028
|
test=synthetics.Test.custom(
|
|
@@ -3896,9 +4030,7 @@ class Test(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_synthetics.Test")
|
|
|
3896
4030
|
handler="index.handler"
|
|
3897
4031
|
),
|
|
3898
4032
|
runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
|
3899
|
-
|
|
3900
|
-
"stage": "prod"
|
|
3901
|
-
}
|
|
4033
|
+
memory=cdk.Size.mebibytes(1024)
|
|
3902
4034
|
)
|
|
3903
4035
|
'''
|
|
3904
4036
|
|
|
@@ -4086,17 +4218,20 @@ def _typecheckingstub__b3b6d76e5f93e31884e16cc00a9b4fc93e6782ff7db09c74aa1ef9346
|
|
|
4086
4218
|
*,
|
|
4087
4219
|
runtime: Runtime,
|
|
4088
4220
|
test: Test,
|
|
4221
|
+
active_tracing: typing.Optional[builtins.bool] = None,
|
|
4089
4222
|
artifacts_bucket_lifecycle_rules: typing.Optional[typing.Sequence[typing.Union[_LifecycleRule_bb74e6ff, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
4090
4223
|
artifacts_bucket_location: typing.Optional[typing.Union[ArtifactsBucketLocation, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4091
4224
|
canary_name: typing.Optional[builtins.str] = None,
|
|
4092
4225
|
cleanup: typing.Optional[Cleanup] = None,
|
|
4093
4226
|
environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
4094
4227
|
failure_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
4228
|
+
memory: typing.Optional[_Size_7b441c34] = None,
|
|
4095
4229
|
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
4096
4230
|
schedule: typing.Optional[Schedule] = None,
|
|
4097
4231
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
4098
4232
|
start_after_creation: typing.Optional[builtins.bool] = None,
|
|
4099
4233
|
success_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
4234
|
+
timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
4100
4235
|
time_to_live: typing.Optional[_Duration_4839e8c3] = None,
|
|
4101
4236
|
vpc: typing.Optional[_IVpc_f30d5663] = None,
|
|
4102
4237
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -4108,17 +4243,20 @@ def _typecheckingstub__44ec0b14d52b66927d4daebe6f97bb070f3629bb0eb86e21668ca7862
|
|
|
4108
4243
|
*,
|
|
4109
4244
|
runtime: Runtime,
|
|
4110
4245
|
test: Test,
|
|
4246
|
+
active_tracing: typing.Optional[builtins.bool] = None,
|
|
4111
4247
|
artifacts_bucket_lifecycle_rules: typing.Optional[typing.Sequence[typing.Union[_LifecycleRule_bb74e6ff, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
4112
4248
|
artifacts_bucket_location: typing.Optional[typing.Union[ArtifactsBucketLocation, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4113
4249
|
canary_name: typing.Optional[builtins.str] = None,
|
|
4114
4250
|
cleanup: typing.Optional[Cleanup] = None,
|
|
4115
4251
|
environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
4116
4252
|
failure_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
4253
|
+
memory: typing.Optional[_Size_7b441c34] = None,
|
|
4117
4254
|
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
4118
4255
|
schedule: typing.Optional[Schedule] = None,
|
|
4119
4256
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
4120
4257
|
start_after_creation: typing.Optional[builtins.bool] = None,
|
|
4121
4258
|
success_retention_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
4259
|
+
timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
4122
4260
|
time_to_live: typing.Optional[_Duration_4839e8c3] = None,
|
|
4123
4261
|
vpc: typing.Optional[_IVpc_f30d5663] = None,
|
|
4124
4262
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|