Class: AWSCDK::Codecommit::RepositoryTriggerOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codecommit/repository_trigger_options.rb

Overview

Creates for a repository trigger to an SNS topic or Lambda function.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branches: nil, custom_data: nil, events: nil, name: nil) ⇒ RepositoryTriggerOptions

Returns a new instance of RepositoryTriggerOptions.

Parameters:

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

    The names of the branches in the AWS CodeCommit repository that contain events that you want to include in the trigger.

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

    When an event is triggered, additional information that AWS CodeCommit includes when it sends information to the target.

  • events (Array<AWSCDK::Codecommit::RepositoryEventTrigger>, nil) (defaults to: nil)

    The repository events for which AWS CodeCommit sends information to the target, which you specified in the DestinationArn property.If you don't specify events, the trigger runs for all repository events.

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

    A name for the trigger.Triggers on a repository must have unique names.



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

def initialize(branches: nil, custom_data: nil, events: nil, name: nil)
  @branches = branches
  Jsii::Type.check_type(@branches, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "branches") unless @branches.nil?
  @custom_data = custom_data
  Jsii::Type.check_type(@custom_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customData") unless @custom_data.nil?
  @events = events
  Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlY29tbWl0LlJlcG9zaXRvcnlFdmVudFRyaWdnZXIifSwia2luZCI6ImFycmF5In19")), "events") unless @events.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#branchesArray<String>? (readonly)

The names of the branches in the AWS CodeCommit repository that contain events that you want to include in the trigger.

If you don't specify at least one branch, the trigger applies to all branches.

Returns:

  • (Array<String>, nil)


28
29
30
# File 'codecommit/repository_trigger_options.rb', line 28

def branches
  @branches
end

#custom_dataString? (readonly)

When an event is triggered, additional information that AWS CodeCommit includes when it sends information to the target.

Returns:

  • (String, nil)


32
33
34
# File 'codecommit/repository_trigger_options.rb', line 32

def custom_data
  @custom_data
end

#eventsArray<AWSCDK::Codecommit::RepositoryEventTrigger>? (readonly)

The repository events for which AWS CodeCommit sends information to the target, which you specified in the DestinationArn property.If you don't specify events, the trigger runs for all repository events.



36
37
38
# File 'codecommit/repository_trigger_options.rb', line 36

def events
  @events
end

#nameString? (readonly)

A name for the trigger.Triggers on a repository must have unique names.

Returns:

  • (String, nil)


40
41
42
# File 'codecommit/repository_trigger_options.rb', line 40

def name
  @name
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'codecommit/repository_trigger_options.rb', line 42

def self.jsii_properties
  {
    :branches => "branches",
    :custom_data => "customData",
    :events => "events",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'codecommit/repository_trigger_options.rb', line 51

def to_jsii
  result = {}
  result.merge!({
    "branches" => @branches,
    "customData" => @custom_data,
    "events" => @events,
    "name" => @name,
  })
  result.compact
end