Skip to content

Commit

Permalink
Added StepFunctionsStartExecutionIntegration and StepFunctionsStartSy…
Browse files Browse the repository at this point in the history
…ncExecutionIntegration.

Added unit and integration tests.
Fixed issues mentioned in the Pull-request.
Added example to README

closes aws#11947.
  • Loading branch information
Saqib Dhuka committed Oct 13, 2021
1 parent 6194ad4 commit 0a6a1b1
Show file tree
Hide file tree
Showing 20 changed files with 1,368 additions and 44 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "\U00002753 General Issue"
about: Create a new issue
labels: needs-triage
---

<!-- NOTE:📕 If issue regarding developer guide, please create issue [here](https://github.com/awsdocs/aws-cdk-guide/issues) -->

## :question: General Issue

<!--
⚠️ Important Information
For support questions, please first reference our [documentation](https://docs.aws.amazon.com/cdk/api/latest), then use [Stackoverflow](https://stackoverflow.com/questions/ask?tags=aws-cdk). This repository's issues are intended for feature requests and bug reports.
-->

### The Question
<!--
Ask your question here. Include any details relevant. Make sure you are not
falling prey to the [X/Y problem][2]!
[2]: http://xyproblem.info
-->

### Environment

- **CDK CLI Version:** <!-- Output of `cdk version` -->
- **Module Version:** <!-- Version of the module in question -->
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS:** <!-- [all | Windows 10 | OSX Mojave | Ubuntu | etc... ] -->
- **Language:** <!-- [all | TypeScript | Java | Python ] etc... ] -->


### Other information
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: "\U0001F41B Bug Report"
about: Report a bug
title: "(module name): short issue description"
labels: bug, needs-triage
---

<!--
description of the bug:
-->




### Reproduction Steps

<!--
minimal amount of code that causes the bug (if possible) or a reference.
The code sample should be an SSCCE. See http://sscce.org/ for details.
In short, provide a code sample that we can copy/paste, run and reproduce.
-->

### What did you expect to happen?

<!--
What were you trying to achieve by performing the steps above?
-->

### What actually happened?

<!--
What is the unexpected behavior you were seeing? If you got an error, paste it here.
-->


### Environment

- **CDK CLI Version :**
- **Framework Version:**
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS :**
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->

### Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->




---

This is :bug: Bug Report
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "📕 Documentation Issue"
about: Issue in the reference documentation or developer guide
title: "(module name): short issue description"
labels: feature-request, documentation, needs-triage
---

<!--
- developer guide? raise issue/pr here: https://github.com/awsdocs/aws-cdk-guide
- want to help? submit a pull request here: https://github.com/aws/aws-cdk
-->

<!--
link to reference doc page:
-->



<!--
describe your issue:
-->





---

This is a 📕 documentation issue
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: "\U0001F680 Feature Request"
about: Request a new feature
title: "(module name): short issue description"
labels: feature-request, needs-triage
---

<!-- short description of the feature you are proposing: -->





### Use Case

<!-- why do you need this feature? -->





### Proposed Solution

<!-- Please include prototype/workaround/sketch/reference implementation: -->





### Other

<!--
e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix,
links for us to have context, eg. associated pull-request, stackoverflow, slack, etc
-->





* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

---

This is a :rocket: Feature Request
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/general-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: "\U00002753 General Issue"
about: Create a new issue
title: "(module name): short issue description"
labels: needs-triage, guidance
---

<!-- NOTE:📕 If there is an issue regarding developer guide, please create an issue [here](https://github.com/awsdocs/aws-cdk-guide/issues) -->

## :question: General Issue

<!--
⚠️ Important Information
For support questions, please first reference our [documentation](https://docs.aws.amazon.com/cdk/api/latest), then use [Stackoverflow](https://stackoverflow.com/questions/tagged/aws-cdk). This repository's issues are intended for feature requests and bug reports.
-->

### The Question
<!--
Ask your question here. Include any details relevant. Make sure you are not
falling prey to the [X/Y problem][2]!
[2]: http://xyproblem.info
-->

### Environment

- **CDK CLI Version:** <!-- Output of `cdk version` -->
- **Module Version:** <!-- Version of the module in question -->
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS:** <!-- [all | Windows 10 | macOS Mojave | Ubuntu | etc... ] -->
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->


### Other information
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: "📊 Tracking Issue"
title: "📊Tracking: [service]"
about: Add a module tracking issue (internal use only)
labels: management/tracking
---

Add your +1 👍 to help us prioritize high-level constructs for this service
---

### Overview:
<!--
Summary of the service (leverage the service’s product page for the text) and a link to the relevant AWS Docs.
This should be the same text that we put at the top of the package’s README.md. Also include a link to the
service’s CDK Construct Library API reference page.
-->






[AWS Docs](url) <!-- replace `url` with link to the relevant AWS Docs -->

### Maturity: CloudFormation Resources Only
<!--
The valid maturity states are: CloudFormation Resources Only, Experimental, Developer Preview, Stable
-->

See the [AWS Construct Library Module Lifecycle doc](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0107-construct-library-module-lifecycle.md) for more information about maturity levels.


### Implementation:
<!--
Checklist of use cases, constructs, features (such as grant methods) that will ship in this package
(not required until the issue is added to the public roadmap)
- [ ]
- [ ]
-->
See the [CDK API Reference](url) for more implementation details.<!-- replace `url` with link to the service's CDK API reference -->






### Issue list:
<!--
e.g. checklist of links to feature requests, bugs, and PRs that are in scope for GA release of this module
(not required until the issues is added to the public roadmap)
- [ ]
- [ ]
-->






<!--
Labels to add:
- package/[name] (create new labels if they don’t already exist)
- needs-design (if cfn-only)
- management/roadmap (when added to the roadmap)
- in-progress (when added to “working on it” column of the roadmap)
-->
---
This is a 📊Tracking Issue
45 changes: 45 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2-integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [HTTP APIs](#http-apis)
- [Lambda Integration](#lambda)
- [HTTP Proxy Integration](#http-proxy)
- [AWS Service Integration](#aws-service)
- [Private Integration](#private-integration)
- [WebSocket APIs](#websocket-apis)
- [Lambda WebSocket Integration](#lambda-websocket-integration)
Expand Down Expand Up @@ -77,6 +78,50 @@ httpApi.addRoutes({
integration: booksIntegration,
});
```
### AWS Service

You can integrate your HTTP API with AWS services by using first-class integrations. A first-class integration connects
an HTTP API route to an AWS service API. When a client invokes a route that's backed by a first-class integration,
API Gateway invokes an AWS service API for you. More information can be found at [Working with AWS service integrations for HTTP APIs]
(https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html).

The following code configures a route `POST /start` to start execution of Standard Step Functions state machine.

```ts
const httpApi = new HttpApi(stack, 'HttpApi');
const state = new StateMachine(stack, 'MyStateMachine', {
definition: Chain.start(new Pass(stack, 'Pass')),
stateMachineType: StateMachineType.STANDARD,
});
httpApi.addRoutes({
path: '/start',
methods: [ HttpMethod.POST ],
integration: new StepFunctionsStartExecutionIntegration({
stateMachine: state,
input: '$request.body',
timeout: Duration.seconds(10),
}),
});
```

The following code configures a route `POST /start` to start synchronous execution of Express Step Functions state machine.

```ts
const httpApi = new HttpApi(stack, 'HttpApi');
const state = new StateMachine(stack, 'MyStateMachine', {
definition: Chain.start(new Pass(stack, 'Pass')),
stateMachineType: StateMachineType.EXPRESS,
});
httpApi.addRoutes({
path: '/start',
methods: [ HttpMethod.POST ],
integration: new StepFunctionsStartSyncExecutionIntegration({
stateMachine: state,
input: '$request.body',
timeout: Duration.seconds(10),
}),
});
```

### Private Integration

Expand Down
Loading

0 comments on commit 0a6a1b1

Please sign in to comment.