Class: AWSCDK::CodePipelineActions::ECRSourceVariables

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_pipeline_actions/ecr_source_variables.rb

Overview

The CodePipeline variables emitted by the ECR source Action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image_digest:, image_tag:, image_uri:, registry_id:, repository_name:) ⇒ ECRSourceVariables

Returns a new instance of ECRSourceVariables.

Parameters:

  • image_digest (String)

    The digest of the current image, in the form ':'.

  • image_tag (String)

    The Docker tag of the current image.

  • image_uri (String)

    The full ECR Docker URI of the current image.

  • registry_id (String)

    The identifier of the registry.

  • repository_name (String)

    The physical name of the repository that this action tracks.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'code_pipeline_actions/ecr_source_variables.rb', line 12

def initialize(image_digest:, image_tag:, image_uri:, registry_id:, repository_name:)
  @image_digest = image_digest
  Jsii::Type.check_type(@image_digest, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageDigest")
  @image_tag = image_tag
  Jsii::Type.check_type(@image_tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageTag")
  @image_uri = image_uri
  Jsii::Type.check_type(@image_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri")
  @registry_id = registry_id
  Jsii::Type.check_type(@registry_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "registryId")
  @repository_name = repository_name
  Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName")
end

Instance Attribute Details

#image_digestString (readonly)

The digest of the current image, in the form ':'.

Returns:

  • (String)


28
29
30
# File 'code_pipeline_actions/ecr_source_variables.rb', line 28

def image_digest
  @image_digest
end

#image_tagString (readonly)

The Docker tag of the current image.

Returns:

  • (String)


32
33
34
# File 'code_pipeline_actions/ecr_source_variables.rb', line 32

def image_tag
  @image_tag
end

#image_uriString (readonly)

The full ECR Docker URI of the current image.

Returns:

  • (String)


36
37
38
# File 'code_pipeline_actions/ecr_source_variables.rb', line 36

def image_uri
  @image_uri
end

#registry_idString (readonly)

The identifier of the registry.

In ECR, this is usually the ID of the AWS account owning it.

Returns:

  • (String)


42
43
44
# File 'code_pipeline_actions/ecr_source_variables.rb', line 42

def registry_id
  @registry_id
end

#repository_nameString (readonly)

The physical name of the repository that this action tracks.

Returns:

  • (String)


46
47
48
# File 'code_pipeline_actions/ecr_source_variables.rb', line 46

def repository_name
  @repository_name
end

Class Method Details

.jsii_propertiesObject



48
49
50
51
52
53
54
55
56
# File 'code_pipeline_actions/ecr_source_variables.rb', line 48

def self.jsii_properties
  {
    :image_digest => "imageDigest",
    :image_tag => "imageTag",
    :image_uri => "imageUri",
    :registry_id => "registryId",
    :repository_name => "repositoryName",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
68
# File 'code_pipeline_actions/ecr_source_variables.rb', line 58

def to_jsii
  result = {}
  result.merge!({
    "imageDigest" => @image_digest,
    "imageTag" => @image_tag,
    "imageUri" => @image_uri,
    "registryId" => @registry_id,
    "repositoryName" => @repository_name,
  })
  result.compact
end