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
import { RestApi } from '@aws-cdk/aws-apigateway';
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { ContentfulWebhook } from '@cloudcomponents/cdk-contentful-webhook';
import { SecretKey } from '@cloudcomponents/cdk-secret-key';
export class ContentfulWebhookStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const api = new RestApi(this, 'Endpoint');
api.root.addMethod('POST');
const accessToken = SecretKey.fromPlainText(process.env.ACCESS_TOKEN as string);
const spaceId = process.env.SPACE_ID as string;
const topics = ['Entry.create'];
new ContentfulWebhook(this, 'ContentfulWebhook', {
accessToken,
spaceId,
name: 'ExampleWebhook',
url: api.url,
topics,
logLevel: '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.49.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 166539e22fb3b0618dcbfa967e07f3dc4fbdf5af8e6e8a72aeee7af549926cd9 |
|
MD5 | 59af6ac122517ae22e7c224666153601 |
|
BLAKE2b-256 | 1f2a545149d7ff90a6d90f3817591fcec28a53dcc8bb52e8a5c2b466c409eaea |
Close
Hashes for cloudcomponents.cdk_contentful_webhook-1.49.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 339c44b74ddd6b2dc61c5a7833ab2643824a8d464937c6bf1bf136f0821ce8b2 |
|
MD5 | 89d7b9895f7ea937ca759fd6b8df4d29 |
|
BLAKE2b-256 | fa9418462fe06909424b26737b4ea9e923c95887068c6646a5df163cdd045ec3 |