Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Friday, Jun 10, 2022 by Pulumi

GremlinDatabase

Manages a Gremlin Database within a Cosmos DB Account.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleAccount = Output.Create(Azure.CosmosDB.GetAccount.InvokeAsync(new Azure.CosmosDB.GetAccountArgs
        {
            Name = "tfex-cosmosdb-account",
            ResourceGroupName = "tfex-cosmosdb-account-rg",
        }));
        var exampleGremlinDatabase = new Azure.CosmosDB.GremlinDatabase("exampleGremlinDatabase", new Azure.CosmosDB.GremlinDatabaseArgs
        {
            ResourceGroupName = exampleAccount.Apply(exampleAccount => exampleAccount.ResourceGroupName),
            AccountName = exampleAccount.Apply(exampleAccount => exampleAccount.Name),
            Throughput = 400,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleAccount, err := cosmosdb.LookupAccount(ctx, &cosmosdb.LookupAccountArgs{
			Name:              "tfex-cosmosdb-account",
			ResourceGroupName: "tfex-cosmosdb-account-rg",
		}, nil)
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewGremlinDatabase(ctx, "exampleGremlinDatabase", &cosmosdb.GremlinDatabaseArgs{
			ResourceGroupName: pulumi.String(exampleAccount.ResourceGroupName),
			AccountName:       pulumi.String(exampleAccount.Name),
			Throughput:        pulumi.Int(400),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleAccount = Output.of(CosmosdbFunctions.getAccount(GetAccountArgs.builder()
            .name("tfex-cosmosdb-account")
            .resourceGroupName("tfex-cosmosdb-account-rg")
            .build()));

        var exampleGremlinDatabase = new GremlinDatabase("exampleGremlinDatabase", GremlinDatabaseArgs.builder()        
            .resourceGroupName(exampleAccount.apply(getAccountResult -> getAccountResult.resourceGroupName()))
            .accountName(exampleAccount.apply(getAccountResult -> getAccountResult.name()))
            .throughput(400)
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_gremlin_database = azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleGremlinDatabase = new azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    throughput: 400,
});
resources:
  exampleGremlinDatabase:
    type: azure:cosmosdb:GremlinDatabase
    properties:
      resourceGroupName: ${exampleAccount.resourceGroupName}
      accountName: ${exampleAccount.name}
      throughput: 400
variables:
  exampleAccount:
    Fn::Invoke:
      Function: azure:cosmosdb:getAccount
      Arguments:
        name: tfex-cosmosdb-account
        resourceGroupName: tfex-cosmosdb-account-rg

Create a GremlinDatabase Resource

new GremlinDatabase(name: string, args: GremlinDatabaseArgs, opts?: CustomResourceOptions);
@overload
def GremlinDatabase(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_name: Optional[str] = None,
                    autoscale_settings: Optional[GremlinDatabaseAutoscaleSettingsArgs] = None,
                    name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    throughput: Optional[int] = None)
@overload
def GremlinDatabase(resource_name: str,
                    args: GremlinDatabaseArgs,
                    opts: Optional[ResourceOptions] = None)
func NewGremlinDatabase(ctx *Context, name string, args GremlinDatabaseArgs, opts ...ResourceOption) (*GremlinDatabase, error)
public GremlinDatabase(string name, GremlinDatabaseArgs args, CustomResourceOptions? opts = null)
public GremlinDatabase(String name, GremlinDatabaseArgs args)
public GremlinDatabase(String name, GremlinDatabaseArgs args, CustomResourceOptions options)
type: azure:cosmosdb:GremlinDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args GremlinDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args GremlinDatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GremlinDatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GremlinDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args GremlinDatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

GremlinDatabase Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The GremlinDatabase resource accepts the following input properties:

AccountName string

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

ResourceGroupName string

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

AutoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Name string

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

Throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

AccountName string

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

ResourceGroupName string

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

AutoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Name string

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

Throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

accountName String

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

resourceGroupName String

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

autoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name String

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

throughput Integer

The throughput of the Gremlin database (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 resource destroy-apply.

accountName string

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

resourceGroupName string

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

autoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name string

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

throughput number

The throughput of the Gremlin database (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 resource destroy-apply.

account_name str

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

resource_group_name str

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

autoscale_settings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name str

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

throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

accountName String

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

resourceGroupName String

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

autoscaleSettings Property Map

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name String

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

throughput Number

The throughput of the Gremlin database (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 resource destroy-apply.

Outputs

All input properties are implicitly available as output properties. Additionally, the GremlinDatabase resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing GremlinDatabase Resource

Get an existing GremlinDatabase resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GremlinDatabaseState, opts?: CustomResourceOptions): GremlinDatabase
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_name: Optional[str] = None,
        autoscale_settings: Optional[GremlinDatabaseAutoscaleSettingsArgs] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        throughput: Optional[int] = None) -> GremlinDatabase
func GetGremlinDatabase(ctx *Context, name string, id IDInput, state *GremlinDatabaseState, opts ...ResourceOption) (*GremlinDatabase, error)
public static GremlinDatabase Get(string name, Input<string> id, GremlinDatabaseState? state, CustomResourceOptions? opts = null)
public static GremlinDatabase get(String name, Output<String> id, GremlinDatabaseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountName string

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

AutoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Name string

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

ResourceGroupName string

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

Throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

AccountName string

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

AutoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Name string

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

ResourceGroupName string

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

Throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

accountName String

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

autoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name String

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

resourceGroupName String

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

throughput Integer

The throughput of the Gremlin database (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 resource destroy-apply.

accountName string

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

autoscaleSettings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name string

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

resourceGroupName string

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

throughput number

The throughput of the Gremlin database (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 resource destroy-apply.

account_name str

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

autoscale_settings GremlinDatabaseAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name str

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

resource_group_name str

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

throughput int

The throughput of the Gremlin database (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 resource destroy-apply.

accountName String

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

autoscaleSettings Property Map

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

name String

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

resourceGroupName String

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

throughput Number

The throughput of the Gremlin database (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 resource destroy-apply.

Supporting Types

GremlinDatabaseAutoscaleSettings

MaxThroughput int

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

MaxThroughput int

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput Integer

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput number

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

max_throughput int

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput Number

The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

Import

CosmosDB Gremlin Databases can be imported using the resource id, e.g.

 $ pulumi import azure:cosmosdb/gremlinDatabase:GremlinDatabase db1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1/gremlinDatabases/db1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.