Class: AWSCDK::Synthetics::CfnCanary::RunConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Synthetics::CfnCanary::RunConfigProperty
- Defined in:
- synthetics/cfn_canary.rb
Overview
A structure that contains input information for a canary run.
This structure is required.
Instance Attribute Summary collapse
-
#active_tracing ⇒ Boolean, ...
readonly
Specifies whether this canary is to use active AWS X-Ray tracing when it runs.
-
#environment_variables ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the keys and values to use for any environment variables used in the canary script.
-
#ephemeral_storage ⇒ Numeric?
readonly
Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution.
-
#memory_in_mb ⇒ Numeric?
readonly
The maximum amount of memory that the canary can use while running.
-
#timeout_in_seconds ⇒ Numeric?
readonly
How long the canary is allowed to run before it must stop.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(active_tracing: nil, environment_variables: nil, ephemeral_storage: nil, memory_in_mb: nil, timeout_in_seconds: nil) ⇒ RunConfigProperty
constructor
A new instance of RunConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(active_tracing: nil, environment_variables: nil, ephemeral_storage: nil, memory_in_mb: nil, timeout_in_seconds: nil) ⇒ RunConfigProperty
Returns a new instance of RunConfigProperty.
1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 |
# File 'synthetics/cfn_canary.rb', line 1131 def initialize(active_tracing: nil, environment_variables: nil, ephemeral_storage: nil, memory_in_mb: nil, timeout_in_seconds: nil) @active_tracing = active_tracing Jsii::Type.check_type(@active_tracing, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "activeTracing") unless @active_tracing.nil? @environment_variables = environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "environmentVariables") unless @environment_variables.nil? @ephemeral_storage = ephemeral_storage Jsii::Type.check_type(@ephemeral_storage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ephemeralStorage") unless @ephemeral_storage.nil? @memory_in_mb = memory_in_mb Jsii::Type.check_type(@memory_in_mb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memoryInMb") unless @memory_in_mb.nil? @timeout_in_seconds = timeout_in_seconds Jsii::Type.check_type(@timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutInSeconds") unless @timeout_in_seconds.nil? end |
Instance Attribute Details
#active_tracing ⇒ Boolean, ... (readonly)
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.0 or later for their canary runtime.
1152 1153 1154 |
# File 'synthetics/cfn_canary.rb', line 1152 def active_tracing @active_tracing end |
#environment_variables ⇒ AWSCDK::IResolvable, ... (readonly)
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 .
1163 1164 1165 |
# File 'synthetics/cfn_canary.rb', line 1163 def environment_variables @environment_variables end |
#ephemeral_storage ⇒ Numeric? (readonly)
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.
1170 1171 1172 |
# File 'synthetics/cfn_canary.rb', line 1170 def ephemeral_storage @ephemeral_storage end |
#memory_in_mb ⇒ Numeric? (readonly)
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.
1177 1178 1179 |
# File 'synthetics/cfn_canary.rb', line 1177 def memory_in_mb @memory_in_mb end |
#timeout_in_seconds ⇒ Numeric? (readonly)
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.
1186 1187 1188 |
# File 'synthetics/cfn_canary.rb', line 1186 def timeout_in_seconds @timeout_in_seconds end |
Class Method Details
.jsii_properties ⇒ Object
1188 1189 1190 1191 1192 1193 1194 1195 1196 |
# File 'synthetics/cfn_canary.rb', line 1188 def self.jsii_properties { :active_tracing => "activeTracing", :environment_variables => "environmentVariables", :ephemeral_storage => "ephemeralStorage", :memory_in_mb => "memoryInMb", :timeout_in_seconds => "timeoutInSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 |
# File 'synthetics/cfn_canary.rb', line 1198 def to_jsii result = {} result.merge!({ "activeTracing" => @active_tracing, "environmentVariables" => @environment_variables, "ephemeralStorage" => @ephemeral_storage, "memoryInMb" => @memory_in_mb, "timeoutInSeconds" => @timeout_in_seconds, }) result.compact end |