CosmosDBOutput Interface
public interface CosmosDBOutput
CosmosDBOutput(name = "database", databaseName = "ToDoList", collectionName = "Items", connectionStringSetting = "AzureCosmosDBConnection") ) { return "{ \"id": "" + System.currentTimeMillis() + "", "description": "" + message + "" }"; }
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
collectionName()
Defines the collection name of the CosmosDB to which to write. |
int |
collectionThroughput()
If CreateIfNotExists is true, defines the throughput of the created collection. |
String |
connectionStringSetting()
Defines the app setting name that contains the CosmosDB connection string. |
boolean |
createIfNotExists()
Defines the ID of the CosmosDB to which to write. |
String |
databaseName()
Defines the database name of the CosmosDB to which to write. |
String |
dataType()
Defines how Functions runtime should treat the parameter value. Possible values are:
|
String |
name()
The variable name used in function.json. |
String |
partitionKey()
Defines the partition key path for the created collection when createIfNotExists is set to true. May include binding parameters. |
String |
preferredLocations()
Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. Values should be comma-separated. example, PreferredLocations = "East US,South Central US,North Europe" |
boolean |
useMultipleWriteLocations()
Enable to use with Multi Master accounts. |
Method Details
collectionName
public String collectionName()
Defines the collection name of the CosmosDB to which to write.
Returns:
collectionThroughput
public int collectionThroughput() default -1
If CreateIfNotExists is true, defines the throughput of the created collection.
Returns:
connectionStringSetting
public String connectionStringSetting()
Defines the app setting name that contains the CosmosDB connection string.
Returns:
createIfNotExists
public boolean createIfNotExists() default false
Defines the ID of the CosmosDB to which to write.
Returns:
databaseName
public String databaseName()
Defines the database name of the CosmosDB to which to write.
Returns:
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<byte[]> </p>
</li>
Returns:
name
public String name()
The variable name used in function.json.
Returns:
partitionKey
public String partitionKey() default ""
Defines the partition key path for the created collection when createIfNotExists is set to true. May include binding parameters.
Returns:
preferredLocations
public String preferredLocations() default ""
Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. Values should be comma-separated. example, PreferredLocations = "East US,South Central US,North Europe"
Returns:
useMultipleWriteLocations
public boolean useMultipleWriteLocations() default false
Enable to use with Multi Master accounts.
Returns: