agent-claw: automated task changes
This commit is contained in:
13
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/.jsiirc.json
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/.jsiirc.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"targets": {
|
||||
"dotnet": {
|
||||
"namespace": "Amazon.CDK.AwsApigatewayv2Integrations"
|
||||
},
|
||||
"java": {
|
||||
"package": "software.amazon.awscdk.aws_apigatewayv2_integrations"
|
||||
},
|
||||
"python": {
|
||||
"module": "aws_cdk.aws_apigatewayv2_integrations"
|
||||
}
|
||||
}
|
||||
}
|
||||
540
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/README.md
generated
vendored
Normal file
540
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/README.md
generated
vendored
Normal file
@@ -0,0 +1,540 @@
|
||||
# AWS APIGatewayv2 Integrations
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [HTTP APIs](#http-apis)
|
||||
- [Lambda Integration](#lambda)
|
||||
- [HTTP Proxy Integration](#http-proxy)
|
||||
- [StepFunctions Integration](#stepfunctions-integration)
|
||||
- [SQS Integration](#sqs-integration)
|
||||
- [EventBridge Integration](#eventbridge-integration)
|
||||
- [Private Integration](#private-integration)
|
||||
- [Request Parameters](#request-parameters)
|
||||
- [WebSocket APIs](#websocket-apis)
|
||||
- [Lambda WebSocket Integration](#lambda-websocket-integration)
|
||||
- [AWS WebSocket Integration](#aws-websocket-integration)
|
||||
- [Mock WebSocket Integration](#mock-websocket-integration)
|
||||
- [Import Issues](#import-issues)
|
||||
- [DotNet Namespace](#dotnet-namespace)
|
||||
- [Java Package](#java-package)
|
||||
|
||||
## HTTP APIs
|
||||
|
||||
Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations.
|
||||
|
||||
### Lambda
|
||||
|
||||
Lambda integrations enable integrating an HTTP API route with a Lambda function. When a client invokes the route, the
|
||||
API Gateway service forwards the request to the Lambda function and returns the function's response to the client.
|
||||
|
||||
The API Gateway service will invoke the Lambda function with an event payload of a specific format. The service expects
|
||||
the function to respond in a specific format. The details on this format are available at [Working with AWS Lambda
|
||||
proxy integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html).
|
||||
|
||||
The following code configures a route `GET /books` with a Lambda proxy integration.
|
||||
|
||||
```ts
|
||||
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const booksDefaultFn: lambda.Function;
|
||||
const booksIntegration = new HttpLambdaIntegration('BooksIntegration', booksDefaultFn);
|
||||
|
||||
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/books',
|
||||
methods: [ apigwv2.HttpMethod.GET ],
|
||||
integration: booksIntegration,
|
||||
});
|
||||
```
|
||||
|
||||
#### Lambda Integration Permissions
|
||||
|
||||
By default, creating a `HttpLambdaIntegration` will add a permission for API Gateway to invoke your AWS Lambda function, scoped to the specific route which uses the integration.
|
||||
|
||||
If you reuse the same AWS Lambda function for many integrations, the AWS Lambda permission policy size can be exceeded by adding a separate policy statement for each route which invokes the AWS Lambda function. To avoid this, you can opt to scope permissions to any route on the API by setting `scopePermissionToRoute` to `false`, and this will ensure only a single policy statement is added to the AWS Lambda permission policy.
|
||||
|
||||
```ts
|
||||
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const booksDefaultFn: lambda.Function;
|
||||
|
||||
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
|
||||
|
||||
const getBooksIntegration = new HttpLambdaIntegration('GetBooksIntegration', booksDefaultFn, {
|
||||
scopePermissionToRoute: false,
|
||||
});
|
||||
const createBookIntegration = new HttpLambdaIntegration('CreateBookIntegration', booksDefaultFn, {
|
||||
scopePermissionToRoute: false,
|
||||
});
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/books',
|
||||
methods: [ apigwv2.HttpMethod.GET ],
|
||||
integration: getBooksIntegration,
|
||||
});
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/books',
|
||||
methods: [ apigwv2.HttpMethod.POST ],
|
||||
integration: createBookIntegration,
|
||||
});
|
||||
```
|
||||
|
||||
In the above example, a single permission is added, shared by both `getBookIntegration` and `createBookIntegration`.
|
||||
|
||||
### HTTP Proxy
|
||||
|
||||
HTTP Proxy integrations enables connecting an HTTP API route to a publicly routable HTTP endpoint. When a client
|
||||
invokes the route, the API Gateway service forwards the entire request and response between the API Gateway endpoint
|
||||
and the integrating HTTP endpoint. More information can be found at [Working with HTTP proxy
|
||||
integrations](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html).
|
||||
|
||||
The following code configures a route `GET /books` with an HTTP proxy integration to an HTTP endpoint
|
||||
`get-books-proxy.example.com`.
|
||||
|
||||
```ts
|
||||
import { HttpUrlIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const booksIntegration = new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.example.com');
|
||||
|
||||
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/books',
|
||||
methods: [ apigwv2.HttpMethod.GET ],
|
||||
integration: booksIntegration,
|
||||
});
|
||||
```
|
||||
|
||||
### StepFunctions Integration
|
||||
|
||||
Step Functions integrations enable integrating an HTTP API route with AWS Step Functions.
|
||||
This allows the HTTP API to start state machine executions synchronously or asynchronously, or to stop executions.
|
||||
|
||||
When a client invokes the route configured with a Step Functions integration, the API Gateway service interacts with the specified state machine according to the integration subtype (e.g., starts a new execution, synchronously starts an execution, or stops an execution) and returns the response to the client.
|
||||
|
||||
The following code configures a Step Functions integrations:
|
||||
|
||||
```ts
|
||||
import { HttpStepFunctionsIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
||||
|
||||
declare const stateMachine: sfn.StateMachine;
|
||||
declare const httpApi: apigwv2.HttpApi;
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/start',
|
||||
methods: [ apigwv2.HttpMethod.POST ],
|
||||
integration: new HttpStepFunctionsIntegration('StartExecutionIntegration', {
|
||||
stateMachine,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION,
|
||||
}),
|
||||
});
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/start-sync',
|
||||
methods: [ apigwv2.HttpMethod.POST ],
|
||||
integration: new HttpStepFunctionsIntegration('StartSyncExecutionIntegration', {
|
||||
stateMachine,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION,
|
||||
}),
|
||||
});
|
||||
|
||||
httpApi.addRoutes({
|
||||
path: '/stop',
|
||||
methods: [ apigwv2.HttpMethod.POST ],
|
||||
integration: new HttpStepFunctionsIntegration('StopExecutionIntegration', {
|
||||
stateMachine,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION,
|
||||
// For the `STOP_EXECUTION` subtype, it is necessary to specify the `executionArn`.
|
||||
parameterMapping: new apigwv2.ParameterMapping()
|
||||
.custom('ExecutionArn', '$request.querystring.executionArn'),
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
**Note**:
|
||||
|
||||
- The `executionArn` parameter is required for the `STOP_EXECUTION` subtype. It is necessary to specify the `executionArn` in the `parameterMapping` property of the `HttpStepFunctionsIntegration` object.
|
||||
- `START_SYNC_EXECUTION` subtype is only supported for EXPRESS type state machine.
|
||||
|
||||
### SQS Integration
|
||||
|
||||
SQS integrations enable integrating an HTTP API route with AWS SQS.
|
||||
This allows the HTTP API to send, receive and delete messages from an SQS queue.
|
||||
|
||||
The following code configures a SQS integrations:
|
||||
|
||||
```ts
|
||||
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
||||
import { HttpSqsIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const queue: sqs.IQueue;
|
||||
declare const httpApi: apigwv2.HttpApi;
|
||||
|
||||
// default integration (send message)
|
||||
httpApi.addRoutes({
|
||||
path: '/default',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpSqsIntegration('defaultIntegration', {
|
||||
queue,
|
||||
}),
|
||||
});
|
||||
// send message integration
|
||||
httpApi.addRoutes({
|
||||
path: '/send-message',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpSqsIntegration('sendMessageIntegration', {
|
||||
queue,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.SQS_SEND_MESSAGE,
|
||||
}),
|
||||
});
|
||||
// receive message integration
|
||||
httpApi.addRoutes({
|
||||
path: '/receive-message',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpSqsIntegration('receiveMessageIntegration', {
|
||||
queue,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.SQS_RECEIVE_MESSAGE,
|
||||
}),
|
||||
});
|
||||
// delete message integration
|
||||
httpApi.addRoutes({
|
||||
path: '/delete-message',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpSqsIntegration('deleteMessageIntegration', {
|
||||
queue,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.SQS_DELETE_MESSAGE,
|
||||
}),
|
||||
});
|
||||
// purge queue integration
|
||||
httpApi.addRoutes({
|
||||
path: '/purge-queue',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpSqsIntegration('purgeQueueIntegration', {
|
||||
queue,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.SQS_PURGE_QUEUE,
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
#### SQS integration parameter mappings
|
||||
|
||||
You can configure the custom parameter mappings of the SQS integration using the `parameterMapping` property of the `HttpSqsIntegration` object.
|
||||
|
||||
The default parameter mapping settings for each subtype are as follows:
|
||||
|
||||
```ts
|
||||
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
||||
declare const queue: sqs.IQueue;
|
||||
|
||||
// SQS_SEND_MESSAGE
|
||||
new apigwv2.ParameterMapping()
|
||||
.custom('QueueUrl', queue.queueUrl)
|
||||
// The `MessageBody` is expected to be in the request body.
|
||||
.custom('MessageBody', '$request.body.MessageBody');
|
||||
|
||||
// SQS_RECEIVE_MESSAGE
|
||||
new apigwv2.ParameterMapping()
|
||||
.custom('QueueUrl', queue.queueUrl);
|
||||
|
||||
// SQS_DELETE_MESSAGE
|
||||
new apigwv2.ParameterMapping()
|
||||
.custom('QueueUrl', queue.queueUrl)
|
||||
// The `ReceiptHandle` is expected to be in the request body.
|
||||
.custom('ReceiptHandle', '$request.body.ReceiptHandle');
|
||||
|
||||
// SQS_PURGE_QUEUE
|
||||
new apigwv2.ParameterMapping()
|
||||
.custom('QueueUrl', queue.queueUrl);
|
||||
```
|
||||
|
||||
### EventBridge Integration
|
||||
|
||||
EventBridge integrations enable integrating an HTTP API route with Amazon EventBridge using the PutEvents API.
|
||||
This allows the HTTP API to forward requests as events to an EventBridge event bus.
|
||||
|
||||
The following code configures EventBridge integrations:
|
||||
|
||||
```ts
|
||||
import * as events from 'aws-cdk-lib/aws-events';
|
||||
import { HttpEventBridgeIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const bus: events.IEventBus;
|
||||
declare const httpApi: apigwv2.HttpApi;
|
||||
|
||||
// default integration (PutEvents)
|
||||
httpApi.addRoutes({
|
||||
path: '/default',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpEventBridgeIntegration('DefaultEventBridgeIntegration', {
|
||||
eventBusRef: bus.eventBusRef,
|
||||
}),
|
||||
});
|
||||
|
||||
// explicit subtype
|
||||
httpApi.addRoutes({
|
||||
path: '/put-events',
|
||||
methods: [apigwv2.HttpMethod.POST],
|
||||
integration: new HttpEventBridgeIntegration('ExplicitSubtypeIntegration', {
|
||||
eventBusRef: bus.eventBusRef,
|
||||
subtype: apigwv2.HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS,
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
#### EventBridge integration parameter mappings
|
||||
|
||||
You can configure the custom parameter mappings of the EventBridge integration using the `parameterMapping` property of the `HttpEventBridgeIntegration` object.
|
||||
|
||||
By default, the integration expects the request body to contain `Detail`, `DetailType`, and `Source` fields.
|
||||
|
||||
```ts
|
||||
import * as events from 'aws-cdk-lib/aws-events';
|
||||
declare const bus: events.IEventBus;
|
||||
|
||||
new apigwv2.ParameterMapping()
|
||||
// The following fields are required for the EventBridge PutEvents integration
|
||||
.custom('Detail', '$request.body.Detail')
|
||||
.custom('DetailType', '$request.body.DetailType')
|
||||
.custom('Source', '$request.body.Source');
|
||||
```
|
||||
|
||||
### Private Integration
|
||||
|
||||
Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or
|
||||
Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by
|
||||
clients outside of the VPC.
|
||||
|
||||
The following integrations are supported for private resources in a VPC.
|
||||
|
||||
#### Application Load Balancer
|
||||
|
||||
The following code is a basic application load balancer private integration of HTTP API:
|
||||
|
||||
```ts
|
||||
import { HttpAlbIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const vpc = new ec2.Vpc(this, 'VPC');
|
||||
const lb = new elbv2.ApplicationLoadBalancer(this, 'lb', { vpc });
|
||||
const listener = lb.addListener('listener', { port: 80 });
|
||||
listener.addTargets('target', {
|
||||
port: 80,
|
||||
});
|
||||
|
||||
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
|
||||
defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener),
|
||||
});
|
||||
```
|
||||
|
||||
When an imported load balancer is used, the `vpc` option must be specified for `HttpAlbIntegration`.
|
||||
|
||||
#### Network Load Balancer
|
||||
|
||||
The following code is a basic network load balancer private integration of HTTP API:
|
||||
|
||||
```ts
|
||||
import { HttpNlbIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const vpc = new ec2.Vpc(this, 'VPC');
|
||||
const lb = new elbv2.NetworkLoadBalancer(this, 'lb', { vpc });
|
||||
const listener = lb.addListener('listener', { port: 80 });
|
||||
listener.addTargets('target', {
|
||||
port: 80,
|
||||
});
|
||||
|
||||
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
|
||||
defaultIntegration: new HttpNlbIntegration('DefaultIntegration', listener),
|
||||
});
|
||||
```
|
||||
|
||||
When an imported load balancer is used, the `vpc` option must be specified for `HttpNlbIntegration`.
|
||||
|
||||
#### Cloud Map Service Discovery
|
||||
|
||||
The following code is a basic discovery service private integration of HTTP API:
|
||||
|
||||
```ts
|
||||
import * as servicediscovery from 'aws-cdk-lib/aws-servicediscovery';
|
||||
import { HttpServiceDiscoveryIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const vpc = new ec2.Vpc(this, 'VPC');
|
||||
const vpcLink = new apigwv2.VpcLink(this, 'VpcLink', { vpc });
|
||||
const namespace = new servicediscovery.PrivateDnsNamespace(this, 'Namespace', {
|
||||
name: 'boobar.com',
|
||||
vpc,
|
||||
});
|
||||
const service = namespace.createService('Service');
|
||||
|
||||
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
|
||||
defaultIntegration: new HttpServiceDiscoveryIntegration('DefaultIntegration', service, {
|
||||
vpcLink,
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
### Request Parameters
|
||||
|
||||
Request parameter mapping allows API requests from clients to be modified before they reach backend integrations.
|
||||
Parameter mapping can be used to specify modifications to request parameters. See [Transforming API requests and
|
||||
responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html).
|
||||
|
||||
The following example creates a new header - `header2` - as a copy of `header1` and removes `header1`.
|
||||
|
||||
```ts
|
||||
import { HttpAlbIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const lb: elbv2.ApplicationLoadBalancer;
|
||||
const listener = lb.addListener('listener', { port: 80 });
|
||||
listener.addTargets('target', {
|
||||
port: 80,
|
||||
});
|
||||
|
||||
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
|
||||
defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
|
||||
parameterMapping: new apigwv2.ParameterMapping()
|
||||
.appendHeader('header2', apigwv2.MappingValue.requestHeader('header1'))
|
||||
.removeHeader('header1'),
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
To add mapping keys and values not yet supported by the CDK, use the `custom()` method:
|
||||
|
||||
```ts
|
||||
import { HttpAlbIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
declare const lb: elbv2.ApplicationLoadBalancer;
|
||||
const listener = lb.addListener('listener', { port: 80 });
|
||||
listener.addTargets('target', {
|
||||
port: 80,
|
||||
});
|
||||
|
||||
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
|
||||
defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
|
||||
parameterMapping: new apigwv2.ParameterMapping().custom('myKey', 'myValue'),
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## WebSocket APIs
|
||||
|
||||
WebSocket integrations connect a route to backend resources. The following integrations are supported in the CDK.
|
||||
|
||||
### Lambda WebSocket Integration
|
||||
|
||||
Lambda integrations enable integrating a WebSocket API route with a Lambda function. When a client connects/disconnects
|
||||
or sends a message specific to a route, the API Gateway service forwards the request to the Lambda function
|
||||
|
||||
The API Gateway service will invoke the Lambda function with an event payload of a specific format.
|
||||
|
||||
The following code configures a `sendMessage` route with a Lambda integration
|
||||
|
||||
```ts
|
||||
import { WebSocketLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi');
|
||||
new apigwv2.WebSocketStage(this, 'mystage', {
|
||||
webSocketApi,
|
||||
stageName: 'dev',
|
||||
autoDeploy: true,
|
||||
});
|
||||
|
||||
declare const messageHandler: lambda.Function;
|
||||
webSocketApi.addRoute('sendMessage', {
|
||||
integration: new WebSocketLambdaIntegration('SendMessageIntegration', messageHandler),
|
||||
});
|
||||
```
|
||||
|
||||
### AWS WebSocket Integration
|
||||
|
||||
AWS type integrations enable integrating with any supported AWS service. This is only supported for WebSocket APIs. When a client
|
||||
connects/disconnects or sends a message specific to a route, the API Gateway service forwards the request to the specified AWS service.
|
||||
|
||||
The following code configures a `$connect` route with a AWS integration that integrates with a dynamodb table. On websocket api connect,
|
||||
it will write new entry to the dynamodb table.
|
||||
|
||||
```ts
|
||||
import { WebSocketAwsIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
|
||||
import * as iam from 'aws-cdk-lib/aws-iam';
|
||||
|
||||
const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi');
|
||||
new apigwv2.WebSocketStage(this, 'mystage', {
|
||||
webSocketApi,
|
||||
stageName: 'dev',
|
||||
autoDeploy: true,
|
||||
});
|
||||
|
||||
declare const apiRole: iam.Role;
|
||||
declare const table: dynamodb.Table;
|
||||
webSocketApi.addRoute('$connect', {
|
||||
integration: new WebSocketAwsIntegration('DynamodbPutItem', {
|
||||
integrationUri: `arn:aws:apigateway:${this.region}:dynamodb:action/PutItem`,
|
||||
integrationMethod: apigwv2.HttpMethod.POST,
|
||||
credentialsRole: apiRole,
|
||||
requestTemplates: {
|
||||
'application/json': JSON.stringify({
|
||||
TableName: table.tableName,
|
||||
Item: {
|
||||
id: {
|
||||
S: '$context.requestId',
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
You can also set additional properties to change the behavior of your integration, such as `contentHandling`.
|
||||
See [Working with binary media types for WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-binary-media-types.html).
|
||||
|
||||
### Mock WebSocket Integration
|
||||
|
||||
API Gateway also allows the creation of mock integrations, allowing you to generate API responses without the need for an integration backend. These responses can range in complexity from a static message to a templated response with parameters extracted from the input request or the integration's context. See [Set up data mapping for WebSocket APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html) and [WebSocket API mapping template reference for API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html) for more information.
|
||||
|
||||
```ts
|
||||
import { WebSocketMockIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
||||
|
||||
const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi');
|
||||
new apigwv2.WebSocketStage(this, 'mystage', {
|
||||
webSocketApi,
|
||||
stageName: 'dev',
|
||||
autoDeploy: true,
|
||||
});
|
||||
|
||||
|
||||
webSocketApi.addRoute('sendMessage', {
|
||||
integration: new WebSocketMockIntegration('DefaultIntegration', {
|
||||
requestTemplates: { 'application/json': JSON.stringify({ statusCode: 200 }) },
|
||||
templateSelectionExpression: '\\$default',
|
||||
}),
|
||||
returnResponse: true,
|
||||
});
|
||||
```
|
||||
|
||||
## Import Issues
|
||||
|
||||
`jsiirc.json` file is missing during the stablization process of this module, which caused import issues for DotNet and Java users who attempt to use this module. Unfortunately, to guarantee backward compatibility, we cannot simply correct the namespace for DotNet or package for Java. The following outlines the workaround.
|
||||
|
||||
### DotNet Namespace
|
||||
|
||||
Instead of the conventional namespace `Amazon.CDK.AWS.Apigatewayv2.Integrations`, you would need to use the following namespace:
|
||||
|
||||
```cs
|
||||
using Amazon.CDK.AwsApigatewayv2Integrations;
|
||||
```
|
||||
|
||||
### Java Package
|
||||
|
||||
Instead of conventional package `import software.amazon.awscdk.services.apigatewayv2_integrations.*`, you would need to use the following package:
|
||||
|
||||
```java
|
||||
import software.amazon.awscdk.aws_apigatewayv2_integrations.*;
|
||||
|
||||
// If you want to import a specific construct
|
||||
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration;
|
||||
```
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/index.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.HttpAlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpAlbIntegration;return Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpNlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpNlbIntegration;return Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpServiceDiscoveryIntegration=void 0,Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpServiceDiscoveryIntegration;return Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpUrlIntegration=void 0,Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpUrlIntegration;return Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpLambdaIntegration;return Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpStepFunctionsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpStepFunctionsIntegration;return Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpSqsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpSqsIntegration;return Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpEventBridgeIntegration=void 0,Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").HttpEventBridgeIntegration;return Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").WebSocketLambdaIntegration;return Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketMockIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").WebSocketMockIntegration;return Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketAwsIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").WebSocketAwsIntegration;return Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,value}),value}});
|
||||
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/alb.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/alb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { HttpPrivateIntegrationOptions } from './base-types';
|
||||
import { HttpPrivateIntegration } from './private/integration';
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '../../../aws-apigatewayv2';
|
||||
import * as elbv2 from '../../../aws-elasticloadbalancingv2';
|
||||
/**
|
||||
* Properties to initialize `HttpAlbIntegration`.
|
||||
*/
|
||||
export interface HttpAlbIntegrationProps extends HttpPrivateIntegrationOptions {
|
||||
}
|
||||
/**
|
||||
* The Application Load Balancer integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpAlbIntegration extends HttpPrivateIntegration {
|
||||
private readonly listener;
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param listener the ELB application listener
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, listener: elbv2.IApplicationListener, props?: HttpAlbIntegrationProps);
|
||||
bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/alb.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/alb.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpAlbIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integration_1=()=>{var tmp=require("./private/integration");return integration_1=()=>tmp,tmp},elbv2=()=>{var tmp=require("../../../aws-elasticloadbalancingv2");return elbv2=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpAlbIntegration extends integration_1().HttpPrivateIntegration{listener;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpAlbIntegration",version:"2.252.0"};constructor(id,listener,props={}){super(id),this.listener=listener,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_IApplicationListener(listener),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpAlbIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpAlbIntegration),error}}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}let vpc=this.props.vpcLink?.vpc;if(!vpc&&this.listener instanceof elbv2().ApplicationListener&&(vpc=this.listener.loadBalancer.vpc),!vpc)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`VpcLinkPropertySpecifiedImported`,"The vpcLink property must be specified when using an imported Application Listener.",options.scope);const vpcLink=this._configureVpcLink(options,{vpcLink:this.props.vpcLink,vpc});return{method:this.props.method??this.httpMethod,payloadFormatVersion:this.payloadFormatVersion,type:this.integrationType,connectionType:this.connectionType,connectionId:vpcLink.vpcLinkId,uri:this.listener.listenerArn,secureServerName:this.props.secureServerName,parameterMapping:this.props.parameterMapping,timeout:this.props.timeout}}}exports.HttpAlbIntegration=HttpAlbIntegration;
|
||||
36
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/base-types.d.ts
generated
vendored
Normal file
36
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/base-types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { HttpMethod, IVpcLink, ParameterMapping } from '../../../aws-apigatewayv2';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* Base options for private integration
|
||||
*/
|
||||
export interface HttpPrivateIntegrationOptions {
|
||||
/**
|
||||
* The vpc link to be used for the private integration
|
||||
*
|
||||
* @default - a new VpcLink is created
|
||||
*/
|
||||
readonly vpcLink?: IVpcLink;
|
||||
/**
|
||||
* The HTTP method that must be used to invoke the underlying HTTP proxy.
|
||||
* @default HttpMethod.ANY
|
||||
*/
|
||||
readonly method?: HttpMethod;
|
||||
/**
|
||||
* Specifies the server name to verified by HTTPS when calling the backend integration
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html
|
||||
* @default undefined private integration traffic will use HTTP protocol
|
||||
*/
|
||||
readonly secureServerName?: string;
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
|
||||
* @default undefined requests are sent to the backend unmodified
|
||||
*/
|
||||
readonly parameterMapping?: ParameterMapping;
|
||||
/**
|
||||
* The maximum amount of time an integration will run before it returns without a response.
|
||||
* Must be between 50 milliseconds and 29 seconds.
|
||||
* @default Duration.seconds(29)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/base-types.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/base-types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
47
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/eventbridge.d.ts
generated
vendored
Normal file
47
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/eventbridge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import * as apigwv2 from '../../../aws-apigatewayv2';
|
||||
import type * as events from '../../../aws-events';
|
||||
/**
|
||||
* Properties to initialize `HttpEventBridgeIntegration`.
|
||||
*/
|
||||
export interface HttpEventBridgeIntegrationProps {
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend.
|
||||
*
|
||||
* When not provided, a default mapping will be used that expects the
|
||||
* incoming request body to contain the fields `Detail`, `DetailType`, and
|
||||
* `Source`.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html
|
||||
*
|
||||
* @default - set `Detail` to `$request.body.Detail`,
|
||||
* `DetailType` to `$request.body.DetailType`, and `Source` to `$request.body.Source`.
|
||||
*/
|
||||
readonly parameterMapping?: apigwv2.ParameterMapping;
|
||||
/**
|
||||
* The subtype of the HTTP integration.
|
||||
*
|
||||
* Only subtypes starting with EVENTBRIDGE_ can be specified.
|
||||
*
|
||||
* @default HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS
|
||||
*/
|
||||
readonly subtype?: apigwv2.HttpIntegrationSubtype;
|
||||
/**
|
||||
* EventBridge event bus that integrates with API Gateway
|
||||
*/
|
||||
readonly eventBusRef: events.EventBusReference;
|
||||
}
|
||||
/**
|
||||
* The EventBridge PutEvents integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpEventBridgeIntegration extends apigwv2.HttpRouteIntegration {
|
||||
private readonly props;
|
||||
private readonly subtype;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, props: HttpEventBridgeIntegrationProps);
|
||||
bind(options: apigwv2.HttpRouteIntegrationBindOptions): apigwv2.HttpRouteIntegrationConfig;
|
||||
private createDefaultParameterMapping;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/eventbridge.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/eventbridge.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpEventBridgeIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var apigwv2=()=>{var tmp=require("../../../aws-apigatewayv2");return apigwv2=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpEventBridgeIntegration extends apigwv2().HttpRouteIntegration{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpEventBridgeIntegration",version:"2.252.0"};subtype;constructor(id,props){super(id),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpEventBridgeIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpEventBridgeIntegration),error}this.subtype=this.props.subtype??apigwv2().HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props.subtype&&!this.props.subtype.startsWith("EventBridge-"))throw new(core_1()).ValidationError((0,literal_string_1().lit)`SubtypeStart`,"Subtype must start with `EventBridge-`",options.scope);const invokeRole=new(iam()).Role(options.scope,"InvokeRole",{assumedBy:new(iam()).ServicePrincipal("apigateway.amazonaws.com")});return invokeRole.addToPolicy(new(iam()).PolicyStatement({effect:iam().Effect.ALLOW,sid:"AllowEventBridgePutEvents",actions:["events:PutEvents"],resources:[this.props.eventBusRef.eventBusArn]})),{payloadFormatVersion:apigwv2().PayloadFormatVersion.VERSION_1_0,type:apigwv2().HttpIntegrationType.AWS_PROXY,subtype:this.subtype,credentials:apigwv2().IntegrationCredentials.fromRole(invokeRole),connectionType:apigwv2().HttpConnectionType.INTERNET,parameterMapping:this.props.parameterMapping??this.createDefaultParameterMapping(options.scope)}}createDefaultParameterMapping(scope){if(this.subtype===apigwv2().HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS)return new(apigwv2()).ParameterMapping().custom("Detail","$request.body.Detail").custom("DetailType","$request.body.DetailType").custom("Source","$request.body.Source");throw new(core_1()).ValidationError((0,literal_string_1().lit)`UnsupportedSubtype`,`Unsupported subtype: ${this.subtype}`,scope)}}exports.HttpEventBridgeIntegration=HttpEventBridgeIntegration;
|
||||
40
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/http-proxy.d.ts
generated
vendored
Normal file
40
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/http-proxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, ParameterMapping } from '../../../aws-apigatewayv2';
|
||||
import { HttpMethod, HttpRouteIntegration } from '../../../aws-apigatewayv2';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* Properties to initialize a new `HttpProxyIntegration`.
|
||||
*/
|
||||
export interface HttpUrlIntegrationProps {
|
||||
/**
|
||||
* The HTTP method that must be used to invoke the underlying HTTP proxy.
|
||||
* @default HttpMethod.ANY
|
||||
*/
|
||||
readonly method?: HttpMethod;
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
|
||||
* @default undefined requests are sent to the backend unmodified
|
||||
*/
|
||||
readonly parameterMapping?: ParameterMapping;
|
||||
/**
|
||||
* The maximum amount of time an integration will run before it returns without a response.
|
||||
* Must be between 50 milliseconds and 29 seconds.
|
||||
*
|
||||
* @default Duration.seconds(29)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
}
|
||||
/**
|
||||
* The HTTP Proxy integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpUrlIntegration extends HttpRouteIntegration {
|
||||
private readonly url;
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param url the URL to proxy to
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, url: string, props?: HttpUrlIntegrationProps);
|
||||
bind(_options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/http-proxy.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/http-proxy.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpUrlIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp};class HttpUrlIntegration extends aws_apigatewayv2_1().HttpRouteIntegration{url;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpUrlIntegration",version:"2.252.0"};constructor(id,url,props={}){super(id),this.url=url,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpUrlIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpUrlIntegration),error}}bind(_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{method:this.props.method??aws_apigatewayv2_1().HttpMethod.ANY,payloadFormatVersion:aws_apigatewayv2_1().PayloadFormatVersion.VERSION_1_0,type:aws_apigatewayv2_1().HttpIntegrationType.HTTP_PROXY,uri:this.url,parameterMapping:this.props.parameterMapping,timeout:this.props.timeout}}}exports.HttpUrlIntegration=HttpUrlIntegration;
|
||||
9
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/index.d.ts
generated
vendored
Normal file
9
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export * from './base-types';
|
||||
export * from './alb';
|
||||
export * from './nlb';
|
||||
export * from './service-discovery';
|
||||
export * from './http-proxy';
|
||||
export * from './lambda';
|
||||
export * from './stepfunctions';
|
||||
export * from './sqs';
|
||||
export * from './eventbridge';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.HttpAlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./alb").HttpAlbIntegration;return Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpNlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./nlb").HttpNlbIntegration;return Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpServiceDiscoveryIntegration=void 0,Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./service-discovery").HttpServiceDiscoveryIntegration;return Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpUrlIntegration=void 0,Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http-proxy").HttpUrlIntegration;return Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").HttpLambdaIntegration;return Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpStepFunctionsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./stepfunctions").HttpStepFunctionsIntegration;return Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpSqsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./sqs").HttpSqsIntegration;return Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpEventBridgeIntegration=void 0,Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./eventbridge").HttpEventBridgeIntegration;return Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,value}),value}});
|
||||
55
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/lambda.d.ts
generated
vendored
Normal file
55
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, ParameterMapping } from '../../../aws-apigatewayv2';
|
||||
import { HttpRouteIntegration, PayloadFormatVersion } from '../../../aws-apigatewayv2';
|
||||
import type { IFunction } from '../../../aws-lambda';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* Lambda Proxy integration properties
|
||||
*/
|
||||
export interface HttpLambdaIntegrationProps {
|
||||
/**
|
||||
* Version of the payload sent to the lambda handler.
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
||||
* @default PayloadFormatVersion.VERSION_2_0
|
||||
*/
|
||||
readonly payloadFormatVersion?: PayloadFormatVersion;
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
|
||||
* @default undefined requests are sent to the backend unmodified
|
||||
*/
|
||||
readonly parameterMapping?: ParameterMapping;
|
||||
/**
|
||||
* The maximum amount of time an integration will run before it returns without a response.
|
||||
* Must be between 50 milliseconds and 29 seconds.
|
||||
*
|
||||
* @default Duration.seconds(29)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
/**
|
||||
* Scope the permission for invoking the AWS Lambda down to the specific route
|
||||
* associated with this integration.
|
||||
*
|
||||
* If this is set to `false`, the permission will allow invoking the AWS Lambda
|
||||
* from any route. This is useful for reducing the AWS Lambda policy size
|
||||
* for cases where the same AWS Lambda function is reused for many integrations.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly scopePermissionToRoute?: boolean;
|
||||
}
|
||||
/**
|
||||
* The Lambda Proxy integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpLambdaIntegration extends HttpRouteIntegration {
|
||||
private readonly handler;
|
||||
private readonly props;
|
||||
private readonly _id;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param handler the Lambda handler to integrate with
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, handler: IFunction, props?: HttpLambdaIntegrationProps);
|
||||
protected completeBind(options: HttpRouteIntegrationBindOptions): void;
|
||||
bind(_options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/lambda.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/lambda.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpLambdaIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp},aws_iam_1=()=>{var tmp=require("../../../aws-iam");return aws_iam_1=()=>tmp,tmp},aws_lambda_1=()=>{var tmp=require("../../../aws-lambda");return aws_lambda_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class HttpLambdaIntegration extends aws_apigatewayv2_1().HttpRouteIntegration{handler;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpLambdaIntegration",version:"2.252.0"};_id;constructor(id,handler,props={}){super(id),this.handler=handler,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpLambdaIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpLambdaIntegration),error}this._id=id}completeBind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.completeBind),error}const route=options.route;if(this.props.scopePermissionToRoute??!0)this.handler.addPermission(`${this._id}-Permission`,{scope:options.scope,principal:new(aws_iam_1()).ServicePrincipal("apigateway.amazonaws.com"),sourceArn:core_1().Stack.of(route).formatArn({service:"execute-api",resource:route.httpApi.apiId,resourceName:`*/*${route.path??""}`})});else{const apiScopedPermissionId=`ApiPermission.ApiScoped.${core_1().Names.nodeUniqueId(this.handler.node)}.${core_1().Names.nodeUniqueId(route.httpApi.node)}`;core_1().Stack.of(options.scope).node.findAll().find(c=>c instanceof aws_lambda_1().CfnPermission&&c.node.id===apiScopedPermissionId)||this.handler.addPermission(apiScopedPermissionId,{scope:options.scope,principal:new(aws_iam_1()).ServicePrincipal("apigateway.amazonaws.com"),sourceArn:core_1().Stack.of(route).formatArn({service:"execute-api",resource:route.httpApi.apiId,resourceName:"*/*/*"})})}}bind(_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{type:aws_apigatewayv2_1().HttpIntegrationType.AWS_PROXY,uri:this.handler.functionArn,payloadFormatVersion:this.props.payloadFormatVersion??aws_apigatewayv2_1().PayloadFormatVersion.VERSION_2_0,parameterMapping:this.props.parameterMapping,timeout:this.props.timeout}}}exports.HttpLambdaIntegration=HttpLambdaIntegration;
|
||||
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/nlb.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/nlb.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { HttpPrivateIntegrationOptions } from './base-types';
|
||||
import { HttpPrivateIntegration } from './private/integration';
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '../../../aws-apigatewayv2';
|
||||
import * as elbv2 from '../../../aws-elasticloadbalancingv2';
|
||||
/**
|
||||
* Properties to initialize `HttpNlbIntegration`.
|
||||
*/
|
||||
export interface HttpNlbIntegrationProps extends HttpPrivateIntegrationOptions {
|
||||
}
|
||||
/**
|
||||
* The Network Load Balancer integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpNlbIntegration extends HttpPrivateIntegration {
|
||||
private readonly listener;
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param listener the ELB network listener
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, listener: elbv2.INetworkListener, props?: HttpNlbIntegrationProps);
|
||||
bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/nlb.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/nlb.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpNlbIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integration_1=()=>{var tmp=require("./private/integration");return integration_1=()=>tmp,tmp},elbv2=()=>{var tmp=require("../../../aws-elasticloadbalancingv2");return elbv2=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpNlbIntegration extends integration_1().HttpPrivateIntegration{listener;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpNlbIntegration",version:"2.252.0"};constructor(id,listener,props={}){super(id),this.listener=listener,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_INetworkListener(listener),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpNlbIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpNlbIntegration),error}}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}let vpc=this.props.vpcLink?.vpc;if(!vpc&&this.listener instanceof elbv2().NetworkListener&&(vpc=this.listener.loadBalancer.vpc),!vpc)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`VpcLinkPropertySpecifiedImported`,"The vpcLink property must be specified when using an imported Network Listener.",options.scope);const vpcLink=this._configureVpcLink(options,{vpcLink:this.props.vpcLink,vpc});return{method:this.props.method??this.httpMethod,payloadFormatVersion:this.payloadFormatVersion,type:this.integrationType,connectionType:this.connectionType,connectionId:vpcLink.vpcLinkId,uri:this.listener.listenerArn,secureServerName:this.props.secureServerName,parameterMapping:this.props.parameterMapping,timeout:this.props.timeout}}}exports.HttpNlbIntegration=HttpNlbIntegration;
|
||||
40
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/private/integration.d.ts
generated
vendored
Normal file
40
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/private/integration.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, IVpcLink } from '../../../../aws-apigatewayv2';
|
||||
import { HttpConnectionType, HttpIntegrationType, HttpRouteIntegration, PayloadFormatVersion, HttpMethod } from '../../../../aws-apigatewayv2';
|
||||
import type * as ec2 from '../../../../aws-ec2';
|
||||
/**
|
||||
* Options required to use an existing vpcLink or configure a new one
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export interface VpcLinkConfigurationOptions {
|
||||
/**
|
||||
* The vpc link to be used for the private integration
|
||||
*
|
||||
* @default - a new VpcLink is created
|
||||
*/
|
||||
readonly vpcLink?: IVpcLink;
|
||||
/**
|
||||
* The vpc for which the VpcLink needs to be created
|
||||
*
|
||||
* @default undefined
|
||||
*/
|
||||
readonly vpc?: ec2.IVpc;
|
||||
}
|
||||
/**
|
||||
* The HTTP Private integration resource for HTTP API
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export declare abstract class HttpPrivateIntegration extends HttpRouteIntegration {
|
||||
protected httpMethod: HttpMethod;
|
||||
protected payloadFormatVersion: PayloadFormatVersion;
|
||||
protected integrationType: HttpIntegrationType;
|
||||
protected connectionType: HttpConnectionType;
|
||||
/**
|
||||
* Adds a vpcLink to the API if not passed in the options
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected _configureVpcLink(bindOptions: HttpRouteIntegrationBindOptions, configOptions: VpcLinkConfigurationOptions): IVpcLink;
|
||||
abstract bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/private/integration.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/private/integration.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpPrivateIntegration=void 0;var aws_apigatewayv2_1=()=>{var tmp=require("../../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpPrivateIntegration extends aws_apigatewayv2_1().HttpRouteIntegration{httpMethod=aws_apigatewayv2_1().HttpMethod.ANY;payloadFormatVersion=aws_apigatewayv2_1().PayloadFormatVersion.VERSION_1_0;integrationType=aws_apigatewayv2_1().HttpIntegrationType.HTTP_PROXY;connectionType=aws_apigatewayv2_1().HttpConnectionType.VPC_LINK;_configureVpcLink(bindOptions,configOptions){let vpcLink=configOptions.vpcLink;if(!vpcLink){if(!configOptions.vpc)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`OneVpcLinkVpcProvided`,"One of vpcLink or vpc should be provided for private integration",bindOptions.scope);vpcLink=bindOptions.route.httpApi.addVpcLink({vpc:configOptions.vpc})}return vpcLink}}exports.HttpPrivateIntegration=HttpPrivateIntegration;
|
||||
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/service-discovery.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/service-discovery.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { HttpPrivateIntegrationOptions } from './base-types';
|
||||
import { HttpPrivateIntegration } from './private/integration';
|
||||
import type { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '../../../aws-apigatewayv2';
|
||||
import type { IServiceRef } from '../../../interfaces/generated/aws-servicediscovery-interfaces.generated';
|
||||
/**
|
||||
* Properties to initialize `HttpServiceDiscoveryIntegration`.
|
||||
*/
|
||||
export interface HttpServiceDiscoveryIntegrationProps extends HttpPrivateIntegrationOptions {
|
||||
}
|
||||
/**
|
||||
* The Service Discovery integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration {
|
||||
private readonly service;
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param service the service discovery resource to integrate with
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, service: IServiceRef, props?: HttpServiceDiscoveryIntegrationProps);
|
||||
bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/service-discovery.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/service-discovery.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpServiceDiscoveryIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integration_1=()=>{var tmp=require("./private/integration");return integration_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpServiceDiscoveryIntegration extends integration_1().HttpPrivateIntegration{service;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpServiceDiscoveryIntegration",version:"2.252.0"};constructor(id,service,props={}){super(id),this.service=service,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_servicediscovery_IServiceRef(service),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpServiceDiscoveryIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpServiceDiscoveryIntegration),error}}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(!this.props.vpcLink)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`VpcLinkPropertyMandatory`,"The vpcLink property is mandatory",options.scope);return{method:this.props.method??this.httpMethod,payloadFormatVersion:this.payloadFormatVersion,type:this.integrationType,connectionType:this.connectionType,connectionId:this.props.vpcLink.vpcLinkId,uri:this.service.serviceRef.serviceArn,secureServerName:this.props.secureServerName,parameterMapping:this.props.parameterMapping}}}exports.HttpServiceDiscoveryIntegration=HttpServiceDiscoveryIntegration;
|
||||
44
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/sqs.d.ts
generated
vendored
Normal file
44
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/sqs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import * as apigwv2 from '../../../aws-apigatewayv2';
|
||||
import type * as sqs from '../../../aws-sqs';
|
||||
/**
|
||||
* Properties to initialize `HttpSqsIntegration`.
|
||||
*/
|
||||
export interface HttpSqsIntegrationProps {
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html#http-api-develop-integrations-aws-services-parameter-mapping
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html
|
||||
*
|
||||
* @default - specify `QueueUrl`. Additionally, set `MessageBody` to `$request.body.MessageBody` for `SQS_SEND_MESSAGE` subtype
|
||||
* and set `ReceiptHandle` to `$request.body.ReceiptHandle` for `SQS_DELETE_MESSAGE` subtype.
|
||||
*/
|
||||
readonly parameterMapping?: apigwv2.ParameterMapping;
|
||||
/**
|
||||
* The subtype of the HTTP integration.
|
||||
*
|
||||
* Only subtypes starting with SQS_ can be specified.
|
||||
*
|
||||
* @default HttpIntegrationSubtype.SQS_SEND_MESSAGE
|
||||
*/
|
||||
readonly subtype?: apigwv2.HttpIntegrationSubtype;
|
||||
/**
|
||||
* SQS queue that Integrates with API Gateway
|
||||
*/
|
||||
readonly queue: sqs.IQueue;
|
||||
}
|
||||
/**
|
||||
* The Sqs integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpSqsIntegration extends apigwv2.HttpRouteIntegration {
|
||||
private readonly props;
|
||||
private readonly subtype;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, props: HttpSqsIntegrationProps);
|
||||
bind(options: apigwv2.HttpRouteIntegrationBindOptions): apigwv2.HttpRouteIntegrationConfig;
|
||||
private determineActionBySubtype;
|
||||
private createDefaultParameterMapping;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/sqs.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/sqs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpSqsIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var apigwv2=()=>{var tmp=require("../../../aws-apigatewayv2");return apigwv2=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpSqsIntegration extends apigwv2().HttpRouteIntegration{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpSqsIntegration",version:"2.252.0"};subtype;constructor(id,props){super(id),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpSqsIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpSqsIntegration),error}this.subtype=this.props.subtype??apigwv2().HttpIntegrationSubtype.SQS_SEND_MESSAGE}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props.subtype&&!this.props.subtype.startsWith("SQS-"))throw new(core_1()).ValidationError((0,literal_string_1().lit)`SubtypeStart`,"Subtype must start with `SQS_`",options.scope);const invokeRole=new(iam()).Role(options.scope,"InvokeRole",{assumedBy:new(iam()).ServicePrincipal("apigateway.amazonaws.com")});return invokeRole.addToPolicy(new(iam()).PolicyStatement({effect:iam().Effect.ALLOW,sid:"AllowSqsExecution",actions:[this.determineActionBySubtype(options.scope)],resources:[this.props.queue.queueArn]})),{payloadFormatVersion:apigwv2().PayloadFormatVersion.VERSION_1_0,type:apigwv2().HttpIntegrationType.AWS_PROXY,subtype:this.props.subtype??apigwv2().HttpIntegrationSubtype.SQS_SEND_MESSAGE,credentials:apigwv2().IntegrationCredentials.fromRole(invokeRole),connectionType:apigwv2().HttpConnectionType.INTERNET,parameterMapping:this.props.parameterMapping??this.createDefaultParameterMapping(options.scope)}}determineActionBySubtype(scope){switch(this.subtype){case apigwv2().HttpIntegrationSubtype.SQS_SEND_MESSAGE:return"sqs:SendMessage";case apigwv2().HttpIntegrationSubtype.SQS_RECEIVE_MESSAGE:return"sqs:ReceiveMessage";case apigwv2().HttpIntegrationSubtype.SQS_DELETE_MESSAGE:return"sqs:DeleteMessage";case apigwv2().HttpIntegrationSubtype.SQS_PURGE_QUEUE:return"sqs:PurgeQueue";default:throw new(core_1()).ValidationError((0,literal_string_1().lit)`UnsupportedSubtype`,`Unsupported subtype: ${this.subtype}`,scope)}}createDefaultParameterMapping(scope){switch(this.subtype){case apigwv2().HttpIntegrationSubtype.SQS_SEND_MESSAGE:return new(apigwv2()).ParameterMapping().custom("QueueUrl",this.props.queue.queueUrl).custom("MessageBody","$request.body.MessageBody");case apigwv2().HttpIntegrationSubtype.SQS_RECEIVE_MESSAGE:return new(apigwv2()).ParameterMapping().custom("QueueUrl",this.props.queue.queueUrl);case apigwv2().HttpIntegrationSubtype.SQS_DELETE_MESSAGE:return new(apigwv2()).ParameterMapping().custom("QueueUrl",this.props.queue.queueUrl).custom("ReceiptHandle","$request.body.ReceiptHandle");case apigwv2().HttpIntegrationSubtype.SQS_PURGE_QUEUE:return new(apigwv2()).ParameterMapping().custom("QueueUrl",this.props.queue.queueUrl);default:throw new(core_1()).ValidationError((0,literal_string_1().lit)`UnsupportedSubtype`,`Unsupported subtype: ${this.subtype}`,scope)}}}exports.HttpSqsIntegration=HttpSqsIntegration;
|
||||
45
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/stepfunctions.d.ts
generated
vendored
Normal file
45
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/stepfunctions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import * as apigwv2 from '../../../aws-apigatewayv2';
|
||||
import * as sfn from '../../../aws-stepfunctions';
|
||||
/**
|
||||
* Properties to initialize `HttpStepFunctionsIntegration`.
|
||||
*/
|
||||
export interface HttpStepFunctionsIntegrationProps {
|
||||
/**
|
||||
* Specifies how to transform HTTP requests before sending them to the backend.
|
||||
*
|
||||
* When the subtype is either `START_EXECUTION` or `START_SYNC_EXECUTION`,
|
||||
* it is necessary to specify the `StateMachineArn`.
|
||||
* Conversely, when the subtype is `STOP_EXECUTION`, the `ExecutionArn` must be specified.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
|
||||
*
|
||||
* @default - specify only `StateMachineArn`
|
||||
*/
|
||||
readonly parameterMapping?: apigwv2.ParameterMapping;
|
||||
/**
|
||||
* The subtype of the HTTP integration.
|
||||
*
|
||||
* Only subtypes starting with STEPFUNCTIONS_ can be specified.
|
||||
*
|
||||
* @default HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION
|
||||
*/
|
||||
readonly subtype?: apigwv2.HttpIntegrationSubtype;
|
||||
/**
|
||||
* Statemachine that Integrates with API Gateway
|
||||
*/
|
||||
readonly stateMachine: sfn.StateMachine;
|
||||
}
|
||||
/**
|
||||
* The StepFunctions integration resource for HTTP API
|
||||
*/
|
||||
export declare class HttpStepFunctionsIntegration extends apigwv2.HttpRouteIntegration {
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, props: HttpStepFunctionsIntegrationProps);
|
||||
bind(options: apigwv2.HttpRouteIntegrationBindOptions): apigwv2.HttpRouteIntegrationConfig;
|
||||
private determineActionBySubtype;
|
||||
private determineResourceArn;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/stepfunctions.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/http/stepfunctions.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpStepFunctionsIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var apigwv2=()=>{var tmp=require("../../../aws-apigatewayv2");return apigwv2=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class HttpStepFunctionsIntegration extends apigwv2().HttpRouteIntegration{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.HttpStepFunctionsIntegration",version:"2.252.0"};constructor(id,props){super(id),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_HttpStepFunctionsIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpStepFunctionsIntegration),error}}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.props.subtype&&!this.props.subtype.startsWith("StepFunctions-"))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`SubtypeStart`,"Subtype must start with `STEPFUNCTIONS_`",options.scope);if(this.props.subtype===apigwv2().HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION&&this.props.stateMachine.stateMachineType===sfn().StateMachineType.STANDARD)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`CannotSubtypeStandardTypeSta`,"Cannot use subtype `STEPFUNCTIONS_START_SYNC_EXECUTION` with a standard type state machine",options.scope);const invokeRole=new(iam()).Role(options.scope,"InvokeRole",{assumedBy:new(iam()).ServicePrincipal("apigateway.amazonaws.com")});return invokeRole.addToPolicy(new(iam()).PolicyStatement({effect:iam().Effect.ALLOW,sid:"AllowStepFunctionsExecution",actions:[this.determineActionBySubtype(this.props.subtype)],resources:[this.determineResourceArn(options)]})),{payloadFormatVersion:apigwv2().PayloadFormatVersion.VERSION_1_0,type:apigwv2().HttpIntegrationType.AWS_PROXY,subtype:this.props.subtype??apigwv2().HttpIntegrationSubtype.STEPFUNCTIONS_START_EXECUTION,credentials:apigwv2().IntegrationCredentials.fromRole(invokeRole),connectionType:apigwv2().HttpConnectionType.INTERNET,parameterMapping:this.props.parameterMapping??new(apigwv2()).ParameterMapping().custom("StateMachineArn",this.props.stateMachine.stateMachineArn)}}determineActionBySubtype(subtype){switch(subtype){case apigwv2().HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION:return"states:StopExecution";case apigwv2().HttpIntegrationSubtype.STEPFUNCTIONS_START_SYNC_EXECUTION:return"states:StartSyncExecution";default:return"states:StartExecution"}}determineResourceArn(options){return this.props.subtype===apigwv2().HttpIntegrationSubtype.STEPFUNCTIONS_STOP_EXECUTION?options.route.stack.formatArn({service:"states",resource:`execution:${this.props.stateMachine.stateMachineName}:*`}):this.props.stateMachine.stateMachineArn}}exports.HttpStepFunctionsIntegration=HttpStepFunctionsIntegration;
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/index.d.ts
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './http';
|
||||
export * from './websocket';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.HttpAlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpAlbIntegration;return Object.defineProperty(exports,_noFold="HttpAlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpNlbIntegration=void 0,Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpNlbIntegration;return Object.defineProperty(exports,_noFold="HttpNlbIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpServiceDiscoveryIntegration=void 0,Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpServiceDiscoveryIntegration;return Object.defineProperty(exports,_noFold="HttpServiceDiscoveryIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpUrlIntegration=void 0,Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpUrlIntegration;return Object.defineProperty(exports,_noFold="HttpUrlIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpLambdaIntegration;return Object.defineProperty(exports,_noFold="HttpLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpStepFunctionsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpStepFunctionsIntegration;return Object.defineProperty(exports,_noFold="HttpStepFunctionsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpSqsIntegration=void 0,Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpSqsIntegration;return Object.defineProperty(exports,_noFold="HttpSqsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpEventBridgeIntegration=void 0,Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpEventBridgeIntegration;return Object.defineProperty(exports,_noFold="HttpEventBridgeIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./websocket").WebSocketLambdaIntegration;return Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketMockIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./websocket").WebSocketMockIntegration;return Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketAwsIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./websocket").WebSocketAwsIntegration;return Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,value}),value}});
|
||||
87
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/aws.d.ts
generated
vendored
Normal file
87
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/aws.d.ts
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
import type { WebSocketRouteIntegrationConfig, WebSocketRouteIntegrationBindOptions, PassthroughBehavior, ContentHandling } from '../../../aws-apigatewayv2';
|
||||
import { WebSocketRouteIntegration } from '../../../aws-apigatewayv2';
|
||||
import type { IRole } from '../../../aws-iam';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* Props for AWS type integration for a WebSocket Api.
|
||||
*/
|
||||
export interface WebSocketAwsIntegrationProps {
|
||||
/**
|
||||
* Integration URI.
|
||||
*/
|
||||
readonly integrationUri: string;
|
||||
/**
|
||||
* Specifies the integration's HTTP method type.
|
||||
*/
|
||||
readonly integrationMethod: string;
|
||||
/**
|
||||
* Specifies how to handle response payload content type conversions.
|
||||
*
|
||||
* @default - The response payload will be passed through from the integration response to
|
||||
* the route response or method response without modification.
|
||||
*/
|
||||
readonly contentHandling?: ContentHandling;
|
||||
/**
|
||||
* Specifies the credentials role required for the integration.
|
||||
*
|
||||
* @default - No credential role provided.
|
||||
*/
|
||||
readonly credentialsRole?: IRole;
|
||||
/**
|
||||
* The request parameters that API Gateway sends with the backend request.
|
||||
* Specify request parameters as key-value pairs (string-to-string
|
||||
* mappings), with a destination as the key and a source as the value.
|
||||
*
|
||||
* @default - No request parameter provided to the integration.
|
||||
*/
|
||||
readonly requestParameters?: {
|
||||
[dest: string]: string;
|
||||
};
|
||||
/**
|
||||
* A map of Apache Velocity templates that are applied on the request
|
||||
* payload.
|
||||
*
|
||||
* ```
|
||||
* { "application/json": "{ \"statusCode\": 200 }" }
|
||||
* ```
|
||||
*
|
||||
* @default - No request template provided to the integration.
|
||||
*/
|
||||
readonly requestTemplates?: {
|
||||
[contentType: string]: string;
|
||||
};
|
||||
/**
|
||||
* The template selection expression for the integration.
|
||||
*
|
||||
* @default - No template selection expression provided.
|
||||
*/
|
||||
readonly templateSelectionExpression?: string;
|
||||
/**
|
||||
* The maximum amount of time an integration will run before it returns without a response.
|
||||
* Must be between 50 milliseconds and 29 seconds.
|
||||
*
|
||||
* @default Duration.seconds(29)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
/**
|
||||
* Specifies the pass-through behavior for incoming requests based on the
|
||||
* Content-Type header in the request, and the available mapping templates
|
||||
* specified as the requestTemplates property on the Integration resource.
|
||||
* There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
|
||||
* NEVER.
|
||||
*
|
||||
* @default - No passthrough behavior required.
|
||||
*/
|
||||
readonly passthroughBehavior?: PassthroughBehavior;
|
||||
}
|
||||
/**
|
||||
* AWS WebSocket AWS Type Integration
|
||||
*/
|
||||
export declare class WebSocketAwsIntegration extends WebSocketRouteIntegration {
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
*/
|
||||
constructor(id: string, props: WebSocketAwsIntegrationProps);
|
||||
bind(_options: WebSocketRouteIntegrationBindOptions): WebSocketRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/aws.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/aws.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketAwsIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp};class WebSocketAwsIntegration extends aws_apigatewayv2_1().WebSocketRouteIntegration{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.WebSocketAwsIntegration",version:"2.252.0"};constructor(id,props){super(id),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_WebSocketAwsIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,WebSocketAwsIntegration),error}}bind(_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_WebSocketRouteIntegrationBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{type:aws_apigatewayv2_1().WebSocketIntegrationType.AWS,uri:this.props.integrationUri,method:this.props.integrationMethod,contentHandling:this.props.contentHandling,credentialsRole:this.props.credentialsRole,requestParameters:this.props.requestParameters,requestTemplates:this.props.requestTemplates,passthroughBehavior:this.props.passthroughBehavior,templateSelectionExpression:this.props.templateSelectionExpression,timeout:this.props.timeout}}}exports.WebSocketAwsIntegration=WebSocketAwsIntegration;
|
||||
3
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/index.d.ts
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './lambda';
|
||||
export * from './mock';
|
||||
export * from './aws';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.WebSocketLambdaIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").WebSocketLambdaIntegration;return Object.defineProperty(exports,_noFold="WebSocketLambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketMockIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./mock").WebSocketMockIntegration;return Object.defineProperty(exports,_noFold="WebSocketMockIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.WebSocketAwsIntegration=void 0,Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./aws").WebSocketAwsIntegration;return Object.defineProperty(exports,_noFold="WebSocketAwsIntegration",{enumerable:!0,configurable:!0,value}),value}});
|
||||
38
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/lambda.d.ts
generated
vendored
Normal file
38
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { WebSocketRouteIntegrationBindOptions, WebSocketRouteIntegrationConfig, ContentHandling } from '../../../aws-apigatewayv2';
|
||||
import { WebSocketRouteIntegration } from '../../../aws-apigatewayv2';
|
||||
import type { IFunction } from '../../../aws-lambda';
|
||||
import type { Duration } from '../../../core';
|
||||
/**
|
||||
* Props for Lambda type integration for a WebSocket Api.
|
||||
*/
|
||||
export interface WebSocketLambdaIntegrationProps {
|
||||
/**
|
||||
* The maximum amount of time an integration will run before it returns without a response.
|
||||
* Must be between 50 milliseconds and 29 seconds.
|
||||
*
|
||||
* @default Duration.seconds(29)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
/**
|
||||
* Specifies how to handle response payload content type conversions.
|
||||
*
|
||||
* @default - The response payload will be passed through from the integration response to
|
||||
* the route response or method response without modification.
|
||||
*/
|
||||
readonly contentHandling?: ContentHandling;
|
||||
}
|
||||
/**
|
||||
* Lambda WebSocket Integration
|
||||
*/
|
||||
export declare class WebSocketLambdaIntegration extends WebSocketRouteIntegration {
|
||||
private readonly handler;
|
||||
private readonly props;
|
||||
private readonly _id;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
* @param handler the Lambda function handler
|
||||
* @param props properties to configure the integration
|
||||
*/
|
||||
constructor(id: string, handler: IFunction, props?: WebSocketLambdaIntegrationProps);
|
||||
bind(options: WebSocketRouteIntegrationBindOptions): WebSocketRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/lambda.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/lambda.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketLambdaIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp},aws_iam_1=()=>{var tmp=require("../../../aws-iam");return aws_iam_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class WebSocketLambdaIntegration extends aws_apigatewayv2_1().WebSocketRouteIntegration{handler;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.WebSocketLambdaIntegration",version:"2.252.0"};_id;constructor(id,handler,props={}){super(id),this.handler=handler,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_WebSocketLambdaIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,WebSocketLambdaIntegration),error}this._id=id}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_WebSocketRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const route=options.route;this.handler.addPermission(`${this._id}-Permission`,{scope:options.scope,principal:new(aws_iam_1()).ServicePrincipal("apigateway.amazonaws.com"),sourceArn:core_1().Stack.of(route).formatArn({service:"execute-api",resource:route.webSocketApi.apiId,resourceName:`*${route.routeKey}`})});const integrationUri=core_1().Stack.of(route).formatArn({service:"apigateway",account:"lambda",resource:"path/2015-03-31/functions",resourceName:`${this.handler.functionArn}/invocations`});return{type:aws_apigatewayv2_1().WebSocketIntegrationType.AWS_PROXY,uri:integrationUri,timeout:this.props.timeout,contentHandling:this.props.contentHandling}}}exports.WebSocketLambdaIntegration=WebSocketLambdaIntegration;
|
||||
38
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/mock.d.ts
generated
vendored
Normal file
38
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/mock.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { WebSocketRouteIntegrationConfig, WebSocketRouteIntegrationBindOptions } from '../../../aws-apigatewayv2';
|
||||
import { WebSocketRouteIntegration } from '../../../aws-apigatewayv2';
|
||||
/**
|
||||
* Props for Mock type integration for a WebSocket Api.
|
||||
*/
|
||||
export interface WebSocketMockIntegrationProps {
|
||||
/**
|
||||
* A map of Apache Velocity templates that are applied on the request
|
||||
* payload.
|
||||
*
|
||||
* ```
|
||||
* { "application/json": "{ \"statusCode\": 200 }" }
|
||||
* ```
|
||||
*
|
||||
* @default - No request template provided to the integration.
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
|
||||
*/
|
||||
readonly requestTemplates?: {
|
||||
[contentType: string]: string;
|
||||
};
|
||||
/**
|
||||
* The template selection expression for the integration.
|
||||
*
|
||||
* @default - No template selection expression provided.
|
||||
*/
|
||||
readonly templateSelectionExpression?: string;
|
||||
}
|
||||
/**
|
||||
* Mock WebSocket Integration
|
||||
*/
|
||||
export declare class WebSocketMockIntegration extends WebSocketRouteIntegration {
|
||||
private readonly props;
|
||||
/**
|
||||
* @param id id of the underlying integration construct
|
||||
*/
|
||||
constructor(id: string, props?: WebSocketMockIntegrationProps);
|
||||
bind(options: WebSocketRouteIntegrationBindOptions): WebSocketRouteIntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/mock.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigatewayv2-integrations/lib/websocket/mock.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketMockIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp};class WebSocketMockIntegration extends aws_apigatewayv2_1().WebSocketRouteIntegration{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_integrations.WebSocketMockIntegration",version:"2.252.0"};constructor(id,props={}){super(id),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_integrations_WebSocketMockIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,WebSocketMockIntegration),error}}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_WebSocketRouteIntegrationBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{type:aws_apigatewayv2_1().WebSocketIntegrationType.MOCK,uri:"",requestTemplates:this.props.requestTemplates,templateSelectionExpression:this.props.templateSelectionExpression}}}exports.WebSocketMockIntegration=WebSocketMockIntegration;
|
||||
Reference in New Issue
Block a user