-
Notifications
You must be signed in to change notification settings - Fork 434
/
awsSamDebugConfiguration.gen.ts
236 lines (232 loc) · 5.89 KB
/
awsSamDebugConfiguration.gen.ts
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
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* This file is not generated from the core library. Please regenerate from
* 'packages/toolkit', e.g. `npm run generateConfigurationAttributes -w packages/toolkit`
*/
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
import * as vscode from "vscode";
export interface AwsSamDebuggerConfiguration extends vscode.DebugConfiguration {
aws?: AWSConnection;
invokeTarget: TemplateTargetProperties | CodeTargetProperties | APITargetProperties;
lambda?: LambdaProperties;
sam?: SAMCLIProperties;
api?: APIGatewayProperties;
}
/**
* AWS connection details
*/
export interface AWSConnection {
/**
* The AWS credentials provider and name to use during the invocation. Example: credential profile "default" would be entered as `profile:default`.
*/
credentials?: string;
/**
* AWS region to use during the invocation.
*/
region?: string;
}
/**
* Configures the application to launch
*/
export interface TemplateTargetProperties {
/**
* Path to the CFN/SAM template.
*/
templatePath: string;
/**
* Resource name of an AWS::Lambda::Function or AWS::Serverless::Function to invoke.
*/
logicalId: string;
/**
* The type of invocation to launch. Possible values:
* * `template` uses a CFN/SAM Template as an entrypoint
* * `code` invokes Lambda code directly.
* * `api` uses the CFN/SAM Template to emulate API Gateway
*/
target: "template";
}
/**
* Configures the application to launch
*/
export interface CodeTargetProperties {
/**
* Lambda Function handler to invoke.
*/
lambdaHandler: string;
/**
* The root of the project, used to determine where in the file-system to locate the lambdaHandler.
*/
projectRoot: string;
/**
* The type of invocation to launch. Possible values:
* * `template` uses a CFN/SAM Template as an entrypoint
* * `code` invokes Lambda code directly.
* * `api` uses the CFN/SAM Template to emulate API Gateway
*/
target: "code";
/**
* Architecture used for local SAM Lambda emulation
*/
architecture?: "x86_64" | "arm64";
}
/**
* Configures the application to launch
*/
export interface APITargetProperties {
/**
* Path to the CFN/SAM template.
*/
templatePath: string;
/**
* Resource name of an AWS::Lambda::Function or AWS::Serverless::Function to invoke.
*/
logicalId: string;
/**
* The type of invocation to launch. Possible values:
* * `template` uses a CFN/SAM Template as an entrypoint
* * `code` invokes Lambda code directly.
* * `api` uses the CFN/SAM Template to emulate API Gateway
*/
target: "api";
}
/**
* Lambda specific details of the invocation
*/
export interface LambdaProperties {
/**
* Environment variables to pass to the function invocation (replaces template variables).
*/
environmentVariables?: {
[k: string]: string;
};
/**
* Event payload to pass to the Lambda invocation.
* Must specify one of 'json' or 'path'.
*/
payload?: {
/**
* JSON definition to use as the event payload
*/
json?: {
[k: string]: unknown;
};
/**
* Path to a file to use as the event payload
*/
path?: string;
};
/**
* The amount of memory (in Mb) the Lambda function has access to.
*/
memoryMb?: number;
/**
* The Lambda Function's runtime
*/
runtime?: string;
/**
* The amount of time (in seconds) that Lambda allows a function to run before stopping it.
*/
timeoutSec?: number;
pathMappings?: PathMapping[];
}
export interface PathMapping {
localRoot: string;
remoteRoot: string;
}
/**
* SAM CLI specific configurations
*/
export interface SAMCLIProperties {
/**
* Additional arguments to pass to the `sam build` command.
*/
buildArguments?: string[];
/**
* Base directory to build and run the application.
* A temporary directory will be created if not specified.
*/
buildDir?: string;
/**
* Whether to build inside a container (default: false).
*/
containerBuild?: boolean;
/**
* Specifies the name or id of an existing Docker network that Lambda Docker containers should connect to.
*/
dockerNetwork?: string;
/**
* Additional arguments to pass to the `sam local` command.
*/
localArguments?: string[];
/**
* Specifies whether the command should skip pulling down the latest Docker image for Lambda runtime (default: false).
*/
skipNewImageCheck?: boolean;
/**
* Values to override in the template
*/
template?: {
/**
* Key:value mappings for SAM template parameter overrides. More information can be found here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stackinstances-override.html#stackinstances-override-cli
*/
parameters?: {
[k: string]: string | number;
};
};
}
/**
* API Gateway configuration
*/
export interface APIGatewayProperties {
/**
* The path to the api (must start with /)
*/
path: string;
/**
* The HTTP message method that will be used
*/
httpMethod: "delete" | "get" | "head" | "options" | "patch" | "post" | "put";
/**
* Event payload to pass to the Lambda invocation.
* Must specify one of 'json' or 'path'.
*/
payload?: {
/**
* JSON definition to use as the event payload
*/
json?: {
[k: string]: unknown;
};
/**
* Path to a file to use as the event payload
*/
path?: string;
};
/**
* Additional HTTP headers
*/
headers?: {
[k: string]: string;
};
/**
* URL query string (e.g. key=foo&value=bar)
*/
querystring?: string;
/**
* key-value map of API Gateway stage variables
*/
stageVariables?: {
[k: string]: string;
};
/**
* The API Gateway client certificate ID
*/
clientCertificateId?: string;
}