@pulumi/pulumi 3.124.1-alpha.xf6bdf03 → 3.125.0-alpha.x6215d96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/archive.d.ts +15 -10
- package/asset/archive.js +15 -9
- package/asset/archive.js.map +1 -1
- package/asset/asset.d.ts +14 -11
- package/asset/asset.js +15 -18
- package/asset/asset.js.map +1 -1
- package/automation/stack.d.ts +10 -2
- package/automation/stack.js +10 -2
- package/automation/stack.js.map +1 -1
- package/dynamic/index.d.ts +67 -35
- package/dynamic/index.js +15 -8
- package/dynamic/index.js.map +1 -1
- package/errors.d.ts +16 -12
- package/errors.js +18 -12
- package/errors.js.map +1 -1
- package/invoke.d.ts +50 -2
- package/iterable/index.d.ts +7 -5
- package/iterable/index.js +7 -5
- package/iterable/index.js.map +1 -1
- package/log/index.d.ts +8 -5
- package/log/index.js +8 -5
- package/log/index.js.map +1 -1
- package/metadata.d.ts +3 -3
- package/metadata.js +3 -3
- package/output.d.ts +119 -91
- package/output.js +73 -46
- package/output.js.map +1 -1
- package/package.json +1 -1
- package/provider/internals.js +3 -1
- package/provider/internals.js.map +1 -1
- package/provider/provider.d.ts +75 -39
- package/provider/server.js +13 -7
- package/provider/server.js.map +1 -1
- package/queryable/index.d.ts +5 -3
- package/resource.d.ts +233 -164
- package/resource.js +160 -97
- package/resource.js.map +1 -1
- package/runtime/asyncIterableUtil.js +26 -17
- package/runtime/asyncIterableUtil.js.map +1 -1
- package/runtime/callbacks.d.ts +5 -0
- package/runtime/callbacks.js +92 -2
- package/runtime/callbacks.js.map +1 -1
- package/runtime/closure/codePaths.d.ts +32 -27
- package/runtime/closure/codePaths.js +23 -15
- package/runtime/closure/codePaths.js.map +1 -1
- package/runtime/closure/createClosure.js +38 -30
- package/runtime/closure/createClosure.js.map +1 -1
- package/runtime/closure/parseFunction.js +26 -15
- package/runtime/closure/parseFunction.js.map +1 -1
- package/runtime/closure/rewriteSuper.js +3 -1
- package/runtime/closure/rewriteSuper.js.map +1 -1
- package/runtime/closure/serializeClosure.d.ts +52 -32
- package/runtime/closure/serializeClosure.js +34 -22
- package/runtime/closure/serializeClosure.js.map +1 -1
- package/runtime/closure/utils.js +6 -2
- package/runtime/closure/utils.js.map +1 -1
- package/runtime/closure/v8.js +18 -9
- package/runtime/closure/v8.js.map +1 -1
- package/runtime/closure/v8Hooks.js +8 -4
- package/runtime/closure/v8Hooks.js.map +1 -1
- package/runtime/config.d.ts +4 -4
- package/runtime/config.js +22 -18
- package/runtime/config.js.map +1 -1
- package/runtime/debuggable.js +17 -6
- package/runtime/debuggable.js.map +1 -1
- package/runtime/invoke.d.ts +23 -14
- package/runtime/invoke.js +27 -18
- package/runtime/invoke.js.map +1 -1
- package/runtime/mocks.d.ts +37 -23
- package/runtime/mocks.js +11 -6
- package/runtime/mocks.js.map +1 -1
- package/runtime/resource.d.ts +21 -15
- package/runtime/resource.js +48 -29
- package/runtime/resource.js.map +1 -1
- package/runtime/rpc.d.ts +71 -43
- package/runtime/rpc.js +85 -47
- package/runtime/rpc.js.map +1 -1
- package/runtime/settings.d.ts +70 -21
- package/runtime/settings.js +85 -42
- package/runtime/settings.js.map +1 -1
- package/runtime/stack.d.ts +27 -14
- package/runtime/stack.js +36 -14
- package/runtime/stack.js.map +1 -1
- package/runtime/state.js +22 -8
- package/runtime/state.js.map +1 -1
- package/stackReference.d.ts +49 -32
- package/stackReference.js +40 -25
- package/stackReference.js.map +1 -1
- package/tests/automation/localWorkspace.spec.js +20 -0
- package/tests/automation/localWorkspace.spec.js.map +1 -1
- package/tsutils.js +6 -2
- package/tsutils.js.map +1 -1
- package/utils.js +15 -6
- package/utils.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/resource.d.ts
CHANGED
|
@@ -2,52 +2,60 @@ import { Input, Inputs, Output } from "./output";
|
|
|
2
2
|
export declare type ID = string;
|
|
3
3
|
export declare type URN = string;
|
|
4
4
|
/**
|
|
5
|
-
* createUrn computes a URN from the combination of a resource name,
|
|
6
|
-
* optional project and optional stack.
|
|
5
|
+
* {@link createUrn} computes a URN from the combination of a resource name,
|
|
6
|
+
* resource type, optional parent, optional project and optional stack.
|
|
7
7
|
*/
|
|
8
8
|
export declare function createUrn(name: Input<string>, type: Input<string>, parent?: Resource | Input<URN>, project?: string, stack?: string): Output<string>;
|
|
9
9
|
/**
|
|
10
|
-
* allAliases computes the full set of aliases for a child resource
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* {@link allAliases} computes the full set of aliases for a child resource
|
|
11
|
+
* given a set of aliases applied to the child and parent resources. This
|
|
12
|
+
* includes the child resource's own aliases, as well as aliases inherited from
|
|
13
|
+
* the parent. If there are N child aliases, and M parent aliases, there will be
|
|
14
|
+
* (M+1)*(N+1)-1 total aliases, or, as calculated in the logic below,
|
|
15
|
+
* N+(M*(1+N)).
|
|
14
16
|
*/
|
|
15
17
|
export declare function allAliases(childAliases: Input<URN | Alias>[], childName: string, childType: string, parent: Resource, parentName: string): Output<URN>[];
|
|
16
18
|
/**
|
|
17
|
-
* Resource represents a class whose CRUD operations are implemented by
|
|
19
|
+
* {@link Resource} represents a class whose CRUD operations are implemented by
|
|
20
|
+
* a provider plugin.
|
|
18
21
|
*/
|
|
19
22
|
export declare abstract class Resource {
|
|
20
23
|
/**
|
|
21
|
-
* A regexp for use with sourcePosition.
|
|
24
|
+
* A regexp for use with {@link sourcePosition}.
|
|
22
25
|
*/
|
|
23
26
|
private static sourcePositionRegExp;
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
26
|
-
* deployments.
|
|
28
|
+
* The stable logical URN used to distinctly address a resource, both before
|
|
29
|
+
* and after deployments.
|
|
27
30
|
*/
|
|
28
31
|
readonly urn: Output<URN>;
|
|
29
32
|
static isInstance(obj: any): obj is Resource;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
34
|
+
* Returns the source position of the user code that instantiated this
|
|
35
|
+
* resource.
|
|
32
36
|
*
|
|
33
37
|
* This is somewhat brittle in that it expects a call stack of the form:
|
|
34
|
-
*
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
38
|
+
*
|
|
39
|
+
* - {@link Resource} class constructor
|
|
40
|
+
* - abstract {@link Resource} subclass constructor
|
|
41
|
+
* - concrete {@link Resource} subclass constructor
|
|
37
42
|
* - user code
|
|
38
43
|
*
|
|
39
|
-
* This stack reflects the expected class hierarchy of
|
|
44
|
+
* This stack reflects the expected class hierarchy of:
|
|
45
|
+
*
|
|
46
|
+
* Resource > Custom/Component resource > Cloud/Component resource
|
|
40
47
|
*
|
|
41
|
-
* For example, consider the AWS S3 Bucket resource. When user code
|
|
42
|
-
* this:
|
|
48
|
+
* For example, consider the AWS S3 Bucket resource. When user code
|
|
49
|
+
* instantiates a Bucket, the stack will look like this:
|
|
43
50
|
*
|
|
44
51
|
* new Resource (/path/to/resource.ts:123:45)
|
|
45
52
|
* new CustomResource (/path/to/resource.ts:678:90)
|
|
46
53
|
* new Bucket (/path/to/bucket.ts:987:65)
|
|
47
54
|
* <user code> (/path/to/index.ts:4:3)
|
|
48
55
|
*
|
|
49
|
-
* Because Node can only give us the stack trace as text, we parse out the
|
|
50
|
-
* matches traces of this form (see
|
|
56
|
+
* Because Node can only give us the stack trace as text, we parse out the
|
|
57
|
+
* source position using a regex that matches traces of this form (see
|
|
58
|
+
* the {@link sourcePositionRegExp} above).
|
|
51
59
|
*/
|
|
52
60
|
private static sourcePosition;
|
|
53
61
|
/**
|
|
@@ -55,55 +63,68 @@ export declare abstract class Resource {
|
|
|
55
63
|
*/
|
|
56
64
|
getProvider(moduleMember: string): ProviderResource | undefined;
|
|
57
65
|
/**
|
|
58
|
-
* Creates and registers a new resource object.
|
|
59
|
-
*
|
|
60
|
-
* dependsOn is an optional list of
|
|
61
|
-
*
|
|
66
|
+
* Creates and registers a new resource object. `t` is the fully qualified
|
|
67
|
+
* type token and `name` is the "name" part to use in creating a stable and
|
|
68
|
+
* globally unique URN for the object. `dependsOn` is an optional list of
|
|
69
|
+
* other resources that this resource depends on, controlling the order in
|
|
70
|
+
* which we perform resource operations.
|
|
62
71
|
*
|
|
63
|
-
* @param t
|
|
64
|
-
*
|
|
65
|
-
* @param
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
68
|
-
*
|
|
69
|
-
* @param
|
|
72
|
+
* @param t
|
|
73
|
+
* The type of the resource.
|
|
74
|
+
* @param name
|
|
75
|
+
* The _unique_ name of the resource.
|
|
76
|
+
* @param custom
|
|
77
|
+
* True to indicate that this is a custom resource, managed by a plugin.
|
|
78
|
+
* @param props
|
|
79
|
+
* The arguments to use to populate the new resource.
|
|
80
|
+
* @param opts
|
|
81
|
+
* A bag of options that control this resource's behavior.
|
|
82
|
+
* @param remote
|
|
83
|
+
* True if this is a remote component resource.
|
|
84
|
+
* @param dependency
|
|
85
|
+
* True if this is a synthetic resource used internally for dependency tracking.
|
|
70
86
|
*/
|
|
71
87
|
constructor(t: string, name: string, custom: boolean, props?: Inputs, opts?: ResourceOptions, remote?: boolean, dependency?: boolean);
|
|
72
88
|
}
|
|
73
89
|
/**
|
|
74
|
-
*
|
|
75
|
-
* solely to make it easy to write an
|
|
90
|
+
* A constant to represent the "root stack" resource for a Pulumi application.
|
|
91
|
+
* The purpose of this is solely to make it easy to write an {@link Alias} like
|
|
92
|
+
* so:
|
|
76
93
|
*
|
|
77
94
|
* `aliases: [{ parent: rootStackResource }]`.
|
|
78
95
|
*
|
|
79
|
-
* This indicates that the prior name for a resource was created based on it
|
|
80
|
-
* by the stack itself and no other resources.
|
|
96
|
+
* This indicates that the prior name for a resource was created based on it
|
|
97
|
+
* being parented directly by the stack itself and no other resources. Note:
|
|
98
|
+
* this is equivalent to:
|
|
81
99
|
*
|
|
82
100
|
* `aliases: [{ parent: undefined }]`
|
|
83
101
|
*
|
|
84
|
-
* However, the former form is preferable as it is more self-descriptive, while
|
|
85
|
-
* a bit confusing and may incorrectly look like something
|
|
86
|
-
* semantics.
|
|
102
|
+
* However, the former form is preferable as it is more self-descriptive, while
|
|
103
|
+
* the latter may look a bit confusing and may incorrectly look like something
|
|
104
|
+
* that could be removed without changing semantics.
|
|
87
105
|
*/
|
|
88
106
|
export declare const rootStackResource: Resource;
|
|
89
107
|
/**
|
|
90
|
-
* Alias is a partial description of prior
|
|
91
|
-
* context of a resource creation to determine what the
|
|
108
|
+
* {@link Alias} is a partial description of prior names used for a resource. It
|
|
109
|
+
* can be processed in the context of a resource creation to determine what the
|
|
110
|
+
* full aliased URN would be.
|
|
92
111
|
*
|
|
93
|
-
* Note there is a semantic difference between properties being absent from this
|
|
94
|
-
* having the `undefined` value. Specifically, there is a
|
|
112
|
+
* Note there is a semantic difference between properties being absent from this
|
|
113
|
+
* type and properties having the `undefined` value. Specifically, there is a
|
|
114
|
+
* difference between:
|
|
95
115
|
*
|
|
96
116
|
* ```ts
|
|
97
117
|
* { name: "foo", parent: undefined } // and
|
|
98
118
|
* { name: "foo" }
|
|
99
119
|
* ```
|
|
100
120
|
*
|
|
101
|
-
* The presence of a property indicates if its value should be used. If absent,
|
|
102
|
-
* not used.
|
|
103
|
-
*
|
|
121
|
+
* The presence of a property indicates if its value should be used. If absent,
|
|
122
|
+
* then the value is not used. So, in the above while `alias.parent` is
|
|
123
|
+
* `undefined` for both, the first alias means "the original URN had no parent"
|
|
124
|
+
* while the second alias means "use the current parent".
|
|
104
125
|
*
|
|
105
|
-
* Note: to indicate that a resource was previously parented by the root stack,
|
|
106
|
-
* that you use:
|
|
126
|
+
* Note: to indicate that a resource was previously parented by the root stack,
|
|
127
|
+
* it is recommended that you use:
|
|
107
128
|
*
|
|
108
129
|
* `aliases: [{ parent: pulumi.rootStackResource }]`
|
|
109
130
|
*
|
|
@@ -113,33 +134,37 @@ export declare const rootStackResource: Resource;
|
|
|
113
134
|
*/
|
|
114
135
|
export interface Alias {
|
|
115
136
|
/**
|
|
116
|
-
* The previous name of the resource.
|
|
117
|
-
* used.
|
|
137
|
+
* The previous name of the resource. If not provided, the current name of
|
|
138
|
+
* the resource is used.
|
|
118
139
|
*/
|
|
119
140
|
name?: Input<string>;
|
|
120
141
|
/**
|
|
121
|
-
* The previous type of the resource.
|
|
142
|
+
* The previous type of the resource. If not provided, the current type of
|
|
143
|
+
* the resource is used.
|
|
122
144
|
*/
|
|
123
145
|
type?: Input<string>;
|
|
124
146
|
/**
|
|
125
|
-
* The previous parent of the resource.
|
|
126
|
-
* parent of the resource is used (`opts.parent` if
|
|
127
|
-
* parent).
|
|
147
|
+
* The previous parent of the resource. If not provided (i.e. `{ name: "foo"
|
|
148
|
+
* }`), the current parent of the resource is used (`opts.parent` if
|
|
149
|
+
* provided, else the implicit stack resource parent).
|
|
128
150
|
*
|
|
129
151
|
* To specify no original parent, use `{ parent: pulumi.rootStackResource }`.
|
|
130
152
|
*/
|
|
131
153
|
parent?: Resource | Input<URN>;
|
|
132
154
|
/**
|
|
133
|
-
* The previous stack of the resource.
|
|
155
|
+
* The previous stack of the resource. If not provided, defaults to
|
|
156
|
+
* `pulumi.getStack()`.
|
|
134
157
|
*/
|
|
135
158
|
stack?: Input<string>;
|
|
136
159
|
/**
|
|
137
|
-
* The previous project of the resource. If not provided, defaults to
|
|
160
|
+
* The previous project of the resource. If not provided, defaults to
|
|
161
|
+
* `pulumi.getProject()`.
|
|
138
162
|
*/
|
|
139
163
|
project?: Input<string>;
|
|
140
164
|
}
|
|
141
165
|
/**
|
|
142
|
-
* ResourceOptions is a bag of optional settings that control a
|
|
166
|
+
* {@link ResourceOptions} is a bag of optional settings that control a
|
|
167
|
+
* resource's behavior.
|
|
143
168
|
*/
|
|
144
169
|
export interface ResourceOptions {
|
|
145
170
|
/**
|
|
@@ -239,52 +264,57 @@ export interface CustomTimeouts {
|
|
|
239
264
|
delete?: string;
|
|
240
265
|
}
|
|
241
266
|
/**
|
|
242
|
-
* ResourceTransformation is the callback signature for the
|
|
243
|
-
* transformation is passed the same set
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
267
|
+
* {@link ResourceTransformation} is the callback signature for the
|
|
268
|
+
* `transformations` resource option. A transformation is passed the same set
|
|
269
|
+
* of inputs provided to the {@link Resource} constructor, and can optionally
|
|
270
|
+
* return back alternate values for the `props` and/or `opts` prior to the
|
|
271
|
+
* resource actually being created. The effect will be as though those props
|
|
272
|
+
* and opts were passed in place of the original call to the {@link Resource}
|
|
273
|
+
* constructor. If the transformation returns `undefined`, this indicates that
|
|
274
|
+
* the resource will not be transformed.
|
|
248
275
|
*/
|
|
249
276
|
export declare type ResourceTransformation = (args: ResourceTransformationArgs) => ResourceTransformationResult | undefined;
|
|
250
277
|
/**
|
|
251
|
-
* ResourceTransform is the callback signature for the `transforms`
|
|
252
|
-
* transform is passed the same set of inputs provided to
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
278
|
+
* {@link ResourceTransform} is the callback signature for the `transforms`
|
|
279
|
+
* resource option. A transform is passed the same set of inputs provided to
|
|
280
|
+
* the {@link Resource} constructor, and can optionally return back alternate
|
|
281
|
+
* values for the `props` and/or `opts` prior to the resource actually being
|
|
282
|
+
* created. The effect will be as though those props and opts were passed in
|
|
283
|
+
* place of the original call to the {@link Resource} constructor. If the
|
|
284
|
+
* transform returns `undefined`, this indicates that the resource will not be
|
|
285
|
+
* transformed.
|
|
257
286
|
*/
|
|
258
287
|
export declare type ResourceTransform = (args: ResourceTransformArgs) => Promise<ResourceTransformResult | undefined> | ResourceTransformResult | undefined;
|
|
259
288
|
/**
|
|
260
|
-
* ResourceTransformArgs is the argument bag passed to a resource transform.
|
|
289
|
+
* {@link ResourceTransformArgs} is the argument bag passed to a resource transform.
|
|
261
290
|
*/
|
|
262
291
|
export interface ResourceTransformArgs {
|
|
263
292
|
/**
|
|
264
|
-
*
|
|
293
|
+
* True if the resource is a custom resource, false if it is a component resource.
|
|
265
294
|
*/
|
|
266
295
|
custom: boolean;
|
|
267
296
|
/**
|
|
268
|
-
* The type of the
|
|
297
|
+
* The type of the resource.
|
|
269
298
|
*/
|
|
270
299
|
type: string;
|
|
271
300
|
/**
|
|
272
|
-
* The name of the
|
|
301
|
+
* The name of the resource.
|
|
273
302
|
*/
|
|
274
303
|
name: string;
|
|
275
304
|
/**
|
|
276
|
-
* The original properties passed to the
|
|
305
|
+
* The original properties passed to the resource constructor.
|
|
277
306
|
*/
|
|
278
307
|
props: Inputs;
|
|
279
308
|
/**
|
|
280
|
-
* The original resource options passed to the
|
|
309
|
+
* The original resource options passed to the resource constructor.
|
|
281
310
|
*/
|
|
282
311
|
opts: ResourceOptions;
|
|
283
312
|
}
|
|
284
313
|
/**
|
|
285
|
-
* ResourceTransformResult is the result that must be returned by a
|
|
286
|
-
* callback. It includes new values to use for the
|
|
287
|
-
* the
|
|
314
|
+
* {@link ResourceTransformResult} is the result that must be returned by a
|
|
315
|
+
* resource transform callback. It includes new values to use for the
|
|
316
|
+
* `props` and `opts` of the {@link Resource} in place of the originally
|
|
317
|
+
* provided values.
|
|
288
318
|
*/
|
|
289
319
|
export interface ResourceTransformResult {
|
|
290
320
|
/**
|
|
@@ -297,34 +327,36 @@ export interface ResourceTransformResult {
|
|
|
297
327
|
opts: ResourceOptions;
|
|
298
328
|
}
|
|
299
329
|
/**
|
|
300
|
-
* ResourceTransformationArgs is the argument bag passed to a resource
|
|
330
|
+
* {@link ResourceTransformationArgs} is the argument bag passed to a resource
|
|
331
|
+
* transformation.
|
|
301
332
|
*/
|
|
302
333
|
export interface ResourceTransformationArgs {
|
|
303
334
|
/**
|
|
304
|
-
* The Resource instance that is being transformed.
|
|
335
|
+
* The {@link Resource} instance that is being transformed.
|
|
305
336
|
*/
|
|
306
337
|
resource: Resource;
|
|
307
338
|
/**
|
|
308
|
-
* The type of the
|
|
339
|
+
* The type of the resource.
|
|
309
340
|
*/
|
|
310
341
|
type: string;
|
|
311
342
|
/**
|
|
312
|
-
* The name of the
|
|
343
|
+
* The name of the resource.
|
|
313
344
|
*/
|
|
314
345
|
name: string;
|
|
315
346
|
/**
|
|
316
|
-
* The original properties passed to the
|
|
347
|
+
* The original properties passed to the resource constructor.
|
|
317
348
|
*/
|
|
318
349
|
props: Inputs;
|
|
319
350
|
/**
|
|
320
|
-
* The original resource options passed to the
|
|
351
|
+
* The original resource options passed to the resource constructor.
|
|
321
352
|
*/
|
|
322
353
|
opts: ResourceOptions;
|
|
323
354
|
}
|
|
324
355
|
/**
|
|
325
|
-
* ResourceTransformationResult is the result that must be returned by a
|
|
326
|
-
* callback. It includes new values to use for the
|
|
327
|
-
* the
|
|
356
|
+
* {@link ResourceTransformationResult} is the result that must be returned by a
|
|
357
|
+
* resource transformation callback. It includes new values to use for the
|
|
358
|
+
* `props` and `opts` of the {@link Resource} in place of the originally
|
|
359
|
+
* provided values.
|
|
328
360
|
*/
|
|
329
361
|
export interface ResourceTransformationResult {
|
|
330
362
|
/**
|
|
@@ -337,165 +369,202 @@ export interface ResourceTransformationResult {
|
|
|
337
369
|
opts: ResourceOptions;
|
|
338
370
|
}
|
|
339
371
|
/**
|
|
340
|
-
* CustomResourceOptions is a bag of optional settings that control a
|
|
372
|
+
* {@link CustomResourceOptions} is a bag of optional settings that control a
|
|
373
|
+
* custom resource's behavior.
|
|
341
374
|
*/
|
|
342
375
|
export interface CustomResourceOptions extends ResourceOptions {
|
|
343
376
|
/**
|
|
344
|
-
* When set to true,
|
|
345
|
-
* is created when replacement is necessary.
|
|
377
|
+
* When set to true, indicates that this resource should be deleted before
|
|
378
|
+
* its replacement is created when replacement is necessary.
|
|
346
379
|
*/
|
|
347
380
|
deleteBeforeReplace?: boolean;
|
|
348
381
|
/**
|
|
349
|
-
* The names of outputs for this resource that should be treated as secrets.
|
|
350
|
-
*
|
|
351
|
-
*
|
|
382
|
+
* The names of outputs for this resource that should be treated as secrets.
|
|
383
|
+
* This augments the list that the resource provider and Pulumi engine
|
|
384
|
+
* already determine based on inputs to your resource. It can be used to
|
|
385
|
+
* mark certain ouputs as a secrets on a per resource basis.
|
|
352
386
|
*/
|
|
353
387
|
additionalSecretOutputs?: string[];
|
|
354
388
|
/**
|
|
355
|
-
* When provided with a resource ID,
|
|
356
|
-
* the cloud resource with the given ID. The
|
|
357
|
-
*
|
|
358
|
-
*
|
|
389
|
+
* When provided with a resource ID, indicates that this resource's provider
|
|
390
|
+
* should import its state from the cloud resource with the given ID. The
|
|
391
|
+
* inputs to the resource's constructor must align with the resource's
|
|
392
|
+
* current state. Once a resource has been imported, the import property
|
|
393
|
+
* must be removed from the resource's options.
|
|
359
394
|
*/
|
|
360
395
|
import?: ID;
|
|
361
396
|
}
|
|
362
397
|
/**
|
|
363
|
-
* ComponentResourceOptions is a bag of optional settings that control a
|
|
398
|
+
* {@link ComponentResourceOptions} is a bag of optional settings that control a
|
|
399
|
+
* component resource's behavior.
|
|
364
400
|
*/
|
|
365
401
|
export interface ComponentResourceOptions extends ResourceOptions {
|
|
366
402
|
/**
|
|
367
|
-
* An optional set of providers to use for child resources. Either keyed by
|
|
368
|
-
* "aws"), or just provided as an array. In the latter
|
|
369
|
-
* from the provider itself.
|
|
403
|
+
* An optional set of providers to use for child resources. Either keyed by
|
|
404
|
+
* package name (e.g. "aws"), or just provided as an array. In the latter
|
|
405
|
+
* case, the package name will be retrieved from the provider itself.
|
|
370
406
|
*
|
|
371
407
|
* Note: only a list should be used. Mapping keys are not respected.
|
|
372
408
|
*/
|
|
373
409
|
providers?: Record<string, ProviderResource> | ProviderResource[];
|
|
374
410
|
}
|
|
375
411
|
/**
|
|
376
|
-
* CustomResource is a resource whose create, read, update, and delete
|
|
377
|
-
* by performing external operations on some
|
|
378
|
-
*
|
|
412
|
+
* {@link CustomResource} is a resource whose create, read, update, and delete
|
|
413
|
+
* (CRUD) operations are managed by performing external operations on some
|
|
414
|
+
* physical entity. The engine understands how to diff and perform partial
|
|
415
|
+
* updates of them, and these CRUD operations are implemented in a dynamically
|
|
379
416
|
* loaded plugin for the defining package.
|
|
380
417
|
*/
|
|
381
418
|
export declare abstract class CustomResource extends Resource {
|
|
382
419
|
/**
|
|
383
|
-
*
|
|
384
|
-
* deployments and may be missing (undefined) during planning phases.
|
|
420
|
+
* The provider-assigned unique ID for this managed resource. It is set
|
|
421
|
+
* during deployments and may be missing (undefined) during planning phases.
|
|
385
422
|
*/
|
|
386
423
|
readonly id: Output<ID>;
|
|
387
424
|
/**
|
|
388
|
-
* Returns true if the given object is
|
|
389
|
-
* multiple copies of the Pulumi SDK have been
|
|
425
|
+
* Returns true if the given object is a {@link CustomResource}. This is
|
|
426
|
+
* designed to work even when multiple copies of the Pulumi SDK have been
|
|
427
|
+
* loaded into the same process.
|
|
390
428
|
*/
|
|
391
429
|
static isInstance(obj: any): obj is CustomResource;
|
|
392
430
|
/**
|
|
393
|
-
* Creates and registers a new managed resource.
|
|
394
|
-
* is the "name" part to use in creating a stable and
|
|
395
|
-
* dependsOn is an optional list of
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
431
|
+
* Creates and registers a new managed resource. `t` is the fully qualified
|
|
432
|
+
* type token and `name` is the "name" part to use in creating a stable and
|
|
433
|
+
* globally unique URN for the object. `dependsOn` is an optional list of
|
|
434
|
+
* other resources that this resource depends on, controlling the order in
|
|
435
|
+
* which we perform resource operations. Creating an instance does not
|
|
436
|
+
* necessarily perform a create on the physical entity which it represents.
|
|
437
|
+
* Instead, this is dependent upon the diffing of the new goal state
|
|
438
|
+
* compared to the current known resource state.
|
|
399
439
|
*
|
|
400
|
-
* @param t
|
|
401
|
-
*
|
|
402
|
-
* @param
|
|
403
|
-
*
|
|
404
|
-
* @param
|
|
440
|
+
* @param t
|
|
441
|
+
* The type of the resource.
|
|
442
|
+
* @param name
|
|
443
|
+
* The _unique_ name of the resource.
|
|
444
|
+
* @param props
|
|
445
|
+
* The arguments to use to populate the new resource.
|
|
446
|
+
* @param opts
|
|
447
|
+
* A bag of options that control this resource's behavior.
|
|
448
|
+
* @param dependency
|
|
449
|
+
* True if this is a synthetic resource used internally for dependency tracking.
|
|
405
450
|
*/
|
|
406
451
|
constructor(t: string, name: string, props?: Inputs, opts?: CustomResourceOptions, dependency?: boolean);
|
|
407
452
|
}
|
|
408
453
|
/**
|
|
409
|
-
* ProviderResource is a resource that implements CRUD operations for
|
|
410
|
-
*
|
|
454
|
+
* {@link ProviderResource} is a resource that implements CRUD operations for
|
|
455
|
+
* other custom resources. These resources are managed similarly to other
|
|
456
|
+
* resources, including the usual diffing and update semantics.
|
|
411
457
|
*/
|
|
412
458
|
export declare abstract class ProviderResource extends CustomResource {
|
|
413
459
|
static register(provider: ProviderResource | undefined): Promise<string | undefined>;
|
|
414
460
|
/**
|
|
415
461
|
* Creates and registers a new provider resource for a particular package.
|
|
416
462
|
*
|
|
417
|
-
* @param pkg
|
|
418
|
-
*
|
|
419
|
-
* @param
|
|
420
|
-
*
|
|
421
|
-
* @param
|
|
463
|
+
* @param pkg
|
|
464
|
+
* The package associated with this provider.
|
|
465
|
+
* @param name
|
|
466
|
+
* The _unique_ name of the provider.
|
|
467
|
+
* @param props
|
|
468
|
+
* The configuration to use for this provider.
|
|
469
|
+
* @param opts
|
|
470
|
+
* A bag of options that control this provider's behavior.
|
|
471
|
+
* @param dependency
|
|
472
|
+
* True if this is a synthetic resource used internally for dependency tracking.
|
|
422
473
|
*/
|
|
423
474
|
constructor(pkg: string, name: string, props?: Inputs, opts?: ResourceOptions, dependency?: boolean);
|
|
424
475
|
}
|
|
425
476
|
/**
|
|
426
|
-
* ComponentResource is a resource that aggregates one or more other
|
|
427
|
-
* level abstraction. The component resource
|
|
428
|
-
* operations for
|
|
477
|
+
* {@link ComponentResource} is a resource that aggregates one or more other
|
|
478
|
+
* child resources into a higher level abstraction. The component resource
|
|
479
|
+
* itself is a resource, but does not require custom CRUD operations for
|
|
480
|
+
* provisioning.
|
|
429
481
|
*/
|
|
430
482
|
export declare class ComponentResource<TData = any> extends Resource {
|
|
431
483
|
/**
|
|
432
|
-
* Returns true if the given object is
|
|
433
|
-
* multiple copies of the Pulumi SDK have been
|
|
484
|
+
* Returns true if the given object is a {@link CustomResource}. This is
|
|
485
|
+
* designed to work even when multiple copies of the Pulumi SDK have been
|
|
486
|
+
* loaded into the same process.
|
|
434
487
|
*/
|
|
435
488
|
static isInstance(obj: any): obj is ComponentResource;
|
|
436
489
|
/**
|
|
437
|
-
* Creates and registers a new component resource.
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
490
|
+
* Creates and registers a new component resource. `type` is the fully
|
|
491
|
+
* qualified type token and `name` is the "name" part to use in creating a
|
|
492
|
+
* stable and globally unique URN for the object. `opts.parent` is the
|
|
493
|
+
* optional parent for this component, and `opts.dependsOn` is an optional
|
|
494
|
+
* list of other resources that this resource depends on, controlling the
|
|
495
|
+
* order in which we perform resource operations.
|
|
442
496
|
*
|
|
443
|
-
* @param type
|
|
444
|
-
*
|
|
445
|
-
* @param
|
|
446
|
-
*
|
|
447
|
-
* @param
|
|
497
|
+
* @param type
|
|
498
|
+
* The type of the resource.
|
|
499
|
+
* @param name
|
|
500
|
+
* The _unique_ name of the resource.
|
|
501
|
+
* @param args
|
|
502
|
+
* Information passed to [initialize] method.
|
|
503
|
+
* @param opts
|
|
504
|
+
* A bag of options that control this resource's behavior.
|
|
505
|
+
* @param remote
|
|
506
|
+
* True if this is a remote component resource.
|
|
448
507
|
*/
|
|
449
508
|
constructor(type: string, name: string, args?: Inputs, opts?: ComponentResourceOptions, remote?: boolean);
|
|
450
509
|
/**
|
|
451
|
-
* Can be overridden by a subclass to asynchronously initialize data for this
|
|
452
|
-
* automatically when constructed.
|
|
453
|
-
* constructors to use.
|
|
510
|
+
* Can be overridden by a subclass to asynchronously initialize data for this component
|
|
511
|
+
* automatically when constructed. The data will be available immediately for subclass
|
|
512
|
+
* constructors to use. To access the data use {@link getData}.
|
|
454
513
|
*/
|
|
455
514
|
protected initialize(args: Inputs): Promise<TData>;
|
|
456
515
|
/**
|
|
457
|
-
* Retrieves the data produces by
|
|
458
|
-
* derived class's constructor after the
|
|
516
|
+
* Retrieves the data produces by {@link initialize}. The data is
|
|
517
|
+
* immediately available in a derived class's constructor after the
|
|
518
|
+
* `super(...)` call to `ComponentResource`.
|
|
459
519
|
*/
|
|
460
520
|
protected getData(): Promise<TData>;
|
|
461
521
|
/**
|
|
462
|
-
*
|
|
463
|
-
* allocating other child sub-resources and propagating their resulting
|
|
522
|
+
* Registers synthetic outputs that a component has initialized, usually by
|
|
523
|
+
* allocating other child sub-resources and propagating their resulting
|
|
524
|
+
* property values.
|
|
464
525
|
*
|
|
465
|
-
*
|
|
466
|
-
* done creating child resources. This is not
|
|
467
|
-
* called after the
|
|
526
|
+
* Component resources can call this at the end of their constructor to
|
|
527
|
+
* indicate that they are done creating child resources. This is not
|
|
528
|
+
* strictly necessary as this will automatically be called after the {@link
|
|
529
|
+
* initialize} method completes.
|
|
468
530
|
*/
|
|
469
531
|
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void;
|
|
470
532
|
}
|
|
471
533
|
/**
|
|
472
|
-
*
|
|
473
|
-
* respective properties of `opts2` merged over the
|
|
474
|
-
* options objects will be unchanged.
|
|
534
|
+
* {@link mergeOptions} takes two {@link ResourceOptions} values and produces a new
|
|
535
|
+
* {@link ResourceOptions} with the respective properties of `opts2` merged over the
|
|
536
|
+
* same properties in `opts1`. The original options objects will be unchanged.
|
|
475
537
|
*
|
|
476
538
|
* Conceptually property merging follows these basic rules:
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
539
|
+
*
|
|
540
|
+
* 1. if the property is a collection, the final value will be a collection
|
|
541
|
+
* containing the values from each options object.
|
|
542
|
+
*
|
|
543
|
+
* 2. Simple scaler values from `opts2` (i.e. strings, numbers, bools) will
|
|
544
|
+
* replace the values of `opts1`.
|
|
545
|
+
*
|
|
546
|
+
* 3. `opts2` can have properties explicitly provided with `null` or
|
|
547
|
+
* `undefined` as the value. If explicitly provided, then that will be the
|
|
548
|
+
* final value in the result.
|
|
549
|
+
*
|
|
550
|
+
* 4. For the purposes of merging `dependsOn`, `provider` and `providers` are
|
|
551
|
+
* always treated as collections, even if only a single value was provided.
|
|
485
552
|
*/
|
|
486
553
|
export declare function mergeOptions(opts1: CustomResourceOptions | undefined, opts2: CustomResourceOptions | undefined): CustomResourceOptions;
|
|
487
554
|
export declare function mergeOptions(opts1: ComponentResourceOptions | undefined, opts2: ComponentResourceOptions | undefined): ComponentResourceOptions;
|
|
488
555
|
export declare function mergeOptions(opts1: ResourceOptions | undefined, opts2: ResourceOptions | undefined): ResourceOptions;
|
|
489
556
|
/**
|
|
490
|
-
* A DependencyResource is a resource that is used to indicate that an
|
|
491
|
-
*
|
|
557
|
+
* A {@link DependencyResource} is a resource that is used to indicate that an
|
|
558
|
+
* {@link Output} has a dependency on a particular resource. These resources are
|
|
559
|
+
* only created when dealing with remote component resources.
|
|
492
560
|
*/
|
|
493
561
|
export declare class DependencyResource extends CustomResource {
|
|
494
562
|
constructor(urn: URN);
|
|
495
563
|
}
|
|
496
564
|
/**
|
|
497
|
-
* A DependencyProviderResource is a resource that is used by the
|
|
498
|
-
*
|
|
565
|
+
* A {@link DependencyProviderResource} is a resource that is used by the
|
|
566
|
+
* provider SDK as a stand-in for a provider that is only used for its
|
|
567
|
+
* reference. Its only valid properties are its URN and ID.
|
|
499
568
|
*/
|
|
500
569
|
export declare class DependencyProviderResource extends ProviderResource {
|
|
501
570
|
constructor(ref: string);
|