Create, update and delete contentful webhooks with your app deployment
Project description
@cloudcomponents/cdk-contentful-webhook
Create, update and delete contentful webhooks with your app deployment
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-contentful-webhook
Python:
pip install cloudcomponents.cdk-contentful-webhook
How to use
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.aws_apigateway import RestApi
from aws_cdk.core import Construct, Stack, StackProps
from cloudcomponents.cdk_contentful_webhook import ContentfulWebhook
from cloudcomponents.cdk_secret_key import SecretKey
class ContentfulWebhookStack(Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
api = RestApi(self, "Endpoint")
api.root.add_method("POST")
access_token = SecretKey.from_plain_text(process.env.ACCESS_TOKEN)
space_id = process.env.SPACE_ID
topics = ["Entry.create"]
ContentfulWebhook(self, "ContentfulWebhook",
access_token=access_token,
space_id=space_id,
name="ExampleWebhook",
url=api.url,
topics=topics,
log_level="debug"
)
API Reference
See API.md.
Example
See more complete examples.
License
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 cloudcomponents.cdk-contentful-webhook-1.37.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca3e7064f84ca0db3a62121c3408660fddb95b3457118d6a3a35b383e4364c0d |
|
MD5 | 1fa215e67d02228eb9a8c74dc1e8ad8d |
|
BLAKE2b-256 | a6210fceb78b14a4a0af06b4ccc32a7b600547b91e2e354231334a4a4758e82e |
Close
Hashes for cloudcomponents.cdk_contentful_webhook-1.37.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac89d2f9fec4dc6390f5a486d5707430dccc9da4cd1fea61a7ec0712f1f256f6 |
|
MD5 | 150d57ea05c0783a19ba0eb18d241d99 |
|
BLAKE2b-256 | bb369f8c13a2ef5b9e7e44ddafa5c2889c86f66684450dd7b9b33cc4afb607f6 |