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

ovh.Hosting.PrivateDatabase

Explore with Pulumi AI

Example Usage

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

const myaccount = ovh.Me.getMe({});
const mycart = myaccount.then(myaccount => ovh.Order.getCart({
    ovhSubsidiary: myaccount.ovhSubsidiary,
}));
const databaseCartProductPlan = mycart.then(mycart => ovh.Order.getCartProductPlan({
    cartId: mycart.id,
    priceCapacity: "renew",
    product: "privateSQL",
    planCode: "private-sql-512-instance",
}));
const databasePrivateDatabase = new ovh.hosting.PrivateDatabase("databasePrivateDatabase", {
    ovhSubsidiary: mycart.then(mycart => mycart.ovhSubsidiary),
    displayName: "Postgresql-12",
    plan: {
        duration: databaseCartProductPlan.then(databaseCartProductPlan => databaseCartProductPlan.prices?.[3]?.duration),
        planCode: databaseCartProductPlan.then(databaseCartProductPlan => databaseCartProductPlan.planCode),
        pricingMode: databaseCartProductPlan.then(databaseCartProductPlan => databaseCartProductPlan.selectedPrices?.[0]?.pricingMode),
        configurations: [
            {
                label: "dc",
                value: "gra3",
            },
            {
                label: "engine",
                value: "postgresql_12",
            },
        ],
    },
});
export const privatedatabaseServiceName = databasePrivateDatabase.serviceName;
Copy
import pulumi
import pulumi_ovh as ovh

myaccount = ovh.Me.get_me()
mycart = ovh.Order.get_cart(ovh_subsidiary=myaccount.ovh_subsidiary)
database_cart_product_plan = ovh.Order.get_cart_product_plan(cart_id=mycart.id,
    price_capacity="renew",
    product="privateSQL",
    plan_code="private-sql-512-instance")
database_private_database = ovh.hosting.PrivateDatabase("databasePrivateDatabase",
    ovh_subsidiary=mycart.ovh_subsidiary,
    display_name="Postgresql-12",
    plan={
        "duration": database_cart_product_plan.prices[3].duration,
        "plan_code": database_cart_product_plan.plan_code,
        "pricing_mode": database_cart_product_plan.selected_prices[0].pricing_mode,
        "configurations": [
            {
                "label": "dc",
                "value": "gra3",
            },
            {
                "label": "engine",
                "value": "postgresql_12",
            },
        ],
    })
pulumi.export("privatedatabaseServiceName", database_private_database.service_name)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myaccount, err := me.GetMe(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		mycart, err := order.GetCart(ctx, &order.GetCartArgs{
			OvhSubsidiary: myaccount.OvhSubsidiary,
		}, nil)
		if err != nil {
			return err
		}
		databaseCartProductPlan, err := order.GetCartProductPlan(ctx, &order.GetCartProductPlanArgs{
			CartId:        mycart.Id,
			PriceCapacity: "renew",
			Product:       "privateSQL",
			PlanCode:      "private-sql-512-instance",
		}, nil)
		if err != nil {
			return err
		}
		databasePrivateDatabase, err := hosting.NewPrivateDatabase(ctx, "databasePrivateDatabase", &hosting.PrivateDatabaseArgs{
			OvhSubsidiary: pulumi.String(mycart.OvhSubsidiary),
			DisplayName:   pulumi.String("Postgresql-12"),
			Plan: &hosting.PrivateDatabasePlanArgs{
				Duration:    pulumi.String(databaseCartProductPlan.Prices[3].Duration),
				PlanCode:    pulumi.String(databaseCartProductPlan.PlanCode),
				PricingMode: pulumi.String(databaseCartProductPlan.SelectedPrices[0].PricingMode),
				Configurations: hosting.PrivateDatabasePlanConfigurationArray{
					&hosting.PrivateDatabasePlanConfigurationArgs{
						Label: pulumi.String("dc"),
						Value: pulumi.String("gra3"),
					},
					&hosting.PrivateDatabasePlanConfigurationArgs{
						Label: pulumi.String("engine"),
						Value: pulumi.String("postgresql_12"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		ctx.Export("privatedatabaseServiceName", databasePrivateDatabase.ServiceName)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var myaccount = Ovh.Me.GetMe.Invoke();

    var mycart = Ovh.Order.GetCart.Invoke(new()
    {
        OvhSubsidiary = myaccount.Apply(getMeResult => getMeResult.OvhSubsidiary),
    });

    var databaseCartProductPlan = Ovh.Order.GetCartProductPlan.Invoke(new()
    {
        CartId = mycart.Apply(getCartResult => getCartResult.Id),
        PriceCapacity = "renew",
        Product = "privateSQL",
        PlanCode = "private-sql-512-instance",
    });

    var databasePrivateDatabase = new Ovh.Hosting.PrivateDatabase("databasePrivateDatabase", new()
    {
        OvhSubsidiary = mycart.Apply(getCartResult => getCartResult.OvhSubsidiary),
        DisplayName = "Postgresql-12",
        Plan = new Ovh.Hosting.Inputs.PrivateDatabasePlanArgs
        {
            Duration = databaseCartProductPlan.Apply(getCartProductPlanResult => getCartProductPlanResult.Prices[3]?.Duration),
            PlanCode = databaseCartProductPlan.Apply(getCartProductPlanResult => getCartProductPlanResult.PlanCode),
            PricingMode = databaseCartProductPlan.Apply(getCartProductPlanResult => getCartProductPlanResult.SelectedPrices[0]?.PricingMode),
            Configurations = new[]
            {
                new Ovh.Hosting.Inputs.PrivateDatabasePlanConfigurationArgs
                {
                    Label = "dc",
                    Value = "gra3",
                },
                new Ovh.Hosting.Inputs.PrivateDatabasePlanConfigurationArgs
                {
                    Label = "engine",
                    Value = "postgresql_12",
                },
            },
        },
    });

    return new Dictionary<string, object?>
    {
        ["privatedatabaseServiceName"] = databasePrivateDatabase.ServiceName,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Me.MeFunctions;
import com.pulumi.ovh.Order.OrderFunctions;
import com.pulumi.ovh.Order.inputs.GetCartArgs;
import com.pulumi.ovh.Order.inputs.GetCartProductPlanArgs;
import com.ovhcloud.pulumi.ovh.Hosting.PrivateDatabase;
import com.ovhcloud.pulumi.ovh.Hosting.PrivateDatabaseArgs;
import com.pulumi.ovh.Hosting.inputs.PrivateDatabasePlanArgs;
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) {
        final var myaccount = MeFunctions.getMe(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);

        final var mycart = OrderFunctions.getCart(GetCartArgs.builder()
            .ovhSubsidiary(myaccount.ovhSubsidiary())
            .build());

        final var databaseCartProductPlan = OrderFunctions.getCartProductPlan(GetCartProductPlanArgs.builder()
            .cartId(mycart.id())
            .priceCapacity("renew")
            .product("privateSQL")
            .planCode("private-sql-512-instance")
            .build());

        var databasePrivateDatabase = new PrivateDatabase("databasePrivateDatabase", PrivateDatabaseArgs.builder()
            .ovhSubsidiary(mycart.ovhSubsidiary())
            .displayName("Postgresql-12")
            .plan(PrivateDatabasePlanArgs.builder()
                .duration(databaseCartProductPlan.prices()[3].duration())
                .planCode(databaseCartProductPlan.planCode())
                .pricingMode(databaseCartProductPlan.selectedPrices()[0].pricingMode())
                .configurations(                
                    PrivateDatabasePlanConfigurationArgs.builder()
                        .label("dc")
                        .value("gra3")
                        .build(),
                    PrivateDatabasePlanConfigurationArgs.builder()
                        .label("engine")
                        .value("postgresql_12")
                        .build())
                .build())
            .build());

        ctx.export("privatedatabaseServiceName", databasePrivateDatabase.serviceName());
    }
}
Copy
resources:
  databasePrivateDatabase:
    type: ovh:Hosting:PrivateDatabase
    properties:
      ovhSubsidiary: ${mycart.ovhSubsidiary}
      displayName: Postgresql-12
      plan:
        duration: ${databaseCartProductPlan.prices[3].duration}
        planCode: ${databaseCartProductPlan.planCode}
        pricingMode: ${databaseCartProductPlan.selectedPrices[0].pricingMode}
        configurations:
          - label: dc
            value: gra3
          - label: engine
            value: postgresql_12
variables:
  myaccount:
    fn::invoke:
      function: ovh:Me:getMe
      arguments: {}
  mycart:
    fn::invoke:
      function: ovh:Order:getCart
      arguments:
        ovhSubsidiary: ${myaccount.ovhSubsidiary}
  databaseCartProductPlan:
    fn::invoke:
      function: ovh:Order:getCartProductPlan
      arguments:
        cartId: ${mycart.id}
        priceCapacity: renew
        product: privateSQL
        planCode: private-sql-512-instance
outputs:
  privatedatabaseServiceName: ${databasePrivateDatabase.serviceName}
Copy

Create PrivateDatabase Resource

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

Constructor syntax

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

@overload
def PrivateDatabase(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    display_name: Optional[str] = None,
                    orders: Optional[Sequence[_hosting.PrivateDatabaseOrderArgs]] = None,
                    ovh_subsidiary: Optional[str] = None,
                    payment_mean: Optional[str] = None,
                    plan: Optional[_hosting.PrivateDatabasePlanArgs] = None,
                    plan_options: Optional[Sequence[_hosting.PrivateDatabasePlanOptionArgs]] = None,
                    service_name: Optional[str] = None)
func NewPrivateDatabase(ctx *Context, name string, args *PrivateDatabaseArgs, opts ...ResourceOption) (*PrivateDatabase, error)
public PrivateDatabase(string name, PrivateDatabaseArgs? args = null, CustomResourceOptions? opts = null)
public PrivateDatabase(String name, PrivateDatabaseArgs args)
public PrivateDatabase(String name, PrivateDatabaseArgs args, CustomResourceOptions options)
type: ovh:Hosting:PrivateDatabase
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 PrivateDatabaseArgs
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 PrivateDatabaseArgs
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 PrivateDatabaseArgs
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 PrivateDatabaseArgs
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. PrivateDatabaseArgs
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 privateDatabaseResource = new Ovh.Hosting.PrivateDatabase("privateDatabaseResource", new()
{
    DisplayName = "string",
    Orders = new[]
    {
        new Ovh.Hosting.Inputs.PrivateDatabaseOrderArgs
        {
            Date = "string",
            Details = new[]
            {
                new Ovh.Hosting.Inputs.PrivateDatabaseOrderDetailArgs
                {
                    Description = "string",
                    Domain = "string",
                    OrderDetailId = 0,
                    Quantity = "string",
                },
            },
            ExpirationDate = "string",
            OrderId = 0,
        },
    },
    OvhSubsidiary = "string",
    Plan = new Ovh.Hosting.Inputs.PrivateDatabasePlanArgs
    {
        Duration = "string",
        PlanCode = "string",
        PricingMode = "string",
        CatalogName = "string",
        Configurations = new[]
        {
            new Ovh.Hosting.Inputs.PrivateDatabasePlanConfigurationArgs
            {
                Label = "string",
                Value = "string",
            },
        },
    },
    PlanOptions = new[]
    {
        new Ovh.Hosting.Inputs.PrivateDatabasePlanOptionArgs
        {
            Duration = "string",
            PlanCode = "string",
            PricingMode = "string",
            CatalogName = "string",
            Configurations = new[]
            {
                new Ovh.Hosting.Inputs.PrivateDatabasePlanOptionConfigurationArgs
                {
                    Label = "string",
                    Value = "string",
                },
            },
        },
    },
    ServiceName = "string",
});
Copy
example, err := Hosting.NewPrivateDatabase(ctx, "privateDatabaseResource", &Hosting.PrivateDatabaseArgs{
	DisplayName: pulumi.String("string"),
	Orders: hosting.PrivateDatabaseOrderArray{
		&hosting.PrivateDatabaseOrderArgs{
			Date: pulumi.String("string"),
			Details: hosting.PrivateDatabaseOrderDetailArray{
				&hosting.PrivateDatabaseOrderDetailArgs{
					Description:   pulumi.String("string"),
					Domain:        pulumi.String("string"),
					OrderDetailId: pulumi.Int(0),
					Quantity:      pulumi.String("string"),
				},
			},
			ExpirationDate: pulumi.String("string"),
			OrderId:        pulumi.Int(0),
		},
	},
	OvhSubsidiary: pulumi.String("string"),
	Plan: &hosting.PrivateDatabasePlanArgs{
		Duration:    pulumi.String("string"),
		PlanCode:    pulumi.String("string"),
		PricingMode: pulumi.String("string"),
		CatalogName: pulumi.String("string"),
		Configurations: hosting.PrivateDatabasePlanConfigurationArray{
			&hosting.PrivateDatabasePlanConfigurationArgs{
				Label: pulumi.String("string"),
				Value: pulumi.String("string"),
			},
		},
	},
	PlanOptions: hosting.PrivateDatabasePlanOptionArray{
		&hosting.PrivateDatabasePlanOptionArgs{
			Duration:    pulumi.String("string"),
			PlanCode:    pulumi.String("string"),
			PricingMode: pulumi.String("string"),
			CatalogName: pulumi.String("string"),
			Configurations: hosting.PrivateDatabasePlanOptionConfigurationArray{
				&hosting.PrivateDatabasePlanOptionConfigurationArgs{
					Label: pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
		},
	},
	ServiceName: pulumi.String("string"),
})
Copy
var privateDatabaseResource = new PrivateDatabase("privateDatabaseResource", PrivateDatabaseArgs.builder()
    .displayName("string")
    .orders(PrivateDatabaseOrderArgs.builder()
        .date("string")
        .details(PrivateDatabaseOrderDetailArgs.builder()
            .description("string")
            .domain("string")
            .orderDetailId(0)
            .quantity("string")
            .build())
        .expirationDate("string")
        .orderId(0)
        .build())
    .ovhSubsidiary("string")
    .plan(PrivateDatabasePlanArgs.builder()
        .duration("string")
        .planCode("string")
        .pricingMode("string")
        .catalogName("string")
        .configurations(PrivateDatabasePlanConfigurationArgs.builder()
            .label("string")
            .value("string")
            .build())
        .build())
    .planOptions(PrivateDatabasePlanOptionArgs.builder()
        .duration("string")
        .planCode("string")
        .pricingMode("string")
        .catalogName("string")
        .configurations(PrivateDatabasePlanOptionConfigurationArgs.builder()
            .label("string")
            .value("string")
            .build())
        .build())
    .serviceName("string")
    .build());
Copy
private_database_resource = ovh.hosting.PrivateDatabase("privateDatabaseResource",
    display_name="string",
    orders=[{
        "date": "string",
        "details": [{
            "description": "string",
            "domain": "string",
            "order_detail_id": 0,
            "quantity": "string",
        }],
        "expiration_date": "string",
        "order_id": 0,
    }],
    ovh_subsidiary="string",
    plan={
        "duration": "string",
        "plan_code": "string",
        "pricing_mode": "string",
        "catalog_name": "string",
        "configurations": [{
            "label": "string",
            "value": "string",
        }],
    },
    plan_options=[{
        "duration": "string",
        "plan_code": "string",
        "pricing_mode": "string",
        "catalog_name": "string",
        "configurations": [{
            "label": "string",
            "value": "string",
        }],
    }],
    service_name="string")
Copy
const privateDatabaseResource = new ovh.hosting.PrivateDatabase("privateDatabaseResource", {
    displayName: "string",
    orders: [{
        date: "string",
        details: [{
            description: "string",
            domain: "string",
            orderDetailId: 0,
            quantity: "string",
        }],
        expirationDate: "string",
        orderId: 0,
    }],
    ovhSubsidiary: "string",
    plan: {
        duration: "string",
        planCode: "string",
        pricingMode: "string",
        catalogName: "string",
        configurations: [{
            label: "string",
            value: "string",
        }],
    },
    planOptions: [{
        duration: "string",
        planCode: "string",
        pricingMode: "string",
        catalogName: "string",
        configurations: [{
            label: "string",
            value: "string",
        }],
    }],
    serviceName: "string",
});
Copy
type: ovh:Hosting:PrivateDatabase
properties:
    displayName: string
    orders:
        - date: string
          details:
            - description: string
              domain: string
              orderDetailId: 0
              quantity: string
          expirationDate: string
          orderId: 0
    ovhSubsidiary: string
    plan:
        catalogName: string
        configurations:
            - label: string
              value: string
        duration: string
        planCode: string
        pricingMode: string
    planOptions:
        - catalogName: string
          configurations:
            - label: string
              value: string
          duration: string
          planCode: string
          pricingMode: string
    serviceName: string
Copy

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

DisplayName string
Name displayed in customer panel for your private database
Orders List<PrivateDatabaseOrder>
Details about your Order
OvhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
PaymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

Plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
PlanOptions Changes to this property will trigger replacement. List<PrivateDatabasePlanOption>
Product Plan to order
ServiceName string
Service name
DisplayName string
Name displayed in customer panel for your private database
Orders []PrivateDatabaseOrderArgs
Details about your Order
OvhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
PaymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

Plan Changes to this property will trigger replacement. PrivateDatabasePlanArgs
Product Plan to order
PlanOptions Changes to this property will trigger replacement. []PrivateDatabasePlanOptionArgs
Product Plan to order
ServiceName string
Service name
displayName String
Name displayed in customer panel for your private database
orders List<PrivateDatabaseOrder>
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. String
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. String
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
planOptions Changes to this property will trigger replacement. List<PrivateDatabasePlanOption>
Product Plan to order
serviceName String
Service name
displayName string
Name displayed in customer panel for your private database
orders PrivateDatabaseOrder[]
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
planOptions Changes to this property will trigger replacement. PrivateDatabasePlanOption[]
Product Plan to order
serviceName string
Service name
display_name str
Name displayed in customer panel for your private database
orders Sequence[hosting.PrivateDatabaseOrderArgs]
Details about your Order
ovh_subsidiary Changes to this property will trigger replacement. str
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
payment_mean Changes to this property will trigger replacement. str
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. hosting.PrivateDatabasePlanArgs
Product Plan to order
plan_options Changes to this property will trigger replacement. Sequence[hosting.PrivateDatabasePlanOptionArgs]
Product Plan to order
service_name str
Service name
displayName String
Name displayed in customer panel for your private database
orders List<Property Map>
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. String
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. String
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. Property Map
Product Plan to order
planOptions Changes to this property will trigger replacement. List<Property Map>
Product Plan to order
serviceName String
Service name

Outputs

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

Cpu int
Number of CPU on your private database
DatabaseURN string
URN of the private database, used when writing IAM policies
Datacenter string
Datacenter where this private database is located
Hostname string
Private database hostname
HostnameFtp string
Private database FTP hostname
Id string
The provider-assigned unique ID for this managed resource.
Infrastructure string
Infrastructure where service was stored
Offer string
Type of the private database offer
Port int
Private database service port
PortFtp int
Private database FTP port
QuotaSize int
Space allowed (in MB) on your private database
QuotaUsed int
Sapce used (in MB) on your private database
Ram int
Amount of ram (in MB) on your private database
Server string
Private database server name
State string
Private database state
Type string
Private database type
Version string
Private database available versions
VersionLabel string
Private database version label
VersionNumber double
Private database version number
Cpu int
Number of CPU on your private database
DatabaseURN string
URN of the private database, used when writing IAM policies
Datacenter string
Datacenter where this private database is located
Hostname string
Private database hostname
HostnameFtp string
Private database FTP hostname
Id string
The provider-assigned unique ID for this managed resource.
Infrastructure string
Infrastructure where service was stored
Offer string
Type of the private database offer
Port int
Private database service port
PortFtp int
Private database FTP port
QuotaSize int
Space allowed (in MB) on your private database
QuotaUsed int
Sapce used (in MB) on your private database
Ram int
Amount of ram (in MB) on your private database
Server string
Private database server name
State string
Private database state
Type string
Private database type
Version string
Private database available versions
VersionLabel string
Private database version label
VersionNumber float64
Private database version number
DatabaseURN String
URN of the private database, used when writing IAM policies
cpu Integer
Number of CPU on your private database
datacenter String
Datacenter where this private database is located
hostname String
Private database hostname
hostnameFtp String
Private database FTP hostname
id String
The provider-assigned unique ID for this managed resource.
infrastructure String
Infrastructure where service was stored
offer String
Type of the private database offer
port Integer
Private database service port
portFtp Integer
Private database FTP port
quotaSize Integer
Space allowed (in MB) on your private database
quotaUsed Integer
Sapce used (in MB) on your private database
ram Integer
Amount of ram (in MB) on your private database
server String
Private database server name
state String
Private database state
type String
Private database type
version String
Private database available versions
versionLabel String
Private database version label
versionNumber Double
Private database version number
DatabaseURN string
URN of the private database, used when writing IAM policies
cpu number
Number of CPU on your private database
datacenter string
Datacenter where this private database is located
hostname string
Private database hostname
hostnameFtp string
Private database FTP hostname
id string
The provider-assigned unique ID for this managed resource.
infrastructure string
Infrastructure where service was stored
offer string
Type of the private database offer
port number
Private database service port
portFtp number
Private database FTP port
quotaSize number
Space allowed (in MB) on your private database
quotaUsed number
Sapce used (in MB) on your private database
ram number
Amount of ram (in MB) on your private database
server string
Private database server name
state string
Private database state
type string
Private database type
version string
Private database available versions
versionLabel string
Private database version label
versionNumber number
Private database version number
cpu int
Number of CPU on your private database
database_urn str
URN of the private database, used when writing IAM policies
datacenter str
Datacenter where this private database is located
hostname str
Private database hostname
hostname_ftp str
Private database FTP hostname
id str
The provider-assigned unique ID for this managed resource.
infrastructure str
Infrastructure where service was stored
offer str
Type of the private database offer
port int
Private database service port
port_ftp int
Private database FTP port
quota_size int
Space allowed (in MB) on your private database
quota_used int
Sapce used (in MB) on your private database
ram int
Amount of ram (in MB) on your private database
server str
Private database server name
state str
Private database state
type str
Private database type
version str
Private database available versions
version_label str
Private database version label
version_number float
Private database version number
DatabaseURN String
URN of the private database, used when writing IAM policies
cpu Number
Number of CPU on your private database
datacenter String
Datacenter where this private database is located
hostname String
Private database hostname
hostnameFtp String
Private database FTP hostname
id String
The provider-assigned unique ID for this managed resource.
infrastructure String
Infrastructure where service was stored
offer String
Type of the private database offer
port Number
Private database service port
portFtp Number
Private database FTP port
quotaSize Number
Space allowed (in MB) on your private database
quotaUsed Number
Sapce used (in MB) on your private database
ram Number
Amount of ram (in MB) on your private database
server String
Private database server name
state String
Private database state
type String
Private database type
version String
Private database available versions
versionLabel String
Private database version label
versionNumber Number
Private database version number

Look up Existing PrivateDatabase Resource

Get an existing PrivateDatabase 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?: PrivateDatabaseState, opts?: CustomResourceOptions): PrivateDatabase
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        database_urn: Optional[str] = None,
        cpu: Optional[int] = None,
        datacenter: Optional[str] = None,
        display_name: Optional[str] = None,
        hostname: Optional[str] = None,
        hostname_ftp: Optional[str] = None,
        infrastructure: Optional[str] = None,
        offer: Optional[str] = None,
        orders: Optional[Sequence[_hosting.PrivateDatabaseOrderArgs]] = None,
        ovh_subsidiary: Optional[str] = None,
        payment_mean: Optional[str] = None,
        plan: Optional[_hosting.PrivateDatabasePlanArgs] = None,
        plan_options: Optional[Sequence[_hosting.PrivateDatabasePlanOptionArgs]] = None,
        port: Optional[int] = None,
        port_ftp: Optional[int] = None,
        quota_size: Optional[int] = None,
        quota_used: Optional[int] = None,
        ram: Optional[int] = None,
        server: Optional[str] = None,
        service_name: Optional[str] = None,
        state: Optional[str] = None,
        type: Optional[str] = None,
        version: Optional[str] = None,
        version_label: Optional[str] = None,
        version_number: Optional[float] = None) -> PrivateDatabase
func GetPrivateDatabase(ctx *Context, name string, id IDInput, state *PrivateDatabaseState, opts ...ResourceOption) (*PrivateDatabase, error)
public static PrivateDatabase Get(string name, Input<string> id, PrivateDatabaseState? state, CustomResourceOptions? opts = null)
public static PrivateDatabase get(String name, Output<String> id, PrivateDatabaseState state, CustomResourceOptions options)
resources:  _:    type: ovh:Hosting:PrivateDatabase    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:
Cpu int
Number of CPU on your private database
DatabaseURN string
URN of the private database, used when writing IAM policies
Datacenter string
Datacenter where this private database is located
DisplayName string
Name displayed in customer panel for your private database
Hostname string
Private database hostname
HostnameFtp string
Private database FTP hostname
Infrastructure string
Infrastructure where service was stored
Offer string
Type of the private database offer
Orders List<PrivateDatabaseOrder>
Details about your Order
OvhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
PaymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

Plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
PlanOptions Changes to this property will trigger replacement. List<PrivateDatabasePlanOption>
Product Plan to order
Port int
Private database service port
PortFtp int
Private database FTP port
QuotaSize int
Space allowed (in MB) on your private database
QuotaUsed int
Sapce used (in MB) on your private database
Ram int
Amount of ram (in MB) on your private database
Server string
Private database server name
ServiceName string
Service name
State string
Private database state
Type string
Private database type
Version string
Private database available versions
VersionLabel string
Private database version label
VersionNumber double
Private database version number
Cpu int
Number of CPU on your private database
DatabaseURN string
URN of the private database, used when writing IAM policies
Datacenter string
Datacenter where this private database is located
DisplayName string
Name displayed in customer panel for your private database
Hostname string
Private database hostname
HostnameFtp string
Private database FTP hostname
Infrastructure string
Infrastructure where service was stored
Offer string
Type of the private database offer
Orders []PrivateDatabaseOrderArgs
Details about your Order
OvhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
PaymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

Plan Changes to this property will trigger replacement. PrivateDatabasePlanArgs
Product Plan to order
PlanOptions Changes to this property will trigger replacement. []PrivateDatabasePlanOptionArgs
Product Plan to order
Port int
Private database service port
PortFtp int
Private database FTP port
QuotaSize int
Space allowed (in MB) on your private database
QuotaUsed int
Sapce used (in MB) on your private database
Ram int
Amount of ram (in MB) on your private database
Server string
Private database server name
ServiceName string
Service name
State string
Private database state
Type string
Private database type
Version string
Private database available versions
VersionLabel string
Private database version label
VersionNumber float64
Private database version number
DatabaseURN String
URN of the private database, used when writing IAM policies
cpu Integer
Number of CPU on your private database
datacenter String
Datacenter where this private database is located
displayName String
Name displayed in customer panel for your private database
hostname String
Private database hostname
hostnameFtp String
Private database FTP hostname
infrastructure String
Infrastructure where service was stored
offer String
Type of the private database offer
orders List<PrivateDatabaseOrder>
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. String
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. String
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
planOptions Changes to this property will trigger replacement. List<PrivateDatabasePlanOption>
Product Plan to order
port Integer
Private database service port
portFtp Integer
Private database FTP port
quotaSize Integer
Space allowed (in MB) on your private database
quotaUsed Integer
Sapce used (in MB) on your private database
ram Integer
Amount of ram (in MB) on your private database
server String
Private database server name
serviceName String
Service name
state String
Private database state
type String
Private database type
version String
Private database available versions
versionLabel String
Private database version label
versionNumber Double
Private database version number
DatabaseURN string
URN of the private database, used when writing IAM policies
cpu number
Number of CPU on your private database
datacenter string
Datacenter where this private database is located
displayName string
Name displayed in customer panel for your private database
hostname string
Private database hostname
hostnameFtp string
Private database FTP hostname
infrastructure string
Infrastructure where service was stored
offer string
Type of the private database offer
orders PrivateDatabaseOrder[]
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. string
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. string
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. PrivateDatabasePlan
Product Plan to order
planOptions Changes to this property will trigger replacement. PrivateDatabasePlanOption[]
Product Plan to order
port number
Private database service port
portFtp number
Private database FTP port
quotaSize number
Space allowed (in MB) on your private database
quotaUsed number
Sapce used (in MB) on your private database
ram number
Amount of ram (in MB) on your private database
server string
Private database server name
serviceName string
Service name
state string
Private database state
type string
Private database type
version string
Private database available versions
versionLabel string
Private database version label
versionNumber number
Private database version number
cpu int
Number of CPU on your private database
database_urn str
URN of the private database, used when writing IAM policies
datacenter str
Datacenter where this private database is located
display_name str
Name displayed in customer panel for your private database
hostname str
Private database hostname
hostname_ftp str
Private database FTP hostname
infrastructure str
Infrastructure where service was stored
offer str
Type of the private database offer
orders Sequence[hosting.PrivateDatabaseOrderArgs]
Details about your Order
ovh_subsidiary Changes to this property will trigger replacement. str
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
payment_mean Changes to this property will trigger replacement. str
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. hosting.PrivateDatabasePlanArgs
Product Plan to order
plan_options Changes to this property will trigger replacement. Sequence[hosting.PrivateDatabasePlanOptionArgs]
Product Plan to order
port int
Private database service port
port_ftp int
Private database FTP port
quota_size int
Space allowed (in MB) on your private database
quota_used int
Sapce used (in MB) on your private database
ram int
Amount of ram (in MB) on your private database
server str
Private database server name
service_name str
Service name
state str
Private database state
type str
Private database type
version str
Private database available versions
version_label str
Private database version label
version_number float
Private database version number
DatabaseURN String
URN of the private database, used when writing IAM policies
cpu Number
Number of CPU on your private database
datacenter String
Datacenter where this private database is located
displayName String
Name displayed in customer panel for your private database
hostname String
Private database hostname
hostnameFtp String
Private database FTP hostname
infrastructure String
Infrastructure where service was stored
offer String
Type of the private database offer
orders List<Property Map>
Details about your Order
ovhSubsidiary Changes to this property will trigger replacement. String
OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under models.nichandle.OvhSubsidiaryEnum
paymentMean Changes to this property will trigger replacement. String
Ovh payment mode

Deprecated: This field is not anymore used since the API has been deprecated in favor of /payment/mean. Now, the default payment mean is used.

plan Changes to this property will trigger replacement. Property Map
Product Plan to order
planOptions Changes to this property will trigger replacement. List<Property Map>
Product Plan to order
port Number
Private database service port
portFtp Number
Private database FTP port
quotaSize Number
Space allowed (in MB) on your private database
quotaUsed Number
Sapce used (in MB) on your private database
ram Number
Amount of ram (in MB) on your private database
server String
Private database server name
serviceName String
Service name
state String
Private database state
type String
Private database type
version String
Private database available versions
versionLabel String
Private database version label
versionNumber Number
Private database version number

Supporting Types

PrivateDatabaseOrder
, PrivateDatabaseOrderArgs

Date string
date
Details List<PrivateDatabaseOrderDetail>
Information about a Bill entry
ExpirationDate string
expiration date
OrderId int
order id
Date string
date
Details []PrivateDatabaseOrderDetail
Information about a Bill entry
ExpirationDate string
expiration date
OrderId int
order id
date String
date
details List<PrivateDatabaseOrderDetail>
Information about a Bill entry
expirationDate String
expiration date
orderId Integer
order id
date string
date
details PrivateDatabaseOrderDetail[]
Information about a Bill entry
expirationDate string
expiration date
orderId number
order id
date str
date
details Sequence[hosting.PrivateDatabaseOrderDetail]
Information about a Bill entry
expiration_date str
expiration date
order_id int
order id
date String
date
details List<Property Map>
Information about a Bill entry
expirationDate String
expiration date
orderId Number
order id

PrivateDatabaseOrderDetail
, PrivateDatabaseOrderDetailArgs

Description string
Custom description on your privatedatabase order.
Domain string
expiration date
OrderDetailId int
order detail id
Quantity string
quantity
Description string
Custom description on your privatedatabase order.
Domain string
expiration date
OrderDetailId int
order detail id
Quantity string
quantity
description String
Custom description on your privatedatabase order.
domain String
expiration date
orderDetailId Integer
order detail id
quantity String
quantity
description string
Custom description on your privatedatabase order.
domain string
expiration date
orderDetailId number
order detail id
quantity string
quantity
description str
Custom description on your privatedatabase order.
domain str
expiration date
order_detail_id int
order detail id
quantity str
quantity
description String
Custom description on your privatedatabase order.
domain String
expiration date
orderDetailId Number
order detail id
quantity String
quantity

PrivateDatabasePlan
, PrivateDatabasePlanArgs

Duration This property is required. string
duration.
PlanCode This property is required. string
Plan code.
PricingMode This property is required. string
Pricing model identifier
CatalogName string
Catalog name
Configurations List<PrivateDatabasePlanConfiguration>
Representation of a configuration item for personalizing product
Duration This property is required. string
duration.
PlanCode This property is required. string
Plan code.
PricingMode This property is required. string
Pricing model identifier
CatalogName string
Catalog name
Configurations []PrivateDatabasePlanConfiguration
Representation of a configuration item for personalizing product
duration This property is required. String
duration.
planCode This property is required. String
Plan code.
pricingMode This property is required. String
Pricing model identifier
catalogName String
Catalog name
configurations List<PrivateDatabasePlanConfiguration>
Representation of a configuration item for personalizing product
duration This property is required. string
duration.
planCode This property is required. string
Plan code.
pricingMode This property is required. string
Pricing model identifier
catalogName string
Catalog name
configurations PrivateDatabasePlanConfiguration[]
Representation of a configuration item for personalizing product
duration This property is required. str
duration.
plan_code This property is required. str
Plan code.
pricing_mode This property is required. str
Pricing model identifier
catalog_name str
Catalog name
configurations Sequence[hosting.PrivateDatabasePlanConfiguration]
Representation of a configuration item for personalizing product
duration This property is required. String
duration.
planCode This property is required. String
Plan code.
pricingMode This property is required. String
Pricing model identifier
catalogName String
Catalog name
configurations List<Property Map>
Representation of a configuration item for personalizing product

PrivateDatabasePlanConfiguration
, PrivateDatabasePlanConfigurationArgs

Label This property is required. string
Identifier of the resource
Value This property is required. string

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

Label This property is required. string
Identifier of the resource
Value This property is required. string

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

label This property is required. String
Identifier of the resource
value This property is required. String

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

label This property is required. string
Identifier of the resource
value This property is required. string

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

label This property is required. str
Identifier of the resource
value This property is required. str

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

label This property is required. String
Identifier of the resource
value This property is required. String

Path to the resource in API.OVH.COM

Plan order valid values can be found on OVHcloud APIv6

PrivateDatabasePlanOption
, PrivateDatabasePlanOptionArgs

Duration This property is required. string
Service duration
PlanCode This property is required. string
Plan code
PricingMode This property is required. string
Pricing model identifier
CatalogName string
Catalog name
Configurations List<PrivateDatabasePlanOptionConfiguration>
Representation of a configuration item for personalizing product
Duration This property is required. string
Service duration
PlanCode This property is required. string
Plan code
PricingMode This property is required. string
Pricing model identifier
CatalogName string
Catalog name
Configurations []PrivateDatabasePlanOptionConfiguration
Representation of a configuration item for personalizing product
duration This property is required. String
Service duration
planCode This property is required. String
Plan code
pricingMode This property is required. String
Pricing model identifier
catalogName String
Catalog name
configurations List<PrivateDatabasePlanOptionConfiguration>
Representation of a configuration item for personalizing product
duration This property is required. string
Service duration
planCode This property is required. string
Plan code
pricingMode This property is required. string
Pricing model identifier
catalogName string
Catalog name
configurations PrivateDatabasePlanOptionConfiguration[]
Representation of a configuration item for personalizing product
duration This property is required. str
Service duration
plan_code This property is required. str
Plan code
pricing_mode This property is required. str
Pricing model identifier
catalog_name str
Catalog name
configurations Sequence[hosting.PrivateDatabasePlanOptionConfiguration]
Representation of a configuration item for personalizing product
duration This property is required. String
Service duration
planCode This property is required. String
Plan code
pricingMode This property is required. String
Pricing model identifier
catalogName String
Catalog name
configurations List<Property Map>
Representation of a configuration item for personalizing product

PrivateDatabasePlanOptionConfiguration
, PrivateDatabasePlanOptionConfigurationArgs

Label This property is required. string
Identifier of the resource
Value This property is required. string
Path to the resource in API.OVH.COM
Label This property is required. string
Identifier of the resource
Value This property is required. string
Path to the resource in API.OVH.COM
label This property is required. String
Identifier of the resource
value This property is required. String
Path to the resource in API.OVH.COM
label This property is required. string
Identifier of the resource
value This property is required. string
Path to the resource in API.OVH.COM
label This property is required. str
Identifier of the resource
value This property is required. str
Path to the resource in API.OVH.COM
label This property is required. String
Identifier of the resource
value This property is required. String
Path to the resource in API.OVH.COM

Import

OVHcloud Webhosting database can be imported using the service_name. Using the following configuration:

terraform

import {

to = ovh_hosting_privatedatabase.database

id = “

}

You can then run:

bash

$ pulumi preview -generate-config-out=database.tf

$ pulumi up

The file database.tf will then contain the imported resource’s configuration, that can be copied next to the import block above. See https://developer.hashicorp.com/terraform/language/import/generating-configuration for more details.

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.