Microsoft.DocumentDB databaseAccounts/apis/databases/graphs 2016-03-19
01/08/2021
3 minutes to read
In this article
To create a Microsoft.DocumentDB/databaseAccounts/apis/databases/graphs resource, add the following JSON to the resources section of your template.
{
"name": "string",
"type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/graphs",
"apiVersion": "2016-03-19",
"properties": {
"resource": {
"id": "string",
"indexingPolicy": {
"automatic": "boolean",
"indexingMode": "string",
"includedPaths": [
{
"path": "string",
"indexes": [
{
"dataType": "string",
"precision": "integer",
"kind": "string"
}
]
}
],
"excludedPaths": [
{
"path": "string"
}
]
},
"partitionKey": {
"paths": [
"string"
],
"kind": "string"
},
"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/apis/databases/graphs 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
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
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/*)
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