Class Artifact
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codepipeline.Artifact
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:12.190Z")
@Stability(Stable)
public class Artifact
extends software.amazon.jsii.JsiiObject
An output artifact of an action.
Artifacts can be used as input by some actions.
Example:
// later: PipelineProject project; LambdaInvokeAction lambdaInvokeAction = LambdaInvokeAction.Builder.create() .actionName("Lambda") .lambda(Function.Builder.create(this, "Func") .runtime(Runtime.NODEJS_LATEST) .handler("index.handler") .code(Code.fromInline("\n const { CodePipeline } = require('@aws-sdk/client-codepipeline');\n\n exports.handler = async function(event, context) {\n const codepipeline = new AWS.CodePipeline();\n await codepipeline.putJobSuccessResult({\n jobId: event['CodePipeline.job'].id,\n outputVariables: {\n MY_VAR: \"some value\",\n },\n });\n }\n ")) .build()) .variablesNamespace("MyNamespace") .build(); Artifact sourceOutput = new Artifact(); CodeBuildAction.Builder.create() .actionName("CodeBuild") .project(project) .input(sourceOutput) .environmentVariables(Map.of( "MyVar", BuildEnvironmentVariable.builder() .value(lambdaInvokeAction.variable("MY_VAR")) .build())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Artifact
A static factory method used to create instances of the Artifact class.Returns an ArtifactPath for a file within this artifact.The artifact attribute for the name of the S3 bucket where the artifact is stored.getMetadata
(String key) Retrieve the metadata stored in this artifact under the given 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.Returns a token for a value inside a JSON file within this artifact.Returns the location of the .zip file in S3 that this Artifact represents.getUrl()
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.void
setMetadata
(String key, Object value) Add arbitrary extra payload to the artifact under a given key.toString()
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Artifact
protected Artifact(software.amazon.jsii.JsiiObjectRef objRef) -
Artifact
protected Artifact(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Artifact
- Parameters:
artifactName
-
-
Artifact
@Stability(Stable) public Artifact()
-
-
Method Details
-
artifact
A static factory method used to create instances of the Artifact class.Mainly meant to be used from
decdk
.- Parameters:
name
- the (required) name of the Artifact. This parameter is required.
-
atPath
Returns an ArtifactPath for a file within this artifact.CfnOutput is in the form "invalid input: '<'artifact-name>::invalid input: '<'file-name>"
- Parameters:
fileName
- The name of the file. This parameter is required.
-
getMetadata
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
- This parameter is required.
-
getParam
@Stability(Stable) @NotNull public String getParam(@NotNull String jsonFile, @NotNull String keyName) Returns a token for a value inside a JSON file within this artifact.- Parameters:
jsonFile
- The JSON file name. This parameter is required.keyName
- The hash key. This parameter is required.
-
setMetadata
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
- This parameter is required.value
- This parameter is required.
-
toString
-
getBucketName
The artifact attribute for the name of the S3 bucket where the artifact is stored. -
getObjectKey
The artifact attribute for The name of the .zip file that contains the artifact that is generated by AWS CodePipeline, such as 1ABCyZZ.zip. -
getS3Location
Returns the location of the .zip file in S3 that this Artifact represents. Used by Lambda'sCfnParametersCode
when being deployed in a CodePipeline. -
getUrl
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. -
getArtifactName
-