Try AWS Native preview for resources not in the classic version.
aws.synthetics.Canary
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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",
"durationInSeconds": 0,
},
handler="string",
runtime_version="string",
execution_role_arn="string",
artifact_s3_location="string",
delete_lambda=False,
name="string",
run_config={
"activeTracing": False,
"environmentVariables": {
"string": "string",
},
"memoryInMb": 0,
"timeoutInSeconds": 0,
},
zip_file="string",
failure_retention_period=0,
s3_key="string",
s3_version="string",
artifact_config={
"s3Encryption": {
"encryptionMode": "string",
"kmsKeyArn": "string",
},
},
start_canary=False,
success_retention_period=0,
tags={
"string": "string",
},
vpc_config={
"securityGroupIds": ["string"],
"subnetIds": ["string"],
"vpcId": "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
The Canary resource accepts the following input properties:
- Artifact
S3Location string - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- Execution
Role 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
. - Runtime
Version 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
Canary
Schedule 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 - 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 string
- Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
- Run
Config 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
. - 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.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- Zip
File 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
S3Location string - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- Execution
Role 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
. - Runtime
Version 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
Canary
Schedule 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 string
- 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.
- 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
. - 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.
- map[string]string
- Key-value map of resource tags. If configured with a provider
default_tags
configuration 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 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
S3Location String - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- execution
Role 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
. - runtime
Version 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
Canary
Schedule 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 - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- delete
Lambda Boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - failure
Retention 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.
- run
Config 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
. - start
Canary Boolean - Whether to run or stop the canary.
- success
Retention 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- zip
File 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
S3Location string - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- execution
Role 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
. - runtime
Version 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
Canary
Schedule 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 - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- delete
Lambda boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - failure
Retention 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.
- run
Config 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
. - start
Canary boolean - Whether to run or stop the canary.
- success
Retention 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- zip
File 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
Canary
Schedule 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_tags
configuration 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
.
- artifact
S3Location String - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- execution
Role 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
. - runtime
Version 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:
- artifact
Config Property Map - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- delete
Lambda Boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - failure
Retention 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.
- run
Config 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
. - start
Canary Boolean - Whether to run or stop the canary.
- success
Retention 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - vpc
Config Property Map - Configuration block. Detailed below.
- zip
File 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.
- Engine
Arn 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.
- Source
Location 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_tags
configuration block. - Timelines
List<Canary
Timeline> - 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.
- Engine
Arn 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.
- Source
Location 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_tags
configuration block. - Timelines
[]Canary
Timeline - 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.
- engine
Arn 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.
- source
Location 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_tags
configuration block. - timelines
List<Canary
Timeline> - 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.
- engine
Arn 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.
- source
Location 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_tags
configuration block. - timelines
Canary
Timeline[] - 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_tags
configuration block. - timelines
Sequence[Canary
Timeline] - 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.
- engine
Arn 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.
- source
Location 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_tags
configuration 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) -> Canary
func 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)
Resource lookup is not supported in YAML
- 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.
- Artifact
Config CanaryArtifact Config - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- Artifact
S3Location string - 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 string - ARN of the Lambda function that is used as your canary's engine.
- Execution
Role stringArn - 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 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.
- Run
Config CanaryRun Config - Configuration block for individual canary runs. Detailed below.
- Runtime
Version 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
Canary
Schedule 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 stringArn - ARN of the Lambda layer where Synthetics stores the canary script code.
- Start
Canary bool - Whether to run or stop the canary.
- Status string
- 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.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration 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_tags
configuration block. - Timelines
List<Canary
Timeline> - Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- Vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- Zip
File 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.
- 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
S3Location string - 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 string - ARN of the Lambda function that is used as your canary's engine.
- Execution
Role stringArn - 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 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.
- Run
Config CanaryRun Config Args - Configuration block for individual canary runs. Detailed below.
- Runtime
Version 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
Canary
Schedule 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 stringArn - ARN of the Lambda layer where Synthetics stores the canary script code.
- Start
Canary bool - Whether to run or stop the canary.
- Status string
- 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.
- map[string]string
- Key-value map of resource tags. If configured with a provider
default_tags
configuration 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_tags
configuration block. - Timelines
[]Canary
Timeline 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 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.
- artifact
Config CanaryArtifact Config - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifact
S3Location String - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- delete
Lambda Boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - engine
Arn String - ARN of the Lambda function that is used as your canary's engine.
- execution
Role StringArn - ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failure
Retention 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.
- run
Config CanaryRun Config - Configuration block for individual canary runs. Detailed below.
- runtime
Version 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
Canary
Schedule 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 StringArn - ARN of the Lambda layer where Synthetics stores the canary script code.
- start
Canary Boolean - Whether to run or stop the canary.
- status String
- Canary status.
- success
Retention 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_tags
configuration 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_tags
configuration block. - timelines
List<Canary
Timeline> - Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- zip
File 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.
- artifact
Config CanaryArtifact Config - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifact
S3Location string - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- delete
Lambda boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - engine
Arn string - ARN of the Lambda function that is used as your canary's engine.
- execution
Role stringArn - ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failure
Retention 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.
- run
Config CanaryRun Config - Configuration block for individual canary runs. Detailed below.
- runtime
Version 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
Canary
Schedule 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 stringArn - ARN of the Lambda layer where Synthetics stores the canary script code.
- start
Canary boolean - Whether to run or stop the canary.
- status string
- Canary status.
- success
Retention 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_tags
configuration 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_tags
configuration block. - timelines
Canary
Timeline[] - Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpc
Config CanaryVpc Config - Configuration block. Detailed below.
- zip
File 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
Canary
Schedule 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_tags
configuration 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_tags
configuration block. - timelines
Sequence[Canary
Timeline 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.
- artifact
Config Property Map - configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
- artifact
S3Location String - Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
- delete
Lambda Boolean - Specifies whether to also delete the Lambda functions and layers used by this canary. The default is
false
. - engine
Arn String - ARN of the Lambda function that is used as your canary's engine.
- execution
Role StringArn - ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
- failure
Retention 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.
- run
Config Property Map - Configuration block for individual canary runs. Detailed below.
- runtime
Version 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:
- source
Location StringArn - ARN of the Lambda layer where Synthetics stores the canary script code.
- start
Canary Boolean - Whether to run or stop the canary.
- status String
- Canary status.
- success
Retention 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_tags
configuration 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_tags
configuration block. - timelines List<Property Map>
- Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
- vpc
Config Property Map - Configuration block. Detailed below.
- zip
File 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
Canary
Artifact Config S3Encryption - Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- S3Encryption
Canary
Artifact Config S3Encryption - Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3Encryption
Canary
Artifact Config S3Encryption - Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
- s3Encryption
Canary
Artifact 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
- Encryption
Mode string - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - Kms
Key stringArn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
- Encryption
Mode string - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - Kms
Key stringArn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
- encryption
Mode String - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - kms
Key StringArn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
- encryption
Mode string - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - kms
Key stringArn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
- encryption_
mode str - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - kms_
key_ strarn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
- encryption
Mode String - The encryption method to use for artifacts created by this canary. Valid values are:
SSE_S3
andSSE_KMS
. - kms
Key StringArn - The ARN of the customer-managed KMS key to use, if you specify
SSE_KMS
forencryption_mode
.
CanaryRunConfig, CanaryRunConfigArgs
- 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 Dictionary<string, string> - 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).
- 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 map[string]string - 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).
- active
Tracing 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.
- environment
Variables Map<String,String> - Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memory
In 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.
- timeout
In 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).
- active
Tracing 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.
- environment
Variables {[key: string]: string} - Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memory
In 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.
- timeout
In 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).
- active
Tracing 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.
- environment
Variables Map<String> - Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
- memory
In 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.
- timeout
In 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. - 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. - 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. - duration
In 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. - duration
In 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. - duration
In 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.
- Last
Modified string - Date and time the canary was most recently modified.
- Last
Started string - Date and time that the canary's most recent run started.
- Last
Stopped string - Date and time that the canary's most recent run ended.
- Created string
- Date and time the canary was created.
- Last
Modified string - Date and time the canary was most recently modified.
- Last
Started string - Date and time that the canary's most recent run started.
- Last
Stopped string - Date and time that the canary's most recent run ended.
- created String
- Date and time the canary was created.
- last
Modified String - Date and time the canary was most recently modified.
- last
Started String - Date and time that the canary's most recent run started.
- last
Stopped String - Date and time that the canary's most recent run ended.
- created string
- Date and time the canary was created.
- last
Modified string - Date and time the canary was most recently modified.
- last
Started string - Date and time that the canary's most recent run started.
- last
Stopped 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.
- last
Modified String - Date and time the canary was most recently modified.
- last
Started String - Date and time that the canary's most recent run started.
- last
Stopped String - Date and time that the canary's most recent run ended.
CanaryVpcConfig, CanaryVpcConfigArgs
- Security
Group List<string>Ids - IDs of the security groups for this canary.
- Subnet
Ids List<string> - IDs of the subnets where this canary is to run.
- Vpc
Id string - ID of the VPC where this canary is to run.
- Security
Group []stringIds - IDs of the security groups for this canary.
- Subnet
Ids []string - IDs of the subnets where this canary is to run.
- Vpc
Id string - ID of the VPC where this canary is to run.
- security
Group List<String>Ids - IDs of the security groups for this canary.
- subnet
Ids List<String> - IDs of the subnets where this canary is to run.
- vpc
Id String - ID of the VPC where this canary is to run.
- security
Group string[]Ids - IDs of the security groups for this canary.
- subnet
Ids string[] - IDs of the subnets where this canary is to run.
- vpc
Id 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.
- security
Group List<String>Ids - IDs of the security groups for this canary.
- subnet
Ids List<String> - IDs of the subnets where this canary is to run.
- vpc
Id 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
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.