Class: AWSCDK::Pipelines::S3SourceOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipelines/s3_source_options.rb

Overview

Options for S3 sources.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_name: nil, role: nil, trigger: nil) ⇒ S3SourceOptions

Returns a new instance of S3SourceOptions.

Parameters:

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

    The action name used for this source in the CodePipeline.

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

    The role that will be assumed by the pipeline prior to executing the S3Source action.

  • trigger (AWSCDK::CodePipelineActions::S3Trigger, nil) (defaults to: nil)

    How should CodePipeline detect source changes for this Action.



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

def initialize(action_name: nil, role: nil, trigger: nil)
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName") unless @action_name.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @trigger = trigger
  Jsii::Type.check_type(@trigger, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuUzNUcmlnZ2VyIn0=")), "trigger") unless @trigger.nil?
end

Instance Attribute Details

#action_nameString? (readonly)

Note:

Default: - The bucket name

The action name used for this source in the CodePipeline.

Returns:

  • (String, nil)


23
24
25
# File 'pipelines/s3_source_options.rb', line 23

def action_name
  @action_name
end

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

Note:

Default: - a new role will be generated

The role that will be assumed by the pipeline prior to executing the S3Source action.

Returns:



28
29
30
# File 'pipelines/s3_source_options.rb', line 28

def role
  @role
end

#triggerAWSCDK::CodePipelineActions::S3Trigger? (readonly)

Note:

Default: S3Trigger.POLL

How should CodePipeline detect source changes for this Action.

Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail, as otherwise the CloudWatch Events will not be emitted.



37
38
39
# File 'pipelines/s3_source_options.rb', line 37

def trigger
  @trigger
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'pipelines/s3_source_options.rb', line 39

def self.jsii_properties
  {
    :action_name => "actionName",
    :role => "role",
    :trigger => "trigger",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'pipelines/s3_source_options.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "actionName" => @action_name,
    "role" => @role,
    "trigger" => @trigger,
  })
  result.compact
end