Canary Args
Provides a Synthetics Canary resource.
NOTE: When you create a canary, AWS creates supporting implicit resources. See the Amazon CloudWatch Synthetics documentation on DeleteCanary for a full list. Neither AWS nor this provider deletes these implicit resources automatically when the canary is deleted. Before deleting a canary, ensure you have all the information about the canary that you need to delete the implicit resources using the AWS Console, or AWS CLI.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.synthetics.Canary;
import com.pulumi.aws.synthetics.CanaryArgs;
import com.pulumi.aws.synthetics.inputs.CanaryScheduleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var some = new Canary("some", CanaryArgs.builder()
.artifactS3Location("s3://some-bucket/")
.executionRoleArn("some-role")
.handler("exports.handler")
.runtimeVersion("syn-1.0")
.schedule(CanaryScheduleArgs.builder()
.expression("rate(0 minute)")
.build())
.zipFile("test-fixtures/lambdatest.zip")
.build());
}
}
Import
Synthetics Canaries can be imported using the name
, e.g.,
$ pulumi import aws:synthetics/canary:Canary some some-canary
Constructors
Properties
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false
.
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Configuration block for individual canary runs. Detailed below.
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0
, syn-nodejs-puppeteer-3.0
, syn-nodejs-2.2
, syn-nodejs-2.1
, syn-nodejs-2.0
, and syn-1.0
.
Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below. The following arguments are optional:
Whether to run or stop the canary.
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Configuration block. Detailed below.