Artifact

class aws_cdk.aws_codepipeline.Artifact(artifact_name=None)

Bases: object

An output artifact of an action.

Artifacts can be used as input by some actions.

Parameters

artifact_name (Optional[str]) –

Methods

at_path(file_name)

Returns an ArtifactPath for a file within this artifact.

CfnOutput is in the form “::”

Parameters

file_name (str) – The name of the file.

Return type

ArtifactPath

get_metadata(key)

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.

Parameters

key (str) –

Return type

Any

get_param(json_file, key_name)

Returns a token for a value inside a JSON file within this artifact.

Parameters
  • json_file (str) – The JSON file name.

  • key_name (str) – The hash key.

Return type

str

set_metadata(key, 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.

Parameters
  • key (str) –

  • value (Any) –

Return type

None

to_string()
Return type

Optional[str]

Attributes

artifact_name
Return type

Optional[str]

bucket_name

The artifact attribute for the name of the S3 bucket where the artifact is stored.

Return type

str

object_key

The artifact attribute for The name of the .zip file that contains the artifact that is generated by AWS CodePipeline, such as 1ABCyZZ.zip.

Return type

str

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.

Return type

Location

url

//s3-us-west-2.amazonaws.com/artifactstorebucket-yivczw8jma0c/test/TemplateSo/1ABCyZZ.zip.

Type

The artifact attribute of the Amazon Simple Storage Service (Amazon S3) URL of the artifact, such as https

Return type

str

Static Methods

classmethod artifact(name)

A static factory method used to create instances of the Artifact class.

Mainly meant to be used from decdk.

Parameters

name (str) – the (required) name of the Artifact.

Return type

Artifact