Class Instance
Manages a V1 DB instance resource within OpenStack.
Example Usage
Instance
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var test = new OpenStack.Database.Instance("test", new OpenStack.Database.InstanceArgs
{
Datastore = new OpenStack.Database.Inputs.InstanceDatastoreArgs
{
Type = "mysql",
Version = "mysql-5.7",
},
FlavorId = "31792d21-c355-4587-9290-56c1ed0ca376",
Networks =
{
new OpenStack.Database.Inputs.InstanceNetworkArgs
{
Uuid = "c0612505-caf2-4fb0-b7cb-56a0240a2b12",
},
},
Region = "region-test",
Size = 8,
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.Database
Assembly: Pulumi.OpenStack.dll
Syntax
public class Instance : CustomResource
Constructors
View SourceInstance(String, InstanceArgs, CustomResourceOptions)
Create a Instance resource with the given unique name, arguments, and options.
Declaration
public Instance(string name, InstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| InstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceConfigurationId
Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
Declaration
public Output<string> ConfigurationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Databases
An array of database name, charset and collate. The database object structure is documented below.
Declaration
public Output<ImmutableArray<InstanceDatabase>> Databases { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<InstanceDatabase>> |
Datastore
An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
Declaration
public Output<InstanceDatastore> Datastore { get; }
Property Value
| Type | Description |
|---|---|
| Output<InstanceDatastore> |
FlavorId
The flavor ID of the desired flavor for the instance. Changing this creates new instance.
Declaration
public Output<string> FlavorId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Database to be created on new instance. Changing this creates a new instance.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Networks
An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.
Declaration
public Output<ImmutableArray<InstanceNetwork>> Networks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<InstanceNetwork>> |
Region
The region in which to create the db instance. Changing this creates a new instance.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
Specifies the volume size in GB. Changing this creates new instance.
Declaration
public Output<int> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Users
An array of username, password, host and databases. The user object structure is documented below.
Declaration
public Output<ImmutableArray<InstanceUser>> Users { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<InstanceUser>> |
Methods
View SourceGet(String, Input<String>, InstanceState, CustomResourceOptions)
Get an existing Instance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Instance Get(string name, Input<string> id, InstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| InstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Instance |