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.50.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57d8475d1e3a7c650623ef7e5b83eb02da46a28c49c05e2d31aab4b8591c24e4 |
|
MD5 | 3ee2b562ced7d106b71a5fcc636d0823 |
|
BLAKE2b-256 | 28081414dc13f210bcf8ce2e8a607e09e15348501dcd1fd119aa4c5135a8f4ff |
Close
Hashes for cloudcomponents.cdk_contentful_webhook-1.50.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ef523903ea2e929bf48e5e308e97e71a71e859f6d1f5354f27eece7039d3e1 |
|
MD5 | 812bf1157f0bc29be2d073f0704a0fd5 |
|
BLAKE2b-256 | 882af4e808db03c2e3a928f8faa5015fcc0a1b4be7e0990f33f4e7dea5784e05 |