Share via


CosmosDBOutput インターフェイス

public interface CosmosDBOutput

CosmosDBOutput(name = "database", databaseName = "ToDoList", collectionName = "Items", connectionStringSetting = "AzureCosmosDBConnection") ) { return "{ \"id": "" + System.currentTimeMillis() + "", "description": "" + message + "" }"; }

メソッドの概要

修飾子と型 メソッドと説明
String collectionName()

書き込む CosmosDB のコレクション名を定義します。

int collectionThroughput()

CreateIfNotExists が true の場合は、作成されたコレクションのスループットを定義します。

String connectionStringSetting()

CosmosDB 接続文字列を含むアプリ設定名を定義します。

boolean createIfNotExists()

書き込む CosmosDB の ID を定義します。

String databaseName()

書き込む CosmosDB のデータベース名を定義します。

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

createIfNotExists が true に設定されている場合に、作成されたコレクションのパーティション キー パスを定義します。 バインディング パラメーターを含めることもできます。

String preferredLocations()

Azure Cosmos DB サービス内の geo レプリケートされたデータベース アカウントの優先する場所 (リージョン) を定義します。 複数の値はコンマで区切る必要があります。 例: PreferredLocations = "米国東部、米国中南部、北ヨーロッパ"

boolean useMultipleWriteLocations()

マルチ マスター アカウントでの使用を有効にします。

メソッドの詳細

collectionName

public String collectionName()

書き込む CosmosDB のコレクション名を定義します。

Returns:

コレクション名の文字列。

collectionThroughput

public int collectionThroughput() default -1

CreateIfNotExists が true の場合は、作成されたコレクションのスループットを定義します。

Returns:

作成されたコレクションのスループット。

connectionStringSetting

public String connectionStringSetting()

CosmosDB 接続文字列を含むアプリ設定名を定義します。

Returns:

接続文字列のアプリ設定名。

createIfNotExists

public boolean createIfNotExists() default false

書き込む CosmosDB の ID を定義します。

Returns:

ID 文字列。

databaseName

public String databaseName()

書き込む CosmosDB のデータベース名を定義します。

Returns:

データベース名の文字列。

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>
    

Returns:

Functions ランタイムによって使用される dataType。

name

public String name()

function.json で使用される変数名。

Returns:

function.json で使用される変数名。

partitionKey

public String partitionKey() default ""

createIfNotExists が true に設定されている場合に、作成されたコレクションのパーティション キー パスを定義します。 バインディング パラメーターを含めることもできます。

Returns:

作成されたコレクションの partitionKey。

preferredLocations

public String preferredLocations() default ""

Azure Cosmos DB サービス内の geo レプリケートされたデータベース アカウントの優先する場所 (リージョン) を定義します。 複数の値はコンマで区切る必要があります。 例: PreferredLocations = "米国東部、米国中南部、北ヨーロッパ"

Returns:

geo レプリケートされたデータベース アカウントの PreferredLocations

useMultipleWriteLocations

public boolean useMultipleWriteLocations() default false

マルチ マスター アカウントでの使用を有効にします。

Returns:

マルチマスター アカウントにするかどうか

適用対象