@aws-cdk_aws-apigatewayv2-alpha.WebSocketIntegration

class WebSocketIntegration (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.WebSocketIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#WebSocketIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.WebSocketIntegration
Pythonaws_cdk.aws_apigatewayv2_alpha.WebSocketIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป WebSocketIntegration

Implements IConstruct, IDependable, IResource, IWebSocketIntegration, 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_alpha from '@aws-cdk/aws-apigatewayv2-alpha';

declare const webSocketApi: apigatewayv2_alpha.WebSocketApi;
const webSocketIntegration = new apigatewayv2_alpha.WebSocketIntegration(this, 'MyWebSocketIntegration', {
  integrationType: apigatewayv2_alpha.WebSocketIntegrationType.AWS_PROXY,
  integrationUri: 'integrationUri',
  webSocketApi: webSocketApi,
});

Initializer

new WebSocketIntegration(scope: Construct, id: string, props: WebSocketIntegrationProps)

Parameters

  • scope Construct
  • id string
  • props WebSocketIntegrationProps

Construct Props

NameTypeDescription
integrationType๐Ÿ”นWebSocketIntegrationTypeIntegration type.
integrationUri๐Ÿ”นstringIntegration URI.
webSocketApi๐Ÿ”นIWebSocketApiThe WebSocket API to which this integration should be bound.

integrationType๐Ÿ”น

Type: WebSocketIntegrationType

Integration type.


integrationUri๐Ÿ”น

Type: string

Integration URI.


webSocketApi๐Ÿ”น

Type: IWebSocketApi

The WebSocket API to which this integration should be bound.

Properties

NameTypeDescription
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
integrationId๐Ÿ”นstringId of the integration.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.
webSocketApi๐Ÿ”นIWebSocketApiThe WebSocket API associated with this integration.

env๐Ÿ”น

Type: ResourceEnvironment

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: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.


webSocketApi๐Ÿ”น

Type: IWebSocketApi

The WebSocket API associated with this integration.

Methods

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
toString()๐Ÿ”นReturns a string representation of this construct.

applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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.