/
AssetManifestArtifact.go
304 lines (272 loc) · 8.36 KB
/
AssetManifestArtifact.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
package cxapi
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/aws-cdk-go/awscdk/cloudassemblyschema"
)
// Asset manifest is a description of a set of assets which need to be built and published.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var cloudAssembly cloudAssembly
//
// assetManifestArtifact := awscdk.Cx_api.NewAssetManifestArtifact(cloudAssembly, jsii.String("name"), &ArtifactManifest{
// Type: awscdk.Cloud_assembly_schema.ArtifactType_NONE,
//
// // the properties below are optional
// Dependencies: []*string{
// jsii.String("dependencies"),
// },
// DisplayName: jsii.String("displayName"),
// Environment: jsii.String("environment"),
// Metadata: map[string][]metadataEntry{
// "metadataKey": []*metadataEntry{
// &metadataEntry{
// "type": jsii.String("type"),
//
// // the properties below are optional
// "data": jsii.String("data"),
// "trace": []*string{
// jsii.String("trace"),
// },
// },
// },
// },
// Properties: &AwsCloudFormationStackProperties{
// TemplateFile: jsii.String("templateFile"),
//
// // the properties below are optional
// AssumeRoleArn: jsii.String("assumeRoleArn"),
// AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
// BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
// CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
// LookupRole: &BootstrapRole{
// Arn: jsii.String("arn"),
//
// // the properties below are optional
// AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
// BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
// RequiresBootstrapStackVersion: jsii.Number(123),
// },
// Parameters: map[string]*string{
// "parametersKey": jsii.String("parameters"),
// },
// RequiresBootstrapStackVersion: jsii.Number(123),
// StackName: jsii.String("stackName"),
// StackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
// Tags: map[string]*string{
// "tagsKey": jsii.String("tags"),
// },
// TerminationProtection: jsii.Boolean(false),
// ValidateOnSynth: jsii.Boolean(false),
// },
// })
//
// Experimental.
type AssetManifestArtifact interface {
CloudArtifact
// Experimental.
Assembly() CloudAssembly
// Name of SSM parameter with bootstrap stack version.
// Experimental.
BootstrapStackVersionSsmParameter() *string
// Returns all the artifacts that this artifact depends on.
// Experimental.
Dependencies() *[]CloudArtifact
// The file name of the asset manifest.
// Experimental.
File() *string
// An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
//
// Defaults to the normal
// id. Should only be used in user interfaces.
// Experimental.
HierarchicalId() *string
// Experimental.
Id() *string
// The artifact's manifest.
// Experimental.
Manifest() *cloudassemblyschema.ArtifactManifest
// The set of messages extracted from the artifact's metadata.
// Experimental.
Messages() *[]*SynthesisMessage
// Version of bootstrap stack required to deploy this stack.
// Experimental.
RequiresBootstrapStackVersion() *float64
// Returns: all the metadata entries of a specific type in this artifact.
// Experimental.
FindMetadataByType(type_ *string) *[]*MetadataEntryResult
}
// The jsii proxy struct for AssetManifestArtifact
type jsiiProxy_AssetManifestArtifact struct {
jsiiProxy_CloudArtifact
}
func (j *jsiiProxy_AssetManifestArtifact) Assembly() CloudAssembly {
var returns CloudAssembly
_jsii_.Get(
j,
"assembly",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) BootstrapStackVersionSsmParameter() *string {
var returns *string
_jsii_.Get(
j,
"bootstrapStackVersionSsmParameter",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) Dependencies() *[]CloudArtifact {
var returns *[]CloudArtifact
_jsii_.Get(
j,
"dependencies",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) File() *string {
var returns *string
_jsii_.Get(
j,
"file",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) HierarchicalId() *string {
var returns *string
_jsii_.Get(
j,
"hierarchicalId",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) Id() *string {
var returns *string
_jsii_.Get(
j,
"id",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) Manifest() *cloudassemblyschema.ArtifactManifest {
var returns *cloudassemblyschema.ArtifactManifest
_jsii_.Get(
j,
"manifest",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) Messages() *[]*SynthesisMessage {
var returns *[]*SynthesisMessage
_jsii_.Get(
j,
"messages",
&returns,
)
return returns
}
func (j *jsiiProxy_AssetManifestArtifact) RequiresBootstrapStackVersion() *float64 {
var returns *float64
_jsii_.Get(
j,
"requiresBootstrapStackVersion",
&returns,
)
return returns
}
// Experimental.
func NewAssetManifestArtifact(assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest) AssetManifestArtifact {
_init_.Initialize()
if err := validateNewAssetManifestArtifactParameters(assembly, name, artifact); err != nil {
panic(err)
}
j := jsiiProxy_AssetManifestArtifact{}
_jsii_.Create(
"monocdk.cx_api.AssetManifestArtifact",
[]interface{}{assembly, name, artifact},
&j,
)
return &j
}
// Experimental.
func NewAssetManifestArtifact_Override(a AssetManifestArtifact, assembly CloudAssembly, name *string, artifact *cloudassemblyschema.ArtifactManifest) {
_init_.Initialize()
_jsii_.Create(
"monocdk.cx_api.AssetManifestArtifact",
[]interface{}{assembly, name, artifact},
a,
)
}
// Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.
//
// Returns: the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.
// Experimental.
func AssetManifestArtifact_FromManifest(assembly CloudAssembly, id *string, artifact *cloudassemblyschema.ArtifactManifest) CloudArtifact {
_init_.Initialize()
if err := validateAssetManifestArtifact_FromManifestParameters(assembly, id, artifact); err != nil {
panic(err)
}
var returns CloudArtifact
_jsii_.StaticInvoke(
"monocdk.cx_api.AssetManifestArtifact",
"fromManifest",
[]interface{}{assembly, id, artifact},
&returns,
)
return returns
}
// Checks if `art` is an instance of this class.
//
// Use this method instead of `instanceof` to properly detect `AssetManifestArtifact`
// instances, even when the construct library is symlinked.
//
// Explanation: in JavaScript, multiple copies of the `cx-api` library on
// disk are seen as independent, completely different libraries. As a
// consequence, the class `AssetManifestArtifact` in each copy of the `cx-api` library
// is seen as a different class, and an instance of one class will not test as
// `instanceof` the other class. `npm install` will not create installations
// like this, but users may manually symlink construct libraries together or
// use a monorepo tool: in those cases, multiple copies of the `cx-api`
// library can be accidentally installed, and `instanceof` will behave
// unpredictably. It is safest to avoid using `instanceof`, and using
// this type-testing method instead.
// Experimental.
func AssetManifestArtifact_IsAssetManifestArtifact(art interface{}) *bool {
_init_.Initialize()
if err := validateAssetManifestArtifact_IsAssetManifestArtifactParameters(art); err != nil {
panic(err)
}
var returns *bool
_jsii_.StaticInvoke(
"monocdk.cx_api.AssetManifestArtifact",
"isAssetManifestArtifact",
[]interface{}{art},
&returns,
)
return returns
}
func (a *jsiiProxy_AssetManifestArtifact) FindMetadataByType(type_ *string) *[]*MetadataEntryResult {
if err := a.validateFindMetadataByTypeParameters(type_); err != nil {
panic(err)
}
var returns *[]*MetadataEntryResult
_jsii_.Invoke(
a,
"findMetadataByType",
[]interface{}{type_},
&returns,
)
return returns
}