agent-claw: automated task changes
This commit is contained in:
13
cdk/node_modules/aws-cdk-lib/aws-synthetics/.jsiirc.json
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-synthetics/.jsiirc.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"targets": {
|
||||
"java": {
|
||||
"package": "software.amazon.awscdk.services.synthetics"
|
||||
},
|
||||
"dotnet": {
|
||||
"namespace": "Amazon.CDK.AWS.Synthetics"
|
||||
},
|
||||
"python": {
|
||||
"module": "aws_cdk.aws_synthetics"
|
||||
}
|
||||
}
|
||||
}
|
||||
524
cdk/node_modules/aws-cdk-lib/aws-synthetics/README.md
generated
vendored
Normal file
524
cdk/node_modules/aws-cdk-lib/aws-synthetics/README.md
generated
vendored
Normal file
@@ -0,0 +1,524 @@
|
||||
# Amazon CloudWatch Synthetics Construct Library
|
||||
|
||||
Amazon CloudWatch Synthetics allow you to monitor your application by generating **synthetic** traffic. The traffic is produced by a **canary**: a configurable script that runs on a schedule. You configure the canary script to follow the same routes and perform the same actions as a user, which allows you to continually verify your user experience even when you don't have any traffic on your applications.
|
||||
|
||||
## Canary
|
||||
|
||||
To illustrate how to use a canary, assume your application defines the following endpoint:
|
||||
|
||||
```console
|
||||
% curl "https://api.example.com/user/books/topbook/"
|
||||
The Hitchhikers Guide to the Galaxy
|
||||
```
|
||||
|
||||
The below code defines a canary that will hit the `books/topbook` endpoint every 5 minutes:
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
environmentVariables: {
|
||||
stage: 'prod',
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
The following is an example of an `index.js` file which exports the `handler` function:
|
||||
|
||||
```js
|
||||
const synthetics = require('Synthetics');
|
||||
const log = require('SyntheticsLogger');
|
||||
|
||||
const pageLoadBlueprint = async function () {
|
||||
// Configure the stage of the API using environment variables
|
||||
const url = `https://api.example.com/${process.env.stage}/user/books/topbook/`;
|
||||
|
||||
const page = await synthetics.getPage();
|
||||
const response = await page.goto(url, {
|
||||
waitUntil: 'domcontentloaded',
|
||||
timeout: 30000,
|
||||
});
|
||||
// Wait for page to render. Increase or decrease wait time based on endpoint being monitored.
|
||||
await page.waitFor(15000);
|
||||
// This will take a screenshot that will be included in test output artifacts.
|
||||
await synthetics.takeScreenshot('loaded', 'loaded');
|
||||
const pageTitle = await page.title();
|
||||
log.info('Page title: ' + pageTitle);
|
||||
if (response.status() !== 200) {
|
||||
throw 'Failed to load page!';
|
||||
}
|
||||
};
|
||||
|
||||
exports.handler = async () => {
|
||||
return await pageLoadBlueprint();
|
||||
};
|
||||
```
|
||||
|
||||
> **Note:** The function **must** be called `handler`.
|
||||
|
||||
The canary will automatically produce a CloudWatch Dashboard:
|
||||
|
||||

|
||||
|
||||
The Canary code will be executed in a lambda function created by Synthetics on your behalf. The Lambda function includes a custom [runtime](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html) provided by Synthetics. The provided runtime includes a variety of handy tools such as [Puppeteer](https://www.npmjs.com/package/puppeteer-core) (for nodejs based one) and Chromium.
|
||||
|
||||
To learn more about Synthetics capabilities, check out the [docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries.html).
|
||||
|
||||
### Canary Schedule
|
||||
|
||||
You can specify the schedule on which a canary runs by providing a
|
||||
[`Schedule`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.Schedule.html)
|
||||
object to the `schedule` property.
|
||||
|
||||
Configure a run rate of up to 60 minutes with `Schedule.rate`:
|
||||
|
||||
```ts
|
||||
const schedule = synthetics.Schedule.rate(Duration.minutes(5)); // Runs every 5 minutes.
|
||||
```
|
||||
|
||||
You can also specify a [cron expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html) with `Schedule.cron`:
|
||||
|
||||
```ts
|
||||
const schedule = synthetics.Schedule.cron({
|
||||
hour: '0,8,16', // Run at 12am, 8am, 4pm UTC every day
|
||||
});
|
||||
```
|
||||
|
||||
If you want the canary to run just once upon deployment, you can use `Schedule.once()`.
|
||||
|
||||
### Automatic Retries
|
||||
|
||||
You can configure the canary to automatically retry failed runs by using the `maxRetries` property.
|
||||
|
||||
This is only supported on the following runtimes or newer: `Runtime.SYNTHETICS_NODEJS_PUPPETEER_10_0`, `Runtime.SYNTHETICS_NODEJS_PLAYWRIGHT_2_0`, `Runtime.SYNTHETICS_PYTHON_SELENIUM_5_1`.
|
||||
|
||||
Max retries can be set between 0 and 2. Canaries which time out after 10 minutes are automatically limited to one retry.
|
||||
|
||||
For more information, see [Configuring your canary to retry automatically](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_autoretry.html).
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
handler: 'canary.handler',
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canaries')),
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_5_1,
|
||||
maxRetries: 2, // The canary run will retry up to 2 times on a failure
|
||||
});
|
||||
```
|
||||
|
||||
### Active Tracing
|
||||
|
||||
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`.
|
||||
|
||||
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.
|
||||
|
||||
For more information, see [Canaries and X-Ray tracing](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html).
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
activeTracing: true, // active tracing enabled
|
||||
});
|
||||
```
|
||||
|
||||
### Memory
|
||||
|
||||
You can set the maximum amount of memory the canary can use while running with the `memory` property.
|
||||
|
||||
```ts
|
||||
import * as cdk from 'aws-cdk-lib';
|
||||
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
memory: cdk.Size.mebibytes(1024), // 1024 MiB
|
||||
});
|
||||
```
|
||||
|
||||
### Timeout
|
||||
|
||||
You can set how long the canary is allowed to run before it must stop with the `timeout` property.
|
||||
|
||||
```ts
|
||||
import * as cdk from 'aws-cdk-lib';
|
||||
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
timeout: cdk.Duration.seconds(60), // 60 seconds
|
||||
});
|
||||
```
|
||||
|
||||
### Browser Type Configuration
|
||||
|
||||
You can configure which browsers your canary uses for testing by specifying the `browserConfigs` property. This allows you to test your application across different browsers to ensure compatibility.
|
||||
|
||||
Available browser types:
|
||||
|
||||
- `BrowserType.CHROME` - Google Chrome browser
|
||||
- `BrowserType.FIREFOX` - Mozilla Firefox browser
|
||||
|
||||
You can specify up to 2 browser configurations. When multiple browsers are configured, the canary will run tests on each browser sequentially.
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_9_1,
|
||||
browserConfigs: [
|
||||
synthetics.BrowserType.CHROME,
|
||||
synthetics.BrowserType.FIREFOX,
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
> **Note:** Firefox support is available for Node.js runtimes (Puppeteer and Playwright) but not for Python Selenium runtimes. When using Firefox, ensure your runtime version supports it.
|
||||
|
||||
### Deleting underlying resources on canary deletion
|
||||
|
||||
When you delete a lambda, the following underlying resources are isolated in your AWS account:
|
||||
|
||||
- Lambda Function that runs your canary script
|
||||
- S3 Bucket for artifact storage
|
||||
- IAM roles and policies
|
||||
- Log Groups in CloudWatch Logs.
|
||||
|
||||
To learn more about these underlying resources, see
|
||||
[Synthetics Canaries Deletion](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/synthetics_canaries_deletion.html).
|
||||
|
||||
In the CDK, you can configure your canary to delete the underlying lambda function when the canary is deleted.
|
||||
This can be provisioned by setting `provisionedResourceCleanup` to `true`.
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'Canary', {
|
||||
test: synthetics.Test.custom({
|
||||
handler: 'index.handler',
|
||||
code: synthetics.Code.fromInline('/* Synthetics handler code'),
|
||||
}),
|
||||
provisionedResourceCleanup: true,
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
});
|
||||
```
|
||||
|
||||
> Note: To properly clean up your canary on deletion, you still have to manually delete other resources
|
||||
> like S3 buckets and CloudWatch logs.
|
||||
|
||||
> Note: The deletion of Lambda resources can also be performed by setting the `cleanup` argument to `Cleanup.LAMBDA`. However, this is an outdated argument that uses custom resources and is currently deprecated.
|
||||
|
||||
### Configuring the Canary Script
|
||||
|
||||
To configure the script the canary executes, use the `test` property. The `test` property accepts a `Test` instance that can be initialized by the `Test` class static methods. Currently, the only implemented method is `Test.custom()`, which allows you to bring your own code. In the future, other methods will be added. `Test.custom()` accepts `code` and `handler` properties -- both are required by Synthetics to create a lambda function on your behalf.
|
||||
|
||||
The `synthetics.Code` class exposes static methods to bundle your code artifacts:
|
||||
|
||||
- `code.fromInline(code)` - specify an inline script.
|
||||
- `code.fromAsset(path)` - specify a .zip file or a directory in the local filesystem which will be zipped and uploaded to S3 on deployment. See the below Note for directory structure.
|
||||
- `code.fromBucket(bucket, key[, objectVersion])` - specify an S3 object that contains the .zip file of your runtime code. See the below Note for directory structure.
|
||||
|
||||
Using the `Code` class static initializers:
|
||||
|
||||
```ts
|
||||
// To supply the code inline:
|
||||
new synthetics.Canary(this, 'Inline Canary', {
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
|
||||
handler: 'index.handler', // must be 'index.handler'
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
});
|
||||
|
||||
// To supply the code from your local filesystem:
|
||||
new synthetics.Canary(this, 'Asset Canary', {
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler', // must end with '.handler'
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
});
|
||||
|
||||
// To supply the code from a S3 bucket:
|
||||
import * as s3 from 'aws-cdk-lib/aws-s3';
|
||||
const bucket = new s3.Bucket(this, 'Code Bucket');
|
||||
new synthetics.Canary(this, 'Bucket Canary', {
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromBucket(bucket, 'canary.zip'),
|
||||
handler: 'index.handler', // must end with '.handler'
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
});
|
||||
```
|
||||
|
||||
> **Note:** Synthetics have a specified folder structure for canaries.
|
||||
> For Node with puppeteer scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure for runtime versions older than `syn-nodejs-puppeteer-11.0`:
|
||||
>
|
||||
> ```plaintext
|
||||
> canary/
|
||||
> ├── nodejs/
|
||||
> ├── node_modules/
|
||||
> ├── <filename>.js
|
||||
> ```
|
||||
>
|
||||
> For puppeteer based runtime versions newer than or equal to `syn-nodejs-puppeteer-11.0`, `nodjs/node_modules` is not necessary but supported.
|
||||
>
|
||||
> Both
|
||||
> ```plaintext
|
||||
> canary/
|
||||
> ├── nodejs/
|
||||
> ├── node_modules/
|
||||
> ├── <filename>.js
|
||||
> ```
|
||||
> And
|
||||
> ```plaintext
|
||||
> canary/
|
||||
> ├── <filename>.js
|
||||
> ```
|
||||
> are supported.
|
||||
>
|
||||
> For Node with playwright scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure:
|
||||
>
|
||||
> ```plaintext
|
||||
> canary/
|
||||
> ├── <filename>.js,.mjs,.cjs
|
||||
> ├─some/dir/path
|
||||
> ├── <filename>.js,.mjs,.cjs
|
||||
> ```
|
||||
>
|
||||
> If `<filename>.js` is placed in the canary directory, the handler should be specified as `filename.handler`.
|
||||
> However, if it is placed in the `some/dir/path` directory, the handler should be specified as `some/dir/path/filename.handler`.
|
||||
> For more information, see Synthetics [docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Synthetics_WritingCanary_Nodejs_Playwright.html).
|
||||
>
|
||||
> For Python scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure:
|
||||
>
|
||||
> ```plaintext
|
||||
> canary/
|
||||
> ├── python/
|
||||
> ├── <filename>.py
|
||||
> ```
|
||||
>
|
||||
> See Synthetics [docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html).
|
||||
|
||||
### Running a canary on a VPC
|
||||
|
||||
You can specify what [VPC a canary executes in](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html).
|
||||
This can allow for monitoring services that may be internal to a specific VPC. To place a canary within a VPC, you can specify the `vpc` property with the desired `VPC` to place then canary in.
|
||||
This will automatically attach the appropriate IAM permissions to attach to the VPC. This will also create a Security Group and attach to the default subnets for the VPC unless specified via `vpcSubnets` and `securityGroups`.
|
||||
|
||||
```ts
|
||||
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
||||
|
||||
declare const vpc: ec2.IVpc;
|
||||
new synthetics.Canary(this, 'Vpc Canary', {
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
vpc,
|
||||
});
|
||||
```
|
||||
|
||||
> **Note:** By default, the Synthetics runtime needs access to the S3 and CloudWatch APIs, which will fail in a private subnet without internet access enabled (e.g. an isolated subnnet).
|
||||
>
|
||||
> Ensure that the Canary is placed in a VPC either with internet connectivity or with VPC Endpoints for S3 and CloudWatch enabled and configured.
|
||||
>
|
||||
> See [Synthetics VPC docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html).
|
||||
|
||||
### Alarms
|
||||
|
||||
You can configure a CloudWatch Alarm on a canary metric. Metrics are emitted by CloudWatch automatically and can be accessed by the following APIs:
|
||||
|
||||
- `canary.metricSuccessPercent()` - percentage of successful canary runs over a given time
|
||||
- `canary.metricDuration()` - how much time each canary run takes, in seconds.
|
||||
- `canary.metricFailed()` - number of failed canary runs over a given time
|
||||
|
||||
Create an alarm that tracks the canary metric:
|
||||
|
||||
```ts
|
||||
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
|
||||
|
||||
declare const canary: synthetics.Canary;
|
||||
new cloudwatch.Alarm(this, 'CanaryAlarm', {
|
||||
metric: canary.metricSuccessPercent(),
|
||||
evaluationPeriods: 2,
|
||||
threshold: 90,
|
||||
comparisonOperator: cloudwatch.ComparisonOperator.LESS_THAN_THRESHOLD,
|
||||
});
|
||||
```
|
||||
|
||||
### Performing safe canary updates
|
||||
|
||||
You can configure a canary to first perform a dry run before applying any updates. The `dryRunAndUpdate` property can be used to safely update canaries by validating the changes before they're applied.
|
||||
This feature is supported for canary runtime versions `syn-nodejs-puppeteer-10.0+`, `syn-nodejs-playwright-2.0+`, and `syn-python-selenium-5.1+`.
|
||||
|
||||
When `dryRunAndUpdate` is set to `true`, CDK will execute a dry run to validate the changes before applying them to the canary.
|
||||
If the dry run succeeds, the canary will be updated with the changes.
|
||||
If the dry run fails, the CloudFormation deployment will fail with the dry run's failure reason.
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_5_1,
|
||||
dryRunAndUpdate: true, // Enable dry run before updating
|
||||
});
|
||||
```
|
||||
|
||||
For more information, see [Performing safe canary updates](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/performing-safe-canary-upgrades.html).
|
||||
|
||||
### Artifacts
|
||||
|
||||
You can pass an S3 bucket to store artifacts from canary runs. If you do not,
|
||||
one will be auto-generated when the canary is created. You may add
|
||||
[lifecycle rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)
|
||||
to the auto-generated bucket.
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2,
|
||||
artifactsBucketLifecycleRules: [
|
||||
{
|
||||
expiration: Duration.days(30),
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
Canary artifacts are encrypted at rest using an AWS-managed key by default.
|
||||
|
||||
You can choose the encryption options SSE-S3 or SSE-KMS by setting the `artifactS3EncryptionMode` property.
|
||||
|
||||
When you use SSE-KMS, you can also supply your own external KMS key by specifying the `kmsKey` property. If you don't, a KMS key will be automatically created and associated with the canary.
|
||||
|
||||
```ts
|
||||
import * as kms from 'aws-cdk-lib/aws-kms';
|
||||
|
||||
const key = new kms.Key(this, 'myKey');
|
||||
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_7_0,
|
||||
artifactsBucketLifecycleRules: [
|
||||
{
|
||||
expiration: Duration.days(30),
|
||||
},
|
||||
],
|
||||
artifactS3EncryptionMode: synthetics.ArtifactsEncryptionMode.KMS,
|
||||
artifactS3KmsKey: key,
|
||||
});
|
||||
```
|
||||
|
||||
### Tag replication
|
||||
|
||||
You can configure a canary to replicate its tags to the underlying Lambda function. This is useful when you want the same tags that are applied to the canary to also be applied to the Lambda function that the canary uses.
|
||||
|
||||
```ts
|
||||
const canary = new synthetics.Canary(this, 'MyCanary', {
|
||||
schedule: synthetics.Schedule.rate(Duration.minutes(5)),
|
||||
test: synthetics.Test.custom({
|
||||
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
|
||||
handler: 'index.handler',
|
||||
}),
|
||||
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_7_0,
|
||||
resourcesToReplicateTags: [
|
||||
synthetics.ResourceToReplicateTags.LAMBDA_FUNCTION,
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
When you specify `ResourceToReplicateTags.LAMBDA_FUNCTION` in the `resourcesToReplicateTags` property, CloudWatch Synthetics will keep the tags of the canary and the Lambda function synchronized. Any future changes you make to the canary's tags will also be applied to the function.
|
||||
|
||||
## Groups
|
||||
|
||||
You can create groups to associate canaries with each other, including cross-Region canaries. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.
|
||||
|
||||
Groups are global resources. When you create a group, it is replicated across all AWS Regions that support groups, and you can add canaries from any of these Regions to it.
|
||||
|
||||
### Creating a Group
|
||||
|
||||
You can create a group and associate canaries with it:
|
||||
|
||||
```ts
|
||||
// First, declare your canaries
|
||||
declare const canary1: synthetics.ICanary;
|
||||
declare const canary2: synthetics.ICanary;
|
||||
|
||||
const group = new synthetics.Group(this, 'MyCanaryGroup', {
|
||||
groupName: 'production-canaries',
|
||||
canaries: [canary1, canary2],
|
||||
});
|
||||
```
|
||||
|
||||
### Adding Canaries to a Group
|
||||
|
||||
You can add canaries to a group after creation:
|
||||
|
||||
```ts
|
||||
declare const canary: synthetics.ICanary;
|
||||
|
||||
const group = new synthetics.Group(this, 'MyCanaryGroup');
|
||||
|
||||
// Add canary to group
|
||||
group.addCanary(canary);
|
||||
```
|
||||
|
||||
### Group Limitations
|
||||
|
||||
- Each group can contain as many as 10 canaries
|
||||
- You can have as many as 20 groups in your account
|
||||
- Any single canary can be a member of up to 10 groups
|
||||
|
||||
### Importing Existing Groups
|
||||
|
||||
You can import existing groups by ARN or name:
|
||||
|
||||
```ts
|
||||
// Import by ARN
|
||||
const importedGroupByArn = synthetics.Group.fromGroupArn(
|
||||
this,
|
||||
'ImportedGroup',
|
||||
'arn:aws:synthetics:us-east-1:123456789012:group:my-group'
|
||||
);
|
||||
|
||||
// Import by name
|
||||
const importedGroupByName = synthetics.Group.fromGroupName(
|
||||
this,
|
||||
'ImportedGroup',
|
||||
'my-group'
|
||||
);
|
||||
```
|
||||
|
||||
For more information about groups, see the [CloudWatch Synthetics Groups documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Groups.html).
|
||||
BIN
cdk/node_modules/aws-cdk-lib/aws-synthetics/images/endpoint-example.png
generated
vendored
Normal file
BIN
cdk/node_modules/aws-cdk-lib/aws-synthetics/images/endpoint-example.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
cdk/node_modules/aws-cdk-lib/aws-synthetics/images/ui-screenshot.png
generated
vendored
Normal file
BIN
cdk/node_modules/aws-cdk-lib/aws-synthetics/images/ui-screenshot.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/index.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.BrowserType=void 0,Object.defineProperty(exports,_noFold="BrowserType",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").BrowserType;return Object.defineProperty(exports,_noFold="BrowserType",{enumerable:!0,configurable:!0,value}),value}}),exports.Test=void 0,Object.defineProperty(exports,_noFold="Test",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Test;return Object.defineProperty(exports,_noFold="Test",{enumerable:!0,configurable:!0,value}),value}}),exports.Cleanup=void 0,Object.defineProperty(exports,_noFold="Cleanup",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Cleanup;return Object.defineProperty(exports,_noFold="Cleanup",{enumerable:!0,configurable:!0,value}),value}}),exports.ResourceToReplicateTags=void 0,Object.defineProperty(exports,_noFold="ResourceToReplicateTags",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").ResourceToReplicateTags;return Object.defineProperty(exports,_noFold="ResourceToReplicateTags",{enumerable:!0,configurable:!0,value}),value}}),exports.ArtifactsEncryptionMode=void 0,Object.defineProperty(exports,_noFold="ArtifactsEncryptionMode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").ArtifactsEncryptionMode;return Object.defineProperty(exports,_noFold="ArtifactsEncryptionMode",{enumerable:!0,configurable:!0,value}),value}}),exports.Canary=void 0,Object.defineProperty(exports,_noFold="Canary",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Canary;return Object.defineProperty(exports,_noFold="Canary",{enumerable:!0,configurable:!0,value}),value}}),exports.Code=void 0,Object.defineProperty(exports,_noFold="Code",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Code;return Object.defineProperty(exports,_noFold="Code",{enumerable:!0,configurable:!0,value}),value}}),exports.AssetCode=void 0,Object.defineProperty(exports,_noFold="AssetCode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").AssetCode;return Object.defineProperty(exports,_noFold="AssetCode",{enumerable:!0,configurable:!0,value}),value}}),exports.InlineCode=void 0,Object.defineProperty(exports,_noFold="InlineCode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").InlineCode;return Object.defineProperty(exports,_noFold="InlineCode",{enumerable:!0,configurable:!0,value}),value}}),exports.S3Code=void 0,Object.defineProperty(exports,_noFold="S3Code",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").S3Code;return Object.defineProperty(exports,_noFold="S3Code",{enumerable:!0,configurable:!0,value}),value}}),exports.Group=void 0,Object.defineProperty(exports,_noFold="Group",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Group;return Object.defineProperty(exports,_noFold="Group",{enumerable:!0,configurable:!0,value}),value}}),exports.RuntimeFamily=void 0,Object.defineProperty(exports,_noFold="RuntimeFamily",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").RuntimeFamily;return Object.defineProperty(exports,_noFold="RuntimeFamily",{enumerable:!0,configurable:!0,value}),value}}),exports.Runtime=void 0,Object.defineProperty(exports,_noFold="Runtime",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Runtime;return Object.defineProperty(exports,_noFold="Runtime",{enumerable:!0,configurable:!0,value}),value}}),exports.Schedule=void 0,Object.defineProperty(exports,_noFold="Schedule",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").Schedule;return Object.defineProperty(exports,_noFold="Schedule",{enumerable:!0,configurable:!0,value}),value}}),exports.CfnCanary=void 0,Object.defineProperty(exports,_noFold="CfnCanary",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").CfnCanary;return Object.defineProperty(exports,_noFold="CfnCanary",{enumerable:!0,configurable:!0,value}),value}}),exports.CfnGroup=void 0,Object.defineProperty(exports,_noFold="CfnGroup",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").CfnGroup;return Object.defineProperty(exports,_noFold="CfnGroup",{enumerable:!0,configurable:!0,value}),value}});
|
||||
492
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/canary.d.ts
generated
vendored
Normal file
492
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,492 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Code } from './code';
|
||||
import { Runtime } from './runtime';
|
||||
import type { Schedule } from './schedule';
|
||||
import type { CanaryReference, ICanaryRef } from './synthetics.generated';
|
||||
import type { MetricOptions } from '../../aws-cloudwatch';
|
||||
import { Metric } from '../../aws-cloudwatch';
|
||||
import * as ec2 from '../../aws-ec2';
|
||||
import * as iam from '../../aws-iam';
|
||||
import * as kms from '../../aws-kms';
|
||||
import * as s3 from '../../aws-s3';
|
||||
import * as cdk from '../../core';
|
||||
/**
|
||||
* Browser types supported by CloudWatch Synthetics Canary
|
||||
*/
|
||||
export declare enum BrowserType {
|
||||
/**
|
||||
* Google Chrome browser
|
||||
*/
|
||||
CHROME = "CHROME",
|
||||
/**
|
||||
* Mozilla Firefox browser
|
||||
*/
|
||||
FIREFOX = "FIREFOX"
|
||||
}
|
||||
/**
|
||||
* Specify a test that the canary should run
|
||||
*/
|
||||
export declare class Test {
|
||||
readonly code: Code;
|
||||
readonly handler: string;
|
||||
/**
|
||||
* Specify a custom test with your own code
|
||||
*
|
||||
* @returns `Test` associated with the specified Code object
|
||||
* @param options The configuration options
|
||||
*/
|
||||
static custom(options: CustomTestOptions): Test;
|
||||
/**
|
||||
* Construct a Test property
|
||||
*
|
||||
* @param code The code that the canary should run
|
||||
* @param handler The handler of the canary
|
||||
*/
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Properties for specifying a test
|
||||
*/
|
||||
export interface CustomTestOptions {
|
||||
/**
|
||||
* The code of the canary script
|
||||
*/
|
||||
readonly code: Code;
|
||||
/**
|
||||
* The handler for the code. Must end with `.handler`.
|
||||
*/
|
||||
readonly handler: string;
|
||||
}
|
||||
/**
|
||||
* Different ways to clean up underlying Canary resources
|
||||
* when the Canary is deleted.
|
||||
*/
|
||||
export declare enum Cleanup {
|
||||
/**
|
||||
* Clean up nothing. The user is responsible for cleaning up
|
||||
* all resources left behind by the Canary.
|
||||
*/
|
||||
NOTHING = "nothing",
|
||||
/**
|
||||
* Clean up the underlying Lambda function only. The user is
|
||||
* responsible for cleaning up all other resources left behind
|
||||
* by the Canary.
|
||||
*/
|
||||
LAMBDA = "lambda"
|
||||
}
|
||||
/**
|
||||
* Resources that tags applied to a canary should be replicated to.
|
||||
*/
|
||||
export declare enum ResourceToReplicateTags {
|
||||
/**
|
||||
* Replicate canary tags to the Lambda function.
|
||||
*
|
||||
* When specified, CloudWatch Synthetics will keep the tags of the canary
|
||||
* and the Lambda function synchronized. Any future changes made to the
|
||||
* canary's tags will also be applied to the function.
|
||||
*/
|
||||
LAMBDA_FUNCTION = "lambda-function"
|
||||
}
|
||||
/**
|
||||
* Options for specifying the s3 location that stores the data of each canary run. The artifacts bucket location **cannot**
|
||||
* be updated once the canary is created.
|
||||
*/
|
||||
export interface ArtifactsBucketLocation {
|
||||
/**
|
||||
* The s3 location that stores the data of each run.
|
||||
*/
|
||||
readonly bucket: s3.IBucket;
|
||||
/**
|
||||
* The S3 bucket prefix. Specify this if you want a more specific path within the artifacts bucket.
|
||||
*
|
||||
* @default - no prefix
|
||||
*/
|
||||
readonly prefix?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a canary
|
||||
*/
|
||||
export interface CanaryProps {
|
||||
/**
|
||||
* The s3 location that stores the data of the canary runs.
|
||||
*
|
||||
* @default - A new s3 bucket will be created without a prefix.
|
||||
*/
|
||||
readonly artifactsBucketLocation?: ArtifactsBucketLocation;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @see required permissions: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-executionrolearn
|
||||
*
|
||||
* @default - A unique role will be generated for this canary.
|
||||
* You can add permissions to roles by calling 'addToRolePolicy'.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
readonly timeToLive?: cdk.Duration;
|
||||
/**
|
||||
* 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)'
|
||||
*/
|
||||
readonly schedule?: Schedule;
|
||||
/**
|
||||
* The amount of times the canary will automatically retry a failed run.
|
||||
* This is only supported on the following runtimes or newer: `Runtime.SYNTHETICS_NODEJS_PUPPETEER_10_0`, `Runtime.SYNTHETICS_NODEJS_PLAYWRIGHT_2_0`, `Runtime.SYNTHETICS_PYTHON_SELENIUM_5_1`.
|
||||
* Max retries can be set between 0 and 2. Canaries which time out after 10 minutes are automatically limited to one retry.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_autoretry.html
|
||||
* @default 0
|
||||
*/
|
||||
readonly maxRetries?: number;
|
||||
/**
|
||||
* Whether or not the canary should start after creation.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly startAfterCreation?: boolean;
|
||||
/**
|
||||
* How many days should successful runs be retained.
|
||||
*
|
||||
* @default Duration.days(31)
|
||||
*/
|
||||
readonly successRetentionPeriod?: cdk.Duration;
|
||||
/**
|
||||
* How many days should failed runs be retained.
|
||||
*
|
||||
* @default Duration.days(31)
|
||||
*/
|
||||
readonly failureRetentionPeriod?: cdk.Duration;
|
||||
/**
|
||||
* 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.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html
|
||||
*
|
||||
* @default - A unique name will be generated from the construct ID
|
||||
*/
|
||||
readonly canaryName?: string;
|
||||
/**
|
||||
* Specify the runtime version to use for the canary.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html
|
||||
*/
|
||||
readonly runtime: Runtime;
|
||||
/**
|
||||
* The type of test that you want your canary to run. Use `Test.custom()` to specify the test to run.
|
||||
*/
|
||||
readonly test: Test;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html
|
||||
*/
|
||||
readonly activeTracing?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
readonly environmentVariables?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
readonly memory?: cdk.Size;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
readonly timeout?: cdk.Duration;
|
||||
/**
|
||||
* The VPC where this canary is run.
|
||||
*
|
||||
* Specify this if the canary needs to access resources in a VPC.
|
||||
*
|
||||
* @default - Not in VPC
|
||||
*/
|
||||
readonly vpc?: ec2.IVpc;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
readonly vpcSubnets?: ec2.SubnetSelection;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
readonly securityGroups?: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @deprecated use provisionedResourceCleanup
|
||||
*/
|
||||
readonly cleanup?: Cleanup;
|
||||
/**
|
||||
* Whether to also delete the Lambda functions and layers used by this canary when the canary is deleted.
|
||||
*
|
||||
* @default undefined - the default behavior is to not delete the Lambda functions and layers
|
||||
*/
|
||||
readonly provisionedResourceCleanup?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
readonly artifactsBucketLifecycleRules?: Array<s3.LifecycleRule>;
|
||||
/**
|
||||
* Canary Artifacts in S3 encryption mode.
|
||||
* Artifact encryption is only supported for canaries that use Synthetics runtime
|
||||
* version `syn-nodejs-puppeteer-3.3` or later.
|
||||
*
|
||||
* @default - Artifacts are encrypted at rest using an AWS managed key. `ArtifactsEncryptionMode.KMS` is set if you specify `artifactS3KmsKey`.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html
|
||||
*/
|
||||
readonly artifactS3EncryptionMode?: ArtifactsEncryptionMode;
|
||||
/**
|
||||
* The KMS key used to encrypt canary artifacts.
|
||||
*
|
||||
* @default - no kms key if `artifactS3EncryptionMode` is set to `S3_MANAGED`. A key will be created if one is not provided and `artifactS3EncryptionMode` is set to `KMS`.
|
||||
*/
|
||||
readonly artifactS3KmsKey?: kms.IKey;
|
||||
/**
|
||||
* Specifies whether to perform a dry run before updating the canary.
|
||||
*
|
||||
* If set to true, CDK will execute a dry run to validate the changes before applying them to the canary.
|
||||
* If the dry run succeeds, the canary will be updated with the changes.
|
||||
* If the dry run fails, the CloudFormation deployment will fail with the dry run's failure reason.
|
||||
*
|
||||
* If set to false or omitted, the canary will be updated directly without first performing a dry run.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/performing-safe-canary-upgrades.html
|
||||
*
|
||||
* @default undefined - AWS CloudWatch default is false
|
||||
*/
|
||||
readonly dryRunAndUpdate?: boolean;
|
||||
/**
|
||||
* Specifies which resources should have their tags replicated to this canary.
|
||||
*
|
||||
* To have the tags that you apply to this canary also be applied to the Lambda
|
||||
* function that the canary uses, specify this property with the value
|
||||
* ResourceToReplicateTags.LAMBDA_FUNCTION. If you do this, CloudWatch Synthetics will keep the tags of the canary and the
|
||||
* Lambda function synchronized. Any future changes you make to the canary's tags
|
||||
* will also be applied to the function.
|
||||
*
|
||||
* @default - No resources will have their tags replicated to this canary
|
||||
*/
|
||||
readonly resourcesToReplicateTags?: ResourceToReplicateTags[];
|
||||
/**
|
||||
* Browser configurations for the canary.
|
||||
*
|
||||
* Specifies which browser(s) to use for running the canary tests.
|
||||
* You can specify up to 2 browser configurations.
|
||||
*
|
||||
* Firefox is supported with Node.js Puppeteer and Playwright runtimes,
|
||||
* but not with Python Selenium runtimes.
|
||||
*
|
||||
* @default undefined - AWS CloudWatch default is using only Chrome browser
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries.html
|
||||
*/
|
||||
readonly browserConfigs?: BrowserType[];
|
||||
}
|
||||
/**
|
||||
* Encryption mode for canary artifacts.
|
||||
*/
|
||||
export declare enum ArtifactsEncryptionMode {
|
||||
/**
|
||||
* Server-side encryption (SSE) with an Amazon S3-managed key.
|
||||
*/
|
||||
S3_MANAGED = "SSE_S3",
|
||||
/**
|
||||
* Server-side encryption (SSE) with an AWS KMS customer managed key.
|
||||
*/
|
||||
KMS = "SSE_KMS"
|
||||
}
|
||||
/**
|
||||
* Represents a CloudWatch Synthetics Canary
|
||||
*/
|
||||
export interface ICanary extends cdk.IResource, ICanaryRef {
|
||||
/**
|
||||
* The ID of the canary
|
||||
*
|
||||
* For imported canaries, this may be the canary name as a fallback,
|
||||
* since the actual ID (a UUID) is not available when importing by name.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly canaryId: string;
|
||||
/**
|
||||
* The name of the canary
|
||||
* @attribute
|
||||
*/
|
||||
readonly canaryName: string;
|
||||
/**
|
||||
* The ARN of the canary
|
||||
* @attribute
|
||||
*/
|
||||
readonly canaryArn: string;
|
||||
}
|
||||
/**
|
||||
* Define a new Canary
|
||||
*/
|
||||
export declare class Canary extends cdk.Resource implements ec2.IConnectable, ICanary {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Import an existing canary by ARN
|
||||
*/
|
||||
static fromCanaryArn(scope: Construct, id: string, canaryArn: string): ICanary;
|
||||
/**
|
||||
* Import an existing canary by name
|
||||
*/
|
||||
static fromCanaryName(scope: Construct, id: string, canaryName: string): ICanary;
|
||||
/**
|
||||
* Execution role associated with this Canary.
|
||||
*/
|
||||
readonly role: iam.IRole;
|
||||
/**
|
||||
* The canary ID
|
||||
* @attribute
|
||||
*/
|
||||
get canaryId(): string;
|
||||
/**
|
||||
* The state of the canary. For example, 'RUNNING', 'STOPPED', 'NOT STARTED', or 'ERROR'.
|
||||
* @attribute
|
||||
*/
|
||||
get canaryState(): string;
|
||||
/**
|
||||
* The canary Name
|
||||
* @attribute
|
||||
*/
|
||||
get canaryName(): string;
|
||||
/**
|
||||
* The canary ARN
|
||||
* @attribute
|
||||
*/
|
||||
readonly canaryArn: string;
|
||||
/**
|
||||
* Bucket where data from each canary run is stored.
|
||||
*/
|
||||
readonly artifactsBucket: s3.IBucket;
|
||||
/**
|
||||
* A reference to the canary.
|
||||
*/
|
||||
get canaryRef(): CanaryReference;
|
||||
/**
|
||||
* Actual connections object for the underlying Lambda
|
||||
*
|
||||
* May be unset, in which case the canary Lambda is not configured for use in a VPC.
|
||||
* @internal
|
||||
*/
|
||||
private readonly _connections?;
|
||||
private readonly _resource;
|
||||
private get resource();
|
||||
constructor(scope: Construct, id: string, props: CanaryProps);
|
||||
private validateDryRunAndUpdate;
|
||||
private validateBrowserConfigs;
|
||||
private cleanupUnderlyingResources;
|
||||
/**
|
||||
* Access the Connections object
|
||||
*
|
||||
* Will fail if not a VPC-enabled Canary
|
||||
*/
|
||||
get connections(): ec2.Connections;
|
||||
/**
|
||||
* Measure the Duration of a single canary run, in seconds.
|
||||
*
|
||||
* @param options - configuration options for the metric
|
||||
*
|
||||
* @default avg over 5 minutes
|
||||
*/
|
||||
metricDuration(options?: MetricOptions): Metric;
|
||||
/**
|
||||
* Measure the percentage of successful canary runs.
|
||||
*
|
||||
* @param options - configuration options for the metric
|
||||
*
|
||||
* @default avg over 5 minutes
|
||||
*/
|
||||
metricSuccessPercent(options?: MetricOptions): Metric;
|
||||
/**
|
||||
* Measure the number of failed canary runs over a given time period.
|
||||
*
|
||||
* Default: sum over 5 minutes
|
||||
*
|
||||
* @param options - configuration options for the metric
|
||||
*/
|
||||
metricFailed(options?: MetricOptions): Metric;
|
||||
/**
|
||||
* Returns a default role for the canary
|
||||
*/
|
||||
private createDefaultRole;
|
||||
private logGroupArn;
|
||||
private lambdaArn;
|
||||
/**
|
||||
* Returns the code object taken in by the canary resource.
|
||||
*/
|
||||
private createCode;
|
||||
/**
|
||||
* Verifies that the handler name matches the conventions given a certain runtime.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-code.html#cfn-synthetics-canary-code-handler
|
||||
* @param handler - the name of the handler
|
||||
* @param runtime - the runtime version
|
||||
*/
|
||||
private validateHandler;
|
||||
private createRunConfig;
|
||||
/**
|
||||
* Returns a canary schedule object
|
||||
*/
|
||||
private createSchedule;
|
||||
private createVpcConfig;
|
||||
private createArtifactConfig;
|
||||
/**
|
||||
* Creates a unique name for the canary. The generated name is the physical ID of the canary.
|
||||
*/
|
||||
private generateUniqueName;
|
||||
private cannedMetric;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/canary.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/canary.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
109
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/code.d.ts
generated
vendored
Normal file
109
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/code.d.ts
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import { RuntimeFamily } from './runtime';
|
||||
import type * as s3 from '../../aws-s3';
|
||||
import * as s3_assets from '../../aws-s3-assets';
|
||||
/**
|
||||
* The code the canary should execute
|
||||
*/
|
||||
export declare abstract class Code {
|
||||
/**
|
||||
* Specify code inline.
|
||||
*
|
||||
* @param code The actual handler code (limited to 5MB)
|
||||
*
|
||||
* @returns `InlineCode` with inline code.
|
||||
*/
|
||||
static fromInline(code: string): InlineCode;
|
||||
/**
|
||||
* Specify code from a local path. Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
|
||||
*
|
||||
* @param assetPath Either a directory or a .zip file
|
||||
*
|
||||
* @returns `AssetCode` associated with the specified path.
|
||||
*/
|
||||
static fromAsset(assetPath: string, options?: s3_assets.AssetOptions): AssetCode;
|
||||
/**
|
||||
* Specify code from an s3 bucket. The object in the s3 bucket must be a .zip file that contains
|
||||
* the structure `nodejs/node_modules/myCanaryFilename.js`.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
|
||||
*
|
||||
* @param bucket The S3 bucket
|
||||
* @param key The object key
|
||||
* @param objectVersion Optional S3 object version
|
||||
*
|
||||
* @returns `S3Code` associated with the specified S3 object.
|
||||
*/
|
||||
static fromBucket(bucket: s3.IBucketRef, key: string, objectVersion?: string): S3Code;
|
||||
/**
|
||||
* Called when the canary is initialized to allow this object to bind
|
||||
* to the stack, add resources and have fun.
|
||||
*
|
||||
* @param scope The binding scope. Don't be smart about trying to down-cast or
|
||||
* assume it's initialized. You may just use it as a construct scope.
|
||||
*
|
||||
* @returns a bound `CodeConfig`.
|
||||
*/
|
||||
abstract bind(scope: Construct, handler: string, family: RuntimeFamily, runtimeName?: string): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* Configuration of the code class
|
||||
*/
|
||||
export interface CodeConfig {
|
||||
/**
|
||||
* The location of the code in S3 (mutually exclusive with `inlineCode`).
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly s3Location?: s3.Location;
|
||||
/**
|
||||
* Inline code (mutually exclusive with `s3Location`).
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly inlineCode?: string;
|
||||
}
|
||||
/**
|
||||
* Canary code from an Asset
|
||||
*/
|
||||
export declare class AssetCode extends Code {
|
||||
private assetPath;
|
||||
private options?;
|
||||
private asset?;
|
||||
/**
|
||||
* @param assetPath The path to the asset file or directory.
|
||||
*/
|
||||
constructor(assetPath: string, options?: s3_assets.AssetOptions | undefined);
|
||||
bind(scope: Construct, handler: string, family: RuntimeFamily, runtimeName?: string): CodeConfig;
|
||||
/**
|
||||
* Validates requirements specified by the canary resource. For example, the canary code with handler `index.handler`
|
||||
* must be found in the file structure `nodejs/node_modules/index.js`.
|
||||
*
|
||||
* Requires path to be either zip file or directory.
|
||||
* Requires asset directory to have the structure 'nodejs/node_modules' for puppeteer runtime.
|
||||
* Requires canary file to be directly inside node_modules folder.
|
||||
* Requires asset directory to have the extension '.js', '.mjs', or '.cjs' for playwright runtime.
|
||||
* Requires asset directory to have the structure 'python' for python runtime.
|
||||
* Requires canary file name matches the handler name.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html
|
||||
*/
|
||||
private validateCanaryAsset;
|
||||
}
|
||||
/**
|
||||
* Canary code from an inline string.
|
||||
*/
|
||||
export declare class InlineCode extends Code {
|
||||
private code;
|
||||
constructor(code: string);
|
||||
bind(scope: Construct, handler: string, _family: RuntimeFamily, _runtimeName?: string): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* S3 bucket path to the code zip file
|
||||
*/
|
||||
export declare class S3Code extends Code {
|
||||
private bucket;
|
||||
private key;
|
||||
private objectVersion?;
|
||||
constructor(bucket: s3.IBucketRef, key: string, objectVersion?: string | undefined);
|
||||
bind(_scope: Construct, _handler: string, _family: RuntimeFamily, _runtimeName?: string): CodeConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/code.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/code.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
99
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/group.d.ts
generated
vendored
Normal file
99
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { ICanary } from './canary';
|
||||
import type { GroupReference, IGroupRef } from './synthetics.generated';
|
||||
import * as cdk from '../../core';
|
||||
/**
|
||||
* Represents a CloudWatch Synthetics Group
|
||||
*/
|
||||
export interface IGroup extends cdk.IResource, IGroupRef {
|
||||
/**
|
||||
* The ID of the group
|
||||
* @attribute
|
||||
*/
|
||||
readonly groupId: string;
|
||||
/**
|
||||
* The name of the group
|
||||
* @attribute
|
||||
*/
|
||||
readonly groupName: string;
|
||||
/**
|
||||
* The ARN of the group
|
||||
* @attribute
|
||||
*/
|
||||
readonly groupArn: string;
|
||||
}
|
||||
/**
|
||||
* Properties for defining a CloudWatch Synthetics Group
|
||||
*/
|
||||
export interface GroupProps {
|
||||
/**
|
||||
* A name for the group. Must contain only lowercase alphanumeric characters,
|
||||
* hyphens, or underscores, and be at most 64 characters.
|
||||
*
|
||||
* The names for all groups in your account, across all Regions, must be unique.
|
||||
*
|
||||
* @default - A unique name will be generated from the construct ID
|
||||
*/
|
||||
readonly groupName?: string;
|
||||
/**
|
||||
* List of canaries to associate with this group.
|
||||
*
|
||||
* Each group can contain as many as 10 canaries.
|
||||
*
|
||||
* @default - No canaries are associated with the group initially
|
||||
*/
|
||||
readonly canaries?: ICanary[];
|
||||
}
|
||||
/**
|
||||
* Define a new CloudWatch Synthetics Group
|
||||
*
|
||||
* Groups allow you to associate canaries with each other, including cross-Region canaries.
|
||||
* Using groups can help you with managing and automating your canaries, and you can also
|
||||
* view aggregated run results and statistics for all canaries in a group.
|
||||
*/
|
||||
export declare class Group extends cdk.Resource implements IGroup {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Import an existing group by ARN
|
||||
*/
|
||||
static fromGroupArn(scope: Construct, id: string, groupArn: string): IGroup;
|
||||
/**
|
||||
* Import an existing group by name
|
||||
*/
|
||||
static fromGroupName(scope: Construct, id: string, groupName: string): IGroup;
|
||||
/**
|
||||
* The ID of the group
|
||||
* @attribute
|
||||
*/
|
||||
readonly groupId: string;
|
||||
/**
|
||||
* The ARN of the group
|
||||
* @attribute
|
||||
*/
|
||||
readonly groupArn: string;
|
||||
/**
|
||||
* The name of the group
|
||||
* @attribute
|
||||
*/
|
||||
get groupName(): string;
|
||||
/**
|
||||
* A reference to the group.
|
||||
*/
|
||||
get groupRef(): GroupReference;
|
||||
private readonly _resource;
|
||||
private readonly _canaries;
|
||||
constructor(scope: Construct, id: string, props?: GroupProps);
|
||||
/**
|
||||
* Add a canary to this group
|
||||
*
|
||||
* @param canary The canary to add to the group [disable-awslint:prefer-ref-interface]
|
||||
*/
|
||||
addCanary(canary: ICanary): void;
|
||||
/**
|
||||
* Get all canaries associated with this group
|
||||
*/
|
||||
get canaries(): ICanary[];
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/group.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/group.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/index.d.ts
generated
vendored
Normal file
6
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from './canary';
|
||||
export * from './code';
|
||||
export * from './group';
|
||||
export * from './runtime';
|
||||
export * from './schedule';
|
||||
export * from './synthetics.generated';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.BrowserType=void 0,Object.defineProperty(exports,_noFold="BrowserType",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").BrowserType;return Object.defineProperty(exports,_noFold="BrowserType",{enumerable:!0,configurable:!0,value}),value}}),exports.Test=void 0,Object.defineProperty(exports,_noFold="Test",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").Test;return Object.defineProperty(exports,_noFold="Test",{enumerable:!0,configurable:!0,value}),value}}),exports.Cleanup=void 0,Object.defineProperty(exports,_noFold="Cleanup",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").Cleanup;return Object.defineProperty(exports,_noFold="Cleanup",{enumerable:!0,configurable:!0,value}),value}}),exports.ResourceToReplicateTags=void 0,Object.defineProperty(exports,_noFold="ResourceToReplicateTags",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").ResourceToReplicateTags;return Object.defineProperty(exports,_noFold="ResourceToReplicateTags",{enumerable:!0,configurable:!0,value}),value}}),exports.ArtifactsEncryptionMode=void 0,Object.defineProperty(exports,_noFold="ArtifactsEncryptionMode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").ArtifactsEncryptionMode;return Object.defineProperty(exports,_noFold="ArtifactsEncryptionMode",{enumerable:!0,configurable:!0,value}),value}}),exports.Canary=void 0,Object.defineProperty(exports,_noFold="Canary",{enumerable:!0,configurable:!0,get:()=>{var value=require("./canary").Canary;return Object.defineProperty(exports,_noFold="Canary",{enumerable:!0,configurable:!0,value}),value}}),exports.Code=void 0,Object.defineProperty(exports,_noFold="Code",{enumerable:!0,configurable:!0,get:()=>{var value=require("./code").Code;return Object.defineProperty(exports,_noFold="Code",{enumerable:!0,configurable:!0,value}),value}}),exports.AssetCode=void 0,Object.defineProperty(exports,_noFold="AssetCode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./code").AssetCode;return Object.defineProperty(exports,_noFold="AssetCode",{enumerable:!0,configurable:!0,value}),value}}),exports.InlineCode=void 0,Object.defineProperty(exports,_noFold="InlineCode",{enumerable:!0,configurable:!0,get:()=>{var value=require("./code").InlineCode;return Object.defineProperty(exports,_noFold="InlineCode",{enumerable:!0,configurable:!0,value}),value}}),exports.S3Code=void 0,Object.defineProperty(exports,_noFold="S3Code",{enumerable:!0,configurable:!0,get:()=>{var value=require("./code").S3Code;return Object.defineProperty(exports,_noFold="S3Code",{enumerable:!0,configurable:!0,value}),value}}),exports.Group=void 0,Object.defineProperty(exports,_noFold="Group",{enumerable:!0,configurable:!0,get:()=>{var value=require("./group").Group;return Object.defineProperty(exports,_noFold="Group",{enumerable:!0,configurable:!0,value}),value}}),exports.RuntimeFamily=void 0,Object.defineProperty(exports,_noFold="RuntimeFamily",{enumerable:!0,configurable:!0,get:()=>{var value=require("./runtime").RuntimeFamily;return Object.defineProperty(exports,_noFold="RuntimeFamily",{enumerable:!0,configurable:!0,value}),value}}),exports.Runtime=void 0,Object.defineProperty(exports,_noFold="Runtime",{enumerable:!0,configurable:!0,get:()=>{var value=require("./runtime").Runtime;return Object.defineProperty(exports,_noFold="Runtime",{enumerable:!0,configurable:!0,value}),value}}),exports.Schedule=void 0,Object.defineProperty(exports,_noFold="Schedule",{enumerable:!0,configurable:!0,get:()=>{var value=require("./schedule").Schedule;return Object.defineProperty(exports,_noFold="Schedule",{enumerable:!0,configurable:!0,value}),value}}),exports.CfnCanary=void 0,Object.defineProperty(exports,_noFold="CfnCanary",{enumerable:!0,configurable:!0,get:()=>{var value=require("./synthetics.generated").CfnCanary;return Object.defineProperty(exports,_noFold="CfnCanary",{enumerable:!0,configurable:!0,value}),value}}),exports.CfnGroup=void 0,Object.defineProperty(exports,_noFold="CfnGroup",{enumerable:!0,configurable:!0,get:()=>{var value=require("./synthetics.generated").CfnGroup;return Object.defineProperty(exports,_noFold="CfnGroup",{enumerable:!0,configurable:!0,value}),value}});
|
||||
551
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/runtime.d.ts
generated
vendored
Normal file
551
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,551 @@
|
||||
/**
|
||||
* All known Lambda runtime families.
|
||||
*/
|
||||
export declare enum RuntimeFamily {
|
||||
/**
|
||||
* All Lambda runtimes that depend on Node.js.
|
||||
*/
|
||||
NODEJS = 0,
|
||||
/**
|
||||
* All lambda runtimes that depend on Python.
|
||||
*/
|
||||
PYTHON = 1,
|
||||
/**
|
||||
* Any future runtime family.
|
||||
*/
|
||||
OTHER = 2
|
||||
}
|
||||
/**
|
||||
* Runtime options for a canary
|
||||
*/
|
||||
export declare class Runtime {
|
||||
readonly name: string;
|
||||
readonly family: RuntimeFamily;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-3.5` includes the following:
|
||||
* - Lambda runtime Node.js 14.x
|
||||
* - Puppeteer-core version 5.5.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* New features:
|
||||
* - **Updated dependencies**: The only new features in this runtime are the updated dependencies.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.5
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_3_5: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-3.6` includes the following:
|
||||
* - Lambda runtime Node.js 14.x
|
||||
* - Puppeteer-core version 5.5.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.6
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_3_6: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-3.7` includes the following:
|
||||
* - Lambda runtime Node.js 14.x
|
||||
* - Puppeteer-core version 5.5.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* New Features:
|
||||
* - **Logging enhancement**: The canary will upload logs to Amazon S3 even if it times out or crashes.
|
||||
* - **Lambda layer size reduced**: The size of the Lambda layer used for canaries is reduced by 34%.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.7
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_3_7: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-3.8` includes the following:
|
||||
* - Lambda runtime Node.js 14.x
|
||||
* - Puppeteer-core version 10.1.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* New Features:
|
||||
* - **Profile cleanup**: Chromium profiles are now cleaned up after each canary run.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.8
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_3_8: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-3.9` includes the following:
|
||||
*
|
||||
* - Lambda runtime Node.js 14.x
|
||||
* - Puppeteer-core version 5.5.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* New Features:
|
||||
* - **Dependency upgrades**: Upgrades some third-party dependency packages.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.9
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_3_9: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-4.0` includes the following:
|
||||
* - Lambda runtime Node.js 16.x
|
||||
* - Puppeteer-core version 5.5.0
|
||||
* - Chromium version 92.0.4512
|
||||
*
|
||||
* New Features:
|
||||
* - **Dependency upgrades**: The Node.js dependency is updated to 16.x.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-4.0
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_4_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-5.0` includes the following:
|
||||
* - Lambda runtime Node.js 16.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Dependency upgrade**: The Puppeteer-core version is updated to 19.7.0. The Chromium version is upgraded to 111.0.5563.146.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-5.0
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_5_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-5.1` includes the following:
|
||||
* - Lambda runtime Node.js 16.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* Bug fixes:
|
||||
* - **Bug fix**: This runtime fixes a bug in `syn-nodejs-puppeteer-5.0` where the HAR files created by the canaries were missing request headers.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-5.1
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_5_1: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-5.2` includes the following:
|
||||
* - Lambda runtime Node.js 16.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated versions of the bundled libraries in Chromium**
|
||||
* - **Bug fixes**
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-5.2
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_5_2: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-6.0` includes the following:
|
||||
* - Lambda runtime Node.js 18.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Dependency upgrade**: The Node.js dependency is upgraded to 18.x.
|
||||
* Bug fixes:
|
||||
* - **Bug fix**: Clean up core dump generated when Chromium crashes during a canary run.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.0
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_6_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-6.1` includes the following:
|
||||
* - Lambda runtime Node.js 18.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Stability improvements**: Added auto-retry logic for handling intermittent Puppeteer launch errors.
|
||||
* - **Dependency upgrades**: Upgrades for some third-party dependency packages.
|
||||
* - **Canaries without Amazon S3 permissions**: Bug fixes, such that canaries that don't have any Amazon S3 permissions can still run. These canaries with no Amazon S3 permissions won't be able to upload screenshots or other artifacts to Amazon S3. For more information about permissions for canaries, see {@link https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_CanaryPermissions.html | Required roles and permissions for canaries}.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.1
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_6_1: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-6.2` includes the following:
|
||||
* - Lambda runtime Node.js 18.x
|
||||
* - Puppeteer-core version 19.7.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated versions of the bundled libraries in Chromium**
|
||||
* - **Ephemeral storage monitoring**: This runtime adds ephemeral storage monitoring in customer accounts.
|
||||
* - **Bug fixes**
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.2
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_6_2: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-7.0` includes the following:
|
||||
* - Lambda runtime Node.js 18.x
|
||||
* - Puppeteer-core version 21.9.0
|
||||
* - Chromium version 121.0.6167.139
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated versions of the bundled libraries in Puppeteer and Chromium**: The Puppeteer and Chromium dependencies are updated to new versions.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-7.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_7_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-8.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Puppeteer-core version 22.10.0
|
||||
* - Chromium version 125.0.6422.112
|
||||
*
|
||||
* New Features:
|
||||
* - **Support for two-factor authentication**
|
||||
* - **Bug fixes** for situations where some service clients were losing data in Node.js SDK V3 responses.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-8.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_8_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-9.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Puppeteer-core version 22.12.1
|
||||
* - Chromium version 126.0.6478.126
|
||||
*
|
||||
* New Features:
|
||||
* - **Bug fixes** Bug fix to enable visual monitoring capabilities.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-9.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_9_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-9.1` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Puppeteer-core version 22.12.1
|
||||
* - Chromium version 126.0.6478.126
|
||||
*
|
||||
* New Features:
|
||||
* - **Bug fixes** Bug fix related to date ranges and pending requests in HAR files.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-9.1
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_9_1: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-10.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Puppeteer-core version 24.2.0
|
||||
* - Chromium version 131.0.6778.264
|
||||
*
|
||||
* New Features:
|
||||
* - **Bug fixes**: The bug related to closing the browser that took excessively long is fixed.
|
||||
* - **Dry run**: Supports dry runs for the canary which allows for adhoc executions or performing a safe canary update.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-10.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_10_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-11.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Puppeteer-core version 24.15.0
|
||||
* - Chromium version 138.0.7204.168
|
||||
*
|
||||
* New Features:
|
||||
* - **Multi-browser support**: You can now run Node.js Puppeteer canaries in either Firefox or Chrome
|
||||
* - **Simplified packaging**: Package scripts directly under root without using the Node.js/node_modules directory structure
|
||||
* - **Screenshot integration**: Capture screenshots using native Puppeteer functions to visualize canary script stages. Synthetics automatically associates screenshots with canary steps and uploads them to Amazon S3
|
||||
* - **Enhanced log querying**: Query and filter logs through the CloudWatch Insights console. Each log message includes a unique canaryRunId for easier searching
|
||||
* - **Configuration file support**: Define and update Synthetics settings using a synthetics.json file. This separation of configuration from script logic improves maintenance and reusability
|
||||
* - **Multiple tabs support**: Create canaries that open multiple browser tabs and access screenshots from each tab. Build multi-tab and multi-step user workflows in Synthetics
|
||||
* - **Security fixes**
|
||||
* - **Visual monitoring bug fixes**
|
||||
* - **Added support for structured JSON logging with configurable log levels**: Logs are now emitted in JSON format to enable easier parsing and querying in CloudWatch. Log level is configurable (for example, DEBUG, INFO, TRACE) through environment variables allowing users to control verbosity based on their needs
|
||||
* - **Support for ES syntax**
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-11.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_11_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-12.0` includes the following:
|
||||
* - Lambda runtime Node.js 22.x
|
||||
* - Puppeteer-core version 24.22.1
|
||||
* - Chromium version 140.0.7339.185
|
||||
* - Firefox version 143.0.1
|
||||
*
|
||||
* New Features:
|
||||
* - Applied security patches and updated Puppeteer and browser versions.
|
||||
* - **Bug fix for Restricted header redaction**: Fixed an issue where in some situations restricted headers were not being redacted in executeHttpStep(). Behavior is now consistent with Puppeteer 10.0.
|
||||
* - **Bug fix for includeResponseBody configuration**: Fixed an issue where HAR file generation can misapply the includeResponseBody configuration setting in certain situations. HAR now ensures response bodies are excluded when setting is configured.
|
||||
* - **Request capture lifecycle fixed**: Fixed an issue where in some situations the HTTP request capturer may cause continuous aggregation of requests. Recording now terminates correctly after each step execution.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-12.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_12_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-puppeteer-13.0` includes the following:
|
||||
* - Lambda runtime Node.js 22.x
|
||||
* - Puppeteer-core version 24.25.0
|
||||
* - Chromium version 142.0.7444.175
|
||||
* - Firefox version 145.x
|
||||
*
|
||||
* New Features:
|
||||
* - Applied security patches and updated Puppeteer and browser versions.
|
||||
* - **Bug fix**: Fixed intermittent runtime extension crash issue caused by concurrent map access
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-13.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PUPPETEER_13_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-playwright-1.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Playwright version 1.45
|
||||
* - Chromium version 126.0.6478.126
|
||||
*
|
||||
* New Features:
|
||||
* - **PlayWright support** You can write canary scripts by using the Playwright automation framework. You can bring your existing Playwright scripts to run as canaries, and enhance them with AWS monitoring capabilities.
|
||||
* - **CloudWatch Logs integration** You can query and filter for logs through the CloudWatch Synthetics console. Each log message contains unique canaryRunId, making it easy to search for logs for a particular canary run.
|
||||
* - **Metrics and canary artifacts** You can monitor canary run pass rate through CloudWatch metrics, and configure alarms to alert you when canaries detect issues.
|
||||
* - **Screenshots and steps association** You can capture screenshots using native Playwright functionality to visualize the stages of a canary script on each run. Screenshots are automatically associated with canary steps, and are uploaded to Amazon S3 buckets.
|
||||
* - **Multiple tabs** You can create canaries that open multiple browser tabs, and access screenshots from each tab. You can create multi-tab and multi-step user workflows in Synthetics.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_playwright.html#Synthetics_runtimeversion-syn-nodejs-playwright-1.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PLAYWRIGHT_1_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-playwright-2.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Playwright version 1.49.1
|
||||
* - Chromium version 131.0.6778.264
|
||||
*
|
||||
* New Features:
|
||||
* - The mismatch between total duration and sum of timings for a given request in HAR file is fixed.
|
||||
* - Supports dry runs for the canary which allows for adhoc executions or performing a safe canary update.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_playwright.html#Synthetics_runtimeversion-syn-nodejs-playwright-2.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PLAYWRIGHT_2_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-playwright-3.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
* - Playwright version 1.53.0
|
||||
* - Chromium version 138.0.7204.168
|
||||
*
|
||||
* New Features:
|
||||
* - Multi-browser support – You can now run your nodejs puppeteer canaries in either Firefox or Chrome
|
||||
* - Support for visual monitoring
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_playwright.html#Synthetics_runtimeversion-syn-nodejs-playwright-3.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PLAYWRIGHT_3_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-playwright-4.0` includes the following:
|
||||
* - Lambda runtime Node.js 22.x
|
||||
* - Playwright version 1.55.0
|
||||
* - Chromium version 140.0.7339.16
|
||||
* - Firefox version 141.0
|
||||
*
|
||||
* New Features:
|
||||
* - Applied security patches and updated Playwright and browser versions.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_playwright.html#Synthetics_runtimeversion-syn-nodejs-playwright-4.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PLAYWRIGHT_4_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-playwright-5.0` includes the following:
|
||||
* - Lambda runtime Node.js 22.x
|
||||
* - Playwright version 1.57.0
|
||||
* - Chromium version 143.0.7499.4
|
||||
* - Firefox version 142.0.1
|
||||
*
|
||||
* New Features:
|
||||
* - Applied security patches and updated Playwright and browser versions.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_playwright.html#Synthetics_runtimeversion-syn-nodejs-playwright-5.0
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_PLAYWRIGHT_5_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-3.0` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
*
|
||||
* New Features:
|
||||
* - **Multi-checks blueprint**: Supports the multi-checks blueprint for creating complex synthetic monitoring scenarios.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_Nodejs.html
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_3_0: Runtime;
|
||||
/**
|
||||
* `syn-nodejs-3.1` includes the following:
|
||||
* - Lambda runtime Node.js 20.x
|
||||
*
|
||||
* New Features:
|
||||
* - **Synthetics runtime namespace migration**: Canary runtime namespace has been migrated from `@amzn/synthetics-core` to `@aws/synthetics-core`.
|
||||
* - **Type definitions on npm**: Type definitions for the synthetics library are now published on npm. Ensure that the package version you install matches your canary's runtime version.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_Nodejs.html#CloudWatch_Synthetics_runtimeversion-syn-nodejs-3.1
|
||||
*/
|
||||
static readonly SYNTHETICS_NODEJS_3_1: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-1.0` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 3.141.0
|
||||
* - Chromium version 83.0.4103.0
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.0
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python Selenium runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_1_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-1.1` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 3.141.0
|
||||
* - Chromium version 83.0.4103.0
|
||||
*
|
||||
* New Features:
|
||||
* - **Custom handler function**: You can now use a custom handler function for your canary scripts.
|
||||
* - **Configuration options for adding metrics and step failure configurations**: These options were already available in runtimes for Node.js canaries.
|
||||
* - **Custom arguments in Chrome**: You can now open a browser in incognito mode or pass in proxy server configuration.
|
||||
* - **Cross-Region artifact buckets**: A canary can store its artifacts in an Amazon S3 bucket in a different Region.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.1
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python Selenium runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_1_1: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-1.2` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 3.141.0
|
||||
* - Chromium version 92.0.4512.0
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated dependencies**: The only new features in this runtime are the updated dependencies.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.2
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python Selenium runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_1_2: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-1.3` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 3.141.0
|
||||
* - Chromium version 92.0.4512.0
|
||||
*
|
||||
* New Features:
|
||||
* - **More precise timestamps**: The start time and stop time of canary runs are now precise to the millisecond.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-1.3
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python Selenium runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_1_3: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-2.0` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 4.10.0
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated dependencies**: The Chromium and Selenium dependencies are updated to new versions.
|
||||
* - **More precise timestamps**: The start time and stop time of canary runs are now precise to the millisecond.
|
||||
*
|
||||
* Bug fixes:
|
||||
* - **Timestamp added**: A timestamp has been added to canary logs.
|
||||
* - **Session re-use**: A bug was fixed so that canaries are now prevented from reusing the session from their previous canary run.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-2.0
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python Selenium runtime.
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_2_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-2.1` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 4.15.1
|
||||
* - Chromium version 111.0.5563.146
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated versions of the bundled libraries in Chromium**: The Chromium and Selenium dependencies are updated to new versions.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-2.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_2_1: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-3.0` includes the following:
|
||||
* - Lambda runtime Python 3.8
|
||||
* - Selenium version 4.15.1
|
||||
* - Chromium version 121.0.6167.139
|
||||
*
|
||||
* New Features:
|
||||
* - **Updated versions of the bundled libraries in Chromium**: The Chromium dependency is updated to a new version.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-3.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_3_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-4.0` includes the following:
|
||||
* - Lambda runtime Python 3.9
|
||||
* - Selenium version 4.15.1
|
||||
* - Chromium version 126.0.6478.126
|
||||
*
|
||||
* New Features:
|
||||
* - **Bug fixes** for errors in HAR parser logging.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-4.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_4_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-4.1` includes the following:
|
||||
* - Lambda runtime Python 3.9
|
||||
* - Selenium version 4.15.1
|
||||
* - Chromium version 126.0.6478.126
|
||||
*
|
||||
* New Features:
|
||||
* - **Addresses security vulnerability** This runtime has an update to address the CVE-2024-39689 vulnerability.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-4.1
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_4_1: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-5.0` includes the following:
|
||||
* - Lambda runtime Python 3.9
|
||||
* - Selenium version 4.21.0
|
||||
* - Chromium version 131.0.6778.264
|
||||
*
|
||||
* New Features:
|
||||
* - Automatic retry if the browser fails to launch.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-5.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_5_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-5.1` includes the following:
|
||||
* - Lambda runtime Python 3.9
|
||||
* - Selenium version 4.21.0
|
||||
* - Chromium version 131.0.6778.264
|
||||
*
|
||||
* New Features:
|
||||
* - Minor updates on metric emission.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-5.1
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_5_1: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-6.0` includes the following:
|
||||
* - Lambda runtime Python 3.11
|
||||
* - Selenium version 4.21.0
|
||||
* - Chromium version 131.0.6778.264
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-6.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_6_0: Runtime;
|
||||
/**
|
||||
* `syn-python-selenium-7.0` includes the following:
|
||||
* - Lambda runtime Python 3.11
|
||||
* - Selenium version 4.32.0
|
||||
* - Chromium version 138.0.7204.168
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-7.0
|
||||
*/
|
||||
static readonly SYNTHETICS_PYTHON_SELENIUM_7_0: Runtime;
|
||||
/**
|
||||
* @param name The name of the runtime version
|
||||
* @param family The Lambda runtime family
|
||||
*/
|
||||
constructor(name: string, family: RuntimeFamily);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/runtime.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/runtime.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Runtime=exports.RuntimeFamily=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var RuntimeFamily;(function(RuntimeFamily2){RuntimeFamily2[RuntimeFamily2.NODEJS=0]="NODEJS",RuntimeFamily2[RuntimeFamily2.PYTHON=1]="PYTHON",RuntimeFamily2[RuntimeFamily2.OTHER=2]="OTHER"})(RuntimeFamily||(exports.RuntimeFamily=RuntimeFamily={}));class Runtime{name;family;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_synthetics.Runtime",version:"2.252.0"};static SYNTHETICS_NODEJS_PUPPETEER_3_5=new Runtime("syn-nodejs-puppeteer-3.5",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_3_6=new Runtime("syn-nodejs-puppeteer-3.6",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_3_7=new Runtime("syn-nodejs-puppeteer-3.7",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_3_8=new Runtime("syn-nodejs-puppeteer-3.8",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_3_9=new Runtime("syn-nodejs-puppeteer-3.9",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_4_0=new Runtime("syn-nodejs-puppeteer-4.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_5_0=new Runtime("syn-nodejs-puppeteer-5.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_5_1=new Runtime("syn-nodejs-puppeteer-5.1",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_5_2=new Runtime("syn-nodejs-puppeteer-5.2",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_6_0=new Runtime("syn-nodejs-puppeteer-6.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_6_1=new Runtime("syn-nodejs-puppeteer-6.1",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_6_2=new Runtime("syn-nodejs-puppeteer-6.2",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_7_0=new Runtime("syn-nodejs-puppeteer-7.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_8_0=new Runtime("syn-nodejs-puppeteer-8.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_9_0=new Runtime("syn-nodejs-puppeteer-9.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_9_1=new Runtime("syn-nodejs-puppeteer-9.1",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_10_0=new Runtime("syn-nodejs-puppeteer-10.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_11_0=new Runtime("syn-nodejs-puppeteer-11.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_12_0=new Runtime("syn-nodejs-puppeteer-12.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PUPPETEER_13_0=new Runtime("syn-nodejs-puppeteer-13.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PLAYWRIGHT_1_0=new Runtime("syn-nodejs-playwright-1.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PLAYWRIGHT_2_0=new Runtime("syn-nodejs-playwright-2.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PLAYWRIGHT_3_0=new Runtime("syn-nodejs-playwright-3.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PLAYWRIGHT_4_0=new Runtime("syn-nodejs-playwright-4.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_PLAYWRIGHT_5_0=new Runtime("syn-nodejs-playwright-5.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_3_0=new Runtime("syn-nodejs-3.0",RuntimeFamily.NODEJS);static SYNTHETICS_NODEJS_3_1=new Runtime("syn-nodejs-3.1",RuntimeFamily.NODEJS);static SYNTHETICS_PYTHON_SELENIUM_1_0=new Runtime("syn-python-selenium-1.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_1_1=new Runtime("syn-python-selenium-1.1",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_1_2=new Runtime("syn-python-selenium-1.2",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_1_3=new Runtime("syn-python-selenium-1.3",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_2_0=new Runtime("syn-python-selenium-2.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_2_1=new Runtime("syn-python-selenium-2.1",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_3_0=new Runtime("syn-python-selenium-3.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_4_0=new Runtime("syn-python-selenium-4.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_4_1=new Runtime("syn-python-selenium-4.1",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_5_0=new Runtime("syn-python-selenium-5.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_5_1=new Runtime("syn-python-selenium-5.1",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_6_0=new Runtime("syn-python-selenium-6.0",RuntimeFamily.PYTHON);static SYNTHETICS_PYTHON_SELENIUM_7_0=new Runtime("syn-python-selenium-7.0",RuntimeFamily.PYTHON);constructor(name,family){this.name=name,this.family=family;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_synthetics_RuntimeFamily(family)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Runtime),error}}}exports.Runtime=Runtime;
|
||||
73
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/schedule.d.ts
generated
vendored
Normal file
73
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/schedule.d.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { Duration } from '../../core';
|
||||
/**
|
||||
* Schedule for canary runs
|
||||
*/
|
||||
export declare class Schedule {
|
||||
/**
|
||||
* The Schedule expression
|
||||
*/
|
||||
readonly expressionString: string;
|
||||
/**
|
||||
* The canary will be executed once.
|
||||
*/
|
||||
static once(): Schedule;
|
||||
/**
|
||||
* Construct a schedule from a literal schedule expression. The expression must be in a `rate(number units)` format.
|
||||
* For example, `Schedule.expression('rate(10 minutes)')`
|
||||
*
|
||||
* @param expression The expression to use.
|
||||
*/
|
||||
static expression(expression: string): Schedule;
|
||||
/**
|
||||
* Construct a schedule from an interval. Allowed values: 0 (for a single run) or between 1 and 60 minutes.
|
||||
* To specify a single run, you can use `Schedule.once()`.
|
||||
*
|
||||
* @param interval The interval at which to run the canary
|
||||
*/
|
||||
static rate(interval: Duration): Schedule;
|
||||
/**
|
||||
* Create a schedule from a set of cron fields
|
||||
*/
|
||||
static cron(options: CronOptions): Schedule;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Options to configure a cron expression
|
||||
*
|
||||
* All fields are strings so you can use complex expressions. Absence of
|
||||
* a field implies '*' or '?', whichever one is appropriate.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html
|
||||
*/
|
||||
export interface CronOptions {
|
||||
/**
|
||||
* The minute to run this rule at
|
||||
*
|
||||
* @default - Every minute
|
||||
*/
|
||||
readonly minute?: string;
|
||||
/**
|
||||
* The hour to run this rule at
|
||||
*
|
||||
* @default - Every hour
|
||||
*/
|
||||
readonly hour?: string;
|
||||
/**
|
||||
* The day of the month to run this rule at
|
||||
*
|
||||
* @default - Every day of the month
|
||||
*/
|
||||
readonly day?: string;
|
||||
/**
|
||||
* The month to run this rule at
|
||||
*
|
||||
* @default - Every month
|
||||
*/
|
||||
readonly month?: string;
|
||||
/**
|
||||
* The day of the week to run this rule at
|
||||
*
|
||||
* @default - Any day of the week
|
||||
*/
|
||||
readonly weekDay?: string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/schedule.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/schedule.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Schedule=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Schedule{expressionString;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_synthetics.Schedule",version:"2.252.0"};static once(){return new Schedule("rate(0 minutes)")}static expression(expression){return new Schedule(expression)}static rate(interval){try{jsiiDeprecationWarnings().aws_cdk_lib_Duration(interval)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.rate),error}const minutes=interval.toMinutes();if(minutes>60)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeScheduleDurationBetween`,"Schedule duration must be between 1 and 60 minutes");return minutes===0?Schedule.once():minutes===1?new Schedule("rate(1 minute)"):new Schedule(`rate(${minutes} minutes)`)}static cron(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_synthetics_CronOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.cron),error}if(options.weekDay!==void 0&&options.day!==void 0)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`CannotSupplyDayWeekDay`,"Cannot supply both 'day' and 'weekDay', use at most one");const minute=fallback(options.minute,"*"),hour=fallback(options.hour,"*"),month=fallback(options.month,"*"),day=fallback(options.day,options.weekDay!==void 0?"?":"*"),weekDay=fallback(options.weekDay,"?"),year="*";return new Schedule(`cron(${minute} ${hour} ${day} ${month} ${weekDay} ${year})`)}constructor(expressionString){this.expressionString=expressionString}}exports.Schedule=Schedule;function fallback(x,def){return x??def}
|
||||
43
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics-canned-metrics.generated.d.ts
generated
vendored
Normal file
43
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics-canned-metrics.generated.d.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
export interface MetricWithDims<D> {
|
||||
readonly namespace: string;
|
||||
readonly metricName: string;
|
||||
readonly statistic: string;
|
||||
readonly dimensionsMap: D;
|
||||
}
|
||||
export declare class CloudWatchSyntheticsMetrics {
|
||||
static _2XxSum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static _4XxSum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static _5XxSum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static durationMaximum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static failedSum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static failedRequestsSum(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
static successPercentAverage(this: void, dimensions: {
|
||||
CanaryName: string;
|
||||
}): MetricWithDims<{
|
||||
CanaryName: string;
|
||||
}>;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics-canned-metrics.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics-canned-metrics.generated.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CloudWatchSyntheticsMetrics=void 0;class CloudWatchSyntheticsMetrics{static _2XxSum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"2xx",dimensionsMap:dimensions,statistic:"Sum"}}static _4XxSum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"4xx",dimensionsMap:dimensions,statistic:"Sum"}}static _5XxSum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"5xx",dimensionsMap:dimensions,statistic:"Sum"}}static durationMaximum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"Duration",dimensionsMap:dimensions,statistic:"Maximum"}}static failedSum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"Failed",dimensionsMap:dimensions,statistic:"Sum"}}static failedRequestsSum(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"Failed requests",dimensionsMap:dimensions,statistic:"Sum"}}static successPercentAverage(dimensions){return{namespace:"CloudWatchSynthetics",metricName:"SuccessPercent",dimensionsMap:dimensions,statistic:"Average"}}}exports.CloudWatchSyntheticsMetrics=CloudWatchSyntheticsMetrics;
|
||||
1015
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics.generated.d.ts
generated
vendored
Normal file
1015
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics.generated.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-synthetics/lib/synthetics.generated.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user