UNPKG

2.13 kBTypeScriptView Raw
1import { Integration, IntegrationConfig, IntegrationOptions } from '../integration';
2import { Method } from '../method';
3export interface AwsIntegrationProps {
4 /**
5 * Use AWS_PROXY integration.
6 *
7 * @default false
8 */
9 readonly proxy?: boolean;
10 /**
11 * The name of the integrated AWS service (e.g. `s3`)
12 */
13 readonly service: string;
14 /**
15 * A designated subdomain supported by certain AWS service for fast
16 * host-name lookup.
17 */
18 readonly subdomain?: string;
19 /**
20 * The path to use for path-base APIs.
21 *
22 * For example, for S3 GET, you can set path to `bucket/key`.
23 * For lambda, you can set path to `2015-03-31/functions/${function-arn}/invocations`
24 *
25 * Mutually exclusive with the `action` options.
26 */
27 readonly path?: string;
28 /**
29 * The AWS action to perform in the integration.
30 *
31 * Use `actionParams` to specify key-value params for the action.
32 *
33 * Mutually exclusive with `path`.
34 */
35 readonly action?: string;
36 /**
37 * Parameters for the action.
38 *
39 * `action` must be set, and `path` must be undefined.
40 * The action params will be URL encoded.
41 */
42 readonly actionParameters?: {
43 [key: string]: string;
44 };
45 /**
46 * The integration's HTTP method type.
47 *
48 * @default POST
49 */
50 readonly integrationHttpMethod?: string;
51 /**
52 * Integration options, such as content handling, request/response mapping, etc.
53 */
54 readonly options?: IntegrationOptions;
55 /**
56 * The region of the integrated AWS service.
57 *
58 * @default - same region as the stack
59 */
60 readonly region?: string;
61}
62/**
63 * This type of integration lets an API expose AWS service actions. It is
64 * intended for calling all AWS service actions, but is not recommended for
65 * calling a Lambda function, because the Lambda custom integration is a legacy
66 * technology.
67 */
68export declare class AwsIntegration extends Integration {
69 private scope?;
70 constructor(props: AwsIntegrationProps);
71 bind(method: Method): IntegrationConfig;
72}