1 | import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
|
2 | import * as ec2 from '@aws-cdk/aws-ec2';
|
3 | import * as iam from '@aws-cdk/aws-iam';
|
4 | import * as lambda from '@aws-cdk/aws-lambda';
|
5 | import { ConstructNode, Resource } from '@aws-cdk/core';
|
6 | import { Construct } from 'constructs';
|
7 |
|
8 |
|
9 |
|
10 | export interface EdgeFunctionProps extends lambda.FunctionProps {
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | readonly stackId?: string;
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare class EdgeFunction extends Resource implements lambda.IVersion {
|
30 | private static readonly EDGE_REGION;
|
31 | readonly edgeArn: string;
|
32 | readonly functionName: string;
|
33 | readonly functionArn: string;
|
34 | readonly grantPrincipal: iam.IPrincipal;
|
35 | readonly isBoundToVpc = false;
|
36 | readonly permissionsNode: ConstructNode;
|
37 | readonly role?: iam.IRole;
|
38 | readonly version: string;
|
39 | readonly architecture: lambda.Architecture;
|
40 | readonly resourceArnsForGrantInvoke: string[];
|
41 | private readonly _edgeFunction;
|
42 | constructor(scope: Construct, id: string, props: EdgeFunctionProps);
|
43 | get lambda(): lambda.IFunction;
|
44 | /**
|
45 | * Convenience method to make `EdgeFunction` conform to the same interface as `Function`.
|
46 | */
|
47 | get currentVersion(): lambda.IVersion;
|
48 | addAlias(aliasName: string, options?: lambda.AliasOptions): lambda.Alias;
|
49 | /**
|
50 | * Not supported. Connections are only applicable to VPC-enabled functions.
|
51 | */
|
52 | get connections(): ec2.Connections;
|
53 | get latestVersion(): lambda.IVersion;
|
54 | addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
|
55 | addPermission(id: string, permission: lambda.Permission): void;
|
56 | addToRolePolicy(statement: iam.PolicyStatement): void;
|
57 | grantInvoke(identity: iam.IGrantable): iam.Grant;
|
58 | grantInvokeUrl(identity: iam.IGrantable): iam.Grant;
|
59 | metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
60 | metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
61 | metricErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
62 | metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
63 | metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
64 | /** Adds an event source to this function. */
|
65 | addEventSource(source: lambda.IEventSource): void;
|
66 | configureAsyncInvoke(options: lambda.EventInvokeConfigOptions): void;
|
67 | addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
|
68 | /** Create a function in-region */
|
69 | private createInRegionFunction;
|
70 | /** Create a support stack and function in us-east-1, and a SSM reader in-region */
|
71 | private createCrossRegionFunction;
|
72 | private createCrossRegionArnReader;
|
73 | private edgeStack;
|
74 | }
|