1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectDatabase
  5. getUser
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

ovh.CloudProjectDatabase.getUser

Explore with Pulumi AI

OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

Use this data source to get information about a user of a database cluster associated with a public cloud project.

Example Usage

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

const user = ovh.CloudProjectDatabase.getUser({
    serviceName: "XXX",
    engine: "YYY",
    clusterId: "ZZZ",
    name: "UUU",
});
export const userName = user.then(user => user.name);
Copy
import pulumi
import pulumi_ovh as ovh

user = ovh.CloudProjectDatabase.get_user(service_name="XXX",
    engine="YYY",
    cluster_id="ZZZ",
    name="UUU")
pulumi.export("userName", user.name)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := cloudprojectdatabase.GetUser(ctx, &cloudprojectdatabase.GetUserArgs{
			ServiceName: "XXX",
			Engine:      "YYY",
			ClusterId:   "ZZZ",
			Name:        "UUU",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("userName", user.Name)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var user = Ovh.CloudProjectDatabase.GetUser.Invoke(new()
    {
        ServiceName = "XXX",
        Engine = "YYY",
        ClusterId = "ZZZ",
        Name = "UUU",
    });

    return new Dictionary<string, object?>
    {
        ["userName"] = user.Apply(getUserResult => getUserResult.Name),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetUserArgs;
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 user = CloudProjectDatabaseFunctions.getUser(GetUserArgs.builder()
            .serviceName("XXX")
            .engine("YYY")
            .clusterId("ZZZ")
            .name("UUU")
            .build());

        ctx.export("userName", user.applyValue(getUserResult -> getUserResult.name()));
    }
}
Copy
variables:
  user:
    fn::invoke:
      function: ovh:CloudProjectDatabase:getUser
      arguments:
        serviceName: XXX
        engine: YYY
        clusterId: ZZZ
        name: UUU
outputs:
  userName: ${user.name}
Copy

Using getUser

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
Copy
def get_user(cluster_id: Optional[str] = None,
             engine: Optional[str] = None,
             name: Optional[str] = None,
             service_name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(cluster_id: Optional[pulumi.Input[str]] = None,
             engine: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             service_name: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func GetUser(ctx *Context, args *GetUserArgs, opts ...InvokeOption) (*GetUserResult, error)
func GetUserOutput(ctx *Context, args *GetUserOutputArgs, opts ...InvokeOption) GetUserResultOutput
Copy

> Note: This function is named GetUser in the Go SDK.

public static class GetUser 
{
    public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
    public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProjectDatabase/getUser:getUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId This property is required. string
Cluster ID
Engine This property is required. string
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
Name This property is required. string
Name of the user.
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ClusterId This property is required. string
Cluster ID
Engine This property is required. string
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
Name This property is required. string
Name of the user.
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. String
Cluster ID
engine This property is required. String
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
name This property is required. String
Name of the user.
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. string
Cluster ID
engine This property is required. string
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
name This property is required. string
Name of the user.
serviceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
cluster_id This property is required. str
Cluster ID
engine This property is required. str
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
name This property is required. str
Name of the user.
service_name This property is required. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. String
Cluster ID
engine This property is required. String
The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
name This property is required. String
Name of the user.
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getUser Result

The following output properties are available:

ClusterId string
See Argument Reference above.
CreatedAt string
Date of the creation of the user.
Engine string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the user.
ServiceName string
See Argument Reference above.
Status string
Current status of the user.
ClusterId string
See Argument Reference above.
CreatedAt string
Date of the creation of the user.
Engine string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the user.
ServiceName string
See Argument Reference above.
Status string
Current status of the user.
clusterId String
See Argument Reference above.
createdAt String
Date of the creation of the user.
engine String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the user.
serviceName String
See Argument Reference above.
status String
Current status of the user.
clusterId string
See Argument Reference above.
createdAt string
Date of the creation of the user.
engine string
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the user.
serviceName string
See Argument Reference above.
status string
Current status of the user.
cluster_id str
See Argument Reference above.
created_at str
Date of the creation of the user.
engine str
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the user.
service_name str
See Argument Reference above.
status str
Current status of the user.
clusterId String
See Argument Reference above.
createdAt String
Date of the creation of the user.
engine String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the user.
serviceName String
See Argument Reference above.
status String
Current status of the user.

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud