Class: AWSCDK::CodePipelineActions::CodeDeployServerDeployActionProps

Inherits:
AWSCDK::Codepipeline::CommonAWSActionProps
  • Object
show all
Defined in:
code_pipeline_actions/code_deploy_server_deploy_action_props.rb

Overview

Construction properties of the CodeDeployServerDeployAction CodeDeploy server deploy CodePipeline Action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, deployment_group:, input:) ⇒ CodeDeployServerDeployActionProps

Returns a new instance of CodeDeployServerDeployActionProps.

Parameters:

  • action_name (String)

    The physical, human-readable name of the Action.

  • run_order (Numeric, nil) (defaults to: nil)

    The runOrder property for this Action.

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

    The name of the namespace to use for variables emitted by this action.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The Role in which context's this Action will be executing in.

  • deployment_group (AWSCDK::CodeDeploy::IServerDeploymentGroup)

    The CodeDeploy server Deployment Group to deploy to.

  • input (AWSCDK::Codepipeline::Artifact)

    The source to use as input for deployment.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 13

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, deployment_group:, input:)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
  @run_order = run_order
  Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil?
  @variables_namespace = variables_namespace
  Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @deployment_group = deployment_group
  Jsii::Type.check_type(@deployment_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5JU2VydmVyRGVwbG95bWVudEdyb3VwIn0=")), "deploymentGroup")
  @input = input
  Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFydGlmYWN0In0=")), "input")
end

Instance Attribute Details

#action_nameString (readonly)

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

Returns:

  • (String)


33
34
35
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 33

def action_name
  @action_name
end

#deployment_groupAWSCDK::CodeDeploy::IServerDeploymentGroup (readonly)

The CodeDeploy server Deployment Group to deploy to.



61
62
63
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 61

def deployment_group
  @deployment_group
end

#inputAWSCDK::Codepipeline::Artifact (readonly)

The source to use as input for deployment.



65
66
67
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 65

def input
  @input
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: a new Role will be generated

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

Returns:



57
58
59
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 57

def role
  @role
end

#run_orderNumeric? (readonly)

Note:

Default: 1

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.



41
42
43
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 41

def run_order
  @run_order
end

#variables_namespaceString? (readonly)

Note:

Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

The name of the namespace to use for variables emitted by this action.

Returns:

  • (String, nil)


46
47
48
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 46

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 67

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :deployment_group => "deploymentGroup",
    :input => "input",
  }
end

Instance Method Details

#to_jsiiObject



78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'code_pipeline_actions/code_deploy_server_deploy_action_props.rb', line 78

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "deploymentGroup" => @deployment_group,
    "input" => @input,
  })
  result.compact
end