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",
});
import pulumi
import pulumi_ovh as ovh
database = ovh.hosting.PrivateDatabaseDb("database",
database_name="XXXXXX",
service_name="XXXXXX")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/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
})
}
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",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Hosting.PrivateDatabaseDb;
import com.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());
}
}
resources:
database:
type: ovh:Hosting:PrivateDatabaseDb
properties:
databaseName: XXXXXX
serviceName: XXXXXX
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 string
- The unique name of the resource.
- args PrivateDatabaseDbArgs
- 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 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 string
- The unique name of the resource.
- args PrivateDatabaseDbArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateDatabaseDbArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := Hosting.NewPrivateDatabaseDb(ctx, "privateDatabaseDbResource", &Hosting.PrivateDatabaseDbArgs{
DatabaseName: pulumi.String("string"),
ServiceName: pulumi.String("string"),
})
var privateDatabaseDbResource = new PrivateDatabaseDb("privateDatabaseDbResource", PrivateDatabaseDbArgs.builder()
.databaseName("string")
.serviceName("string")
.build());
private_database_db_resource = ovh.hosting.PrivateDatabaseDb("privateDatabaseDbResource",
database_name="string",
service_name="string")
const privateDatabaseDbResource = new ovh.hosting.PrivateDatabaseDb("privateDatabaseDbResource", {
databaseName: "string",
serviceName: "string",
});
type: ovh:Hosting:PrivateDatabaseDb
properties:
databaseName: string
serviceName: string
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
The PrivateDatabaseDb resource accepts the following input properties:
- Database
Name string - Name of your new database
- Service
Name string - The internal name of your private database.
- Database
Name string - Name of your new database
- Service
Name string - The internal name of your private database.
- database
Name String - Name of your new database
- service
Name String - The internal name of your private database.
- database
Name string - Name of your new database
- service
Name string - The internal name of your private database.
- database_
name str - Name of your new database
- service_
name str - The internal name of your private database.
- database
Name String - Name of your new database
- service
Name 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)
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.
- Database
Name string - Name of your new database
- Service
Name string - The internal name of your private database.
- Database
Name string - Name of your new database
- Service
Name string - The internal name of your private database.
- database
Name String - Name of your new database
- service
Name String - The internal name of your private database.
- database
Name string - Name of your new database
- service
Name string - The internal name of your private database.
- database_
name str - Name of your new database
- service_
name str - The internal name of your private database.
- database
Name String - Name of your new database
- service
Name 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
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.