GremlinGraph

class GremlinGraph : KotlinCustomResource

Manages a Gremlin Graph within a Cosmos DB Account.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.cosmosdb.CosmosdbFunctions;
import com.pulumi.azure.cosmosdb.inputs.GetAccountArgs;
import com.pulumi.azure.cosmosdb.GremlinDatabase;
import com.pulumi.azure.cosmosdb.GremlinDatabaseArgs;
import com.pulumi.azure.cosmosdb.GremlinGraph;
import com.pulumi.azure.cosmosdb.GremlinGraphArgs;
import com.pulumi.azure.cosmosdb.inputs.GremlinGraphIndexPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.GremlinGraphConflictResolutionPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.GremlinGraphUniqueKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleAccount = CosmosdbFunctions.getAccount(GetAccountArgs.builder()
.name("tfex-cosmosdb-account")
.resourceGroupName("tfex-cosmosdb-account-rg")
.build());
var exampleGremlinDatabase = new GremlinDatabase("exampleGremlinDatabase", GremlinDatabaseArgs.builder()
.resourceGroupName(exampleAccount.applyValue(getAccountResult -> getAccountResult.resourceGroupName()))
.accountName(exampleAccount.applyValue(getAccountResult -> getAccountResult.name()))
.build());
var exampleGremlinGraph = new GremlinGraph("exampleGremlinGraph", GremlinGraphArgs.builder()
.resourceGroupName(exampleAccount.applyValue(getAccountResult -> getAccountResult.resourceGroupName()))
.accountName(exampleAccount.applyValue(getAccountResult -> getAccountResult.name()))
.databaseName(exampleGremlinDatabase.name())
.partitionKeyPath("/Example")
.throughput(400)
.indexPolicy(GremlinGraphIndexPolicyArgs.builder()
.automatic(true)
.indexingMode("consistent")
.includedPaths("/*")
.excludedPaths("/\"_etag\"/?")
.build())
.conflictResolutionPolicy(GremlinGraphConflictResolutionPolicyArgs.builder()
.mode("LastWriterWins")
.conflictResolutionPath("/_ts")
.build())
.uniqueKeys(GremlinGraphUniqueKeyArgs.builder()
.paths(
"/definition/id1",
"/definition/id2")
.build())
.build());
}
}

Import

Cosmos Gremlin Graphs can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/gremlinGraph:GremlinGraph example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1/gremlinDatabases/db1/graphs/graphs1

*/

Properties

Link copied to clipboard
val accountName: Output<String>

The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.

Link copied to clipboard

The time to live of Analytical Storage for this Cosmos DB Gremlin Graph. Possible values are between -1 to 2147483647 not including 0. If present and the value is set to -1, it means never expire.

Link copied to clipboard
Link copied to clipboard

A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created.

Link copied to clipboard
val databaseName: Output<String>

The name of the Cosmos DB Graph Database in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.

Link copied to clipboard
val defaultTtl: Output<Int>

The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The configuration of the indexing policy. One or more index_policy blocks as defined below.

Link copied to clipboard
val name: Output<String>

Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.

Link copied to clipboard

Define a partition key. Changing this forces a new resource to be created.

Link copied to clipboard
val partitionKeyVersion: Output<Int>?

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.

Link copied to clipboard
val throughput: Output<Int>

The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Link copied to clipboard

One or more unique_key blocks as defined below. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>