# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['GremlinGraphArgs', 'GremlinGraph']

@pulumi.input_type
class GremlinGraphArgs:
    def __init__(__self__, *,
                 account_name: pulumi.Input[str],
                 database_name: pulumi.Input[str],
                 partition_key_path: pulumi.Input[str],
                 resource_group_name: pulumi.Input[str],
                 analytical_storage_ttl: Optional[pulumi.Input[int]] = None,
                 autoscale_settings: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']] = None,
                 conflict_resolution_policy: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']] = None,
                 default_ttl: Optional[pulumi.Input[int]] = None,
                 index_policy: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 partition_key_version: Optional[pulumi.Input[int]] = None,
                 throughput: Optional[pulumi.Input[int]] = None,
                 unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]] = None):
        """
        The set of arguments for constructing a GremlinGraph resource.
        :param pulumi.Input[str] account_name: The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        :param pulumi.Input[str] database_name: 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.
        :param pulumi.Input[str] partition_key_path: Define a partition key. Changing this forces a new resource to be created.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        :param pulumi.Input[int] analytical_storage_ttl: 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.
               
               > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        :param pulumi.Input['GremlinGraphConflictResolutionPolicyArgs'] conflict_resolution_policy: A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[int] default_ttl: The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        :param pulumi.Input['GremlinGraphIndexPolicyArgs'] index_policy: The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        :param pulumi.Input[int] partition_key_version: Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        :param pulumi.Input[int] throughput: 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.
        :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        pulumi.set(__self__, "account_name", account_name)
        pulumi.set(__self__, "database_name", database_name)
        pulumi.set(__self__, "partition_key_path", partition_key_path)
        pulumi.set(__self__, "resource_group_name", resource_group_name)
        if analytical_storage_ttl is not None:
            pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl)
        if autoscale_settings is not None:
            pulumi.set(__self__, "autoscale_settings", autoscale_settings)
        if conflict_resolution_policy is not None:
            pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy)
        if default_ttl is not None:
            pulumi.set(__self__, "default_ttl", default_ttl)
        if index_policy is not None:
            pulumi.set(__self__, "index_policy", index_policy)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if partition_key_version is not None:
            pulumi.set(__self__, "partition_key_version", partition_key_version)
        if throughput is not None:
            pulumi.set(__self__, "throughput", throughput)
        if unique_keys is not None:
            pulumi.set(__self__, "unique_keys", unique_keys)

    @property
    @pulumi.getter(name="accountName")
    def account_name(self) -> pulumi.Input[str]:
        """
        The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "account_name")

    @account_name.setter
    def account_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "account_name", value)

    @property
    @pulumi.getter(name="databaseName")
    def database_name(self) -> pulumi.Input[str]:
        """
        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.
        """
        return pulumi.get(self, "database_name")

    @database_name.setter
    def database_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "database_name", value)

    @property
    @pulumi.getter(name="partitionKeyPath")
    def partition_key_path(self) -> pulumi.Input[str]:
        """
        Define a partition key. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "partition_key_path")

    @partition_key_path.setter
    def partition_key_path(self, value: pulumi.Input[str]):
        pulumi.set(self, "partition_key_path", value)

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Input[str]:
        """
        The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

    @resource_group_name.setter
    def resource_group_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "resource_group_name", value)

    @property
    @pulumi.getter(name="analyticalStorageTtl")
    def analytical_storage_ttl(self) -> Optional[pulumi.Input[int]]:
        """
        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.

        > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        """
        return pulumi.get(self, "analytical_storage_ttl")

    @analytical_storage_ttl.setter
    def analytical_storage_ttl(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "analytical_storage_ttl", value)

    @property
    @pulumi.getter(name="autoscaleSettings")
    def autoscale_settings(self) -> Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']]:
        return pulumi.get(self, "autoscale_settings")

    @autoscale_settings.setter
    def autoscale_settings(self, value: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']]):
        pulumi.set(self, "autoscale_settings", value)

    @property
    @pulumi.getter(name="conflictResolutionPolicy")
    def conflict_resolution_policy(self) -> Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']]:
        """
        A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "conflict_resolution_policy")

    @conflict_resolution_policy.setter
    def conflict_resolution_policy(self, value: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']]):
        pulumi.set(self, "conflict_resolution_policy", value)

    @property
    @pulumi.getter(name="defaultTtl")
    def default_ttl(self) -> Optional[pulumi.Input[int]]:
        """
        The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        """
        return pulumi.get(self, "default_ttl")

    @default_ttl.setter
    def default_ttl(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "default_ttl", value)

    @property
    @pulumi.getter(name="indexPolicy")
    def index_policy(self) -> Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']]:
        """
        The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        """
        return pulumi.get(self, "index_policy")

    @index_policy.setter
    def index_policy(self, value: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']]):
        pulumi.set(self, "index_policy", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="partitionKeyVersion")
    def partition_key_version(self) -> Optional[pulumi.Input[int]]:
        """
        Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        """
        return pulumi.get(self, "partition_key_version")

    @partition_key_version.setter
    def partition_key_version(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "partition_key_version", value)

    @property
    @pulumi.getter
    def throughput(self) -> Optional[pulumi.Input[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.
        """
        return pulumi.get(self, "throughput")

    @throughput.setter
    def throughput(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "throughput", value)

    @property
    @pulumi.getter(name="uniqueKeys")
    def unique_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]]:
        """
        One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "unique_keys")

    @unique_keys.setter
    def unique_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]]):
        pulumi.set(self, "unique_keys", value)


@pulumi.input_type
class _GremlinGraphState:
    def __init__(__self__, *,
                 account_name: Optional[pulumi.Input[str]] = None,
                 analytical_storage_ttl: Optional[pulumi.Input[int]] = None,
                 autoscale_settings: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']] = None,
                 conflict_resolution_policy: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']] = None,
                 database_name: Optional[pulumi.Input[str]] = None,
                 default_ttl: Optional[pulumi.Input[int]] = None,
                 index_policy: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 partition_key_path: Optional[pulumi.Input[str]] = None,
                 partition_key_version: Optional[pulumi.Input[int]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 throughput: Optional[pulumi.Input[int]] = None,
                 unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]] = None):
        """
        Input properties used for looking up and filtering GremlinGraph resources.
        :param pulumi.Input[str] account_name: The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        :param pulumi.Input[int] analytical_storage_ttl: 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.
               
               > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        :param pulumi.Input['GremlinGraphConflictResolutionPolicyArgs'] conflict_resolution_policy: A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] database_name: 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.
        :param pulumi.Input[int] default_ttl: The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        :param pulumi.Input['GremlinGraphIndexPolicyArgs'] index_policy: The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        :param pulumi.Input[str] partition_key_path: Define a partition key. Changing this forces a new resource to be created.
        :param pulumi.Input[int] partition_key_version: Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        :param pulumi.Input[int] throughput: 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.
        :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        if account_name is not None:
            pulumi.set(__self__, "account_name", account_name)
        if analytical_storage_ttl is not None:
            pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl)
        if autoscale_settings is not None:
            pulumi.set(__self__, "autoscale_settings", autoscale_settings)
        if conflict_resolution_policy is not None:
            pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy)
        if database_name is not None:
            pulumi.set(__self__, "database_name", database_name)
        if default_ttl is not None:
            pulumi.set(__self__, "default_ttl", default_ttl)
        if index_policy is not None:
            pulumi.set(__self__, "index_policy", index_policy)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if partition_key_path is not None:
            pulumi.set(__self__, "partition_key_path", partition_key_path)
        if partition_key_version is not None:
            pulumi.set(__self__, "partition_key_version", partition_key_version)
        if resource_group_name is not None:
            pulumi.set(__self__, "resource_group_name", resource_group_name)
        if throughput is not None:
            pulumi.set(__self__, "throughput", throughput)
        if unique_keys is not None:
            pulumi.set(__self__, "unique_keys", unique_keys)

    @property
    @pulumi.getter(name="accountName")
    def account_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "account_name")

    @account_name.setter
    def account_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "account_name", value)

    @property
    @pulumi.getter(name="analyticalStorageTtl")
    def analytical_storage_ttl(self) -> Optional[pulumi.Input[int]]:
        """
        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.

        > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        """
        return pulumi.get(self, "analytical_storage_ttl")

    @analytical_storage_ttl.setter
    def analytical_storage_ttl(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "analytical_storage_ttl", value)

    @property
    @pulumi.getter(name="autoscaleSettings")
    def autoscale_settings(self) -> Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']]:
        return pulumi.get(self, "autoscale_settings")

    @autoscale_settings.setter
    def autoscale_settings(self, value: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']]):
        pulumi.set(self, "autoscale_settings", value)

    @property
    @pulumi.getter(name="conflictResolutionPolicy")
    def conflict_resolution_policy(self) -> Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']]:
        """
        A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "conflict_resolution_policy")

    @conflict_resolution_policy.setter
    def conflict_resolution_policy(self, value: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']]):
        pulumi.set(self, "conflict_resolution_policy", value)

    @property
    @pulumi.getter(name="databaseName")
    def database_name(self) -> Optional[pulumi.Input[str]]:
        """
        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.
        """
        return pulumi.get(self, "database_name")

    @database_name.setter
    def database_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "database_name", value)

    @property
    @pulumi.getter(name="defaultTtl")
    def default_ttl(self) -> Optional[pulumi.Input[int]]:
        """
        The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        """
        return pulumi.get(self, "default_ttl")

    @default_ttl.setter
    def default_ttl(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "default_ttl", value)

    @property
    @pulumi.getter(name="indexPolicy")
    def index_policy(self) -> Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']]:
        """
        The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        """
        return pulumi.get(self, "index_policy")

    @index_policy.setter
    def index_policy(self, value: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']]):
        pulumi.set(self, "index_policy", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="partitionKeyPath")
    def partition_key_path(self) -> Optional[pulumi.Input[str]]:
        """
        Define a partition key. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "partition_key_path")

    @partition_key_path.setter
    def partition_key_path(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "partition_key_path", value)

    @property
    @pulumi.getter(name="partitionKeyVersion")
    def partition_key_version(self) -> Optional[pulumi.Input[int]]:
        """
        Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        """
        return pulumi.get(self, "partition_key_version")

    @partition_key_version.setter
    def partition_key_version(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "partition_key_version", value)

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

    @resource_group_name.setter
    def resource_group_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "resource_group_name", value)

    @property
    @pulumi.getter
    def throughput(self) -> Optional[pulumi.Input[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.
        """
        return pulumi.get(self, "throughput")

    @throughput.setter
    def throughput(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "throughput", value)

    @property
    @pulumi.getter(name="uniqueKeys")
    def unique_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]]:
        """
        One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "unique_keys")

    @unique_keys.setter
    def unique_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]]):
        pulumi.set(self, "unique_keys", value)


