databricks.DatabaseInstance
Explore with Pulumi AI
Database Instances are managed Postgres instances, composed of a primary Postgres compute instance and 0 or more read replica instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.DatabaseInstance("this", {
name: "my-database-instance",
capacity: "CU_2",
});
import pulumi
import pulumi_databricks as databricks
this = databricks.DatabaseInstance("this",
name="my-database-instance",
capacity="CU_2")
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databricks.NewDatabaseInstance(ctx, "this", &databricks.DatabaseInstanceArgs{
Name: pulumi.String("my-database-instance"),
Capacity: pulumi.String("CU_2"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.DatabaseInstance("this", new()
{
Name = "my-database-instance",
Capacity = "CU_2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabaseInstance;
import com.pulumi.databricks.DatabaseInstanceArgs;
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) {
var this_ = new DatabaseInstance("this", DatabaseInstanceArgs.builder()
.name("my-database-instance")
.capacity("CU_2")
.build());
}
}
resources:
this:
type: databricks:DatabaseInstance
properties:
name: my-database-instance
capacity: CU_2
Create DatabaseInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabaseInstance(name: string, args?: DatabaseInstanceArgs, opts?: CustomResourceOptions);
@overload
def DatabaseInstance(resource_name: str,
args: Optional[DatabaseInstanceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def DatabaseInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
capacity: Optional[str] = None,
name: Optional[str] = None,
stopped: Optional[bool] = None)
func NewDatabaseInstance(ctx *Context, name string, args *DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)
public DatabaseInstance(string name, DatabaseInstanceArgs? args = null, CustomResourceOptions? opts = null)
public DatabaseInstance(String name, DatabaseInstanceArgs args)
public DatabaseInstance(String name, DatabaseInstanceArgs args, CustomResourceOptions options)
type: databricks:DatabaseInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabaseInstanceArgs
- 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 DatabaseInstanceArgs
- 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 DatabaseInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databaseInstanceResource = new Databricks.DatabaseInstance("databaseInstanceResource", new()
{
Capacity = "string",
Name = "string",
Stopped = false,
});
example, err := databricks.NewDatabaseInstance(ctx, "databaseInstanceResource", &databricks.DatabaseInstanceArgs{
Capacity: pulumi.String("string"),
Name: pulumi.String("string"),
Stopped: pulumi.Bool(false),
})
var databaseInstanceResource = new DatabaseInstance("databaseInstanceResource", DatabaseInstanceArgs.builder()
.capacity("string")
.name("string")
.stopped(false)
.build());
database_instance_resource = databricks.DatabaseInstance("databaseInstanceResource",
capacity="string",
name="string",
stopped=False)
const databaseInstanceResource = new databricks.DatabaseInstance("databaseInstanceResource", {
capacity: "string",
name: "string",
stopped: false,
});
type: databricks:DatabaseInstance
properties:
capacity: string
name: string
stopped: false
DatabaseInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DatabaseInstance resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - Id string
- The provider-assigned unique ID for this managed resource.
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- State string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- Uid string
- (string) - An immutable UUID identifier for the instance
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - Id string
- The provider-assigned unique ID for this managed resource.
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- State string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- Uid string
- (string) - An immutable UUID identifier for the instance
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - id String
- The provider-assigned unique ID for this managed resource.
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state String
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- uid String
- (string) - An immutable UUID identifier for the instance
- creation
Time string - (string) - The timestamp when the instance was created
- creator string
- (string) - The email of the creator of the instance
- effective
Stopped boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - id string
- The provider-assigned unique ID for this managed resource.
- pg
Version string - (string) - The version of Postgres running on the instance
- read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- uid string
- (string) - An immutable UUID identifier for the instance
- creation_
time str - (string) - The timestamp when the instance was created
- creator str
- (string) - The email of the creator of the instance
- effective_
stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - id str
- The provider-assigned unique ID for this managed resource.
- pg_
version str - (string) - The version of Postgres running on the instance
- read_
write_ strdns - (string) - The DNS endpoint to connect to the instance for read+write access
- state str
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- uid str
- (string) - An immutable UUID identifier for the instance
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - id String
- The provider-assigned unique ID for this managed resource.
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state String
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- uid String
- (string) - An immutable UUID identifier for the instance
Look up Existing DatabaseInstance Resource
Get an existing DatabaseInstance 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?: DatabaseInstanceState, opts?: CustomResourceOptions): DatabaseInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
capacity: Optional[str] = None,
creation_time: Optional[str] = None,
creator: Optional[str] = None,
effective_stopped: Optional[bool] = None,
name: Optional[str] = None,
pg_version: Optional[str] = None,
read_write_dns: Optional[str] = None,
state: Optional[str] = None,
stopped: Optional[bool] = None,
uid: Optional[str] = None) -> DatabaseInstance
func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
public static DatabaseInstance get(String name, Output<String> id, DatabaseInstanceState state, CustomResourceOptions options)
resources: _: type: databricks:DatabaseInstance get: id: ${id}
- 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.
- Capacity string
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - Name string
- The name of the instance. This is the unique identifier for the instance
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- State string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- Stopped bool
- Whether the instance is stopped
- Uid string
- (string) - An immutable UUID identifier for the instance
- Capacity string
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - Name string
- The name of the instance. This is the unique identifier for the instance
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- State string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- Stopped bool
- Whether the instance is stopped
- Uid string
- (string) - An immutable UUID identifier for the instance
- capacity String
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - name String
- The name of the instance. This is the unique identifier for the instance
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state String
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- stopped Boolean
- Whether the instance is stopped
- uid String
- (string) - An immutable UUID identifier for the instance
- capacity string
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- creation
Time string - (string) - The timestamp when the instance was created
- creator string
- (string) - The email of the creator of the instance
- effective
Stopped boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - name string
- The name of the instance. This is the unique identifier for the instance
- pg
Version string - (string) - The version of Postgres running on the instance
- read
Write stringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state string
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- stopped boolean
- Whether the instance is stopped
- uid string
- (string) - An immutable UUID identifier for the instance
- capacity str
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- creation_
time str - (string) - The timestamp when the instance was created
- creator str
- (string) - The email of the creator of the instance
- effective_
stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - name str
- The name of the instance. This is the unique identifier for the instance
- pg_
version str - (string) - The version of Postgres running on the instance
- read_
write_ strdns - (string) - The DNS endpoint to connect to the instance for read+write access
- state str
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- stopped bool
- Whether the instance is stopped
- uid str
- (string) - An immutable UUID identifier for the instance
- capacity String
- The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_stopped
is owned by the server.stopped
will only be set in Create/Update response messages if and only if the user provides the field via the request.effective_stopped
on the other hand will always bet set in all response messages (Create/Update/Get/List) - name String
- The name of the instance. This is the unique identifier for the instance
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (string) - The DNS endpoint to connect to the instance for read+write access
- state String
- (string) - The current state of the instance. Possible values are:
AVAILABLE
,DELETING
,FAILING_OVER
,STARTING
,STOPPED
,UPDATING
- stopped Boolean
- Whether the instance is stopped
- uid String
- (string) - An immutable UUID identifier for the instance
Import
As of Pulumi v1.5, resources can be imported through configuration.
hcl
import {
id = name
to = databricks_database_instance.this
}
If you are using an older version of Pulumi, import the resource using the pulumi import
command as follows:
$ pulumi import databricks:index/databaseInstance:DatabaseInstance databricks_database_instance name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.