Microsoft.DocumentDB databaseAccounts/gremlinDatabases/graphs 2019-08-01

Template format

To create a Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs",
  "apiVersion": "2019-08-01",
  "location": "string",
  "tags": {},
  "properties": {
    "resource": {
      "id": "string",
      "indexingPolicy": {
        "automatic": "boolean",
        "indexingMode": "string",
        "includedPaths": [
          {
            "path": "string",
            "indexes": [
              {
                "dataType": "string",
                "precision": "integer",
                "kind": "string"
              }
            ]
          }
        ],
        "excludedPaths": [
          {
            "path": "string"
          }
        ],
        "spatialIndexes": [
          {
            "path": "string",
            "types": [
              "string"
            ]
          }
        ]
      },
      "partitionKey": {
        "paths": [
          "string"
        ],
        "kind": "string",
        "version": "integer"
      },
      "defaultTtl": "integer",
      "uniqueKeyPolicy": {
        "uniqueKeys": [
          {
            "paths": [
              "string"
            ]
          }
        ]
      },
      "conflictResolutionPolicy": {
        "mode": "string",
        "conflictResolutionPath": "string",
        "conflictResolutionProcedure": "string"
      }
    },
    "options": {}
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes Cosmos DB graph name.
type enum Yes For JSON -graphs
-or-
Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2019-08-01
location string No The location of the resource group to which the resource belongs.
tags object No
properties object Yes Properties to create and update Azure Cosmos DB Gremlin graph. - GremlinGraphCreateUpdateProperties object

GremlinGraphCreateUpdateProperties object

Name Type Required Value
resource object Yes The standard JSON format of a Gremlin graph - GremlinGraphResource object
options object Yes A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

GremlinGraphResource object

Name Type Required Value
id string Yes Name of the Cosmos DB Gremlin graph
indexingPolicy object No The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph - IndexingPolicy object
partitionKey object No The configuration of the partition key to be used for partitioning data into multiple partitions - ContainerPartitionKey object
defaultTtl integer No Default time to live
uniqueKeyPolicy object No The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - UniqueKeyPolicy object
conflictResolutionPolicy object No The conflict resolution policy for the graph. - ConflictResolutionPolicy object

IndexingPolicy object

Name Type Required Value
automatic boolean No Indicates if the indexing policy is automatic
indexingMode enum No Indicates the indexing mode. - Consistent, Lazy, None
includedPaths array No List of paths to include in the indexing - IncludedPath object
excludedPaths array No List of paths to exclude from indexing - ExcludedPath object
spatialIndexes array No List of spatial specifics - SpatialSpec object

ContainerPartitionKey object

Name Type Required Value
paths array No List of paths using which data within the container can be partitioned - string
kind enum No Indicates the kind of algorithm used for partitioning. - Hash or Range
version integer No Indicates the version of the partition key definition

UniqueKeyPolicy object

Name Type Required Value
uniqueKeys array No List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. - UniqueKey object

ConflictResolutionPolicy object

Name Type Required Value
mode enum No Indicates the conflict resolution mode. - LastWriterWins or Custom
conflictResolutionPath string No The conflict resolution path in the case of LastWriterWins mode.
conflictResolutionProcedure string No The procedure to resolve conflicts in the case of custom mode.

IncludedPath object

Name Type Required Value
path string No The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
indexes array No List of indexes for this path - Indexes object

ExcludedPath object

Name Type Required Value
path string No The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)

SpatialSpec object

Name Type Required Value
path string No The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
types array No List of path's spatial type - Point, LineString, Polygon, MultiPolygon

UniqueKey object

Name Type Required Value
paths array No List of paths must be unique for each document in the Azure Cosmos DB service - string

Indexes object

Name Type Required Value
dataType enum No The datatype for which the indexing behavior is applied to. - String, Number, Point, Polygon, LineString, MultiPolygon
precision integer No The precision of the index. -1 is maximum precision.
kind enum No Indicates the type of index. - Hash, Range, Spatial

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create an Azure Cosmos DB account for Gremlin API

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using dedicated throughput.
Create an Azure Cosmos DB account for Gremlin API autoscale

Deploy to Azure
This template creates an Azure Cosmos DB account for Gremlin API in two regions with one database and one graph using autoscale throughput.