class GremlinGraph(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_name: Optional[pulumi.Input[str]] = None,
                 analytical_storage_ttl: Optional[pulumi.Input[int]] = None,
                 autoscale_settings: Optional[pulumi.Input[Union['GremlinGraphAutoscaleSettingsArgs', 'GremlinGraphAutoscaleSettingsArgsDict']]] = None,
                 conflict_resolution_policy: Optional[pulumi.Input[Union['GremlinGraphConflictResolutionPolicyArgs', 'GremlinGraphConflictResolutionPolicyArgsDict']]] = None,
                 database_name: Optional[pulumi.Input[str]] = None,
                 default_ttl: Optional[pulumi.Input[int]] = None,
                 index_policy: Optional[pulumi.Input[Union['GremlinGraphIndexPolicyArgs', 'GremlinGraphIndexPolicyArgsDict']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 partition_key_path: Optional[pulumi.Input[str]] = None,
                 partition_key_version: Optional[pulumi.Input[int]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 throughput: Optional[pulumi.Input[int]] = None,
                 unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GremlinGraphUniqueKeyArgs', 'GremlinGraphUniqueKeyArgsDict']]]]] = None,
                 __props__=None):
        """
        Manages a Gremlin Graph within a Cosmos DB Account.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
            resource_group_name="tfex-cosmosdb-account-rg")
        example_gremlin_database = azure.cosmosdb.GremlinDatabase("example",
            name="tfex-cosmos-gremlin-db",
            resource_group_name=example.resource_group_name,
            account_name=example.name)
        example_gremlin_graph = azure.cosmosdb.GremlinGraph("example",
            name="tfex-cosmos-gremlin-graph",
            resource_group_name=example.resource_group_name,
            account_name=example.name,
            database_name=example_gremlin_database.name,
            partition_key_path="/Example",
            throughput=400,
            index_policy={
                "automatic": True,
                "indexing_mode": "consistent",
                "included_paths": ["/*"],
                "excluded_paths": ["/\\"_etag\\"/?"],
            },
            conflict_resolution_policy={
                "mode": "LastWriterWins",
                "conflict_resolution_path": "/_ts",
            },
            unique_keys=[{
                "paths": [
                    "/definition/id1",
                    "/definition/id2",
                ],
            }])
        ```

        > **NOTE:** The CosmosDB Account needs to have the `EnableGremlin` capability enabled to use this resource - which can be done by adding this to the `capabilities` list within the `cosmosdb.Account` resource.

        ## Import

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

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

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] account_name: The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        :param pulumi.Input[int] analytical_storage_ttl: 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.
               
               > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        :param pulumi.Input[Union['GremlinGraphConflictResolutionPolicyArgs', 'GremlinGraphConflictResolutionPolicyArgsDict']] conflict_resolution_policy: A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] database_name: 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.
        :param pulumi.Input[int] default_ttl: The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        :param pulumi.Input[Union['GremlinGraphIndexPolicyArgs', 'GremlinGraphIndexPolicyArgsDict']] index_policy: The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        :param pulumi.Input[str] partition_key_path: Define a partition key. Changing this forces a new resource to be created.
        :param pulumi.Input[int] partition_key_version: Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        :param pulumi.Input[int] throughput: 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.
        :param pulumi.Input[Sequence[pulumi.Input[Union['GremlinGraphUniqueKeyArgs', 'GremlinGraphUniqueKeyArgsDict']]]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GremlinGraphArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages a Gremlin Graph within a Cosmos DB Account.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
            resource_group_name="tfex-cosmosdb-account-rg")
        example_gremlin_database = azure.cosmosdb.GremlinDatabase("example",
            name="tfex-cosmos-gremlin-db",
            resource_group_name=example.resource_group_name,
            account_name=example.name)
        example_gremlin_graph = azure.cosmosdb.GremlinGraph("example",
            name="tfex-cosmos-gremlin-graph",
            resource_group_name=example.resource_group_name,
            account_name=example.name,
            database_name=example_gremlin_database.name,
            partition_key_path="/Example",
            throughput=400,
            index_policy={
                "automatic": True,
                "indexing_mode": "consistent",
                "included_paths": ["/*"],
                "excluded_paths": ["/\\"_etag\\"/?"],
            },
            conflict_resolution_policy={
                "mode": "LastWriterWins",
                "conflict_resolution_path": "/_ts",
            },
            unique_keys=[{
                "paths": [
                    "/definition/id1",
                    "/definition/id2",
                ],
            }])
        ```

        > **NOTE:** The CosmosDB Account needs to have the `EnableGremlin` capability enabled to use this resource - which can be done by adding this to the `capabilities` list within the `cosmosdb.Account` resource.

        ## Import

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

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

        :param str resource_name: The name of the resource.
        :param GremlinGraphArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(GremlinGraphArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_name: Optional[pulumi.Input[str]] = None,
                 analytical_storage_ttl: Optional[pulumi.Input[int]] = None,
                 autoscale_settings: Optional[pulumi.Input[Union['GremlinGraphAutoscaleSettingsArgs', 'GremlinGraphAutoscaleSettingsArgsDict']]] = None,
                 conflict_resolution_policy: Optional[pulumi.Input[Union['GremlinGraphConflictResolutionPolicyArgs', 'GremlinGraphConflictResolutionPolicyArgsDict']]] = None,
                 database_name: Optional[pulumi.Input[str]] = None,
                 default_ttl: Optional[pulumi.Input[int]] = None,
                 index_policy: Optional[pulumi.Input[Union['GremlinGraphIndexPolicyArgs', 'GremlinGraphIndexPolicyArgsDict']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 partition_key_path: Optional[pulumi.Input[str]] = None,
                 partition_key_version: Optional[pulumi.Input[int]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 throughput: Optional[pulumi.Input[int]] = None,
                 unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GremlinGraphUniqueKeyArgs', 'GremlinGraphUniqueKeyArgsDict']]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = GremlinGraphArgs.__new__(GremlinGraphArgs)

            if account_name is None and not opts.urn:
                raise TypeError("Missing required property 'account_name'")
            __props__.__dict__["account_name"] = account_name
            __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl
            __props__.__dict__["autoscale_settings"] = autoscale_settings
            __props__.__dict__["conflict_resolution_policy"] = conflict_resolution_policy
            if database_name is None and not opts.urn:
                raise TypeError("Missing required property 'database_name'")
            __props__.__dict__["database_name"] = database_name
            __props__.__dict__["default_ttl"] = default_ttl
            __props__.__dict__["index_policy"] = index_policy
            __props__.__dict__["name"] = name
            if partition_key_path is None and not opts.urn:
                raise TypeError("Missing required property 'partition_key_path'")
            __props__.__dict__["partition_key_path"] = partition_key_path
            __props__.__dict__["partition_key_version"] = partition_key_version
            if resource_group_name is None and not opts.urn:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__.__dict__["resource_group_name"] = resource_group_name
            __props__.__dict__["throughput"] = throughput
            __props__.__dict__["unique_keys"] = unique_keys
        super(GremlinGraph, __self__).__init__(
            'azure:cosmosdb/gremlinGraph:GremlinGraph',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_name: Optional[pulumi.Input[str]] = None,
            analytical_storage_ttl: Optional[pulumi.Input[int]] = None,
            autoscale_settings: Optional[pulumi.Input[Union['GremlinGraphAutoscaleSettingsArgs', 'GremlinGraphAutoscaleSettingsArgsDict']]] = None,
            conflict_resolution_policy: Optional[pulumi.Input[Union['GremlinGraphConflictResolutionPolicyArgs', 'GremlinGraphConflictResolutionPolicyArgsDict']]] = None,
            database_name: Optional[pulumi.Input[str]] = None,
            default_ttl: Optional[pulumi.Input[int]] = None,
            index_policy: Optional[pulumi.Input[Union['GremlinGraphIndexPolicyArgs', 'GremlinGraphIndexPolicyArgsDict']]] = None,
            name: Optional[pulumi.Input[str]] = None,
            partition_key_path: Optional[pulumi.Input[str]] = None,
            partition_key_version: Optional[pulumi.Input[int]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            throughput: Optional[pulumi.Input[int]] = None,
            unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GremlinGraphUniqueKeyArgs', 'GremlinGraphUniqueKeyArgsDict']]]]] = None) -> 'GremlinGraph':
        """
        Get an existing GremlinGraph resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] account_name: The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        :param pulumi.Input[int] analytical_storage_ttl: 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.
               
               > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        :param pulumi.Input[Union['GremlinGraphConflictResolutionPolicyArgs', 'GremlinGraphConflictResolutionPolicyArgsDict']] conflict_resolution_policy: A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] database_name: 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.
        :param pulumi.Input[int] default_ttl: The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        :param pulumi.Input[Union['GremlinGraphIndexPolicyArgs', 'GremlinGraphIndexPolicyArgsDict']] index_policy: The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        :param pulumi.Input[str] partition_key_path: Define a partition key. Changing this forces a new resource to be created.
        :param pulumi.Input[int] partition_key_version: Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        :param pulumi.Input[int] throughput: 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.
        :param pulumi.Input[Sequence[pulumi.Input[Union['GremlinGraphUniqueKeyArgs', 'GremlinGraphUniqueKeyArgsDict']]]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _GremlinGraphState.__new__(_GremlinGraphState)

        __props__.__dict__["account_name"] = account_name
        __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl
        __props__.__dict__["autoscale_settings"] = autoscale_settings
        __props__.__dict__["conflict_resolution_policy"] = conflict_resolution_policy
        __props__.__dict__["database_name"] = database_name
        __props__.__dict__["default_ttl"] = default_ttl
        __props__.__dict__["index_policy"] = index_policy
        __props__.__dict__["name"] = name
        __props__.__dict__["partition_key_path"] = partition_key_path
        __props__.__dict__["partition_key_version"] = partition_key_version
        __props__.__dict__["resource_group_name"] = resource_group_name
        __props__.__dict__["throughput"] = throughput
        __props__.__dict__["unique_keys"] = unique_keys
        return GremlinGraph(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="accountName")
    def account_name(self) -> pulumi.Output[str]:
        """
        The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "account_name")

    @property
    @pulumi.getter(name="analyticalStorageTtl")
    def analytical_storage_ttl(self) -> pulumi.Output[Optional[int]]:
        """
        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.

        > **Note:** Disabling `analytical_storage_ttl` will force a new resource to be created since it can't be disabled once it's enabled.
        """
        return pulumi.get(self, "analytical_storage_ttl")

    @property
    @pulumi.getter(name="autoscaleSettings")
    def autoscale_settings(self) -> pulumi.Output[Optional['outputs.GremlinGraphAutoscaleSettings']]:
        return pulumi.get(self, "autoscale_settings")

    @property
    @pulumi.getter(name="conflictResolutionPolicy")
    def conflict_resolution_policy(self) -> pulumi.Output['outputs.GremlinGraphConflictResolutionPolicy']:
        """
        A `conflict_resolution_policy` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "conflict_resolution_policy")

    @property
    @pulumi.getter(name="databaseName")
    def database_name(self) -> pulumi.Output[str]:
        """
        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.
        """
        return pulumi.get(self, "database_name")

    @property
    @pulumi.getter(name="defaultTtl")
    def default_ttl(self) -> pulumi.Output[Optional[int]]:
        """
        The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire.
        """
        return pulumi.get(self, "default_ttl")

    @property
    @pulumi.getter(name="indexPolicy")
    def index_policy(self) -> pulumi.Output['outputs.GremlinGraphIndexPolicy']:
        """
        The configuration of the indexing policy. One or more `index_policy` blocks as defined below.
        """
        return pulumi.get(self, "index_policy")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Specifies the name of the Cosmos DB Gremlin Graph. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="partitionKeyPath")
    def partition_key_path(self) -> pulumi.Output[str]:
        """
        Define a partition key. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "partition_key_path")

    @property
    @pulumi.getter(name="partitionKeyVersion")
    def partition_key_version(self) -> pulumi.Output[Optional[int]]:
        """
        Define a partition key version. Changing this forces a new resource to be created. Possible values are `1`and `2`. This should be set to `2` in order to use large partition keys.
        """
        return pulumi.get(self, "partition_key_version")

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Output[str]:
        """
        The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

    @property
    @pulumi.getter
    def throughput(self) -> pulumi.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.
        """
        return pulumi.get(self, "throughput")

    @property
    @pulumi.getter(name="uniqueKeys")
    def unique_keys(self) -> pulumi.Output[Optional[Sequence['outputs.GremlinGraphUniqueKey']]]:
        """
        One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "unique_keys")

