|
| 1 | +/*! |
| 2 | + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * SPDX-License-Identifier: Apache-2.0 |
| 4 | + */ |
| 5 | + |
| 6 | +/** |
| 7 | + * This file is not generated from the core library. Please regenerate from |
| 8 | + * 'packages/toolkit', e.g. `npm run generateConfigurationAttributes -w packages/toolkit` |
| 9 | + */ |
| 10 | + |
| 11 | +/** |
| 12 | + * This file was automatically generated by json-schema-to-typescript. |
| 13 | + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
| 14 | + * and run json-schema-to-typescript to regenerate this file. |
| 15 | + */ |
| 16 | + |
| 17 | +import * as vscode from "vscode"; |
| 18 | + |
| 19 | +export interface AwsSamDebuggerConfiguration extends vscode.DebugConfiguration { |
| 20 | + aws?: AWSConnection; |
| 21 | + invokeTarget: TemplateTargetProperties | CodeTargetProperties | APITargetProperties; |
| 22 | + lambda?: LambdaProperties; |
| 23 | + sam?: SAMCLIProperties; |
| 24 | + api?: APIGatewayProperties; |
| 25 | +} |
| 26 | +/** |
| 27 | + * AWS connection details |
| 28 | + */ |
| 29 | +export interface AWSConnection { |
| 30 | + /** |
| 31 | + * The AWS credentials provider and name to use during the invocation. Example: credential profile "default" would be entered as `profile:default`. |
| 32 | + */ |
| 33 | + credentials?: string; |
| 34 | + /** |
| 35 | + * AWS region to use during the invocation. |
| 36 | + */ |
| 37 | + region?: string; |
| 38 | +} |
| 39 | +/** |
| 40 | + * Configures the application to launch |
| 41 | + */ |
| 42 | +export interface TemplateTargetProperties { |
| 43 | + /** |
| 44 | + * Path to the CFN/SAM template. |
| 45 | + */ |
| 46 | + templatePath: string; |
| 47 | + /** |
| 48 | + * Resource name of an AWS::Lambda::Function or AWS::Serverless::Function to invoke. |
| 49 | + */ |
| 50 | + logicalId: string; |
| 51 | + /** |
| 52 | + * The type of invocation to launch. Possible values: |
| 53 | +* * `template` uses a CFN/SAM Template as an entrypoint |
| 54 | +* * `code` invokes Lambda code directly. |
| 55 | +* * `api` uses the CFN/SAM Template to emulate API Gateway |
| 56 | + */ |
| 57 | + target: "template"; |
| 58 | +} |
| 59 | +/** |
| 60 | + * Configures the application to launch |
| 61 | + */ |
| 62 | +export interface CodeTargetProperties { |
| 63 | + /** |
| 64 | + * Lambda Function handler to invoke. |
| 65 | + */ |
| 66 | + lambdaHandler: string; |
| 67 | + /** |
| 68 | + * The root of the project, used to determine where in the file-system to locate the lambdaHandler. |
| 69 | + */ |
| 70 | + projectRoot: string; |
| 71 | + /** |
| 72 | + * The type of invocation to launch. Possible values: |
| 73 | +* * `template` uses a CFN/SAM Template as an entrypoint |
| 74 | +* * `code` invokes Lambda code directly. |
| 75 | +* * `api` uses the CFN/SAM Template to emulate API Gateway |
| 76 | + */ |
| 77 | + target: "code"; |
| 78 | + /** |
| 79 | + * Architecture used for local SAM Lambda emulation |
| 80 | + */ |
| 81 | + architecture?: "x86_64" | "arm64"; |
| 82 | +} |
| 83 | +/** |
| 84 | + * Configures the application to launch |
| 85 | + */ |
| 86 | +export interface APITargetProperties { |
| 87 | + /** |
| 88 | + * Path to the CFN/SAM template. |
| 89 | + */ |
| 90 | + templatePath: string; |
| 91 | + /** |
| 92 | + * Resource name of an AWS::Lambda::Function or AWS::Serverless::Function to invoke. |
| 93 | + */ |
| 94 | + logicalId: string; |
| 95 | + /** |
| 96 | + * The type of invocation to launch. Possible values: |
| 97 | +* * `template` uses a CFN/SAM Template as an entrypoint |
| 98 | +* * `code` invokes Lambda code directly. |
| 99 | +* * `api` uses the CFN/SAM Template to emulate API Gateway |
| 100 | + */ |
| 101 | + target: "api"; |
| 102 | +} |
| 103 | +/** |
| 104 | + * Lambda specific details of the invocation |
| 105 | + */ |
| 106 | +export interface LambdaProperties { |
| 107 | + /** |
| 108 | + * Environment variables to pass to the function invocation (replaces template variables). |
| 109 | + */ |
| 110 | + environmentVariables?: { |
| 111 | + [k: string]: string; |
| 112 | + }; |
| 113 | + /** |
| 114 | + * Event payload to pass to the Lambda invocation. |
| 115 | +* Must specify one of 'json' or 'path'. |
| 116 | + */ |
| 117 | + payload?: { |
| 118 | + /** |
| 119 | + * JSON definition to use as the event payload |
| 120 | + */ |
| 121 | + json?: { |
| 122 | + [k: string]: unknown; |
| 123 | + }; |
| 124 | + /** |
| 125 | + * Path to a file to use as the event payload |
| 126 | + */ |
| 127 | + path?: string; |
| 128 | + }; |
| 129 | + /** |
| 130 | + * The amount of memory (in Mb) the Lambda function has access to. |
| 131 | + */ |
| 132 | + memoryMb?: number; |
| 133 | + /** |
| 134 | + * The Lambda Function's runtime |
| 135 | + */ |
| 136 | + runtime?: string; |
| 137 | + /** |
| 138 | + * The amount of time (in seconds) that Lambda allows a function to run before stopping it. |
| 139 | + */ |
| 140 | + timeoutSec?: number; |
| 141 | + pathMappings?: PathMapping[]; |
| 142 | +} |
| 143 | +export interface PathMapping { |
| 144 | + localRoot: string; |
| 145 | + remoteRoot: string; |
| 146 | +} |
| 147 | +/** |
| 148 | + * SAM CLI specific configurations |
| 149 | + */ |
| 150 | +export interface SAMCLIProperties { |
| 151 | + /** |
| 152 | + * Additional arguments to pass to the `sam build` command. |
| 153 | + */ |
| 154 | + buildArguments?: string[]; |
| 155 | + /** |
| 156 | + * Base directory to build and run the application. |
| 157 | +* A temporary directory will be created if not specified. |
| 158 | + */ |
| 159 | + buildDir?: string; |
| 160 | + /** |
| 161 | + * Whether to build inside a container (default: false). |
| 162 | + */ |
| 163 | + containerBuild?: boolean; |
| 164 | + /** |
| 165 | + * Specifies the name or id of an existing Docker network that Lambda Docker containers should connect to. |
| 166 | + */ |
| 167 | + dockerNetwork?: string; |
| 168 | + /** |
| 169 | + * Additional arguments to pass to the `sam local` command. |
| 170 | + */ |
| 171 | + localArguments?: string[]; |
| 172 | + /** |
| 173 | + * Specifies whether the command should skip pulling down the latest Docker image for Lambda runtime (default: false). |
| 174 | + */ |
| 175 | + skipNewImageCheck?: boolean; |
| 176 | + /** |
| 177 | + * Values to override in the template |
| 178 | + */ |
| 179 | + template?: { |
| 180 | + /** |
| 181 | + * 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 |
| 182 | + */ |
| 183 | + parameters?: { |
| 184 | + [k: string]: string | number; |
| 185 | + }; |
| 186 | + }; |
| 187 | +} |
| 188 | +/** |
| 189 | + * API Gateway configuration |
| 190 | + */ |
| 191 | +export interface APIGatewayProperties { |
| 192 | + /** |
| 193 | + * The path to the api (must start with /) |
| 194 | + */ |
| 195 | + path: string; |
| 196 | + /** |
| 197 | + * The HTTP message method that will be used |
| 198 | + */ |
| 199 | + httpMethod: "delete" | "get" | "head" | "options" | "patch" | "post" | "put"; |
| 200 | + /** |
| 201 | + * Event payload to pass to the Lambda invocation. |
| 202 | +* Must specify one of 'json' or 'path'. |
| 203 | + */ |
| 204 | + payload?: { |
| 205 | + /** |
| 206 | + * JSON definition to use as the event payload |
| 207 | + */ |
| 208 | + json?: { |
| 209 | + [k: string]: unknown; |
| 210 | + }; |
| 211 | + /** |
| 212 | + * Path to a file to use as the event payload |
| 213 | + */ |
| 214 | + path?: string; |
| 215 | + }; |
| 216 | + /** |
| 217 | + * Additional HTTP headers |
| 218 | + */ |
| 219 | + headers?: { |
| 220 | + [k: string]: string; |
| 221 | + }; |
| 222 | + /** |
| 223 | + * URL query string (e.g. key=foo&value=bar) |
| 224 | + */ |
| 225 | + querystring?: string; |
| 226 | + /** |
| 227 | + * key-value map of API Gateway stage variables |
| 228 | + */ |
| 229 | + stageVariables?: { |
| 230 | + [k: string]: string; |
| 231 | + }; |
| 232 | + /** |
| 233 | + * The API Gateway client certificate ID |
| 234 | + */ |
| 235 | + clientCertificateId?: string; |
| 236 | +} |
0 commit comments