Skip to content

Commit b5d0efd

Browse files
authored
Merge pull request #191924 from ggailey777/patch-6
Remove identity-based connections from IoT Hub trigger
2 parents b387205 + a04bf37 commit b5d0efd

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

articles/azure-functions/functions-bindings-event-hubs-trigger.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ For information on setup and configuration details, see the [overview](functions
1515

1616
[!INCLUDE [functions-bindings-event-hubs-trigger](../../includes/functions-bindings-event-hubs-trigger.md)]
1717

18+
[!INCLUDE [functions-event-hubs-connections](../../includes/functions-event-hubs-connections.md)]
19+
1820
## host.json settings
1921

20-
The [host.json](functions-host-json.md#eventhub) file contains settings that control Event Hub trigger behavior. See the [host.json settings](functions-bindings-event-hubs.md#hostjson-settings) section for details regarding available settings.
22+
The [host.json](functions-host-json.md#eventhub) file contains settings that control Event Hubs trigger behavior. See the [host.json settings](functions-bindings-event-hubs.md#hostjson-settings) section for details regarding available settings.
2123

2224
## Next steps
2325

articles/azure-functions/functions-bindings-event-iot-trigger.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ For information on setup and configuration details, see the [overview](functions
1717
1818
[!INCLUDE [functions-bindings-event-hubs](../../includes/functions-bindings-event-hubs-trigger.md)]
1919

20+
## Connections
21+
22+
The `connection` property is a reference to environment configuration that contains name of an application setting containing a connection string. You can get this connection string by selecting the **Connection Information** button for the [namespace](../event-hubs/event-hubs-create.md#create-an-event-hubs-namespace). The connection string must be for an Event Hubs namespace, not the event hub itself.
23+
24+
The connection string must have at least "read" permissions to activate the function.
25+
26+
This connection string should be stored in an application setting with a name matching the value specified by the `connection` property of the binding configuration.
27+
28+
> [!NOTE]
29+
> Identity-based connections aren't supported by the IoT Hub trigger. If you need to use managed identities end-to-end, you can instead use IoT Hub Routing to send data to an event hub you control. In that way, outbound routing can be authenticated with managed identity the event can be read [from that event hub using managed identity](functions-bindings-event-hubs-trigger.md?tabs=extensionv5#identity-based-connections).
30+
2031
## host.json properties
2132

2233
The [host.json](functions-host-json.md#eventhub) file contains settings that control Event Hub trigger behavior. See the [host.json settings](functions-bindings-event-iot.md#hostjson-settings) section for details regarding available settings.

includes/functions-bindings-event-hubs-trigger.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
author: craigshoemaker
2+
author: ggailey777
33
ms.service: azure-functions
44
ms.topic: include
55
ms.date: 11/15/2021
6-
ms.author: cshoe
6+
ms.author: glenga
77
---
88

99
Use the function trigger to respond to an event sent to an event hub event stream. You must have read access to the underlying event hub to set up the trigger. When the function is triggered, the message passed to the function is typed as a string.
@@ -284,7 +284,7 @@ public void eventHubProcessor(
284284
}
285285
```
286286

287-
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `EventHubTrigger` annotation on parameters whose value would come from Event Hub. Parameters with these annotations cause the function to run when an event arrives. This annotation can be used with native Java types, POJOs, or nullable values using `Optional<T>`.
287+
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `EventHubTrigger` annotation on parameters whose value comes from the event hub. Parameters with these annotations cause the function to run when an event arrives. This annotation can be used with native Java types, POJOs, or nullable values using `Optional<T>`.
288288

289289
::: zone-end
290290
::: zone pivot="programming-language-csharp"
@@ -452,14 +452,12 @@ The Event Hubs trigger provides several [metadata properties](../articles/azure-
452452
|--------|----|-----------|
453453
|`PartitionContext`|[PartitionContext](/dotnet/api/microsoft.servicebus.messaging.partitioncontext)|The `PartitionContext` instance.|
454454
|`EnqueuedTimeUtc`|`DateTime`|The enqueued time in UTC.|
455-
|`Offset`|`string`|The offset of the data relative to the Event Hub partition stream. The offset is a marker or identifier for an event within the Event Hubs stream. The identifier is unique within a partition of the Event Hubs stream.|
455+
|`Offset`|`string`|The offset of the data relative to the event hub partition stream. The offset is a marker or identifier for an event within the Event Hubs stream. The identifier is unique within a partition of the Event Hubs stream.|
456456
|`PartitionKey`|`string`|The partition to which event data should be sent.|
457457
|`Properties`|`IDictionary<String,Object>`|The user properties of the event data.|
458458
|`SequenceNumber`|`Int64`|The logical sequence number of the event.|
459459
|`SystemProperties`|`IDictionary<String,Object>`|The system properties, including the event data.|
460460

461461
See [code examples](#example) that use these properties earlier in this article.
462462

463-
[!INCLUDE [functions-event-hubs-connections](./functions-event-hubs-connections.md)]
464-
465-
[EventHubTriggerAttribute]: /dotnet/api/microsoft.azure.webjobs.eventhubtriggerattribute
463+
[EventHubTriggerAttribute]: /dotnet/api/microsoft.azure.webjobs.eventhubtriggerattribute

0 commit comments

Comments
 (0)