Class: AWSCDK::CodePipelineActions::ManualApprovalActionProps

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

Overview

Construction properties of the ManualApprovalAction.

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, additional_information: nil, external_entity_link: nil, notification_topic: nil, notify_emails: nil, timeout: nil) ⇒ ManualApprovalActionProps

Returns a new instance of ManualApprovalActionProps.

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.

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

    Any additional information that you want to include in the notification email message.

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

    URL you want to provide to the reviewer as part of the approval request.

  • notification_topic (AWSCDK::SNS::ITopic, nil) (defaults to: nil)

    Optional SNS topic to send notifications to when an approval is pending.

  • notify_emails (Array<String>, nil) (defaults to: nil)

    A list of email addresses to subscribe to notifications when this Action is pending approval.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    A timeout duration.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 16

def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, additional_information: nil, external_entity_link: nil, notification_topic: nil, notify_emails: nil, timeout: nil)
  @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?
  @additional_information = additional_information
  Jsii::Type.check_type(@additional_information, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "additionalInformation") unless @additional_information.nil?
  @external_entity_link = external_entity_link
  Jsii::Type.check_type(@external_entity_link, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "externalEntityLink") unless @external_entity_link.nil?
  @notification_topic = notification_topic
  Jsii::Type.check_type(@notification_topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "notificationTopic") unless @notification_topic.nil?
  @notify_emails = notify_emails
  Jsii::Type.check_type(@notify_emails, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notifyEmails") unless @notify_emails.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
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)


42
43
44
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 42

def action_name
  @action_name
end

#additional_informationString? (readonly)

Any additional information that you want to include in the notification email message.

Returns:

  • (String, nil)


70
71
72
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 70

def additional_information
  @additional_information
end
Note:

Default: - the approval request will not have an external link

URL you want to provide to the reviewer as part of the approval request.

Returns:

  • (String, nil)


75
76
77
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 75

def external_entity_link
  @external_entity_link
end

#notification_topicAWSCDK::SNS::ITopic? (readonly)

Optional SNS topic to send notifications to when an approval is pending.

Returns:



79
80
81
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 79

def notification_topic
  @notification_topic
end

#notify_emailsArray<String>? (readonly)

A list of email addresses to subscribe to notifications when this Action is pending approval.

If this has been provided, but not notification_topic, a new Topic will be created.

Returns:

  • (Array<String>, nil)


86
87
88
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 86

def notify_emails
  @notify_emails
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:



66
67
68
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 66

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.



50
51
52
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 50

def run_order
  @run_order
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: - 10080 minutes (7 days)

A timeout duration.

It is configurable up to 86400 minutes (60 days) with a minimum value of 5 minutes.



94
95
96
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 94

def timeout
  @timeout
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)


55
56
57
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 55

def variables_namespace
  @variables_namespace
end

Class Method Details

.jsii_propertiesObject



96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 96

def self.jsii_properties
  {
    :action_name => "actionName",
    :run_order => "runOrder",
    :variables_namespace => "variablesNamespace",
    :role => "role",
    :additional_information => "additionalInformation",
    :external_entity_link => "externalEntityLink",
    :notification_topic => "notificationTopic",
    :notify_emails => "notifyEmails",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'code_pipeline_actions/manual_approval_action_props.rb', line 110

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "actionName" => @action_name,
    "runOrder" => @run_order,
    "variablesNamespace" => @variables_namespace,
    "role" => @role,
    "additionalInformation" => @additional_information,
    "externalEntityLink" => @external_entity_link,
    "notificationTopic" => @notification_topic,
    "notifyEmails" => @notify_emails,
    "timeout" => @timeout,
  })
  result.compact
end