Class: AWSCDK::CodePipelineActions::EC2DeploySpecificationsInlineProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_pipeline_actions/ec2_deploy_specifications_inline_props.rb

Overview

Properties of Ec2DeploySpecifications.inline().

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(post_script:, target_directory:, pre_script: nil) ⇒ EC2DeploySpecificationsInlineProps

Returns a new instance of EC2DeploySpecificationsInlineProps.

Parameters:

  • post_script (String)

    Path to the executable script file that runs AFTER the Deploy phase.

  • target_directory (String)

    The location of the target directory you want to deploy to.

  • pre_script (String, nil) (defaults to: nil)

    Path to the executable script file that runs BEFORE the Deploy phase.



10
11
12
13
14
15
16
17
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 10

def initialize(post_script:, target_directory:, pre_script: nil)
  @post_script = post_script
  Jsii::Type.check_type(@post_script, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "postScript")
  @target_directory = target_directory
  Jsii::Type.check_type(@target_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetDirectory")
  @pre_script = pre_script
  Jsii::Type.check_type(@pre_script, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preScript") unless @pre_script.nil?
end

Instance Attribute Details

#post_scriptString (readonly)

Path to the executable script file that runs AFTER the Deploy phase.

It should start from the root directory of your uploaded source artifact. Use an absolute path like uploadDir/postScript.sh.

Returns:

  • (String)


25
26
27
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 25

def post_script
  @post_script
end

#pre_scriptString? (readonly)

Note:

Default: - No script

Path to the executable script file that runs BEFORE the Deploy phase.

It should start from the root directory of your uploaded source artifact. Use an absolute path like uploadDir/preScript.sh.

Returns:

  • (String, nil)


39
40
41
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 39

def pre_script
  @pre_script
end

#target_directoryString (readonly)

The location of the target directory you want to deploy to.

Use an absolute path like /home/ec2-user/deploy.

Returns:

  • (String)


31
32
33
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 31

def target_directory
  @target_directory
end

Class Method Details

.jsii_propertiesObject



41
42
43
44
45
46
47
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 41

def self.jsii_properties
  {
    :post_script => "postScript",
    :target_directory => "targetDirectory",
    :pre_script => "preScript",
  }
end

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
# File 'code_pipeline_actions/ec2_deploy_specifications_inline_props.rb', line 49

def to_jsii
  result = {}
  result.merge!({
    "postScript" => @post_script,
    "targetDirectory" => @target_directory,
    "preScript" => @pre_script,
  })
  result.compact
end