Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(apigatewayv2): add apigatewayv2 integrations and authorizers to jsiirc #30461

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/aws-cdk-lib/aws-apigatewayv2-authorizers/.jsiirc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"targets": {
"dotnet": {
"namespace": "Amazon.CDK.AwsApigatewayv2Authorizers"
},
"java": {
"package": "software.amazon.awscdk.aws_apigatewayv2_authorizers"
},
"python": {
"module": "aws_cdk.aws_apigatewayv2_authorizers"
}
}
}
26 changes: 26 additions & 0 deletions packages/aws-cdk-lib/aws-apigatewayv2-authorizers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- [WebSocket APIs](#websocket-apis)
- [Lambda Authorizer](#lambda-authorizer)
- [IAM Authorizers](#iam-authorizer)
- [Import Issues](#import-issues)
- [DotNet Namespace](#dotnet-namespace)
- [Java Package](#java-package)

## Introduction

Expand Down Expand Up @@ -280,3 +283,26 @@ user.attachInlinePolicy(new iam.Policy(this, 'AllowInvoke', {
}));

```

## 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.Authorizers`, you would need to use the following namespace:

```cs
using Amazon.CDK.AwsApigatewayv2Authorizers;;
```

### Java Package

Instead of conventional package `import software.amazon.awscdk.services.apigatewayv2_authorizers.*`, you would need to use the following package:

```java
import software.amazon.awscdk.aws_apigatewayv2_authorizers.*;

// If you want to import a specific construct
import software.amazon.awscdk.aws_apigatewayv2_authorizers.WebSocketIamAuthorizer;
```
13 changes: 13 additions & 0 deletions packages/aws-cdk-lib/aws-apigatewayv2-integrations/.jsiirc.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
28 changes: 27 additions & 1 deletion packages/aws-cdk-lib/aws-apigatewayv2-integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- [WebSocket APIs](#websocket-apis)
- [Lambda WebSocket Integration](#lambda-websocket-integration)
- [AWS WebSocket Integration](#aws-websocket-integration)
- [Import Issues](#import-issues)
- [DotNet Namespace](#dotnet-namespace)
- [Java Package](#java-package)

## HTTP APIs

Expand Down Expand Up @@ -307,4 +310,27 @@ webSocketApi.addRoute('$connect', {
```

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).
See [Working with binary media types for WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-binary-media-types.html).

## 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;
```
Loading