Class: AWSCDK::Pipelines::ConnectionSourceOptions

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

Overview

Configuration options for CodeStar source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection_arn:, action_name: nil, code_build_clone_output: nil, trigger_on_push: nil) ⇒ ConnectionSourceOptions

Returns a new instance of ConnectionSourceOptions.

Parameters:

  • connection_arn (String)

    The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository.

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

    The action name used for this source in the CodePipeline.

  • code_build_clone_output (Boolean, nil) (defaults to: nil)

    If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files).

  • trigger_on_push (Boolean, nil) (defaults to: nil)

    Controls automatically starting your pipeline when a new commit is made on the configured repository and branch.



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

def initialize(connection_arn:, action_name: nil, code_build_clone_output: nil, trigger_on_push: nil)
  @connection_arn = connection_arn
  Jsii::Type.check_type(@connection_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionArn")
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName") unless @action_name.nil?
  @code_build_clone_output = code_build_clone_output
  Jsii::Type.check_type(@code_build_clone_output, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "codeBuildCloneOutput") unless @code_build_clone_output.nil?
  @trigger_on_push = trigger_on_push
  Jsii::Type.check_type(@trigger_on_push, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "triggerOnPush") unless @trigger_on_push.nil?
end

Instance Attribute Details

#action_nameString? (readonly)

Note:

Default: - The repository string

The action name used for this source in the CodePipeline.

Returns:

  • (String, nil)


33
34
35
# File 'pipelines/connection_source_options.rb', line 33

def action_name
  @action_name
end

#code_build_clone_outputBoolean? (readonly)

Note:

Default: false

If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files).

This provides access to repository history, and retains symlinks (symlinks would otherwise be removed by CodePipeline).

Note: if this option is true, only CodeBuild jobs can use the output artifact.



44
45
46
# File 'pipelines/connection_source_options.rb', line 44

def code_build_clone_output
  @code_build_clone_output
end

#connection_arnString (readonly)

The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository.

Examples:

"arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"

Returns:

  • (String)

See Also:



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

def connection_arn
  @connection_arn
end

#trigger_on_pushBoolean? (readonly)

Note:

Default: true

Controls automatically starting your pipeline when a new commit is made on the configured repository and branch.

If unspecified, the default value is true, and the field does not display by default.



53
54
55
# File 'pipelines/connection_source_options.rb', line 53

def trigger_on_push
  @trigger_on_push
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
# File 'pipelines/connection_source_options.rb', line 55

def self.jsii_properties
  {
    :connection_arn => "connectionArn",
    :action_name => "actionName",
    :code_build_clone_output => "codeBuildCloneOutput",
    :trigger_on_push => "triggerOnPush",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
# File 'pipelines/connection_source_options.rb', line 64

def to_jsii
  result = {}
  result.merge!({
    "connectionArn" => @connection_arn,
    "actionName" => @action_name,
    "codeBuildCloneOutput" => @code_build_clone_output,
    "triggerOnPush" => @trigger_on_push,
  })
  result.compact
end