Hi @Anonymous
You can leverage the Event Subscription - Create Or Update API 2020-10-15-preview API to update the delivery properties.
You need to define properties.deliveryAttributeMappings
for the different endpoints that you have configured. Please refer to Create Or Update document for the usage.
For your reference below was the REST body call for webhook endpoint. You can see the properties deliveryAttributeMappings
{
"id":"/subscriptions/{subscriptionID}/resourceGroups/{resourcegroup}/providers/Microsoft.EventGrid/topics/{mytopic}/providers/Microsoft.EventGrid/eventSubscriptions/{myeventgridsubscription}",
"name":"myeventgridsub",
"type":"Microsoft.EventGrid/eventSubscriptions",
"properties":{
"topic":"/subscriptions/{subscriptionID}/resourceGroups/{resourcegroup}/providers/Microsoft.EventGrid/topics/{mytopic}",
"destination":{
"endpointType":"WebHook",
"properties":{
"endpointUrl":"mywebhookendpoint",
"maxEventsPerBatch":1,
"preferredBatchSizeInKilobytes":64,
"deliveryAttributeMappings":[
{
"name":"mycustomheader",
"type":"Static",
"properties":{
"value":"mycustomheaderValue",
"isSecret":false
}
},
{
"name":"mycustomheader1",
"type":"Static",
"properties":{
"value":"mycustomheaderValue2",
"isSecret":false,
"sourceField":""
}
}
]
}
},
"filter":{
"advancedFilters":[
],
"enableAdvancedFilteringOnArrays":true
},
"eventDeliverySchema":"EventGridSchema",
"labels":[
],
"retryPolicy":{
"maxDeliveryAttempts":30,
"eventTimeToLiveInMinutes":1440
}
}
}
As per the ARM document for Microsoft.EventGrid eventSubscriptions I don't see the api version as 2020-10-15-preview or newer yet that can help you with the ARM deployment which has deliveryAttributeMappings
property that can be define to achieve the same.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.