Reputation: 60751
Within my storage account, I'm creating an event subscription to blobcreated/blobdeleted:
I've select Custom Input Schema:
However, I'm getting this error:
"CustomInputSchema" cannot be used in combination with the topic's input schema of EventGridSchema
How do I create a custom input schema?
Upvotes: 2
Views: 1648
Reputation: 8235
All Azure Event Grid (built-in) topic's input schemas are using a default input schema such as the EventGridSchema. This input schema can be mapped to the output schema (delivery schema) only to EventGridSchema or CloudEventV01Schema. That's a reason why you received an error message.
The CustomInputSchema can be used for custom or event domain topic's input schema. More details about this option is here.
For your solution, I do recommend subscribing to Event Grid events with a webhook handler to the Azure API Management and using a transformation policy for your custom event schema.
Upvotes: 1
Reputation: 301
There are two concepts:
1) Input schema: This is the schema used during publishing of events to EventGrid. This is specified as part of topic or domain creation.
2) Output or delivery schema: This is the schema used when EventGrid delivers events to your event-subscription endpoint. This is specified as part of an event subscription creation.
You would use "Custom Input Schema" for 2) above only in the scenario where you are using a custom schema to publish events to EventGrid AND you want to retain that schema on the way out when it reaches your event subscription endpoint. In the scenario you have described above, you are receiving Storage events which are published in standard EventGrid event schema, and hence they cannot be converted to a custom schema on the way out.
Upvotes: 3