Class: AWSCDK::Synthetics::CanaryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Synthetics::CanaryProps
- Defined in:
- synthetics/canary_props.rb
Overview
Properties for a canary.
Instance Attribute Summary collapse
-
#active_tracing ⇒ Boolean?
readonly
Specifies whether this canary is to use active AWS X-Ray tracing when it runs.
-
#artifact_s3_encryption_mode ⇒ AWSCDK::Synthetics::ArtifactsEncryptionMode?
readonly
Canary Artifacts in S3 encryption mode.
-
#artifact_s3_kms_key ⇒ AWSCDK::KMS::IKey?
readonly
The KMS key used to encrypt canary artifacts.
-
#artifacts_bucket_lifecycle_rules ⇒ Array<AWSCDK::S3::LifecycleRule>?
readonly
Lifecycle rules for the generated canary artifact bucket.
-
#artifacts_bucket_location ⇒ AWSCDK::Synthetics::ArtifactsBucketLocation?
readonly
The s3 location that stores the data of the canary runs.
-
#browser_configs ⇒ Array<AWSCDK::Synthetics::BrowserType>?
readonly
Browser configurations for the canary.
-
#canary_name ⇒ String?
readonly
The name of the canary.
-
#cleanup ⇒ AWSCDK::Synthetics::Cleanup?
readonly
deprecated
Deprecated.
use provisionedResourceCleanup
-
#dry_run_and_update ⇒ Boolean?
readonly
Specifies whether to perform a dry run before updating the canary.
-
#environment_variables ⇒ Hash{String => String}?
readonly
Key-value pairs that the Synthetics caches and makes available for your canary scripts.
-
#failure_retention_period ⇒ AWSCDK::Duration?
readonly
How many days should failed runs be retained.
-
#max_retries ⇒ Numeric?
readonly
The amount of times the canary will automatically retry a failed run.
-
#memory ⇒ AWSCDK::Size?
readonly
The maximum amount of memory that the canary can use while running.
-
#provisioned_resource_cleanup ⇒ Boolean?
readonly
Whether to also delete the Lambda functions and layers used by this canary when the canary is deleted.
-
#resources_to_replicate_tags ⇒ Array<AWSCDK::Synthetics::ResourceToReplicateTags>?
readonly
Specifies which resources should have their tags replicated to this canary.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
Canary execution role.
-
#runtime ⇒ AWSCDK::Synthetics::Runtime
readonly
Specify the runtime version to use for the canary.
-
#schedule ⇒ AWSCDK::Synthetics::Schedule?
readonly
Specify the schedule for how often the canary runs.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The list of security groups to associate with the canary's network interfaces.
-
#start_after_creation ⇒ Boolean?
readonly
Whether or not the canary should start after creation.
-
#success_retention_period ⇒ AWSCDK::Duration?
readonly
How many days should successful runs be retained.
-
#test ⇒ AWSCDK::Synthetics::Test
readonly
The type of test that you want your canary to run.
-
#time_to_live ⇒ AWSCDK::Duration?
readonly
How long the canary will be in a 'RUNNING' state.
-
#timeout ⇒ AWSCDK::Duration?
readonly
How long the canary is allowed to run before it must stop.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC where this canary is run.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Where to place the network interfaces within the VPC.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(runtime:, test:, active_tracing: nil, artifact_s3_encryption_mode: nil, artifact_s3_kms_key: nil, artifacts_bucket_lifecycle_rules: nil, artifacts_bucket_location: nil, browser_configs: nil, canary_name: nil, cleanup: nil, dry_run_and_update: nil, environment_variables: nil, failure_retention_period: nil, max_retries: nil, memory: nil, provisioned_resource_cleanup: nil, resources_to_replicate_tags: nil, role: nil, schedule: nil, security_groups: nil, start_after_creation: nil, success_retention_period: nil, timeout: nil, time_to_live: nil, vpc: nil, vpc_subnets: nil) ⇒ CanaryProps
constructor
A new instance of CanaryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(runtime:, test:, active_tracing: nil, artifact_s3_encryption_mode: nil, artifact_s3_kms_key: nil, artifacts_bucket_lifecycle_rules: nil, artifacts_bucket_location: nil, browser_configs: nil, canary_name: nil, cleanup: nil, dry_run_and_update: nil, environment_variables: nil, failure_retention_period: nil, max_retries: nil, memory: nil, provisioned_resource_cleanup: nil, resources_to_replicate_tags: nil, role: nil, schedule: nil, security_groups: nil, start_after_creation: nil, success_retention_period: nil, timeout: nil, time_to_live: nil, vpc: nil, vpc_subnets: nil) ⇒ CanaryProps
Returns a new instance of CanaryProps.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'synthetics/canary_props.rb', line 33 def initialize(runtime:, test:, active_tracing: nil, artifact_s3_encryption_mode: nil, artifact_s3_kms_key: nil, artifacts_bucket_lifecycle_rules: nil, artifacts_bucket_location: nil, browser_configs: nil, canary_name: nil, cleanup: nil, dry_run_and_update: nil, environment_variables: nil, failure_retention_period: nil, max_retries: nil, memory: nil, provisioned_resource_cleanup: nil, resources_to_replicate_tags: nil, role: nil, schedule: nil, security_groups: nil, start_after_creation: nil, success_retention_period: nil, timeout: nil, time_to_live: nil, vpc: nil, vpc_subnets: nil) @runtime = runtime Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5SdW50aW1lIn0=")), "runtime") @test = test Jsii::Type.check_type(@test, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5UZXN0In0=")), "test") @active_tracing = active_tracing Jsii::Type.check_type(@active_tracing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "activeTracing") unless @active_tracing.nil? @artifact_s3_encryption_mode = artifact_s3_encryption_mode Jsii::Type.check_type(@artifact_s3_encryption_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5BcnRpZmFjdHNFbmNyeXB0aW9uTW9kZSJ9")), "artifactS3EncryptionMode") unless @artifact_s3_encryption_mode.nil? @artifact_s3_kms_key = artifact_s3_kms_key Jsii::Type.check_type(@artifact_s3_kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "artifactS3KmsKey") unless @artifact_s3_kms_key.nil? @artifacts_bucket_lifecycle_rules = artifacts_bucket_lifecycle_rules.is_a?(Array) ? artifacts_bucket_lifecycle_rules.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::S3::LifecycleRule.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : artifacts_bucket_lifecycle_rules Jsii::Type.check_type(@artifacts_bucket_lifecycle_rules, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5MaWZlY3ljbGVSdWxlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "artifactsBucketLifecycleRules") unless @artifacts_bucket_lifecycle_rules.nil? @artifacts_bucket_location = artifacts_bucket_location.is_a?(Hash) ? ::AWSCDK::Synthetics::ArtifactsBucketLocation.new(**artifacts_bucket_location.transform_keys(&:to_sym)) : artifacts_bucket_location Jsii::Type.check_type(@artifacts_bucket_location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5BcnRpZmFjdHNCdWNrZXRMb2NhdGlvbiJ9")), "artifactsBucketLocation") unless @artifacts_bucket_location.nil? @browser_configs = browser_configs Jsii::Type.check_type(@browser_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zeW50aGV0aWNzLkJyb3dzZXJUeXBlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "browserConfigs") unless @browser_configs.nil? @canary_name = canary_name Jsii::Type.check_type(@canary_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "canaryName") unless @canary_name.nil? @cleanup = cleanup Jsii::Type.check_type(@cleanup, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5DbGVhbnVwIn0=")), "cleanup") unless @cleanup.nil? @dry_run_and_update = dry_run_and_update Jsii::Type.check_type(@dry_run_and_update, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "dryRunAndUpdate") unless @dry_run_and_update.nil? @environment_variables = environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environmentVariables") unless @environment_variables.nil? @failure_retention_period = failure_retention_period Jsii::Type.check_type(@failure_retention_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "failureRetentionPeriod") unless @failure_retention_period.nil? @max_retries = max_retries Jsii::Type.check_type(@max_retries, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRetries") unless @max_retries.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "memory") unless @memory.nil? @provisioned_resource_cleanup = provisioned_resource_cleanup Jsii::Type.check_type(@provisioned_resource_cleanup, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "provisionedResourceCleanup") unless @provisioned_resource_cleanup.nil? @resources_to_replicate_tags = Jsii::Type.check_type(@resources_to_replicate_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zeW50aGV0aWNzLlJlc291cmNlVG9SZXBsaWNhdGVUYWdzIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "resourcesToReplicateTags") unless @resources_to_replicate_tags.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @schedule = schedule Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5TY2hlZHVsZSJ9")), "schedule") unless @schedule.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @start_after_creation = start_after_creation Jsii::Type.check_type(@start_after_creation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "startAfterCreation") unless @start_after_creation.nil? @success_retention_period = success_retention_period Jsii::Type.check_type(@success_retention_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "successRetentionPeriod") unless @success_retention_period.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @time_to_live = time_to_live Jsii::Type.check_type(@time_to_live, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeToLive") unless @time_to_live.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? end |
Instance Attribute Details
#active_tracing ⇒ Boolean? (readonly)
Default: false
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.
You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
109 110 111 |
# File 'synthetics/canary_props.rb', line 109 def active_tracing @active_tracing end |
#artifact_s3_encryption_mode ⇒ AWSCDK::Synthetics::ArtifactsEncryptionMode? (readonly)
Default: - Artifacts are encrypted at rest using an AWS managed key. ArtifactsEncryptionMode.KMS is set if you specify artifactS3KmsKey.
Canary Artifacts in S3 encryption mode.
Artifact encryption is only supported for canaries that use Synthetics runtime
version syn-nodejs-puppeteer-3.3 or later.
118 119 120 |
# File 'synthetics/canary_props.rb', line 118 def artifact_s3_encryption_mode @artifact_s3_encryption_mode end |
#artifact_s3_kms_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - no kms key if artifactS3EncryptionMode is set to S3_MANAGED. A key will be created if one is not provided and artifactS3EncryptionMode is set to KMS.
The KMS key used to encrypt canary artifacts.
123 124 125 |
# File 'synthetics/canary_props.rb', line 123 def artifact_s3_kms_key @artifact_s3_kms_key end |
#artifacts_bucket_lifecycle_rules ⇒ Array<AWSCDK::S3::LifecycleRule>? (readonly)
Default: - no rules applied to the generated bucket.
Lifecycle rules for the generated canary artifact bucket.
Has no effect
if a bucket is passed to artifacts_bucket_location. If you pass a bucket
to artifacts_bucket_location, you can add lifecycle rules to the bucket
itself.
133 134 135 |
# File 'synthetics/canary_props.rb', line 133 def artifacts_bucket_lifecycle_rules @artifacts_bucket_lifecycle_rules end |
#artifacts_bucket_location ⇒ AWSCDK::Synthetics::ArtifactsBucketLocation? (readonly)
Default: - A new s3 bucket will be created without a prefix.
The s3 location that stores the data of the canary runs.
138 139 140 |
# File 'synthetics/canary_props.rb', line 138 def artifacts_bucket_location @artifacts_bucket_location end |
#browser_configs ⇒ Array<AWSCDK::Synthetics::BrowserType>? (readonly)
Default: undefined - AWS CloudWatch default is using only Chrome browser
Browser configurations for the canary.
Specifies which browser(s) to use for running the canary tests. You can specify up to 2 browser configurations.
Firefox is supported with Node.js Puppeteer and Playwright runtimes, but not with Python Selenium runtimes.
150 151 152 |
# File 'synthetics/canary_props.rb', line 150 def browser_configs @browser_configs end |
#canary_name ⇒ String? (readonly)
Default: - A unique name will be generated from the construct ID
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.
162 163 164 |
# File 'synthetics/canary_props.rb', line 162 def canary_name @canary_name end |
#cleanup ⇒ AWSCDK::Synthetics::Cleanup? (readonly)
use provisionedResourceCleanup
Default: Cleanup.NOTHING
Specify the underlying resources to be cleaned up when the canary is deleted.
Using Cleanup.LAMBDA will create a Custom Resource to achieve this.
170 171 172 |
# File 'synthetics/canary_props.rb', line 170 def cleanup @cleanup end |
#dry_run_and_update ⇒ Boolean? (readonly)
Default: undefined - AWS CloudWatch default is false
Specifies whether to perform a dry run before updating the canary.
If set to true, CDK will execute a dry run to validate the changes before applying them to the canary. If the dry run succeeds, the canary will be updated with the changes. If the dry run fails, the CloudFormation deployment will fail with the dry run's failure reason.
If set to false or omitted, the canary will be updated directly without first performing a dry run.
182 183 184 |
# File 'synthetics/canary_props.rb', line 182 def dry_run_and_update @dry_run_and_update end |
#environment_variables ⇒ Hash{String => String}? (readonly)
Default: - No environment variables.
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.
191 192 193 |
# File 'synthetics/canary_props.rb', line 191 def environment_variables @environment_variables end |
#failure_retention_period ⇒ AWSCDK::Duration? (readonly)
Default: Duration.days(31)
How many days should failed runs be retained.
196 197 198 |
# File 'synthetics/canary_props.rb', line 196 def failure_retention_period @failure_retention_period end |
#max_retries ⇒ Numeric? (readonly)
Default: 0
The amount of times the canary will automatically retry a failed run.
This is only supported on the following runtimes or newer: Runtime.SYNTHETICS_NODEJS_PUPPETEER_10_0, Runtime.SYNTHETICS_NODEJS_PLAYWRIGHT_2_0, Runtime.SYNTHETICS_PYTHON_SELENIUM_5_1.
Max retries can be set between 0 and 2. Canaries which time out after 10 minutes are automatically limited to one retry.
205 206 207 |
# File 'synthetics/canary_props.rb', line 205 def max_retries @max_retries end |
#memory ⇒ AWSCDK::Size? (readonly)
Default: Size.mebibytes(1024)
The maximum amount of memory that the canary can use while running.
This value must be a multiple of 64 Mib. The range is 960 MiB to 3008 MiB.
213 214 215 |
# File 'synthetics/canary_props.rb', line 213 def memory @memory end |
#provisioned_resource_cleanup ⇒ Boolean? (readonly)
Default: undefined - the default behavior is to not delete the Lambda functions and layers
Whether to also delete the Lambda functions and layers used by this canary when the canary is deleted.
218 219 220 |
# File 'synthetics/canary_props.rb', line 218 def provisioned_resource_cleanup @provisioned_resource_cleanup end |
#resources_to_replicate_tags ⇒ Array<AWSCDK::Synthetics::ResourceToReplicateTags>? (readonly)
Default: - No resources will have their tags replicated to this canary
Specifies which resources should have their tags replicated to this canary.
To have the tags that you apply to this canary also be applied to the Lambda function that the canary uses, specify this property with the value ResourceToReplicateTags.LAMBDA_FUNCTION. If you do this, CloudWatch Synthetics will keep the tags of the canary and the Lambda function synchronized. Any future changes you make to the canary's tags will also be applied to the function.
229 230 231 |
# File 'synthetics/canary_props.rb', line 229 def @resources_to_replicate_tags end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - A unique role will be generated for this canary. You can add permissions to roles by calling 'addToRolePolicy'.
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.
242 243 244 |
# File 'synthetics/canary_props.rb', line 242 def role @role end |
#runtime ⇒ AWSCDK::Synthetics::Runtime (readonly)
Specify the runtime version to use for the canary.
92 93 94 |
# File 'synthetics/canary_props.rb', line 92 def runtime @runtime end |
#schedule ⇒ AWSCDK::Synthetics::Schedule? (readonly)
Default: 'rate(5 minutes)'
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().
250 251 252 |
# File 'synthetics/canary_props.rb', line 250 def schedule @schedule end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - If the canary is placed within a VPC and a security group is not specified a dedicated security group will be created for this canary.
The list of security groups to associate with the canary's network interfaces.
You must provide vpc when using this prop.
257 258 259 |
# File 'synthetics/canary_props.rb', line 257 def security_groups @security_groups end |
#start_after_creation ⇒ Boolean? (readonly)
Default: true
Whether or not the canary should start after creation.
262 263 264 |
# File 'synthetics/canary_props.rb', line 262 def start_after_creation @start_after_creation end |
#success_retention_period ⇒ AWSCDK::Duration? (readonly)
Default: Duration.days(31)
How many days should successful runs be retained.
267 268 269 |
# File 'synthetics/canary_props.rb', line 267 def success_retention_period @success_retention_period end |
#test ⇒ AWSCDK::Synthetics::Test (readonly)
The type of test that you want your canary to run.
Use Test.custom() to specify the test to run.
98 99 100 |
# File 'synthetics/canary_props.rb', line 98 def test @test end |
#time_to_live ⇒ AWSCDK::Duration? (readonly)
Default: - no limit
How long the canary will be in a 'RUNNING' state.
For example, if you set time_to_live 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.
285 286 287 |
# File 'synthetics/canary_props.rb', line 285 def time_to_live @time_to_live end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: - the frequency of the canary is used as this value, up to a maximum of 900 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.
The minimum allowed value is 3 seconds. The maximum allowed value is 840 seconds (14 minutes).
277 278 279 |
# File 'synthetics/canary_props.rb', line 277 def timeout @timeout end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - Not in VPC
The VPC where this canary is run.
Specify this if the canary needs to access resources in a VPC.
292 293 294 |
# File 'synthetics/canary_props.rb', line 292 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy if not specified
Where to place the network interfaces within the VPC.
You must provide vpc when using this prop.
299 300 301 |
# File 'synthetics/canary_props.rb', line 299 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'synthetics/canary_props.rb', line 301 def self.jsii_properties { :runtime => "runtime", :test => "test", :active_tracing => "activeTracing", :artifact_s3_encryption_mode => "artifactS3EncryptionMode", :artifact_s3_kms_key => "artifactS3KmsKey", :artifacts_bucket_lifecycle_rules => "artifactsBucketLifecycleRules", :artifacts_bucket_location => "artifactsBucketLocation", :browser_configs => "browserConfigs", :canary_name => "canaryName", :cleanup => "cleanup", :dry_run_and_update => "dryRunAndUpdate", :environment_variables => "environmentVariables", :failure_retention_period => "failureRetentionPeriod", :max_retries => "maxRetries", :memory => "memory", :provisioned_resource_cleanup => "provisionedResourceCleanup", :resources_to_replicate_tags => "resourcesToReplicateTags", :role => "role", :schedule => "schedule", :security_groups => "securityGroups", :start_after_creation => "startAfterCreation", :success_retention_period => "successRetentionPeriod", :timeout => "timeout", :time_to_live => "timeToLive", :vpc => "vpc", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'synthetics/canary_props.rb', line 332 def to_jsii result = {} result.merge!({ "runtime" => @runtime, "test" => @test, "activeTracing" => @active_tracing, "artifactS3EncryptionMode" => @artifact_s3_encryption_mode, "artifactS3KmsKey" => @artifact_s3_kms_key, "artifactsBucketLifecycleRules" => @artifacts_bucket_lifecycle_rules, "artifactsBucketLocation" => @artifacts_bucket_location, "browserConfigs" => @browser_configs, "canaryName" => @canary_name, "cleanup" => @cleanup, "dryRunAndUpdate" => @dry_run_and_update, "environmentVariables" => @environment_variables, "failureRetentionPeriod" => @failure_retention_period, "maxRetries" => @max_retries, "memory" => @memory, "provisionedResourceCleanup" => @provisioned_resource_cleanup, "resourcesToReplicateTags" => @resources_to_replicate_tags, "role" => @role, "schedule" => @schedule, "securityGroups" => @security_groups, "startAfterCreation" => @start_after_creation, "successRetentionPeriod" => @success_retention_period, "timeout" => @timeout, "timeToLive" => @time_to_live, "vpc" => @vpc, "vpcSubnets" => @vpc_subnets, }) result.compact end |