Class: AWSCDK::CloudAssemblySchema::Hooks
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudAssemblySchema::Hooks
- Defined in:
- cloud_assembly_schema/hooks.rb
Overview
Commands to run at predefined points during the integration test workflow.
Instance Attribute Summary collapse
-
#post_deploy ⇒ Array<String>?
readonly
Commands to run prior after deploying the cdk stacks in the integration test.
-
#post_destroy ⇒ Array<String>?
readonly
Commands to run after destroying the cdk stacks in the integration test.
-
#pre_deploy ⇒ Array<String>?
readonly
Commands to run prior to deploying the cdk stacks in the integration test.
-
#pre_destroy ⇒ Array<String>?
readonly
Commands to run prior to destroying the cdk stacks in the integration test.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(post_deploy: nil, post_destroy: nil, pre_deploy: nil, pre_destroy: nil) ⇒ Hooks
constructor
A new instance of Hooks.
- #to_jsii ⇒ Object
Constructor Details
#initialize(post_deploy: nil, post_destroy: nil, pre_deploy: nil, pre_destroy: nil) ⇒ Hooks
Returns a new instance of Hooks.
11 12 13 14 15 16 17 18 19 20 |
# File 'cloud_assembly_schema/hooks.rb', line 11 def initialize(post_deploy: nil, post_destroy: nil, pre_deploy: nil, pre_destroy: nil) @post_deploy = post_deploy Jsii::Type.check_type(@post_deploy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "postDeploy") unless @post_deploy.nil? @post_destroy = post_destroy Jsii::Type.check_type(@post_destroy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "postDestroy") unless @post_destroy.nil? @pre_deploy = pre_deploy Jsii::Type.check_type(@pre_deploy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "preDeploy") unless @pre_deploy.nil? @pre_destroy = pre_destroy Jsii::Type.check_type(@pre_destroy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "preDestroy") unless @pre_destroy.nil? end |
Instance Attribute Details
#post_deploy ⇒ Array<String>? (readonly)
Default: - no commands
Commands to run prior after deploying the cdk stacks in the integration test.
26 27 28 |
# File 'cloud_assembly_schema/hooks.rb', line 26 def post_deploy @post_deploy end |
#post_destroy ⇒ Array<String>? (readonly)
Default: - no commands
Commands to run after destroying the cdk stacks in the integration test.
31 32 33 |
# File 'cloud_assembly_schema/hooks.rb', line 31 def post_destroy @post_destroy end |
#pre_deploy ⇒ Array<String>? (readonly)
Default: - no commands
Commands to run prior to deploying the cdk stacks in the integration test.
36 37 38 |
# File 'cloud_assembly_schema/hooks.rb', line 36 def pre_deploy @pre_deploy end |
#pre_destroy ⇒ Array<String>? (readonly)
Default: - no commands
Commands to run prior to destroying the cdk stacks in the integration test.
41 42 43 |
# File 'cloud_assembly_schema/hooks.rb', line 41 def pre_destroy @pre_destroy end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'cloud_assembly_schema/hooks.rb', line 43 def self.jsii_properties { :post_deploy => "postDeploy", :post_destroy => "postDestroy", :pre_deploy => "preDeploy", :pre_destroy => "preDestroy", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'cloud_assembly_schema/hooks.rb', line 52 def to_jsii result = {} result.merge!({ "postDeploy" => @post_deploy, "postDestroy" => @post_destroy, "preDeploy" => @pre_deploy, "preDestroy" => @pre_destroy, }) result.compact end |