1. Packages
  2. OVH
  3. API Docs
  4. Hosting
  5. PrivateDatabaseUser
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.Hosting.PrivateDatabaseUser

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Create a new user on your private cloud database instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const user = new ovh.hosting.PrivateDatabaseUser("user", {
        password: "XXXXXX",
        serviceName: "XXXXXX",
        userName: "XXXXXX",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    user = ovh.hosting.PrivateDatabaseUser("user",
        password="XXXXXX",
        service_name="XXXXXX",
        user_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.NewPrivateDatabaseUser(ctx, "user", &Hosting.PrivateDatabaseUserArgs{
    			Password:    pulumi.String("XXXXXX"),
    			ServiceName: pulumi.String("XXXXXX"),
    			UserName:    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 user = new Ovh.Hosting.PrivateDatabaseUser("user", new()
        {
            Password = "XXXXXX",
            ServiceName = "XXXXXX",
            UserName = "XXXXXX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Hosting.PrivateDatabaseUser;
    import com.pulumi.ovh.Hosting.PrivateDatabaseUserArgs;
    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 user = new PrivateDatabaseUser("user", PrivateDatabaseUserArgs.builder()
                .password("XXXXXX")
                .serviceName("XXXXXX")
                .userName("XXXXXX")
                .build());
    
        }
    }
    
    resources:
      user:
        type: ovh:Hosting:PrivateDatabaseUser
        properties:
          password: XXXXXX
          serviceName: XXXXXX
          userName: XXXXXX
    

    Create PrivateDatabaseUser Resource

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

    Constructor syntax

    new PrivateDatabaseUser(name: string, args: PrivateDatabaseUserArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateDatabaseUser(resource_name: str,
                            args: PrivateDatabaseUserArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateDatabaseUser(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            password: Optional[str] = None,
                            service_name: Optional[str] = None,
                            user_name: Optional[str] = None)
    func NewPrivateDatabaseUser(ctx *Context, name string, args PrivateDatabaseUserArgs, opts ...ResourceOption) (*PrivateDatabaseUser, error)
    public PrivateDatabaseUser(string name, PrivateDatabaseUserArgs args, CustomResourceOptions? opts = null)
    public PrivateDatabaseUser(String name, PrivateDatabaseUserArgs args)
    public PrivateDatabaseUser(String name, PrivateDatabaseUserArgs args, CustomResourceOptions options)
    
    type: ovh:Hosting:PrivateDatabaseUser
    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 PrivateDatabaseUserArgs
    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 PrivateDatabaseUserArgs
    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 PrivateDatabaseUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateDatabaseUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateDatabaseUserArgs
    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 privateDatabaseUserResource = new Ovh.Hosting.PrivateDatabaseUser("privateDatabaseUserResource", new()
    {
        Password = "string",
        ServiceName = "string",
        UserName = "string",
    });
    
    example, err := Hosting.NewPrivateDatabaseUser(ctx, "privateDatabaseUserResource", &Hosting.PrivateDatabaseUserArgs{
    	Password:    pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	UserName:    pulumi.String("string"),
    })
    
    var privateDatabaseUserResource = new PrivateDatabaseUser("privateDatabaseUserResource", PrivateDatabaseUserArgs.builder()
        .password("string")
        .serviceName("string")
        .userName("string")
        .build());
    
    private_database_user_resource = ovh.hosting.PrivateDatabaseUser("privateDatabaseUserResource",
        password="string",
        service_name="string",
        user_name="string")
    
    const privateDatabaseUserResource = new ovh.hosting.PrivateDatabaseUser("privateDatabaseUserResource", {
        password: "string",
        serviceName: "string",
        userName: "string",
    });
    
    type: ovh:Hosting:PrivateDatabaseUser
    properties:
        password: string
        serviceName: string
        userName: string
    

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

    Password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    ServiceName string
    The internal name of your private database.
    UserName string
    User name used to connect on your databases
    Password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    ServiceName string
    The internal name of your private database.
    UserName string
    User name used to connect on your databases
    password String
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName String
    The internal name of your private database.
    userName String
    User name used to connect on your databases
    password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName string
    The internal name of your private database.
    userName string
    User name used to connect on your databases
    password str
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    service_name str
    The internal name of your private database.
    user_name str
    User name used to connect on your databases
    password String
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName String
    The internal name of your private database.
    userName String
    User name used to connect on your databases

    Outputs

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

    Get an existing PrivateDatabaseUser 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?: PrivateDatabaseUserState, opts?: CustomResourceOptions): PrivateDatabaseUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            password: Optional[str] = None,
            service_name: Optional[str] = None,
            user_name: Optional[str] = None) -> PrivateDatabaseUser
    func GetPrivateDatabaseUser(ctx *Context, name string, id IDInput, state *PrivateDatabaseUserState, opts ...ResourceOption) (*PrivateDatabaseUser, error)
    public static PrivateDatabaseUser Get(string name, Input<string> id, PrivateDatabaseUserState? state, CustomResourceOptions? opts = null)
    public static PrivateDatabaseUser get(String name, Output<String> id, PrivateDatabaseUserState 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.
    The following state arguments are supported:
    Password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    ServiceName string
    The internal name of your private database.
    UserName string
    User name used to connect on your databases
    Password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    ServiceName string
    The internal name of your private database.
    UserName string
    User name used to connect on your databases
    password String
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName String
    The internal name of your private database.
    userName String
    User name used to connect on your databases
    password string
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName string
    The internal name of your private database.
    userName string
    User name used to connect on your databases
    password str
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    service_name str
    The internal name of your private database.
    user_name str
    User name used to connect on your databases
    password String
    Password for the new user (alphanumeric, minimum one number and 8 characters minimum)
    serviceName String
    The internal name of your private database.
    userName String
    User name used to connect on your databases

    Import

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

    $ pulumi import ovh:Hosting/privateDatabaseUser:PrivateDatabaseUser user service_name/user_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.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud