你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EventGridOutput 接口

public interface EventGridOutput

EventGridOutput (name = “outputEvent”, topicEndpointUri = “MyEventGridTopicUriSetting”, topicKeySetting = “MyEventGridTopicKeySetting”) OutputBinding<String> outputEvent final ExecutionContext context ) { context.getLogger () .info (content) ; final String eventGridOutputDocument = “{\”id“: ”100“, ”eventType“:”recordInserted“, ”subject“: ”myapp/test/java“, ”eventTime“:”2017-08-10T21:03:07+00:00“, ”data“: {”tag1“: ”value1“,”tag2“:”value2“}, ”dataVersion“: ”1.0”}";outputEvent.setValue (eventGridOutputDocument) ;}

方法摘要

修饰符和类型 方法和描述
String dataType()

定义 Functions 运行时应如何处理参数值。 可能的值为:

    <li>
    
      <p>"" or string: treat it as a string whose value is serialized from the parameter </p>
    
    </li>
    
    <li>
    
      <p>binary: treat it as a binary data whose value comes from for example OutputBinding&lt;byte[]&gt; </p>
    
    </li>
    

String name()

function.json 中使用的变量名称。

String topicEndpointUri()

获取或设置主题事件终结点 URI。 例如: https://topic1.westus2-1.eventgrid.azure.net/api/events 这在事件网格主题的定义中找到。 可在此处找到有关获取主题 URL 的信息: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic

String topicKeySetting()

获取或设置主题键设置。 可在此处找到有关获取主题密钥的信息: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic

方法详细信息

dataType

public String dataType() default ""

定义 Functions 运行时应如何处理参数值。 可能的值为:

    <li>
    
      <p>"" or string: treat it as a string whose value is serialized from the parameter </p>
    
    </li>
    
    <li>
    
      <p>binary: treat it as a binary data whose value comes from for example OutputBinding&lt;byte[]&gt; </p>
    
    </li>
    

返回:

将由 Functions 运行时使用的 dataType。

name

public String name()

function.json 中使用的变量名称。

返回:

function.json 中使用的变量名称。

topicEndpointUri

public String topicEndpointUri()

获取或设置主题事件终结点 URI。 例如: https://topic1.westus2-1.eventgrid.azure.net/api/events 这在事件网格主题的定义中找到。 可在此处找到有关获取主题 URL 的信息: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic

返回:

eventGrid 主题的主题事件终结点 URI。

topicKeySetting

public String topicKeySetting()

获取或设置主题键设置。 可在此处找到有关获取主题密钥的信息: https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#send-an-event-to-your-topic

返回:

eventGrid 主题的主题键设置。

适用于