# WebSocketRouteIntegrationBindOptions

Options to the WebSocketRouteIntegration during its bind operation.

Used as argument in: [WebSocketRouteIntegration.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketRouteIntegration.html#bind)

- Source: [`aws-apigatewayv2/lib/websocket/integration.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/websocket/integration.ts#L225)
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
import * as constructs from 'constructs';

declare const construct: constructs.Construct;
declare const webSocketRoute: apigatewayv2.WebSocketRoute;
const webSocketRouteIntegrationBindOptions: apigatewayv2.WebSocketRouteIntegrationBindOptions = {
  route: webSocketRoute,
  scope: construct,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2 as apigatewayv2
import constructs as constructs

# construct: constructs.Construct
# web_socket_route: apigatewayv2.WebSocketRoute

web_socket_route_integration_bind_options = apigatewayv2.WebSocketRouteIntegrationBindOptions(
    route=web_socket_route,
    scope=construct
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigatewayv2.*;
import software.constructs.*;

Construct construct;
WebSocketRoute webSocketRoute;

WebSocketRouteIntegrationBindOptions webSocketRouteIntegrationBindOptions = WebSocketRouteIntegrationBindOptions.builder()
        .route(webSocketRoute)
        .scope(construct)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;
using Constructs;

Construct construct;
WebSocketRoute webSocketRoute;
var webSocketRouteIntegrationBindOptions = new WebSocketRouteIntegrationBindOptions {
    Route = webSocketRoute,
    Scope = construct
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import constructs "github.com/aws/constructs-go/constructs"

var construct Construct
var webSocketRoute WebSocketRoute

webSocketRouteIntegrationBindOptions := &WebSocketRouteIntegrationBindOptions{
	Route: webSocketRoute,
	Scope: construct,
}
```

## Properties

- `route`: [IWebSocketRoute](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.IWebSocketRoute.html) (required) — The route to which this is being bound.

- `scope`: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) (required) — The current scope in which the bind is occurring.

  If the `WebSocketRouteIntegration` being bound creates additional constructs,
  this will be used as their parent scope.
