aws.synthetics.Canary
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const some = new aws.synthetics.Canary("some", {
    name: "some-canary",
    artifactS3Location: "s3://some-bucket/",
    executionRoleArn: "some-role",
    handler: "exports.handler",
    zipFile: "test-fixtures/lambdatest.zip",
    runtimeVersion: "syn-1.0",
    schedule: {
        expression: "rate(0 minute)",
    },
});
import pulumi
import pulumi_aws as aws
some = aws.synthetics.Canary("some",
    name="some-canary",
    artifact_s3_location="s3://some-bucket/",
    execution_role_arn="some-role",
    handler="exports.handler",
    zip_file="test-fixtures/lambdatest.zip",
    runtime_version="syn-1.0",
    schedule={
        "expression": "rate(0 minute)",
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := synthetics.NewCanary(ctx, "some", &synthetics.CanaryArgs{
			Name:               pulumi.String("some-canary"),
			ArtifactS3Location: pulumi.String("s3://some-bucket/"),
			ExecutionRoleArn:   pulumi.String("some-role"),
			Handler:            pulumi.String("exports.handler"),
			ZipFile:            pulumi.String("test-fixtures/lambdatest.zip"),
			RuntimeVersion:     pulumi.String("syn-1.0"),
			Schedule: &synthetics.CanaryScheduleArgs{
				Expression: pulumi.String("rate(0 minute)"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var some = new Aws.Synthetics.Canary("some", new()
    {
        Name = "some-canary",
        ArtifactS3Location = "s3://some-bucket/",
        ExecutionRoleArn = "some-role",
        Handler = "exports.handler",
        ZipFile = "test-fixtures/lambdatest.zip",
        RuntimeVersion = "syn-1.0",
        Schedule = new Aws.Synthetics.Inputs.CanaryScheduleArgs
        {
            Expression = "rate(0 minute)",
        },
    });
});
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()
            .name("some-canary")
            .artifactS3Location("s3://some-bucket/")
            .executionRoleArn("some-role")
            .handler("exports.handler")
            .zipFile("test-fixtures/lambdatest.zip")
            .runtimeVersion("syn-1.0")
            .schedule(CanaryScheduleArgs.builder()
                .expression("rate(0 minute)")
                .build())
            .build());
    }
}
resources:
  some:
    type: aws:synthetics:Canary
    properties:
      name: some-canary
      artifactS3Location: s3://some-bucket/
      executionRoleArn: some-role
      handler: exports.handler
      zipFile: test-fixtures/lambdatest.zip
      runtimeVersion: syn-1.0
      schedule:
        expression: rate(0 minute)
Create Canary Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Canary(name: string, args: CanaryArgs, opts?: CustomResourceOptions);@overload
def Canary(resource_name: str,
           args: CanaryArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Canary(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           schedule: Optional[CanaryScheduleArgs] = None,
           handler: Optional[str] = None,
           runtime_version: Optional[str] = None,
           execution_role_arn: Optional[str] = None,
           artifact_s3_location: Optional[str] = None,
           delete_lambda: Optional[bool] = None,
           name: Optional[str] = None,
           run_config: Optional[CanaryRunConfigArgs] = None,
           zip_file: Optional[str] = None,
           failure_retention_period: Optional[int] = None,
           s3_key: Optional[str] = None,
           s3_version: Optional[str] = None,
           artifact_config: Optional[CanaryArtifactConfigArgs] = None,
           start_canary: Optional[bool] = None,
           success_retention_period: Optional[int] = None,
           tags: Optional[Mapping[str, str]] = None,
           vpc_config: Optional[CanaryVpcConfigArgs] = None,
           s3_bucket: Optional[str] = None)func NewCanary(ctx *Context, name string, args CanaryArgs, opts ...ResourceOption) (*Canary, error)public Canary(string name, CanaryArgs args, CustomResourceOptions? opts = null)
public Canary(String name, CanaryArgs args)
public Canary(String name, CanaryArgs args, CustomResourceOptions options)
type: aws:synthetics:Canary
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CanaryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CanaryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CanaryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CanaryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CanaryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var canaryResource = new Aws.Synthetics.Canary("canaryResource", new()
{
    Schedule = new Aws.Synthetics.Inputs.CanaryScheduleArgs
    {
        Expression = "string",
        DurationInSeconds = 0,
    },
    Handler = "string",
    RuntimeVersion = "string",
    ExecutionRoleArn = "string",
    ArtifactS3Location = "string",
    DeleteLambda = false,
    Name = "string",
    RunConfig = new Aws.Synthetics.Inputs.CanaryRunConfigArgs
    {
        ActiveTracing = false,
        EnvironmentVariables = 
        {
            { "string", "string" },
        },
        MemoryInMb = 0,
        TimeoutInSeconds = 0,
    },
    ZipFile = "string",
    FailureRetentionPeriod = 0,
    S3Key = "string",
    S3Version = "string",
    ArtifactConfig = new Aws.Synthetics.Inputs.CanaryArtifactConfigArgs
    {
        S3Encryption = new Aws.Synthetics.Inputs.CanaryArtifactConfigS3EncryptionArgs
        {
            EncryptionMode = "string",
            KmsKeyArn = "string",
        },
    },
    StartCanary = false,
    SuccessRetentionPeriod = 0,
    Tags = 
    {
        { "string", "string" },
    },
    VpcConfig = new Aws.Synthetics.Inputs.CanaryVpcConfigArgs
    {
        SecurityGroupIds = new[]
        {
            "string",
        },
        SubnetIds = new[]
        {
            "string",
        },
        VpcId = "string",
    },
    S3Bucket = "string",
});
example, err := synthetics.NewCanary(ctx, "canaryResource", &synthetics.CanaryArgs{
	Schedule: &synthetics.CanaryScheduleArgs{
		Expression:        pulumi.String("string"),
		DurationInSeconds: pulumi.Int(0),
	},
	Handler:            pulumi.String("string"),
	RuntimeVersion:     pulumi.String("string"),
	ExecutionRoleArn:   pulumi.String("string"),
	ArtifactS3Location: pulumi.String("string"),
	DeleteLambda:       pulumi.Bool(false),
	Name:               pulumi.String("string"),
	RunConfig: &synthetics.CanaryRunConfigArgs{
		ActiveTracing: pulumi.Bool(false),
		EnvironmentVariables: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		MemoryInMb:       pulumi.Int(0),
		TimeoutInSeconds: pulumi.Int(0),
	},
	ZipFile:                pulumi.String("string"),
	FailureRetentionPeriod: pulumi.Int(0),
	S3Key:                  pulumi.String("string"),
	S3Version:              pulumi.String("string"),
	ArtifactConfig: &synthetics.CanaryArtifactConfigArgs{
		S3Encryption: &synthetics.CanaryArtifactConfigS3EncryptionArgs{
			EncryptionMode: pulumi.String("string"),
			KmsKeyArn:      pulumi.String("string"),
		},
	},
	StartCanary:            pulumi.Bool(false),
	SuccessRetentionPeriod: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VpcConfig: &synthetics.CanaryVpcConfigArgs{
		SecurityGroupIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		SubnetIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		VpcId: pulumi.String("string"),
	},
	S3Bucket: pulumi.String("string"),
})
var canaryResource = new Canary("canaryResource", CanaryArgs.builder()
    .schedule(CanaryScheduleArgs.builder()
        .expression("string")
        .durationInSeconds(0)
        .build())
    .handler("string")
    .runtimeVersion("string")
    .executionRoleArn("string")
    .artifactS3Location("string")
    .deleteLambda(false)
    .name("string")
    .runConfig(CanaryRunConfigArgs.builder()
        .activeTracing(false)
        .environmentVariables(Map.of("string", "string"))
        .memoryInMb(0)
        .timeoutInSeconds(0)
        .build())
    .zipFile("string")
    .failureRetentionPeriod(0)
    .s3Key("string")
    .s3Version("string")
    .artifactConfig(CanaryArtifactConfigArgs.builder()
        .s3Encryption(CanaryArtifactConfigS3EncryptionArgs.builder()
            .encryptionMode("string")
            .kmsKeyArn("string")
            .build())
        .build())
    .startCanary(false)
    .successRetentionPeriod(0)
    .tags(Map.of("string", "string"))
    .vpcConfig(CanaryVpcConfigArgs.builder()
        .securityGroupIds("string")
        .subnetIds("string")
        .vpcId("string")
        .build())
    .s3Bucket("string")
    .build());
canary_resource = aws.synthetics.Canary("canaryResource",
    schedule={
        "expression": "string",
        "duration_in_seconds": 0,
    },
    handler="string",
    runtime_version="string",
    execution_role_arn="string",
    artifact_s3_location="string",
    delete_lambda=False,
    name="string",
    run_config={
        "active_tracing": False,
        "environment_variables": {
            "string": "string",
        },
        "memory_in_mb": 0,
        "timeout_in_seconds": 0,
    },
    zip_file="string",
    failure_retention_period=0,
    s3_key="string",
    s3_version="string",
    artifact_config={
        "s3_encryption": {
            "encryption_mode": "string",
            "kms_key_arn": "string",
        },
    },
    start_canary=False,
    success_retention_period=0,
    tags={
        "string": "string",
    },
    vpc_config={
        "security_group_ids": ["string"],
        "subnet_ids": ["string"],
        "vpc_id": "string",
    },
    s3_bucket="string")
const canaryResource = new aws.synthetics.Canary("canaryResource", {
    schedule: {
        expression: "string",
        durationInSeconds: 0,
    },
    handler: "string",
    runtimeVersion: "string",
    executionRoleArn: "string",
    artifactS3Location: "string",
    deleteLambda: false,
    name: "string",
    runConfig: {
        activeTracing: false,
        environmentVariables: {
            string: "string",
        },
        memoryInMb: 0,
        timeoutInSeconds: 0,
    },
    zipFile: "string",
    failureRetentionPeriod: 0,
    s3Key: "string",
    s3Version: "string",
    artifactConfig: {
        s3Encryption: {
            encryptionMode: "string",
            kmsKeyArn: "string",
        },
    },
    startCanary: false,
    successRetentionPeriod: 0,
    tags: {
        string: "string",
    },
    vpcConfig: {
        securityGroupIds: ["string"],
        subnetIds: ["string"],
        vpcId: "string",
    },
    s3Bucket: "string",
});
type: aws:synthetics:Canary
properties:
    artifactConfig:
        s3Encryption:
            encryptionMode: string
            kmsKeyArn: string
    artifactS3Location: string
    deleteLambda: false
    executionRoleArn: string
    failureRetentionPeriod: 0
    handler: string
    name: string
    runConfig:
        activeTracing: false
        environmentVariables:
            string: string
        memoryInMb: 0
        timeoutInSeconds: 0
    runtimeVersion: string
    s3Bucket: string
    s3Key: string
    s3Version: string
    schedule:
        durationInSeconds: 0
        expression: string
    startCanary: false
    successRetentionPeriod: 0
    tags:
        string: string
    vpcConfig:
        securityGroupIds:
            - string
        subnetIds:
            - string
        vpcId: string
    zipFile: string
Canary Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Canary resource accepts the following input properties:
- ArtifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- ExecutionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- Handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- RuntimeVersion string
- 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, andsyn-1.0.
- Schedule
CanarySchedule 
- 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: 
- ArtifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- DeleteLambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- FailureRetention intPeriod 
- 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.
- Name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- RunConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- S3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- S3Key string
- S3 key of your script. Conflicts with zip_file.
- S3Version string
- S3 version ID of your script. Conflicts with zip_file.
- StartCanary bool
- Whether to run or stop the canary.
- SuccessRetention intPeriod 
- 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.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- VpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- ZipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- ArtifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- ExecutionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- Handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- RuntimeVersion string
- 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, andsyn-1.0.
- Schedule
CanarySchedule Args 
- 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: 
- ArtifactConfig CanaryArtifact Config Args 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- DeleteLambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- FailureRetention intPeriod 
- 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.
- Name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- RunConfig CanaryRun Config Args 
- Configuration block for individual canary runs. Detailed below.
- S3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- S3Key string
- S3 key of your script. Conflicts with zip_file.
- S3Version string
- S3 version ID of your script. Conflicts with zip_file.
- StartCanary bool
- Whether to run or stop the canary.
- SuccessRetention intPeriod 
- 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.
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- VpcConfig CanaryVpc Config Args 
- Configuration block. Detailed below.
- ZipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- artifactS3Location String
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- executionRole StringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- handler String
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- runtimeVersion String
- 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, andsyn-1.0.
- schedule
CanarySchedule 
- 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: 
- artifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- deleteLambda Boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- failureRetention IntegerPeriod 
- 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.
- name String
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- s3Bucket String
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key String
- S3 key of your script. Conflicts with zip_file.
- s3Version String
- S3 version ID of your script. Conflicts with zip_file.
- startCanary Boolean
- Whether to run or stop the canary.
- successRetention IntegerPeriod 
- 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.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- vpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- zipFile String
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- artifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- executionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- runtimeVersion string
- 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, andsyn-1.0.
- schedule
CanarySchedule 
- 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: 
- artifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- deleteLambda boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- failureRetention numberPeriod 
- 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.
- name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- s3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key string
- S3 key of your script. Conflicts with zip_file.
- s3Version string
- S3 version ID of your script. Conflicts with zip_file.
- startCanary boolean
- Whether to run or stop the canary.
- successRetention numberPeriod 
- 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.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- vpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- zipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- artifact_s3_ strlocation 
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- execution_role_ strarn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- handler str
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- runtime_version str
- 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, andsyn-1.0.
- schedule
CanarySchedule Args 
- 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: 
- artifact_config CanaryArtifact Config Args 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- delete_lambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- failure_retention_ intperiod 
- 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.
- name str
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- run_config CanaryRun Config Args 
- Configuration block for individual canary runs. Detailed below.
- s3_bucket str
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3_key str
- S3 key of your script. Conflicts with zip_file.
- s3_version str
- S3 version ID of your script. Conflicts with zip_file.
- start_canary bool
- Whether to run or stop the canary.
- success_retention_ intperiod 
- 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.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- vpc_config CanaryVpc Config Args 
- Configuration block. Detailed below.
- zip_file str
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- artifactS3Location String
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- executionRole StringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- handler String
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- runtimeVersion String
- 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, andsyn-1.0.
- schedule Property Map
- 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: 
- artifactConfig Property Map
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- deleteLambda Boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- failureRetention NumberPeriod 
- 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.
- name String
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig Property Map
- Configuration block for individual canary runs. Detailed below.
- s3Bucket String
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key String
- S3 key of your script. Conflicts with zip_file.
- s3Version String
- S3 version ID of your script. Conflicts with zip_file.
- startCanary Boolean
- Whether to run or stop the canary.
- successRetention NumberPeriod 
- 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.
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- vpcConfig Property Map
- Configuration block. Detailed below.
- zipFile String
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
Outputs
All input properties are implicitly available as output properties. Additionally, the Canary resource produces the following output properties:
- Arn string
- Amazon Resource Name (ARN) of the Canary.
- EngineArn string
- ARN of the Lambda function that is used as your canary's engine.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- Status string
- Canary status.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Timelines
List<CanaryTimeline> 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- Arn string
- Amazon Resource Name (ARN) of the Canary.
- EngineArn string
- ARN of the Lambda function that is used as your canary's engine.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- Status string
- Canary status.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Timelines
[]CanaryTimeline 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- arn String
- Amazon Resource Name (ARN) of the Canary.
- engineArn String
- ARN of the Lambda function that is used as your canary's engine.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceLocation StringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- status String
- Canary status.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
List<CanaryTimeline> 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- arn string
- Amazon Resource Name (ARN) of the Canary.
- engineArn string
- ARN of the Lambda function that is used as your canary's engine.
- id string
- The provider-assigned unique ID for this managed resource.
- sourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- status string
- Canary status.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
CanaryTimeline[] 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- arn str
- Amazon Resource Name (ARN) of the Canary.
- engine_arn str
- ARN of the Lambda function that is used as your canary's engine.
- id str
- The provider-assigned unique ID for this managed resource.
- source_location_ strarn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- status str
- Canary status.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
Sequence[CanaryTimeline] 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- arn String
- Amazon Resource Name (ARN) of the Canary.
- engineArn String
- ARN of the Lambda function that is used as your canary's engine.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceLocation StringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- status String
- Canary status.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines List<Property Map>
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
Look up Existing Canary Resource
Get an existing Canary resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CanaryState, opts?: CustomResourceOptions): Canary@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        artifact_config: Optional[CanaryArtifactConfigArgs] = None,
        artifact_s3_location: Optional[str] = None,
        delete_lambda: Optional[bool] = None,
        engine_arn: Optional[str] = None,
        execution_role_arn: Optional[str] = None,
        failure_retention_period: Optional[int] = None,
        handler: Optional[str] = None,
        name: Optional[str] = None,
        run_config: Optional[CanaryRunConfigArgs] = None,
        runtime_version: Optional[str] = None,
        s3_bucket: Optional[str] = None,
        s3_key: Optional[str] = None,
        s3_version: Optional[str] = None,
        schedule: Optional[CanaryScheduleArgs] = None,
        source_location_arn: Optional[str] = None,
        start_canary: Optional[bool] = None,
        status: Optional[str] = None,
        success_retention_period: Optional[int] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        timelines: Optional[Sequence[CanaryTimelineArgs]] = None,
        vpc_config: Optional[CanaryVpcConfigArgs] = None,
        zip_file: Optional[str] = None) -> Canaryfunc GetCanary(ctx *Context, name string, id IDInput, state *CanaryState, opts ...ResourceOption) (*Canary, error)public static Canary Get(string name, Input<string> id, CanaryState? state, CustomResourceOptions? opts = null)public static Canary get(String name, Output<String> id, CanaryState state, CustomResourceOptions options)resources:  _:    type: aws:synthetics:Canary    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- Amazon Resource Name (ARN) of the Canary.
- ArtifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- ArtifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- DeleteLambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- EngineArn string
- ARN of the Lambda function that is used as your canary's engine.
- ExecutionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- FailureRetention intPeriod 
- 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.
- Handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- Name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- RunConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- RuntimeVersion string
- 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, andsyn-1.0.
- S3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- S3Key string
- S3 key of your script. Conflicts with zip_file.
- S3Version string
- S3 version ID of your script. Conflicts with zip_file.
- Schedule
CanarySchedule 
- 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: 
- SourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- StartCanary bool
- Whether to run or stop the canary.
- Status string
- Canary status.
- SuccessRetention intPeriod 
- 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.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Timelines
List<CanaryTimeline> 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- VpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- ZipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- Arn string
- Amazon Resource Name (ARN) of the Canary.
- ArtifactConfig CanaryArtifact Config Args 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- ArtifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- DeleteLambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- EngineArn string
- ARN of the Lambda function that is used as your canary's engine.
- ExecutionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- FailureRetention intPeriod 
- 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.
- Handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- Name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- RunConfig CanaryRun Config Args 
- Configuration block for individual canary runs. Detailed below.
- RuntimeVersion string
- 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, andsyn-1.0.
- S3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- S3Key string
- S3 key of your script. Conflicts with zip_file.
- S3Version string
- S3 version ID of your script. Conflicts with zip_file.
- Schedule
CanarySchedule Args 
- 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: 
- SourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- StartCanary bool
- Whether to run or stop the canary.
- Status string
- Canary status.
- SuccessRetention intPeriod 
- 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.
- map[string]string
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Timelines
[]CanaryTimeline Args 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- VpcConfig CanaryVpc Config Args 
- Configuration block. Detailed below.
- ZipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- arn String
- Amazon Resource Name (ARN) of the Canary.
- artifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifactS3Location String
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- deleteLambda Boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- engineArn String
- ARN of the Lambda function that is used as your canary's engine.
- executionRole StringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failureRetention IntegerPeriod 
- 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.
- handler String
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- name String
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- runtimeVersion String
- 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, andsyn-1.0.
- s3Bucket String
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key String
- S3 key of your script. Conflicts with zip_file.
- s3Version String
- S3 version ID of your script. Conflicts with zip_file.
- schedule
CanarySchedule 
- 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: 
- sourceLocation StringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- startCanary Boolean
- Whether to run or stop the canary.
- status String
- Canary status.
- successRetention IntegerPeriod 
- 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.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
List<CanaryTimeline> 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- zipFile String
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- arn string
- Amazon Resource Name (ARN) of the Canary.
- artifactConfig CanaryArtifact Config 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifactS3Location string
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- deleteLambda boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- engineArn string
- ARN of the Lambda function that is used as your canary's engine.
- executionRole stringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failureRetention numberPeriod 
- 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.
- handler string
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- name string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig CanaryRun Config 
- Configuration block for individual canary runs. Detailed below.
- runtimeVersion string
- 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, andsyn-1.0.
- s3Bucket string
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key string
- S3 key of your script. Conflicts with zip_file.
- s3Version string
- S3 version ID of your script. Conflicts with zip_file.
- schedule
CanarySchedule 
- 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: 
- sourceLocation stringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- startCanary boolean
- Whether to run or stop the canary.
- status string
- Canary status.
- successRetention numberPeriod 
- 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.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
CanaryTimeline[] 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpcConfig CanaryVpc Config 
- Configuration block. Detailed below.
- zipFile string
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- arn str
- Amazon Resource Name (ARN) of the Canary.
- artifact_config CanaryArtifact Config Args 
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifact_s3_ strlocation 
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- delete_lambda bool
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- engine_arn str
- ARN of the Lambda function that is used as your canary's engine.
- execution_role_ strarn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failure_retention_ intperiod 
- 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.
- handler str
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- name str
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- run_config CanaryRun Config Args 
- Configuration block for individual canary runs. Detailed below.
- runtime_version str
- 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, andsyn-1.0.
- s3_bucket str
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3_key str
- S3 key of your script. Conflicts with zip_file.
- s3_version str
- S3 version ID of your script. Conflicts with zip_file.
- schedule
CanarySchedule Args 
- 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: 
- source_location_ strarn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- start_canary bool
- Whether to run or stop the canary.
- status str
- Canary status.
- success_retention_ intperiod 
- 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.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines
Sequence[CanaryTimeline Args] 
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpc_config CanaryVpc Config Args 
- Configuration block. Detailed below.
- zip_file str
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
- arn String
- Amazon Resource Name (ARN) of the Canary.
- artifactConfig Property Map
- configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifactS3Location String
- Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- deleteLambda Boolean
- Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
- engineArn String
- ARN of the Lambda function that is used as your canary's engine.
- executionRole StringArn 
- ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failureRetention NumberPeriod 
- 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.
- handler String
- Entry point to use for the source code when running the canary. This value must end with the string .handler.
- name String
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- runConfig Property Map
- Configuration block for individual canary runs. Detailed below.
- runtimeVersion String
- 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, andsyn-1.0.
- s3Bucket String
- Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
- s3Key String
- S3 key of your script. Conflicts with zip_file.
- s3Version String
- S3 version ID of your script. Conflicts with zip_file.
- schedule Property Map
- 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: 
- sourceLocation StringArn 
- ARN of the Lambda layer where Synthetics stores the canary script code.
- startCanary Boolean
- Whether to run or stop the canary.
- status String
- Canary status.
- successRetention NumberPeriod 
- 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.
- Map<String>
- Key-value map of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- timelines List<Property Map>
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpcConfig Property Map
- Configuration block. Detailed below.
- zipFile String
- ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket,s3_key, ands3_version.
Supporting Types
CanaryArtifactConfig, CanaryArtifactConfigArgs      
- S3Encryption
CanaryArtifact Config S3Encryption 
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- S3Encryption
CanaryArtifact Config S3Encryption 
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3Encryption
CanaryArtifact Config S3Encryption 
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3Encryption
CanaryArtifact Config S3Encryption 
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3_encryption CanaryArtifact Config S3Encryption 
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3Encryption Property Map
- Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
CanaryArtifactConfigS3Encryption, CanaryArtifactConfigS3EncryptionArgs        
- EncryptionMode string
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- KmsKey stringArn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
- EncryptionMode string
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- KmsKey stringArn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
- encryptionMode String
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- kmsKey StringArn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
- encryptionMode string
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- kmsKey stringArn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
- encryption_mode str
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- kms_key_ strarn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
- encryptionMode String
- The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3andSSE_KMS.
- kmsKey StringArn 
- The ARN of the customer-managed KMS key to use, if you specify SSE_KMSforencryption_mode.
CanaryRunConfig, CanaryRunConfigArgs      
- ActiveTracing bool
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- EnvironmentVariables Dictionary<string, string>
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- MemoryIn intMb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- TimeoutIn intSeconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
- ActiveTracing bool
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- EnvironmentVariables map[string]string
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- MemoryIn intMb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- TimeoutIn intSeconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
- activeTracing Boolean
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- environmentVariables Map<String,String>
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memoryIn IntegerMb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- timeoutIn IntegerSeconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
- activeTracing boolean
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- environmentVariables {[key: string]: string}
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memoryIn numberMb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- timeoutIn numberSeconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
- active_tracing bool
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- environment_variables Mapping[str, str]
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memory_in_ intmb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- timeout_in_ intseconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
- activeTracing Boolean
- Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
- environmentVariables Map<String>
- Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memoryIn NumberMb 
- Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
- timeoutIn NumberSeconds 
- Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
CanarySchedule, CanaryScheduleArgs    
- Expression string
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- DurationIn intSeconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
- Expression string
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- DurationIn intSeconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
- expression String
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- durationIn IntegerSeconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
- expression string
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- durationIn numberSeconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
- expression str
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- duration_in_ intseconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
- expression String
- Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can beminute,minutes, orhour. For cron expression, the syntax iscron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
- durationIn NumberSeconds 
- Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
CanaryTimeline, CanaryTimelineArgs    
- Created string
- Date and time the canary was created.
- LastModified string
- Date and time the canary was most recently modified.
- LastStarted string
- Date and time that the canary's most recent run started.
- LastStopped string
- Date and time that the canary's most recent run ended.
- Created string
- Date and time the canary was created.
- LastModified string
- Date and time the canary was most recently modified.
- LastStarted string
- Date and time that the canary's most recent run started.
- LastStopped string
- Date and time that the canary's most recent run ended.
- created String
- Date and time the canary was created.
- lastModified String
- Date and time the canary was most recently modified.
- lastStarted String
- Date and time that the canary's most recent run started.
- lastStopped String
- Date and time that the canary's most recent run ended.
- created string
- Date and time the canary was created.
- lastModified string
- Date and time the canary was most recently modified.
- lastStarted string
- Date and time that the canary's most recent run started.
- lastStopped string
- Date and time that the canary's most recent run ended.
- created str
- Date and time the canary was created.
- last_modified str
- Date and time the canary was most recently modified.
- last_started str
- Date and time that the canary's most recent run started.
- last_stopped str
- Date and time that the canary's most recent run ended.
- created String
- Date and time the canary was created.
- lastModified String
- Date and time the canary was most recently modified.
- lastStarted String
- Date and time that the canary's most recent run started.
- lastStopped String
- Date and time that the canary's most recent run ended.
CanaryVpcConfig, CanaryVpcConfigArgs      
- SecurityGroup List<string>Ids 
- IDs of the security groups for this canary.
- SubnetIds List<string>
- IDs of the subnets where this canary is to run.
- VpcId string
- ID of the VPC where this canary is to run.
- SecurityGroup []stringIds 
- IDs of the security groups for this canary.
- SubnetIds []string
- IDs of the subnets where this canary is to run.
- VpcId string
- ID of the VPC where this canary is to run.
- securityGroup List<String>Ids 
- IDs of the security groups for this canary.
- subnetIds List<String>
- IDs of the subnets where this canary is to run.
- vpcId String
- ID of the VPC where this canary is to run.
- securityGroup string[]Ids 
- IDs of the security groups for this canary.
- subnetIds string[]
- IDs of the subnets where this canary is to run.
- vpcId string
- ID of the VPC where this canary is to run.
- security_group_ Sequence[str]ids 
- IDs of the security groups for this canary.
- subnet_ids Sequence[str]
- IDs of the subnets where this canary is to run.
- vpc_id str
- ID of the VPC where this canary is to run.
- securityGroup List<String>Ids 
- IDs of the security groups for this canary.
- subnetIds List<String>
- IDs of the subnets where this canary is to run.
- vpcId String
- ID of the VPC where this canary is to run.
Import
Using pulumi import, import Synthetics Canaries using the name. For example:
$ pulumi import aws:synthetics/canary:Canary some some-canary
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.