Class: AWSCDK::Codepipeline::Artifact
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Codepipeline::Artifact
- Defined in:
- codepipeline/artifact.rb
Overview
An output artifact of an action.
Artifacts can be used as input by some actions.
Class Method Summary collapse
-
.artifact(name, files = nil) ⇒ AWSCDK::Codepipeline::Artifact
A static factory method used to create instances of the Artifact class.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#artifact_files ⇒ Array<String>?
The file paths that you want to export as the output artifact for the action.
- #artifact_name ⇒ String?
-
#at_path(file_name) ⇒ AWSCDK::Codepipeline::ArtifactPath
Returns an ArtifactPath for a file within this artifact.
-
#bucket_name ⇒ String
The artifact attribute for the name of the S3 bucket where the artifact is stored.
-
#get_metadata(key) ⇒ Object
Retrieve the metadata stored in this artifact under the given key.
-
#get_param(json_file, key_name) ⇒ String
Returns a token for a value inside a JSON file within this artifact.
-
#initialize(artifact_name = nil, artifact_files = nil) ⇒ Artifact
constructor
An output artifact of an action.
-
#object_key ⇒ String
The artifact attribute for The name of the .zip file that contains the artifact that is generated by AWS CodePipeline, such as 1ABCyZZ.zip.
-
#s3_location ⇒ AWSCDK::S3::Location
Returns the location of the .zip file in S3 that this Artifact represents.
-
#set_metadata(key, value) ⇒ void
Add arbitrary extra payload to the artifact under a given key.
- #to_string ⇒ String?
-
#url ⇒ String
The artifact attribute of the Amazon Simple Storage Service (Amazon S3) URL of the artifact, such as https://s3-us-west-2.amazonaws.com/artifactstorebucket-yivczw8jma0c/test/TemplateSo/1ABCyZZ.zip.
Constructor Details
#initialize(artifact_name = nil, artifact_files = nil) ⇒ Artifact
An output artifact of an action.
Artifacts can be used as input by some actions.
16 17 18 19 20 |
# File 'codepipeline/artifact.rb', line 16 def initialize(artifact_name = nil, artifact_files = nil) Jsii::Type.check_type(artifact_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "artifactName") unless artifact_name.nil? Jsii::Type.check_type(artifact_files, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "artifactFiles") unless artifact_files.nil? Jsii::Object.instance_method(:initialize).bind(self).call(artifact_name, artifact_files) end |
Class Method Details
.artifact(name, files = nil) ⇒ AWSCDK::Codepipeline::Artifact
A static factory method used to create instances of the Artifact class.
Mainly meant to be used from decdk.
45 46 47 48 49 |
# File 'codepipeline/artifact.rb', line 45 def self.artifact(name, files = nil) Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Type.check_type(files, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "files") unless files.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline.Artifact", "artifact", [name, files]) end |
.jsii_overridable_methods ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'codepipeline/artifact.rb', line 22 def self.jsii_overridable_methods { :bucket_name => { kind: :property, name: "bucketName", is_optional: false }, :object_key => { kind: :property, name: "objectKey", is_optional: false }, :s3_location => { kind: :property, name: "s3Location", is_optional: false }, :url => { kind: :property, name: "url", is_optional: false }, :artifact_files => { kind: :property, name: "artifactFiles", is_optional: true }, :artifact_name => { kind: :property, name: "artifactName", is_optional: true }, :at_path => { kind: :method, name: "atPath", is_optional: false }, :get_metadata => { kind: :method, name: "getMetadata", is_optional: false }, :get_param => { kind: :method, name: "getParam", is_optional: false }, :set_metadata => { kind: :method, name: "setMetadata", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, } end |
Instance Method Details
#artifact_files ⇒ Array<String>?
The file paths that you want to export as the output artifact for the action.
This property can only be used in artifacts for CommandsAction.
84 85 86 |
# File 'codepipeline/artifact.rb', line 84 def artifact_files() jsii_get_property("artifactFiles") end |
#artifact_name ⇒ String?
89 90 91 |
# File 'codepipeline/artifact.rb', line 89 def artifact_name() jsii_get_property("artifactName") end |
#at_path(file_name) ⇒ AWSCDK::Codepipeline::ArtifactPath
Returns an ArtifactPath for a file within this artifact.
CfnOutput is in the form "
99 100 101 102 |
# File 'codepipeline/artifact.rb', line 99 def at_path(file_name) Jsii::Type.check_type(file_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fileName") jsii_call_method("atPath", [file_name]) end |
#bucket_name ⇒ String
The artifact attribute for the name of the S3 bucket where the artifact is stored.
54 55 56 |
# File 'codepipeline/artifact.rb', line 54 def bucket_name() jsii_get_property("bucketName") end |
#get_metadata(key) ⇒ Object
Retrieve the metadata stored in this artifact under the given key.
If there is no metadata stored under the given key, null will be returned.
111 112 113 114 |
# File 'codepipeline/artifact.rb', line 111 def (key) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") jsii_call_method("getMetadata", [key]) end |
#get_param(json_file, key_name) ⇒ String
Returns a token for a value inside a JSON file within this artifact.
121 122 123 124 125 |
# File 'codepipeline/artifact.rb', line 121 def get_param(json_file, key_name) Jsii::Type.check_type(json_file, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jsonFile") Jsii::Type.check_type(key_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyName") jsii_call_method("getParam", [json_file, key_name]) end |
#object_key ⇒ String
The artifact attribute for The name of the .zip file that contains the artifact that is generated by AWS CodePipeline, such as 1ABCyZZ.zip.
61 62 63 |
# File 'codepipeline/artifact.rb', line 61 def object_key() jsii_get_property("objectKey") end |
#s3_location ⇒ AWSCDK::S3::Location
Returns the location of the .zip file in S3 that this Artifact represents. Used by Lambda's CfnParametersCode when being deployed in a CodePipeline.
68 69 70 |
# File 'codepipeline/artifact.rb', line 68 def s3_location() jsii_get_property("s3Location") end |
#set_metadata(key, value) ⇒ void
This method returns an undefined value.
Add arbitrary extra payload to the artifact under a given key.
This can be used by CodePipeline actions to communicate data between themselves. If metadata was already present under the given key, it will be overwritten with the new value.
136 137 138 139 140 |
# File 'codepipeline/artifact.rb', line 136 def (key, value) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_call_method("setMetadata", [key, value]) end |
#to_string ⇒ String?
143 144 145 |
# File 'codepipeline/artifact.rb', line 143 def to_string() jsii_call_method("toString", []) end |
#url ⇒ String
The artifact attribute of the Amazon Simple Storage Service (Amazon S3) URL of the artifact, such as https://s3-us-west-2.amazonaws.com/artifactstorebucket-yivczw8jma0c/test/TemplateSo/1ABCyZZ.zip.
75 76 77 |
# File 'codepipeline/artifact.rb', line 75 def url() jsii_get_property("url") end |