Class: AWSCDK::CloudAssemblySchema::CDKCommand
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudAssemblySchema::CDKCommand
- Defined in:
- cloud_assembly_schema/cdk_command.rb
Overview
Represents a cdk command i.e. synth, deploy, & destroy.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean?
readonly
Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable
synthand disabledeploy&destroyin order to limit the test to synthesis. -
#expect_error ⇒ Boolean?
readonly
If the runner should expect this command to fail.
-
#expected_message ⇒ String?
readonly
This can be used in combination with
expectedErrorto validate that a specific message is returned.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled: nil, expected_message: nil, expect_error: nil) ⇒ CDKCommand
constructor
A new instance of CDKCommand.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enabled: nil, expected_message: nil, expect_error: nil) ⇒ CDKCommand
Returns a new instance of CDKCommand.
10 11 12 13 14 15 16 17 |
# File 'cloud_assembly_schema/cdk_command.rb', line 10 def initialize(enabled: nil, expected_message: nil, expect_error: nil) @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil? @expected_message = Jsii::Type.check_type(@expected_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expectedMessage") unless @expected_message.nil? @expect_error = expect_error Jsii::Type.check_type(@expect_error, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "expectError") unless @expect_error.nil? end |
Instance Attribute Details
#enabled ⇒ Boolean? (readonly)
Default: true
Whether or not to run this command as part of the workflow This can be used if you only want to test some of the workflow for example enable synth and disable deploy & destroy in order to limit the test to synthesis.
23 24 25 |
# File 'cloud_assembly_schema/cdk_command.rb', line 23 def enabled @enabled end |
#expect_error ⇒ Boolean? (readonly)
Default: false
If the runner should expect this command to fail.
33 34 35 |
# File 'cloud_assembly_schema/cdk_command.rb', line 33 def expect_error @expect_error end |
#expected_message ⇒ String? (readonly)
Default: - do not validate message
This can be used in combination with expectedError to validate that a specific message is returned.
28 29 30 |
# File 'cloud_assembly_schema/cdk_command.rb', line 28 def @expected_message end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'cloud_assembly_schema/cdk_command.rb', line 35 def self.jsii_properties { :enabled => "enabled", :expected_message => "expectedMessage", :expect_error => "expectError", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'cloud_assembly_schema/cdk_command.rb', line 43 def to_jsii result = {} result.merge!({ "enabled" => @enabled, "expectedMessage" => @expected_message, "expectError" => @expect_error, }) result.compact end |