Class: AWSCDK::CloudAssemblySchema::DestroyCommand
- Inherits:
-
CDKCommand
- Object
- CDKCommand
- AWSCDK::CloudAssemblySchema::DestroyCommand
- Defined in:
- cloud_assembly_schema/destroy_command.rb
Overview
Represents a cdk destroy command.
Instance Attribute Summary collapse
-
#args ⇒ AWSCDK::CloudAssemblySchema::DestroyOptions?
readonly
Additional arguments to pass to the command This can be used to test specific CLI functionality.
-
#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, args: nil) ⇒ DestroyCommand
constructor
A new instance of DestroyCommand.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enabled: nil, expected_message: nil, expect_error: nil, args: nil) ⇒ DestroyCommand
Returns a new instance of DestroyCommand.
11 12 13 14 15 16 17 18 19 20 |
# File 'cloud_assembly_schema/destroy_command.rb', line 11 def initialize(enabled: nil, expected_message: nil, expect_error: nil, args: 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? @args = args.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::DestroyOptions.new(**args.transform_keys(&:to_sym)) : args Jsii::Type.check_type(@args, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuRGVzdHJveU9wdGlvbnMifQ==")), "args") unless @args.nil? end |
Instance Attribute Details
#args ⇒ AWSCDK::CloudAssemblySchema::DestroyOptions? (readonly)
Default: - only default args are used
Additional arguments to pass to the command This can be used to test specific CLI functionality.
41 42 43 |
# File 'cloud_assembly_schema/destroy_command.rb', line 41 def args @args end |
#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.
26 27 28 |
# File 'cloud_assembly_schema/destroy_command.rb', line 26 def enabled @enabled end |
#expect_error ⇒ Boolean? (readonly)
Default: false
If the runner should expect this command to fail.
36 37 38 |
# File 'cloud_assembly_schema/destroy_command.rb', line 36 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.
31 32 33 |
# File 'cloud_assembly_schema/destroy_command.rb', line 31 def @expected_message end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'cloud_assembly_schema/destroy_command.rb', line 43 def self.jsii_properties { :enabled => "enabled", :expected_message => "expectedMessage", :expect_error => "expectError", :args => "args", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'cloud_assembly_schema/destroy_command.rb', line 52 def to_jsii result = {} result.merge!(super) result.merge!({ "enabled" => @enabled, "expectedMessage" => @expected_message, "expectError" => @expect_error, "args" => @args, }) result.compact end |