Sdílet prostřednictvím


CosmosDBInput Interface

public interface CosmosDBInput

CosmosDBInput(name = "database", databaseName = "ToDoList", collectionName = "Items", id = "{Query.id}", connectionStringSetting = "AzureCosmosDBConnection") Optional<String> item ) { return item.orElse("Not found"); }

Method Summary

Modifier and Type Method and Description
String collectionName()

Defines the collection name of the CosmosDB to which to bind.

String connectionStringSetting()

Defines the app setting name that contains the CosmosDB connection string.

String databaseName()

Defines the database name of the CosmosDB to which to bind.

String dataType()

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

    <li>
    
      <p>"": get the value as a string, and try to deserialize to actual parameter type like POJO </p>
    
    </li>
    
    <li>
    
      <p>string: always get the value as a string </p>
    
    </li>
    
    <li>
    
      <p>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[] </p>
    
    </li>
    

String id()

Defines the ID of the CosmosDB to which to bind.

String name()

The variable name used in function.json.

String partitionKey()

Defines partition key value for the lookup. May include binding parameters.

String sqlQuery()

Defines the SQL query string to which to bind.

Method Details

collectionName

public String collectionName()

Defines the collection name of the CosmosDB to which to bind.

Returns:

The collection name string.

connectionStringSetting

public String connectionStringSetting()

Defines the app setting name that contains the CosmosDB connection string.

Returns:

The app setting name of the connection string.

databaseName

public String databaseName()

Defines the database name of the CosmosDB to which to bind.

Returns:

The database name string.

dataType

public String dataType() default ""

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

    <li>
    
      <p>"": get the value as a string, and try to deserialize to actual parameter type like POJO </p>
    
    </li>
    
    <li>
    
      <p>string: always get the value as a string </p>
    
    </li>
    
    <li>
    
      <p>binary: get the value as a binary data, and try to deserialize to actual parameter type byte[] </p>
    
    </li>
    

Returns:

The dataType which will be used by the Functions runtime.

id

public String id() default ""

Defines the ID of the CosmosDB to which to bind.

Returns:

The ID string.

name

public String name()

The variable name used in function.json.

Returns:

The variable name used in function.json.

partitionKey

public String partitionKey() default ""

Defines partition key value for the lookup. May include binding parameters.

Returns:

partition key value

sqlQuery

public String sqlQuery() default ""

Defines the SQL query string to which to bind.

Returns:

The SQL query string.

Applies to