class WebSocketIntegration (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.APIGatewayv2.WebSocketIntegration |
![]() | software.amazon.awscdk.services.apigatewayv2.WebSocketIntegration |
![]() | aws_cdk.aws_apigatewayv2.WebSocketIntegration |
![]() | @aws-cdk/aws-apigatewayv2 » WebSocketIntegration |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, IWeb
, IIntegration
The integration for an API route.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apigatewayv2 from '@aws-cdk/aws-apigatewayv2';
declare const webSocketApi: apigatewayv2.WebSocketApi;
const webSocketIntegration = new apigatewayv2.WebSocketIntegration(this, 'MyWebSocketIntegration', {
integrationType: apigatewayv2.WebSocketIntegrationType.AWS_PROXY,
integrationUri: 'integrationUri',
webSocketApi: webSocketApi,
});
Initializer
new WebSocketIntegration(scope: Construct, id: string, props: WebSocketIntegrationProps)
Parameters
- scope
Construct
- id
string
- props
Web
Socket Integration Props
Construct Props
Name | Type | Description |
---|---|---|
integration | Web | Integration type. |
integration | string | Integration URI. |
web | IWeb | The WebSocket API to which this integration should be bound. |
integrationType
Type:
Web
Integration type.
integrationUri
Type:
string
Integration URI.
webSocketApi
Type:
IWeb
The WebSocket API to which this integration should be bound.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
integration | string | Id of the integration. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
web | IWeb | The WebSocket API associated with this integration. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
integrationId
Type:
string
Id of the integration.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
webSocketApi
Type:
IWeb
The WebSocket API associated with this integration.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.