Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,21 @@
* here: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic
* @return The topic key setting of the eventGrid topic.
*/
String topicKeySetting();
String topicKeySetting() default "";

/**
* Gets or sets the topic events endpoint URI. Eg: https://topic1.westus2-1.eventgrid.azure.net/api/events
* This is found in the Event Grid Topic's definition. You can find information on getting the Url for a topic
* here: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic
* @return The topic events endpoint URI of the eventGrid topic.
*/
String topicEndpointUri();
String topicEndpointUri() default "";

/**
* Defines the common prefix for app settings that configure an identity-based connection.
* When set, topicEndpointUri and topicKeySetting should not be set.
*
* @return The common prefix for the identity-based connection settings.
*/
String connection() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public void every_binding_annotation_should_have_dataType_method() {
}
}

@Test
public void event_grid_output_should_support_identity_based_connection() throws NoSuchMethodException {
assertEquals("", EventGridOutput.class.getMethod("connection").getDefaultValue());
assertEquals("", EventGridOutput.class.getMethod("topicEndpointUri").getDefaultValue());
assertEquals("", EventGridOutput.class.getMethod("topicKeySetting").getDefaultValue());
}

/**
* find all annotation bindings based on annotation suffix conventions defined in bindingAnnotationSuffix array
*/
Expand Down