WebSocketRouteAuthorizerConfig Struct
Results of binding an authorizer to an WebSocket route.
Example
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';
const webSocketRouteAuthorizerConfig: apigatewayv2.WebSocketRouteAuthorizerConfig = {
authorizationType: 'authorizationType',
// the properties below are optional
authorizerId: 'authorizerId',
};
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
web_socket_route_authorizer_config = apigatewayv2.WebSocketRouteAuthorizerConfig(
authorization_type="authorizationType",
# the properties below are optional
authorizer_id="authorizerId"
)
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.*;
WebSocketRouteAuthorizerConfig webSocketRouteAuthorizerConfig = WebSocketRouteAuthorizerConfig.builder()
.authorizationType("authorizationType")
// the properties below are optional
.authorizerId("authorizerId")
.build();
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;
var webSocketRouteAuthorizerConfig = new WebSocketRouteAuthorizerConfig {
AuthorizationType = "authorizationType",
// the properties below are optional
AuthorizerId = "authorizerId"
};
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"
webSocketRouteAuthorizerConfig := &WebSocketRouteAuthorizerConfig{
AuthorizationType: jsii.String("authorizationType"),
// the properties below are optional
AuthorizerId: jsii.String("authorizerId"),
}
Properties
authorizationTypestringauthorization_typestrauthorizationTypeStringAuthorizationTypestringAuthorizationType*stringrequired#The type of authorization.
Possible values are:
- CUSTOM - Lambda Authorizer
- NONE - No Authorization
authorizerIdoptionalstringauthorizer_idoptionalstrauthorizerIdoptionalStringAuthorizerIdoptionalstringAuthorizerIdoptional*string#The authorizer id.
Default: No authorizer id (useful for AWS_IAM route authorizer)