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.35.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad414b448e5b1beac9ff368540a13a953b23d2af3e3477c1f7b90910de05eddc |
|
MD5 | f55970b319e07c07d008bb39c41b2a31 |
|
BLAKE2b-256 | 9a9b3481b4568422681e7b125d0775a2db90fcc07d82af72141a5d31c2006e66 |
Close
Hashes for cloudcomponents.cdk_contentful_webhook-1.35.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09012122389926a77fc7518f2cd4fd82d7aabab2d194fe8d799e5d8c09acdc1 |
|
MD5 | 4b9fc6ab77a5f7a0bf9d2c23c2c390cd |
|
BLAKE2b-256 | 7bd1c1bc954f0dedb1798c5fa7c81a81aa15d43e7b0d369f99b30964dd242e0c |