CfnCanaryPropsMixin
- class aws_cdk.mixins_preview.aws_synthetics.mixins.CfnCanaryPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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.
Canaries are automated scripts that run at specified intervals against an endpoint. They include Python or Node.js code to create a Lambda function. This code needs to be packaged in a certain way, depending on the language. For more information, see Writing a canary script .
To create canaries, you must have the
CloudWatchSyntheticsFullAccesspolicy. If you are creating a new IAM role for the canary, you also need the theiam:CreateRole,iam:CreatePolicyandiam:AttachRolePolicypermissions. For more information, see Necessary Roles and Permissions .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 .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html
- CloudformationResource:
AWS::Synthetics::Canary
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins cfn_canary_props_mixin = synthetics_mixins.CfnCanaryPropsMixin(synthetics_mixins.CfnCanaryMixinProps( artifact_config=synthetics_mixins.CfnCanaryPropsMixin.ArtifactConfigProperty( s3_encryption=synthetics_mixins.CfnCanaryPropsMixin.S3EncryptionProperty( encryption_mode="encryptionMode", kms_key_arn="kmsKeyArn" ) ), artifact_s3_location="artifactS3Location", browser_configs=[synthetics_mixins.CfnCanaryPropsMixin.BrowserConfigProperty( browser_type="browserType" )], code=synthetics_mixins.CfnCanaryPropsMixin.CodeProperty( blueprint_types=["blueprintTypes"], dependencies=[synthetics_mixins.CfnCanaryPropsMixin.DependencyProperty( reference="reference", type="type" )], handler="handler", s3_bucket="s3Bucket", s3_key="s3Key", s3_object_version="s3ObjectVersion", script="script", source_location_arn="sourceLocationArn" ), delete_lambda_resources_on_canary_deletion=False, dry_run_and_update=False, execution_role_arn="executionRoleArn", failure_retention_period=123, name="name", provisioned_resource_cleanup="provisionedResourceCleanup", resources_to_replicate_tags=["resourcesToReplicateTags"], run_config=synthetics_mixins.CfnCanaryPropsMixin.RunConfigProperty( active_tracing=False, environment_variables={ "environment_variables_key": "environmentVariables" }, ephemeral_storage=123, memory_in_mb=123, timeout_in_seconds=123 ), runtime_version="runtimeVersion", schedule=synthetics_mixins.CfnCanaryPropsMixin.ScheduleProperty( duration_in_seconds="durationInSeconds", expression="expression", retry_config=synthetics_mixins.CfnCanaryPropsMixin.RetryConfigProperty( max_retries=123 ) ), start_canary_after_creation=False, success_retention_period=123, tags=[CfnTag( key="key", value="value" )], visual_reference=synthetics_mixins.CfnCanaryPropsMixin.VisualReferenceProperty( base_canary_run_id="baseCanaryRunId", base_screenshots=[synthetics_mixins.CfnCanaryPropsMixin.BaseScreenshotProperty( ignore_coordinates=["ignoreCoordinates"], screenshot_name="screenshotName" )], browser_type="browserType" ), visual_references=[synthetics_mixins.CfnCanaryPropsMixin.VisualReferenceProperty( base_canary_run_id="baseCanaryRunId", base_screenshots=[synthetics_mixins.CfnCanaryPropsMixin.BaseScreenshotProperty( ignore_coordinates=["ignoreCoordinates"], screenshot_name="screenshotName" )], browser_type="browserType" )], vpc_config=synthetics_mixins.CfnCanaryPropsMixin.VPCConfigProperty( ipv6_allowed_for_dual_stack=False, security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"], vpc_id="vpcId" ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Synthetics::Canary.- Parameters:
props (
Union[CfnCanaryMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['artifactConfig', 'artifactS3Location', 'browserConfigs', 'code', 'deleteLambdaResourcesOnCanaryDeletion', 'dryRunAndUpdate', 'executionRoleArn', 'failureRetentionPeriod', 'name', 'provisionedResourceCleanup', 'resourcesToReplicateTags', 'runConfig', 'runtimeVersion', 'schedule', 'startCanaryAfterCreation', 'successRetentionPeriod', 'tags', 'visualReference', 'visualReferences', 'vpcConfig']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
ArtifactConfigProperty
- class CfnCanaryPropsMixin.ArtifactConfigProperty(*, s3_encryption=None)
Bases:
objectA structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3 .
- Parameters:
s3_encryption (
Union[IResolvable,S3EncryptionProperty,Dict[str,Any],None]) – 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 .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins artifact_config_property = synthetics_mixins.CfnCanaryPropsMixin.ArtifactConfigProperty( s3_encryption=synthetics_mixins.CfnCanaryPropsMixin.S3EncryptionProperty( encryption_mode="encryptionMode", kms_key_arn="kmsKeyArn" ) )
Attributes
- s3_encryption
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 .
BaseScreenshotProperty
- class CfnCanaryPropsMixin.BaseScreenshotProperty(*, ignore_coordinates=None, screenshot_name=None)
Bases:
objectA structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.
- Parameters:
ignore_coordinates (
Optional[Sequence[str]]) – Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the CloudWatch console to draw the boundaries on the screen. For more information, see Edit or delete a canary .screenshot_name (
Optional[str]) – The name of the screenshot. This is generated the first time the canary is run after theUpdateCanaryoperation that specified for this canary to perform visual monitoring.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins base_screenshot_property = synthetics_mixins.CfnCanaryPropsMixin.BaseScreenshotProperty( ignore_coordinates=["ignoreCoordinates"], screenshot_name="screenshotName" )
Attributes
- ignore_coordinates
Coordinates that define the part of a screen to ignore during screenshot comparisons.
To obtain the coordinates to use here, use the CloudWatch console to draw the boundaries on the screen. For more information, see Edit or delete a canary .
- screenshot_name
The name of the screenshot.
This is generated the first time the canary is run after the
UpdateCanaryoperation that specified for this canary to perform visual monitoring.
BrowserConfigProperty
- class CfnCanaryPropsMixin.BrowserConfigProperty(*, browser_type=None)
Bases:
objectA structure that specifies the browser type to use for a canary run.
- Parameters:
browser_type (
Optional[str]) – The browser type associated with this browser configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins browser_config_property = synthetics_mixins.CfnCanaryPropsMixin.BrowserConfigProperty( browser_type="browserType" )
Attributes
- browser_type
The browser type associated with this browser configuration.
CodeProperty
- class CfnCanaryPropsMixin.CodeProperty(*, blueprint_types=None, dependencies=None, handler=None, s3_bucket=None, s3_key=None, s3_object_version=None, script=None, source_location_arn=None)
Bases:
objectUse 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.- Parameters:
blueprint_types (
Optional[Sequence[str]]) –BlueprintTypesare a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts.multi-checksis the only supported value. When you specifyBlueprintTypes, theHandlerfield cannot be specified since the blueprint provides a pre-defined entry point.dependencies (
Union[IResolvable,Sequence[Union[IResolvable,DependencyProperty,Dict[str,Any]]],None]) – List of Lambda layers to attach to the canary.handler (
Optional[str]) – The entry point to use for the source code when running the canary. For canaries that use thesyn-python-selenium-1.0runtime or asyn-nodejs.puppeteerruntime earlier thansyn-nodejs.puppeteer-3.4, the handler must be specified as*fileName* .handler. Forsyn-python-selenium-1.1,syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified as*fileName* . *functionName*, or you can specify a folder where canary scripts reside as*folder* / *fileName* . *functionName*. This field is required when you don’t specifyBlueprintTypesand is not allowed when you specifyBlueprintTypes.s3_bucket (
Optional[str]) – If your canary script is located in S3, specify the bucket name here. The bucket must already exist.s3_key (
Optional[str]) – The Amazon S3 key of your script. For more information, see Working with Amazon S3 Objects .s3_object_version (
Optional[str]) – The Amazon S3 version ID of your script.script (
Optional[str]) – 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.source_location_arn (
Optional[str]) – The ARN of the Lambda layer where Synthetics stores the canary script code.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins code_property = synthetics_mixins.CfnCanaryPropsMixin.CodeProperty( blueprint_types=["blueprintTypes"], dependencies=[synthetics_mixins.CfnCanaryPropsMixin.DependencyProperty( reference="reference", type="type" )], handler="handler", s3_bucket="s3Bucket", s3_key="s3Key", s3_object_version="s3ObjectVersion", script="script", source_location_arn="sourceLocationArn" )
Attributes
- blueprint_types
BlueprintTypesare a list of templates that enable simplified canary creation.You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts.
multi-checksis the only supported value.When you specify
BlueprintTypes, theHandlerfield cannot be specified since the blueprint provides a pre-defined entry point.
- dependencies
List of Lambda layers to attach to the canary.
- handler
The entry point to use for the source code when running the canary.
For canaries that use the
syn-python-selenium-1.0runtime or asyn-nodejs.puppeteerruntime earlier thansyn-nodejs.puppeteer-3.4, the handler must be specified as*fileName* .handler. Forsyn-python-selenium-1.1,syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified as*fileName* . *functionName*, or you can specify a folder where canary scripts reside as*folder* / *fileName* . *functionName*.This field is required when you don’t specify
BlueprintTypesand is not allowed when you specifyBlueprintTypes.
- s3_bucket
If your canary script is located in S3, specify the bucket name here.
The bucket must already exist.
- s3_key
The Amazon S3 key of your script.
For more information, see Working with Amazon S3 Objects .
- s3_object_version
The Amazon S3 version ID of your script.
- script
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.
- source_location_arn
The ARN of the Lambda layer where Synthetics stores the canary script code.
DependencyProperty
- class CfnCanaryPropsMixin.DependencyProperty(*, reference=None, type=None)
Bases:
objectA structure that contains information about a dependency for a canary.
- Parameters:
reference (
Optional[str]) – The dependency reference. For Lambda layers, this is the ARN of the Lambda layer. For more information about Lambda ARN format, see Lambda .type (
Optional[str]) – The type of dependency. Valid value isLambdaLayer.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins dependency_property = synthetics_mixins.CfnCanaryPropsMixin.DependencyProperty( reference="reference", type="type" )
Attributes
- reference
The dependency reference.
For Lambda layers, this is the ARN of the Lambda layer. For more information about Lambda ARN format, see Lambda .
- type
The type of dependency.
Valid value is
LambdaLayer.
RetryConfigProperty
- class CfnCanaryPropsMixin.RetryConfigProperty(*, max_retries=None)
Bases:
objectThe canary’s retry configuration information.
- Parameters:
max_retries (
Union[int,float,None]) – The maximum number of retries. The value must be less than or equal to two.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins retry_config_property = synthetics_mixins.CfnCanaryPropsMixin.RetryConfigProperty( max_retries=123 )
Attributes
- max_retries
The maximum number of retries.
The value must be less than or equal to two.
RunConfigProperty
- class CfnCanaryPropsMixin.RunConfigProperty(*, active_tracing=None, environment_variables=None, ephemeral_storage=None, memory_in_mb=None, timeout_in_seconds=None)
Bases:
objectA structure that contains input information for a canary run.
This structure is required.
- Parameters:
active_tracing (
Union[bool,IResolvable,None]) – 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 . You can enable active tracing only for canaries that use versionsyn-nodejs-2.0or later for their canary runtime.environment_variables (
Union[Mapping[str,str],IResolvable,None]) – 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 .ephemeral_storage (
Union[int,float,None]) – Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution. This temporary storage is used for storing canary run artifacts (which are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser operations. This temporary storage is cleared after the run is completed. Default storage value is 1024 MB.memory_in_mb (
Union[int,float,None]) – 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.timeout_in_seconds (
Union[int,float,None]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins run_config_property = synthetics_mixins.CfnCanaryPropsMixin.RunConfigProperty( active_tracing=False, environment_variables={ "environment_variables_key": "environmentVariables" }, ephemeral_storage=123, memory_in_mb=123, timeout_in_seconds=123 )
Attributes
- active_tracing
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 .
You can enable active tracing only for canaries that use version
syn-nodejs-2.0or later for their canary runtime.
- environment_variables
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 .
- ephemeral_storage
Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution.
This temporary storage is used for storing canary run artifacts (which are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser operations. This temporary storage is cleared after the run is completed. Default storage value is 1024 MB.
- memory_in_mb
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.
- timeout_in_seconds
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.
S3EncryptionProperty
- class CfnCanaryPropsMixin.S3EncryptionProperty(*, encryption_mode=None, kms_key_arn=None)
Bases:
objectA 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 .
- Parameters:
encryption_mode (
Optional[str]) – The encryption method to use for artifacts created by this canary. SpecifySSE_S3to use server-side encryption (SSE) with an Amazon S3-managed key. SpecifySSE-KMSto use server-side encryption with a customer-managed AWS key. If you omit this parameter, an AWS -managed AWS key is used.kms_key_arn (
Optional[str]) – The ARN of the customer-managed AWS key to use, if you specifySSE-KMSforEncryptionMode.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins s3_encryption_property = synthetics_mixins.CfnCanaryPropsMixin.S3EncryptionProperty( encryption_mode="encryptionMode", kms_key_arn="kmsKeyArn" )
Attributes
- encryption_mode
The encryption method to use for artifacts created by this canary.
Specify
SSE_S3to use server-side encryption (SSE) with an Amazon S3-managed key. SpecifySSE-KMSto use server-side encryption with a customer-managed AWS key.If you omit this parameter, an AWS -managed AWS key is used.
- kms_key_arn
The ARN of the customer-managed AWS key to use, if you specify
SSE-KMSforEncryptionMode.
ScheduleProperty
- class CfnCanaryPropsMixin.ScheduleProperty(*, duration_in_seconds=None, expression=None, retry_config=None)
Bases:
objectThis structure specifies how often a canary is to make runs and the date and time when it should stop making runs.
- Parameters:
duration_in_seconds (
Optional[str]) – How long, in seconds, for the canary to continue making regular runs according to the schedule in theExpressionvalue. If you specify 0, the canary continues making runs until you stop it. If you omit this field, the default of 0 is used.expression (
Optional[str]) – Arateexpression or acronexpression that defines how often the canary is to run. For a rate expression, The syntax israte( *number unit* ). unit can beminute,minutes, orhour. For example,rate(1 minute)runs the canary once a minute,rate(10 minutes)runs it once every 10 minutes, andrate(1 hour)runs it once every hour. You can specify a frequency betweenrate(1 minute)andrate(1 hour). Specifyingrate(0 minute)orrate(0 hour)is a special value that causes the canary to run only once when it is started. Usecron( *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 .retry_config (
Union[IResolvable,RetryConfigProperty,Dict[str,Any],None]) – The canary’s retry configuration information.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins schedule_property = synthetics_mixins.CfnCanaryPropsMixin.ScheduleProperty( duration_in_seconds="durationInSeconds", expression="expression", retry_config=synthetics_mixins.CfnCanaryPropsMixin.RetryConfigProperty( max_retries=123 ) )
Attributes
- duration_in_seconds
How long, in seconds, for the canary to continue making regular runs according to the schedule in the
Expressionvalue.If you specify 0, the canary continues making runs until you stop it. If you omit this field, the default of 0 is used.
- expression
A
rateexpression or acronexpression that defines how often the canary is to run.For a rate expression, The syntax is
rate( *number unit* ). unit can beminute,minutes, orhour.For example,
rate(1 minute)runs the canary once a minute,rate(10 minutes)runs it once every 10 minutes, andrate(1 hour)runs it once every hour. You can specify a frequency betweenrate(1 minute)andrate(1 hour).Specifying
rate(0 minute)orrate(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 .
- retry_config
The canary’s retry configuration information.
VPCConfigProperty
- class CfnCanaryPropsMixin.VPCConfigProperty(*, ipv6_allowed_for_dual_stack=None, security_group_ids=None, subnet_ids=None, vpc_id=None)
Bases:
objectIf 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 .
- Parameters:
ipv6_allowed_for_dual_stack (
Union[bool,IResolvable,None]) – Set this totrueto allow outbound IPv6 traffic on VPC canaries that are connected to dual-stack subnets. The default isfalse.security_group_ids (
Optional[Sequence[str]]) – The IDs of the security groups for this canary.subnet_ids (
Optional[Sequence[str]]) – The IDs of the subnets where this canary is to run.vpc_id (
Optional[str]) – The ID of the VPC where this canary is to run.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins v_pCConfig_property = synthetics_mixins.CfnCanaryPropsMixin.VPCConfigProperty( ipv6_allowed_for_dual_stack=False, security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"], vpc_id="vpcId" )
Attributes
- ipv6_allowed_for_dual_stack
Set this to
trueto allow outbound IPv6 traffic on VPC canaries that are connected to dual-stack subnets.The default is
false.
- security_group_ids
The IDs of the security groups for this canary.
- subnet_ids
The IDs of the subnets where this canary is to run.
- vpc_id
The ID of the VPC where this canary is to run.
VisualReferenceProperty
- class CfnCanaryPropsMixin.VisualReferenceProperty(*, base_canary_run_id=None, base_screenshots=None, browser_type=None)
Bases:
objectDefines 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 and Visual monitoring blueprint
- Parameters:
base_canary_run_id (
Optional[str]) – Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary. Valid values arenextrunto use the screenshots from the next run after this update is made,lastrunto use the screenshots from the most recent run before this update was made, or the value ofIdin the CanaryRun from any past run of this canary.base_screenshots (
Union[IResolvable,Sequence[Union[IResolvable,BaseScreenshotProperty,Dict[str,Any]]],None]) – An array of screenshots that are used as the baseline for comparisons during visual monitoring.browser_type (
Optional[str]) – The browser type associated with this visual reference configuration. Valid values areCHROMEandFIREFOX.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_synthetics import mixins as synthetics_mixins visual_reference_property = synthetics_mixins.CfnCanaryPropsMixin.VisualReferenceProperty( base_canary_run_id="baseCanaryRunId", base_screenshots=[synthetics_mixins.CfnCanaryPropsMixin.BaseScreenshotProperty( ignore_coordinates=["ignoreCoordinates"], screenshot_name="screenshotName" )], browser_type="browserType" )
Attributes
- base_canary_run_id
Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary.
Valid values are
nextrunto use the screenshots from the next run after this update is made,lastrunto use the screenshots from the most recent run before this update was made, or the value ofIdin the CanaryRun from any past run of this canary.
- base_screenshots
An array of screenshots that are used as the baseline for comparisons during visual monitoring.
- browser_type
The browser type associated with this visual reference configuration.
Valid values are
CHROMEandFIREFOX.