SendGridOutput Interface

public interface SendGridOutput

Place this on a parameter whose value would be written to SendGrid. The parameter type should be OutputBinding<T>, where T could be one of:

    <li>
    
      <p>Any native Java types such as int, String, byte[] </p>
    
    </li>
    
    <li>
    
      <p>Any POJO type </p>
    
    </li>
    

Method Summary

Modifier and Type Method and Description
String apiKey()

Defines the API key of the SendGrid to which to write.

String dataType()

Defines how Functions runtime should treat the parameter value. Possible values are:

    <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 from()

Defines the 'FROM' name of the SendGrid to which to write.

String name()

The variable name used in function.json.

String subject()

Defines the subject of the SendGrid email to which to write.

String text()

Defines the content text of the SendGrid email to which to write.

String to()

Defines the 'TO' email of the SendGrid to which to write.

Method Details

apiKey

public String apiKey()

Defines the API key of the SendGrid to which to write.

Returns:

The SendGrid API key string.

dataType

public String dataType() default ""

Defines how Functions runtime should treat the parameter value. Possible values are:

    <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>
    

Returns:

The dataType which will be used by the Functions runtime.

from

public String from()

Defines the 'FROM' name of the SendGrid to which to write.

Returns:

The SendGrid 'FROM' name string.

name

public String name()

The variable name used in function.json.

Returns:

The variable name used in function.json.

subject

public String subject()

Defines the subject of the SendGrid email to which to write.

Returns:

The SendGrid email subject string.

text

public String text()

Defines the content text of the SendGrid email to which to write.

Returns:

The SendGrid email content string.

to

public String to()

Defines the 'TO' email of the SendGrid to which to write.

Returns:

The SendGrid 'TO' email string.

Applies to