Class: AWSCDK::EventsTargets::CodePipelineTargetOptions

Inherits:
TargetBaseProps
  • Object
show all
Defined in:
events_targets/code_pipeline_target_options.rb

Overview

Customization options when creating a CodePipeline event target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, event_role: nil) ⇒ CodePipelineTargetOptions

Returns a new instance of CodePipelineTargetOptions.

Parameters:

  • dead_letter_queue (AWSCDK::SQS::IQueue, nil) (defaults to: nil)

    The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.

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

    The maximum age of a request that Lambda sends to a function for processing.

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

    The maximum number of times to retry when the function returns an error.

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

    The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.



11
12
13
14
15
16
17
18
19
20
# File 'events_targets/code_pipeline_target_options.rb', line 11

def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, event_role: nil)
  @dead_letter_queue = dead_letter_queue
  Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil?
  @max_event_age = max_event_age
  Jsii::Type.check_type(@max_event_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxEventAge") unless @max_event_age.nil?
  @retry_attempts = retry_attempts
  Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil?
  @event_role = event_role
  Jsii::Type.check_type(@event_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "eventRole") unless @event_role.nil?
end

Instance Attribute Details

#dead_letter_queueAWSCDK::SQS::IQueue? (readonly)

Note:

Default: - no dead-letter queue

The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.

The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.

Returns:



30
31
32
# File 'events_targets/code_pipeline_target_options.rb', line 30

def dead_letter_queue
  @dead_letter_queue
end

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

Note:

Default: - a new role will be created

The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.

Returns:



51
52
53
# File 'events_targets/code_pipeline_target_options.rb', line 51

def event_role
  @event_role
end

#max_event_ageAWSCDK::Duration? (readonly)

Note:

Default: Duration.hours(24)

The maximum age of a request that Lambda sends to a function for processing.

Minimum value of 60. Maximum value of 86400.

Returns:



38
39
40
# File 'events_targets/code_pipeline_target_options.rb', line 38

def max_event_age
  @max_event_age
end

#retry_attemptsNumeric? (readonly)

Note:

Default: 185

The maximum number of times to retry when the function returns an error.

Minimum value of 0. Maximum value of 185.

Returns:

  • (Numeric, nil)


46
47
48
# File 'events_targets/code_pipeline_target_options.rb', line 46

def retry_attempts
  @retry_attempts
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
# File 'events_targets/code_pipeline_target_options.rb', line 53

def self.jsii_properties
  {
    :dead_letter_queue => "deadLetterQueue",
    :max_event_age => "maxEventAge",
    :retry_attempts => "retryAttempts",
    :event_role => "eventRole",
  }
end

Instance Method Details

#to_jsiiObject



62
63
64
65
66
67
68
69
70
71
72
# File 'events_targets/code_pipeline_target_options.rb', line 62

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "deadLetterQueue" => @dead_letter_queue,
    "maxEventAge" => @max_event_age,
    "retryAttempts" => @retry_attempts,
    "eventRole" => @event_role,
  })
  result.compact
end