projen-statemachine-example
Project description
projen-simple
Build a custom construct based on an AWS Blog post and use projen to publish to 4 language repositories. (Hope Go is coming soon)
Architecture
This library constrcution is referred to this AWS blog.
How to utilize polyglot packages
TypeScript
$ cdk --init language typescript
$ yarn add projen-statemachine-example
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from scotthsieh_projen_statemachine import StateMachineApiGatewayExample
class TypescriptStack(cdk.Stack):
def __init__(self, scope, id, props=None):
super().__init__(scope, id, props)
stage_name = "default"
part_path = "pets"
example_construct = StateMachineApiGatewayExample(self, "KerKer",
stage_name=stage_name, part_path=part_path
)
cdk.CfnOutput(self, "OStateMachine",
value=example_construct.state_machine.state_machine_arn
)
cdk.CfnOutput(self, "OExecutionOutput",
value=example_construct.execution_input, description="Sample input to StartExecution."
)
Python
$ cdk init --language python
$ cat <<EOL > requirements.txt
aws-cdk.core
scotthsieh_projen_statemachine
EOL
$ python -m pip install -r requirements.txt
from aws_cdk import core as cdk
from scotthsieh_projen_statemachine import StateMachineApiGatewayExample
class PythonStack(cdk.Stack):
def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
stage_name = 'default'
part_path = 'pets'
example_construct = StateMachineApiGatewayExample(
self, 'PythonStatemachne', stage_name=stage_name, part_path=part_path,
)
cdk.CfnOutput(self, "OStateMachine",
value=example_construct.state_machine.state_machine_arn
)
cdk.CfnOutput(self, "OExecutionOutput", value=example_construct.execution_input, description="Sample input to StartExecution.")
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for scotthsieh_projen_statemachine-0.1.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a568f6ab5c0ec22e4d7dfae9d1ab41e94ef895dd9b0b478d4956137b0df60b4e |
|
MD5 | 457d0f96b66b7193bf5f702f0ef33b92 |
|
BLAKE2b-256 | e770f3e03bb80a8462c055cbbec56d2c9375af3b0028c5ec4a16c90c575251b1 |
Close
Hashes for scotthsieh_projen_statemachine-0.1.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b94e29fa0e9d1599bdd6c84ca1eaa8a57030be0b7babebd146cec44427b14d66 |
|
MD5 | 1a0bf193fbbfb69bd82d4e8eb6747a4c |
|
BLAKE2b-256 | 97cea4ba4ff9c6e654dea4410c1cb0fa436c49e976d993f1dc80243c1c297b20 |