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 from non-compiling source. May contain errors.
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.48.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0902db532965c4f14b44db6ff4f5f1f5ad608c15318827483e17c1be77a17cda |
|
MD5 | 3bf89f64182558cd344cda80fa8e7a49 |
|
BLAKE2b-256 | 916c720f5c446a94d9643059cbcd85f02ef02d576069fa0a1359e4efcc1aa31b |
Close
Hashes for cloudcomponents.cdk_contentful_webhook-1.48.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fe0517082069a6fa931b226531e7ef602daa275264d810652cdd6e5ff390ee8 |
|
MD5 | b7526cbb2aed4c867d3d4ff39fd3d7f0 |
|
BLAKE2b-256 | 5af3062a93bbb4759241af3af1b7d8220008736dc7b6108a66059807747cc8d4 |