Class: AWSCDK::CodeBuild::CfnProject::ProjectSourceVersionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/cfn_project.rb

Overview

A source identifier and its corresponding version.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_identifier:, source_version: nil) ⇒ ProjectSourceVersionProperty

Returns a new instance of ProjectSourceVersionProperty.

Parameters:

  • source_identifier (String)

    An identifier for a source in the build project.

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

    The source version for the corresponding source identifier. If specified, must be one of:.



1846
1847
1848
1849
1850
1851
# File 'code_build/cfn_project.rb', line 1846

def initialize(source_identifier:, source_version: nil)
  @source_identifier = source_identifier
  Jsii::Type.check_type(@source_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceIdentifier")
  @source_version = source_version
  Jsii::Type.check_type(@source_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceVersion") unless @source_version.nil?
end

Instance Attribute Details

#source_identifierString (readonly)

An identifier for a source in the build project.

The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.



1859
1860
1861
# File 'code_build/cfn_project.rb', line 1859

def source_identifier
  @source_identifier
end

#source_versionString? (readonly)

The source version for the corresponding source identifier. If specified, must be one of:.

  • For CodeCommit: the commit ID, branch, or Git tag to use.
  • For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example, pr/25 ). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
  • For GitLab: the commit ID, branch, or Git tag to use.
  • For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
  • For Amazon S3: the version ID of the object that represents the build input ZIP file to use.

For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .



1872
1873
1874
# File 'code_build/cfn_project.rb', line 1872

def source_version
  @source_version
end

Class Method Details

.jsii_propertiesObject



1874
1875
1876
1877
1878
1879
# File 'code_build/cfn_project.rb', line 1874

def self.jsii_properties
  {
    :source_identifier => "sourceIdentifier",
    :source_version => "sourceVersion",
  }
end

Instance Method Details

#to_jsiiObject



1881
1882
1883
1884
1885
1886
1887
1888
# File 'code_build/cfn_project.rb', line 1881

def to_jsii
  result = {}
  result.merge!({
    "sourceIdentifier" => @source_identifier,
    "sourceVersion" => @source_version,
  })
  result.compact
end