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
File details
Details for the file scotthsieh_projen_statemachine-0.1.20.tar.gz
.
File metadata
- Download URL: scotthsieh_projen_statemachine-0.1.20.tar.gz
- Upload date:
- Size: 650.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc18d94c9dc465ba584fdb00bbd0ef5012c8ce22258fd3ec3dcb3d979a1de4fc |
|
MD5 | 5ba0044ceb0e3199c4256000132af47c |
|
BLAKE2b-256 | 11ba294363dd58ef48068de1139100ae8bdb7a0e1c639f80b0bfb62a296782dc |
File details
Details for the file scotthsieh_projen_statemachine-0.1.20-py3-none-any.whl
.
File metadata
- Download URL: scotthsieh_projen_statemachine-0.1.20-py3-none-any.whl
- Upload date:
- Size: 649.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f5b86673c03bf2e9d6df5fc68852345fff46094a81897029510142652629bec |
|
MD5 | 73ca875e077a8ce1d1b6505e885931f4 |
|
BLAKE2b-256 | d32c9dc33ba5a04c284991a935ee391ead0f9ef1ba7cd4f4f6d00f7cb2e55e78 |