awssynthetics

package
v1.139.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canary_IsConstruct

func Canary_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Canary_IsResource

func Canary_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func CfnCanary_CFN_RESOURCE_TYPE_NAME

func CfnCanary_CFN_RESOURCE_TYPE_NAME() *string

func CfnCanary_IsCfnElement

func CfnCanary_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnCanary_IsCfnResource

func CfnCanary_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnCanary_IsConstruct

func CfnCanary_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func NewAssetCode_Override

func NewAssetCode_Override(a AssetCode, assetPath *string, options *awss3assets.AssetOptions)

Experimental.

func NewCanary_Override

func NewCanary_Override(c Canary, scope constructs.Construct, id *string, props *CanaryProps)

Experimental.

func NewCfnCanary_Override

func NewCfnCanary_Override(c CfnCanary, scope awscdk.Construct, id *string, props *CfnCanaryProps)

Create a new `AWS::Synthetics::Canary`.

func NewCode_Override

func NewCode_Override(c Code)

Experimental.

func NewInlineCode_Override

func NewInlineCode_Override(i InlineCode, code *string)

Experimental.

func NewRuntime_Override

func NewRuntime_Override(r Runtime, name *string, family RuntimeFamily)

Experimental.

func NewS3Code_Override

func NewS3Code_Override(s S3Code, bucket awss3.IBucket, key *string, objectVersion *string)

Experimental.

Types

type ArtifactsBucketLocation

type ArtifactsBucketLocation struct {
	// The s3 location that stores the data of each run.
	// Experimental.
	Bucket awss3.IBucket `json:"bucket"`
	// The S3 bucket prefix.
	//
	// Specify this if you want a more specific path within the artifacts bucket.
	// Experimental.
	Prefix *string `json:"prefix"`
}

Options for specifying the s3 location that stores the data of each canary run.

The artifacts bucket location **cannot** be updated once the canary is created.

TODO: EXAMPLE

Experimental.

type AssetCode

type AssetCode interface {
	Code
	Bind(scope constructs.Construct, handler *string, family RuntimeFamily) *CodeConfig
}

Canary code from an Asset.

TODO: EXAMPLE

Experimental.

func AssetCode_FromAsset

func AssetCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode

Specify code from a local path.

Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func Code_FromAsset

func Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode

Specify code from a local path.

Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func InlineCode_FromAsset

func InlineCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode

Specify code from a local path.

Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func NewAssetCode

func NewAssetCode(assetPath *string, options *awss3assets.AssetOptions) AssetCode

Experimental.

func S3Code_FromAsset

func S3Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode

Specify code from a local path.

Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

type Canary

type Canary interface {
	awscdk.Resource
	ArtifactsBucket() awss3.IBucket
	CanaryId() *string
	CanaryName() *string
	CanaryState() *string
	Env() *awscdk.ResourceEnvironment
	Node() awscdk.ConstructNode
	PhysicalName() *string
	Role() awsiam.IRole
	Stack() awscdk.Stack
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	MetricDuration(options *awscloudwatch.MetricOptions) awscloudwatch.Metric
	MetricFailed(options *awscloudwatch.MetricOptions) awscloudwatch.Metric
	MetricSuccessPercent(options *awscloudwatch.MetricOptions) awscloudwatch.Metric
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Define a new Canary.

TODO: EXAMPLE

Experimental.

func NewCanary

func NewCanary(scope constructs.Construct, id *string, props *CanaryProps) Canary

Experimental.

type CanaryProps

type CanaryProps struct {
	// Specify the runtime version to use for the canary.
	// See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html
	//
	// Experimental.
	Runtime Runtime `json:"runtime"`
	// The type of test that you want your canary to run.
	//
	// Use `Test.custom()` to specify the test to run.
	// Experimental.
	Test Test `json:"test"`
	// The s3 location that stores the data of the canary runs.
	// Experimental.
	ArtifactsBucketLocation *ArtifactsBucketLocation `json:"artifactsBucketLocation"`
	// The name of the canary.
	//
	// Be sure to give it a descriptive name that distinguishes it from
	// other canaries in your account.
	//
	// Do not include secrets or proprietary information in your canary name. The canary name
	// makes up part of the canary ARN, which is included in outbound calls over the internet.
	// See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html
	//
	// Experimental.
	CanaryName *string `json:"canaryName"`
	// Key-value pairs that the Synthetics caches and makes available for your canary scripts.
	//
	// Use environment variables
	// to apply configuration changes, such as test and production environment configurations, without changing your
	// Canary script source code.
	// Experimental.
	EnvironmentVariables *map[string]*string `json:"environmentVariables"`
	// How many days should failed runs be retained.
	// Experimental.
	FailureRetentionPeriod awscdk.Duration `json:"failureRetentionPeriod"`
	// Canary execution role.
	//
	// This is the role that will be assumed by the canary upon execution.
	// It controls the permissions that the canary will have. The role must
	// be assumable by the AWS Lambda service principal.
	//
	// If not supplied, a role will be created with all the required permissions.
	// If you provide a Role, you must add the required permissions.
	// See: required permissions: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-executionrolearn
	//
	// Experimental.
	Role awsiam.IRole `json:"role"`
	// Specify the schedule for how often the canary runs.
	//
	// For example, if you set `schedule` to `rate(10 minutes)`, then the canary will run every 10 minutes.
	// You can set the schedule with `Schedule.rate(Duration)` (recommended) or you can specify an expression using `Schedule.expression()`.
	// Experimental.
	Schedule Schedule `json:"schedule"`
	// Whether or not the canary should start after creation.
	// Experimental.
	StartAfterCreation *bool `json:"startAfterCreation"`
	// How many days should successful runs be retained.
	// Experimental.
	SuccessRetentionPeriod awscdk.Duration `json:"successRetentionPeriod"`
	// How long the canary will be in a 'RUNNING' state.
	//
	// For example, if you set `timeToLive` to be 1 hour and `schedule` to be `rate(10 minutes)`,
	// your canary will run at 10 minute intervals for an hour, for a total of 6 times.
	// Experimental.
	TimeToLive awscdk.Duration `json:"timeToLive"`
}

Properties for a canary.

TODO: EXAMPLE

Experimental.

type CfnCanary

type CfnCanary interface {
	awscdk.CfnResource
	awscdk.IInspectable
	ArtifactConfig() interface{}
	SetArtifactConfig(val interface{})
	ArtifactS3Location() *string
	SetArtifactS3Location(val *string)
	AttrId() *string
	AttrState() *string
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	Code() interface{}
	SetCode(val interface{})
	CreationStack() *[]*string
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	FailureRetentionPeriod() *float64
	SetFailureRetentionPeriod(val *float64)
	LogicalId() *string
	Name() *string
	SetName(val *string)
	Node() awscdk.ConstructNode
	Ref() *string
	RunConfig() interface{}
	SetRunConfig(val interface{})
	RuntimeVersion() *string
	SetRuntimeVersion(val *string)
	Schedule() interface{}
	SetSchedule(val interface{})
	Stack() awscdk.Stack
	StartCanaryAfterCreation() interface{}
	SetStartCanaryAfterCreation(val interface{})
	SuccessRetentionPeriod() *float64
	SetSuccessRetentionPeriod(val *float64)
	Tags() awscdk.TagManager
	UpdatedProperites() *map[string]interface{}
	VisualReference() interface{}
	SetVisualReference(val interface{})
	VpcConfig() interface{}
	SetVpcConfig(val interface{})
	AddDeletionOverride(path *string)
	AddDependsOn(target awscdk.CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	GetAtt(attributeName *string) awscdk.Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector awscdk.TreeInspector)
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	OverrideLogicalId(newLogicalId *string)
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::Synthetics::Canary`.

Creates or updates a canary. Canaries are scripts that monitor your endpoints and APIs from the outside-in. Canaries help you check the availability and latency of your web services and troubleshoot anomalies by investigating load time data, screenshots of the UI, logs, and metrics. You can set up a canary to run continuously or just once.

To create canaries, you must have the `CloudWatchSyntheticsFullAccess` policy. If you are creating a new IAM role for the canary, you also need the the `iam:CreateRole` , `iam:CreatePolicy` and `iam:AttachRolePolicy` permissions. For more information, see [Necessary Roles and Permissions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Roles) .

Do not include secrets or proprietary information in your canary names. The canary name makes up part of the Amazon Resource Name (ARN) for the canary, and the ARN is included in outbound calls over the internet. For more information, see [Security Considerations for Synthetics Canaries](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html) .

TODO: EXAMPLE

func NewCfnCanary

func NewCfnCanary(scope awscdk.Construct, id *string, props *CfnCanaryProps) CfnCanary

Create a new `AWS::Synthetics::Canary`.

type CfnCanaryProps

type CfnCanaryProps struct {
	// The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary.
	//
	// Artifacts include the log file, screenshots, and HAR files. Specify the full location path, including `s3://` at the beginning of the path.
	ArtifactS3Location *string `json:"artifactS3Location"`
	// Use this structure to input your script code for the canary.
	//
	// This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an S3 bucket, the bucket name, key, and version are also included. If the script is passed into the canary directly, the script code is contained in the value of `Script` .
	Code interface{} `json:"code"`
	// The ARN of the IAM role to be used to run the canary.
	//
	// This role must already exist, and must include `lambda.amazonaws.com` as a principal in the trust policy. The role must also have the following permissions:
	//
	// - `s3:PutObject`
	// - `s3:GetBucketLocation`
	// - `s3:ListAllMyBuckets`
	// - `cloudwatch:PutMetricData`
	// - `logs:CreateLogGroup`
	// - `logs:CreateLogStream`
	// - `logs:PutLogEvents`
	ExecutionRoleArn *string `json:"executionRoleArn"`
	// The name for this canary.
	//
	// Be sure to give it a descriptive name that distinguishes it from other canaries in your account.
	//
	// Do not include secrets or proprietary information in your canary names. The canary name makes up part of the canary ARN, and the ARN is included in outbound calls over the internet. For more information, see [Security Considerations for Synthetics Canaries](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html) .
	Name *string `json:"name"`
	// Specifies the runtime version to use for the canary.
	//
	// For more information about runtime versions, see [Canary Runtime Versions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html) .
	RuntimeVersion *string `json:"runtimeVersion"`
	// A structure that contains information about how often the canary is to run, and when these runs are to stop.
	Schedule interface{} `json:"schedule"`
	// Specify TRUE to have the canary start making runs immediately after it is created.
	//
	// A canary that you create using CloudFormation can't be used to monitor the CloudFormation stack that creates the canary or to roll back that stack if there is a failure.
	StartCanaryAfterCreation interface{} `json:"startCanaryAfterCreation"`
	// A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
	ArtifactConfig interface{} `json:"artifactConfig"`
	// The 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.
	FailureRetentionPeriod *float64 `json:"failureRetentionPeriod"`
	// A structure that contains input information for a canary run.
	//
	// If you omit this structure, the frequency of the canary is used as canary's timeout value, up to a maximum of 900 seconds.
	RunConfig interface{} `json:"runConfig"`
	// The 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.
	SuccessRetentionPeriod *float64 `json:"successRetentionPeriod"`
	// The list of key-value pairs that are associated with the canary.
	Tags *[]*awscdk.CfnTag `json:"tags"`
	// If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.
	VisualReference interface{} `json:"visualReference"`
	// If this canary is to test an endpoint in a VPC, this structure contains information about the subnet and security groups of the VPC endpoint.
	//
	// For more information, see [Running a Canary in a VPC](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html) .
	VpcConfig interface{} `json:"vpcConfig"`
}

Properties for defining a `CfnCanary`.

TODO: EXAMPLE

type CfnCanary_ArtifactConfigProperty

type CfnCanary_ArtifactConfigProperty struct {
	// A structure that contains the configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3 .
	//
	// Artifact encryption functionality is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 or later. For more information, see [Encrypting canary artifacts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) .
	S3Encryption interface{} `json:"s3Encryption"`
}

A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3 .

TODO: EXAMPLE

type CfnCanary_BaseScreenshotProperty

type CfnCanary_BaseScreenshotProperty struct {
	// The name of the screenshot.
	//
	// This is generated the first time the canary is run after the `UpdateCanary` operation that specified for this canary to perform visual monitoring.
	ScreenshotName *string `json:"screenshotName"`
	// Coordinates that define the part of a screen to ignore during screenshot comparisons.
	//
	// To obtain the coordinates to use here, use the CloudWatch Logs console to draw the boundaries on the screen. For more information, see {LINK}
	IgnoreCoordinates *[]*string `json:"ignoreCoordinates"`
}

A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.

TODO: EXAMPLE

type CfnCanary_CodeProperty

type CfnCanary_CodeProperty struct {
	// The entry point to use for the source code when running the canary.
	//
	// This value must end with the string `.handler` . The string is limited to 29 characters or fewer.
	Handler *string `json:"handler"`
	// If your canary script is located in S3, specify the bucket name here.
	//
	// The bucket must already exist.
	S3Bucket *string `json:"s3Bucket"`
	// The S3 key of your script.
	//
	// For more information, see [Working with Amazon S3 Objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html) .
	S3Key *string `json:"s3Key"`
	// The S3 version ID of your script.
	S3ObjectVersion *string `json:"s3ObjectVersion"`
	// If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the script in plain text.
	//
	// It can be up to 5 MB.
	Script *string `json:"script"`
}

Use this structure to input your script code for the canary.

This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an S3 bucket, the bucket name, key, and version are also included. If the script is passed into the canary directly, the script code is contained in the value of `Script` .

TODO: EXAMPLE

type CfnCanary_RunConfigProperty

type CfnCanary_RunConfigProperty struct {
	// Specifies whether this canary is to use active AWS X-Ray tracing when it runs.
	//
	// Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the canary does not hit an endpoint that has X-Ray tracing enabled. Using X-Ray tracing incurs charges. For more information, see [Canaries and X-Ray tracing](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html) .
	//
	// You can enable active tracing only for canaries that use version `syn-nodejs-2.0` or later for their canary runtime.
	ActiveTracing interface{} `json:"activeTracing"`
	// Specifies the keys and values to use for any environment variables used in the canary script.
	//
	// Use the following format:
	//
	// { "key1" : "value1", "key2" : "value2", ...}
	//
	// Keys must start with a letter and be at least two characters. The total size of your environment variables cannot exceed 4 KB. You can't specify any Lambda reserved environment variables as the keys for your environment variables. For more information about reserved keys, see [Runtime environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime) .
	EnvironmentVariables interface{} `json:"environmentVariables"`
	// The maximum amount of memory that the canary can use while running.
	//
	// This value must be a multiple of 64. The range is 960 to 3008.
	MemoryInMb *float64 `json:"memoryInMb"`
	// How long the canary is allowed to run before it must stop.
	//
	// You can't set this time to be longer than the frequency of the runs of this canary.
	//
	// If you omit this field, the frequency of the canary is used as this value, up to a maximum of 900 seconds.
	TimeoutInSeconds *float64 `json:"timeoutInSeconds"`
}

A structure that contains input information for a canary run.

This structure is required.

TODO: EXAMPLE

type CfnCanary_S3EncryptionProperty

type CfnCanary_S3EncryptionProperty struct {
	// The encryption method to use for artifacts created by this canary.
	//
	// Specify `SSE_S3` to use server-side encryption (SSE) with an Amazon S3-managed key. Specify `SSE-KMS` to use server-side encryption with a customer-managed AWS KMS key.
	//
	// If you omit this parameter, an AWS -managed AWS KMS key is used.
	EncryptionMode *string `json:"encryptionMode"`
	// The ARN of the customer-managed AWS KMS key to use, if you specify `SSE-KMS` for `EncryptionMode`.
	KmsKeyArn *string `json:"kmsKeyArn"`
}

A structure that contains the configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3 .

Artifact encryption functionality is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 or later. For more information, see [Encrypting canary artifacts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) .

TODO: EXAMPLE

type CfnCanary_ScheduleProperty

type CfnCanary_ScheduleProperty struct {
	// A `rate` expression or a `cron` expression that defines how often the canary is to run.
	//
	// For a rate expression, The syntax is `rate( *number unit* )` . *unit* can be `minute` , `minutes` , or `hour` .
	//
	// For example, `rate(1 minute)` runs the canary once a minute, `rate(10 minutes)` runs it once every 10 minutes, and `rate(1 hour)` runs it once every hour. You can specify a frequency between `rate(1 minute)` and `rate(1 hour)` .
	//
	// Specifying `rate(0 minute)` or `rate(0 hour)` is a special value that causes the canary to run only once when it is started.
	//
	// Use `cron( *expression* )` to specify a cron expression. You can't schedule a canary to wait for more than a year before running. For information about the syntax for cron expressions, see [Scheduling canary runs using cron](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html) .
	Expression *string `json:"expression"`
	// How long, in seconds, for the canary to continue making regular runs according to the schedule in the `Expression` value.
	//
	// If you specify 0, the canary continues making runs until you stop it. If you omit this field, the default of 0 is used.
	DurationInSeconds *string `json:"durationInSeconds"`
}

This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.

TODO: EXAMPLE

type CfnCanary_VPCConfigProperty

type CfnCanary_VPCConfigProperty struct {
	// The IDs of the security groups for this canary.
	SecurityGroupIds *[]*string `json:"securityGroupIds"`
	// The IDs of the subnets where this canary is to run.
	SubnetIds *[]*string `json:"subnetIds"`
	// The ID of the VPC where this canary is to run.
	VpcId *string `json:"vpcId"`
}

If this canary is to test an endpoint in a VPC, this structure contains information about the subnet and security groups of the VPC endpoint.

For more information, see [Running a Canary in a VPC](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html) .

TODO: EXAMPLE

type CfnCanary_VisualReferenceProperty

type CfnCanary_VisualReferenceProperty struct {
	// Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary.
	//
	// Valid values are `nextrun` to use the screenshots from the next run after this update is made, `lastrun` to use the screenshots from the most recent run before this update was made, or the value of `Id` in the [CanaryRun](https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRun.html) from any past run of this canary.
	BaseCanaryRunId *string `json:"baseCanaryRunId"`
	// An array of screenshots that are used as the baseline for comparisons during visual monitoring.
	BaseScreenshots interface{} `json:"baseScreenshots"`
}

Defines the screenshots to use as the baseline for comparisons during visual monitoring comparisons during future runs of this canary.

If you omit this parameter, no changes are made to any baseline screenshots that the canary might be using already.

Visual monitoring is supported only on canaries running the *syn-puppeteer-node-3.2* runtime or later. For more information, see [Visual monitoring](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) and [Visual monitoring blueprint](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html)

TODO: EXAMPLE

type Code

type Code interface {
	Bind(scope constructs.Construct, handler *string, family RuntimeFamily) *CodeConfig
}

The code the canary should execute.

TODO: EXAMPLE

Experimental.

type CodeConfig

type CodeConfig struct {
	// Inline code (mutually exclusive with `s3Location`).
	// Experimental.
	InlineCode *string `json:"inlineCode"`
	// The location of the code in S3 (mutually exclusive with `inlineCode`).
	// Experimental.
	S3Location *awss3.Location `json:"s3Location"`
}

Configuration of the code class.

TODO: EXAMPLE

Experimental.

type CronOptions

type CronOptions struct {
	// The day of the month to run this rule at.
	// Experimental.
	Day *string `json:"day"`
	// The hour to run this rule at.
	// Experimental.
	Hour *string `json:"hour"`
	// The minute to run this rule at.
	// Experimental.
	Minute *string `json:"minute"`
	// The month to run this rule at.
	// Experimental.
	Month *string `json:"month"`
	// The day of the week to run this rule at.
	// Experimental.
	WeekDay *string `json:"weekDay"`
}

Options to configure a cron expression.

All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.

TODO: EXAMPLE

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html

Experimental.

type CustomTestOptions

type CustomTestOptions struct {
	// The code of the canary script.
	// Experimental.
	Code Code `json:"code"`
	// The handler for the code.
	//
	// Must end with `.handler`.
	// Experimental.
	Handler *string `json:"handler"`
}

Properties for specifying a test.

TODO: EXAMPLE

Experimental.

type InlineCode

type InlineCode interface {
	Code
	Bind(_scope constructs.Construct, handler *string, _family RuntimeFamily) *CodeConfig
}

Canary code from an inline string.

TODO: EXAMPLE

Experimental.

func AssetCode_FromInline

func AssetCode_FromInline(code *string) InlineCode

Specify code inline.

Returns: `InlineCode` with inline code. Experimental.

func Code_FromInline

func Code_FromInline(code *string) InlineCode

Specify code inline.

Returns: `InlineCode` with inline code. Experimental.

func InlineCode_FromInline

func InlineCode_FromInline(code *string) InlineCode

Specify code inline.

Returns: `InlineCode` with inline code. Experimental.

func NewInlineCode

func NewInlineCode(code *string) InlineCode

Experimental.

func S3Code_FromInline

func S3Code_FromInline(code *string) InlineCode

Specify code inline.

Returns: `InlineCode` with inline code. Experimental.

type Runtime

type Runtime interface {
	Family() RuntimeFamily
	Name() *string
}

Runtime options for a canary.

TODO: EXAMPLE

Experimental.

func NewRuntime

func NewRuntime(name *string, family RuntimeFamily) Runtime

Experimental.

func Runtime_SYNTHETICS_1_0

func Runtime_SYNTHETICS_1_0() Runtime

func Runtime_SYNTHETICS_NODEJS_2_0

func Runtime_SYNTHETICS_NODEJS_2_0() Runtime

func Runtime_SYNTHETICS_NODEJS_2_1

func Runtime_SYNTHETICS_NODEJS_2_1() Runtime

func Runtime_SYNTHETICS_NODEJS_2_2

func Runtime_SYNTHETICS_NODEJS_2_2() Runtime

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_0

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_0() Runtime

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_1

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_1() Runtime

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_2

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_2() Runtime

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_3

func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_3() Runtime

func Runtime_SYNTHETICS_PYTHON_SELENIUM_1_0

func Runtime_SYNTHETICS_PYTHON_SELENIUM_1_0() Runtime

type RuntimeFamily

type RuntimeFamily string

All known Lambda runtime families. Experimental.

const (
	RuntimeFamily_NODEJS RuntimeFamily = "NODEJS"
	RuntimeFamily_PYTHON RuntimeFamily = "PYTHON"
	RuntimeFamily_OTHER  RuntimeFamily = "OTHER"
)

type S3Code

type S3Code interface {
	Code
	Bind(_scope constructs.Construct, _handler *string, _family RuntimeFamily) *CodeConfig
}

S3 bucket path to the code zip file.

TODO: EXAMPLE

Experimental.

func AssetCode_FromBucket

func AssetCode_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code

Specify code from an s3 bucket.

The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func Code_FromBucket

func Code_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code

Specify code from an s3 bucket.

The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func InlineCode_FromBucket

func InlineCode_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code

Specify code from an s3 bucket.

The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

func NewS3Code

func NewS3Code(bucket awss3.IBucket, key *string, objectVersion *string) S3Code

Experimental.

func S3Code_FromBucket

func S3Code_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code

Specify code from an s3 bucket.

The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.

Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch

Experimental.

type Schedule

type Schedule interface {
	ExpressionString() *string
}

Schedule for canary runs.

TODO: EXAMPLE

Experimental.

func Schedule_Cron

func Schedule_Cron(options *CronOptions) Schedule

Create a schedule from a set of cron fields. Experimental.

func Schedule_Expression

func Schedule_Expression(expression *string) Schedule

Construct a schedule from a literal schedule expression.

The expression must be in a `rate(number units)` format. For example, `Schedule.expression('rate(10 minutes)')` Experimental.

func Schedule_Once

func Schedule_Once() Schedule

The canary will be executed once. Experimental.

func Schedule_Rate

func Schedule_Rate(interval awscdk.Duration) Schedule

Construct a schedule from an interval.

Allowed values: 0 (for a single run) or between 1 and 60 minutes. To specify a single run, you can use `Schedule.once()`. Experimental.

type Test

type Test interface {
	Code() Code
	Handler() *string
}

Specify a test that the canary should run.

TODO: EXAMPLE

Experimental.

func Test_Custom

func Test_Custom(options *CustomTestOptions) Test

Specify a custom test with your own code.

Returns: `Test` associated with the specified Code object Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL