1. Packages
  2. OVH
  3. API Docs
  4. Hosting
  5. PrivateDatabaseDb
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.Hosting.PrivateDatabaseDb

Explore with Pulumi AI

Create a new database on your private cloud database service.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";

const database = new ovh.hosting.PrivateDatabaseDb("database", {
    databaseName: "XXXXXX",
    serviceName: "XXXXXX",
});
Copy
import pulumi
import pulumi_ovh as ovh

database = ovh.hosting.PrivateDatabaseDb("database",
    database_name="XXXXXX",
    service_name="XXXXXX")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/hosting"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hosting.NewPrivateDatabaseDb(ctx, "database", &hosting.PrivateDatabaseDbArgs{
			DatabaseName: pulumi.String("XXXXXX"),
			ServiceName:  pulumi.String("XXXXXX"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var database = new Ovh.Hosting.PrivateDatabaseDb("database", new()
    {
        DatabaseName = "XXXXXX",
        ServiceName = "XXXXXX",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.Hosting.PrivateDatabaseDb;
import com.ovhcloud.pulumi.ovh.Hosting.PrivateDatabaseDbArgs;
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 database = new PrivateDatabaseDb("database", PrivateDatabaseDbArgs.builder()
            .databaseName("XXXXXX")
            .serviceName("XXXXXX")
            .build());

    }
}
Copy
resources:
  database:
    type: ovh:Hosting:PrivateDatabaseDb
    properties:
      databaseName: XXXXXX
      serviceName: XXXXXX
Copy

Create PrivateDatabaseDb Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PrivateDatabaseDb(name: string, args: PrivateDatabaseDbArgs, opts?: CustomResourceOptions);
@overload
def PrivateDatabaseDb(resource_name: str,
                      args: PrivateDatabaseDbArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def PrivateDatabaseDb(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      database_name: Optional[str] = None,
                      service_name: Optional[str] = None)
func NewPrivateDatabaseDb(ctx *Context, name string, args PrivateDatabaseDbArgs, opts ...ResourceOption) (*PrivateDatabaseDb, error)
public PrivateDatabaseDb(string name, PrivateDatabaseDbArgs args, CustomResourceOptions? opts = null)
public PrivateDatabaseDb(String name, PrivateDatabaseDbArgs args)
public PrivateDatabaseDb(String name, PrivateDatabaseDbArgs args, CustomResourceOptions options)
type: ovh:Hosting:PrivateDatabaseDb
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PrivateDatabaseDbArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PrivateDatabaseDbArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDatabaseDbArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDatabaseDbArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PrivateDatabaseDbArgs
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 privateDatabaseDbResource = new Ovh.Hosting.PrivateDatabaseDb("privateDatabaseDbResource", new()
{
    DatabaseName = "string",
    ServiceName = "string",
});
Copy
example, err := Hosting.NewPrivateDatabaseDb(ctx, "privateDatabaseDbResource", &Hosting.PrivateDatabaseDbArgs{
	DatabaseName: pulumi.String("string"),
	ServiceName:  pulumi.String("string"),
})
Copy
var privateDatabaseDbResource = new PrivateDatabaseDb("privateDatabaseDbResource", PrivateDatabaseDbArgs.builder()
    .databaseName("string")
    .serviceName("string")
    .build());
Copy
private_database_db_resource = ovh.hosting.PrivateDatabaseDb("privateDatabaseDbResource",
    database_name="string",
    service_name="string")
Copy
const privateDatabaseDbResource = new ovh.hosting.PrivateDatabaseDb("privateDatabaseDbResource", {
    databaseName: "string",
    serviceName: "string",
});
Copy
type: ovh:Hosting:PrivateDatabaseDb
properties:
    databaseName: string
    serviceName: string
Copy

PrivateDatabaseDb 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 PrivateDatabaseDb resource accepts the following input properties:

DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
Name of your new database
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The internal name of your private database.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
Name of your new database
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The internal name of your private database.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
Name of your new database
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The internal name of your private database.
databaseName
This property is required.
Changes to this property will trigger replacement.
string
Name of your new database
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The internal name of your private database.
database_name
This property is required.
Changes to this property will trigger replacement.
str
Name of your new database
service_name
This property is required.
Changes to this property will trigger replacement.
str
The internal name of your private database.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
Name of your new database
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The internal name of your private database.

Outputs

All input properties are implicitly available as output properties. Additionally, the PrivateDatabaseDb 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 Existing PrivateDatabaseDb Resource

Get an existing PrivateDatabaseDb 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?: PrivateDatabaseDbState, opts?: CustomResourceOptions): PrivateDatabaseDb
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        database_name: Optional[str] = None,
        service_name: Optional[str] = None) -> PrivateDatabaseDb
func GetPrivateDatabaseDb(ctx *Context, name string, id IDInput, state *PrivateDatabaseDbState, opts ...ResourceOption) (*PrivateDatabaseDb, error)
public static PrivateDatabaseDb Get(string name, Input<string> id, PrivateDatabaseDbState? state, CustomResourceOptions? opts = null)
public static PrivateDatabaseDb get(String name, Output<String> id, PrivateDatabaseDbState state, CustomResourceOptions options)
resources:  _:    type: ovh:Hosting:PrivateDatabaseDb    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DatabaseName Changes to this property will trigger replacement. string
Name of your new database
ServiceName Changes to this property will trigger replacement. string
The internal name of your private database.
DatabaseName Changes to this property will trigger replacement. string
Name of your new database
ServiceName Changes to this property will trigger replacement. string
The internal name of your private database.
databaseName Changes to this property will trigger replacement. String
Name of your new database
serviceName Changes to this property will trigger replacement. String
The internal name of your private database.
databaseName Changes to this property will trigger replacement. string
Name of your new database
serviceName Changes to this property will trigger replacement. string
The internal name of your private database.
database_name Changes to this property will trigger replacement. str
Name of your new database
service_name Changes to this property will trigger replacement. str
The internal name of your private database.
databaseName Changes to this property will trigger replacement. String
Name of your new database
serviceName Changes to this property will trigger replacement. String
The internal name of your private database.

Import

OVHcloud Webhosting database can be imported using the service_name and the database_name, separated by “/” E.g.,

$ pulumi import ovh:Hosting/privateDatabaseDb:PrivateDatabaseDb database service_name/database_name
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.