1 | import * as s3 from '@aws-cdk/aws-s3';
|
2 |
|
3 |
|
4 |
|
5 | export declare class Artifact {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | static artifact(name: string): Artifact;
|
13 | private _artifactName?;
|
14 | private readonly metadata;
|
15 | constructor(artifactName?: string);
|
16 | get artifactName(): string | undefined;
|
17 | /**
|
18 | * Returns an ArtifactPath for a file within this artifact.
|
19 | * CfnOutput is in the form "<artifact-name>::<file-name>"
|
20 | * @param fileName The name of the file
|
21 | */
|
22 | atPath(fileName: string): ArtifactPath;
|
23 | /**
|
24 | * The artifact attribute for the name of the S3 bucket where the artifact is stored.
|
25 | */
|
26 | get bucketName(): string;
|
27 | /**
|
28 | * The artifact attribute for The name of the .zip file that contains the artifact that is
|
29 | * generated by AWS CodePipeline, such as 1ABCyZZ.zip.
|
30 | */
|
31 | get objectKey(): string;
|
32 | /**
|
33 | * The artifact attribute of the Amazon Simple Storage Service (Amazon S3) URL of the artifact,
|
34 | * such as https://s3-us-west-2.amazonaws.com/artifactstorebucket-yivczw8jma0c/test/TemplateSo/1ABCyZZ.zip.
|
35 | */
|
36 | get url(): string;
|
37 | /**
|
38 | * Returns a token for a value inside a JSON file within this artifact.
|
39 | * @param jsonFile The JSON file name.
|
40 | * @param keyName The hash key.
|
41 | */
|
42 | getParam(jsonFile: string, keyName: string): string;
|
43 | /**
|
44 | * Returns the location of the .zip file in S3 that this Artifact represents.
|
45 | * Used by Lambda's `CfnParametersCode` when being deployed in a CodePipeline.
|
46 | */
|
47 | get s3Location(): s3.Location;
|
48 | /**
|
49 | * Add arbitrary extra payload to the artifact under a given key.
|
50 | * This can be used by CodePipeline actions to communicate data between themselves.
|
51 | * If metadata was already present under the given key,
|
52 | * it will be overwritten with the new value.
|
53 | */
|
54 | setMetadata(key: string, value: any): void;
|
55 | /**
|
56 | * Retrieve the metadata stored in this artifact under the given key.
|
57 | * If there is no metadata stored under the given key,
|
58 | * null will be returned.
|
59 | */
|
60 | getMetadata(key: string): any;
|
61 | toString(): string | undefined;
|
62 | /** @internal */
|
63 | protected _setName(name: string): void;
|
64 | }
|
65 | /**
|
66 | * A specific file within an output artifact.
|
67 | *
|
68 | * The most common use case for this is specifying the template file
|
69 | * for a CloudFormation action.
|
70 | */
|
71 | export declare class ArtifactPath {
|
72 | readonly artifact: Artifact;
|
73 | readonly fileName: string;
|
74 | static artifactPath(artifactName: string, fileName: string): ArtifactPath;
|
75 | constructor(artifact: Artifact, fileName: string);
|
76 | get location(): string;
|
77 | }
|