@jaypie/constructs 1.1.31 → 1.1.32
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.
|
@@ -35,9 +35,11 @@ export interface JaypieLambdaProps {
|
|
|
35
35
|
}
|
|
36
36
|
export declare class JaypieLambda extends Construct implements lambda.IFunction {
|
|
37
37
|
private readonly _lambda;
|
|
38
|
+
private readonly _alias?;
|
|
38
39
|
private readonly _code;
|
|
39
40
|
constructor(scope: Construct, id: string, props: JaypieLambdaProps);
|
|
40
41
|
get lambda(): lambda.Function;
|
|
42
|
+
get alias(): lambda.Alias | undefined;
|
|
41
43
|
get code(): lambda.Code;
|
|
42
44
|
get functionArn(): string;
|
|
43
45
|
get functionName(): string;
|
package/dist/esm/index.js
CHANGED
|
@@ -407,7 +407,7 @@ class JaypieLambda extends Construct {
|
|
|
407
407
|
}
|
|
408
408
|
// Configure provisioned concurrency if specified
|
|
409
409
|
if (provisionedConcurrentExecutions !== undefined) {
|
|
410
|
-
new lambda.Alias(this, "ProvisionedAlias", {
|
|
410
|
+
this._alias = new lambda.Alias(this, "ProvisionedAlias", {
|
|
411
411
|
aliasName: "provisioned",
|
|
412
412
|
version: this._lambda.currentVersion,
|
|
413
413
|
provisionedConcurrentExecutions,
|
|
@@ -424,15 +424,18 @@ class JaypieLambda extends Construct {
|
|
|
424
424
|
get lambda() {
|
|
425
425
|
return this._lambda;
|
|
426
426
|
}
|
|
427
|
+
get alias() {
|
|
428
|
+
return this._alias;
|
|
429
|
+
}
|
|
427
430
|
get code() {
|
|
428
431
|
return this._code;
|
|
429
432
|
}
|
|
430
433
|
// IFunction implementation
|
|
431
434
|
get functionArn() {
|
|
432
|
-
return this._lambda.functionArn;
|
|
435
|
+
return this._alias?.functionArn ?? this._lambda.functionArn;
|
|
433
436
|
}
|
|
434
437
|
get functionName() {
|
|
435
|
-
return this._lambda.functionName;
|
|
438
|
+
return this._alias?.functionName ?? this._lambda.functionName;
|
|
436
439
|
}
|
|
437
440
|
get grantPrincipal() {
|
|
438
441
|
return this._lambda.grantPrincipal;
|
|
@@ -456,7 +459,8 @@ class JaypieLambda extends Construct {
|
|
|
456
459
|
return this._lambda.permissionsNode;
|
|
457
460
|
}
|
|
458
461
|
get resourceArnsForGrantInvoke() {
|
|
459
|
-
return this.
|
|
462
|
+
return (this._alias?.resourceArnsForGrantInvoke ??
|
|
463
|
+
this._lambda.resourceArnsForGrantInvoke);
|
|
460
464
|
}
|
|
461
465
|
addEventSource(source) {
|
|
462
466
|
this._lambda.addEventSource(source);
|
|
@@ -480,7 +484,7 @@ class JaypieLambda extends Construct {
|
|
|
480
484
|
this._lambda.configureAsyncInvoke(options);
|
|
481
485
|
}
|
|
482
486
|
grantInvoke(grantee) {
|
|
483
|
-
return this._lambda.grantInvoke(grantee);
|
|
487
|
+
return (this._alias?.grantInvoke(grantee) ?? this._lambda.grantInvoke(grantee));
|
|
484
488
|
}
|
|
485
489
|
grantInvokeCompositePrincipal(compositePrincipal) {
|
|
486
490
|
return this._lambda.grantInvokeCompositePrincipal(compositePrincipal);
|