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
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,33 @@ Binary data is represented as `byte[]` or `Byte[]` in your Azure functions code.

Empty input values could be `null` as your functions argument, but a recommended way to deal with potential empty values is to use `Optional<T>` type.

### Blob Storage SDK types

Support for binding directly to Azure Blob Storage SDK types is currently in preview. `BlobClient` and `BlobContainerClient` parameters require:

* The `JAVA_ENABLE_SDK_TYPES` application setting set to `true`.
* Azure Functions Maven Plugin version 1.38.0 or later, or the corresponding Gradle plugin support.

Without these settings, the Java worker treats the parameter as a regular POJO and attempts to deserialize the blob content into it.

For example, a blob trigger can access blob properties through `BlobClient`:

```java
@FunctionName("processBlob")
public void run(
@BlobTrigger(
name = "content",
path = "images/{name}",
connection = "AzureWebJobsStorage") BlobClient blob,
@BindingName("name") String filename,
ExecutionContext context
) {
context.getLogger().info("Name: " + filename + ", Size: " + blob.getProperties().getBlobSize() + " bytes");
}
```

Only one SDK type can be used in a function definition. See the [Java developer guide](https://learn.microsoft.com/azure/azure-functions/functions-reference-java#sdk-types) for configuration, supported types, and troubleshooting information.


## Inputs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
* <li>Any native Java types such as int, String, byte[]</li>
* <li>Nullable values using Optional&lt;T&gt;</li>
* <li>Any POJO type</li>
* <li>Azure Blob Storage SDK types {@code BlobClient} and {@code BlobContainerClient} (preview)</li>
* </ul>
*
* <p>SDK type parameters require the {@code JAVA_ENABLE_SDK_TYPES} application setting to be {@code true} and
* Azure Functions Maven Plugin version 1.38.0 or later (or corresponding Gradle plugin support). Without SDK type
* support enabled, the Java worker treats the parameter as a POJO.</p>
*
* <p>The following example shows a Java function that logs the filename and size when a blob is added or updated
* in the "samples-workitems" container:</p>
Expand Down