Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

getCloudProjectDatabaseUser

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

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

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

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := ovh.LookupCloudProjectDatabaseUser(ctx, &GetCloudProjectDatabaseUserArgs{
			ServiceName: "XXX",
			Engine:      "YYY",
			ClusterId:   "ZZZ",
			Name:        "UUU",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("userName", user.Name)
		return nil
	})
}
package generated_program;

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

        ctx.export("userName", user.applyValue(getCloudProjectDatabaseUserResult -> getCloudProjectDatabaseUserResult.name()));
    }
}
import pulumi
import pulumi_ovh as ovh

user = ovh.get_cloud_project_database_user(service_name="XXX",
    engine="YYY",
    cluster_id="ZZZ",
    name="UUU")
pulumi.export("userName", user.name)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const user = ovh.getCloudProjectDatabaseUser({
    serviceName: "XXX",
    engine: "YYY",
    clusterId: "ZZZ",
    name: "UUU",
});
export const userName = user.then(user => user.name);
variables:
  user:
    Fn::Invoke:
      Function: ovh:getCloudProjectDatabaseUser
      Arguments:
        serviceName: XXX
        engine: YYY
        clusterId: ZZZ
        name: UUU
outputs:
  userName: ${user.name}

Using getCloudProjectDatabaseUser

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 getCloudProjectDatabaseUser(args: GetCloudProjectDatabaseUserArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabaseUserResult>
function getCloudProjectDatabaseUserOutput(args: GetCloudProjectDatabaseUserOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabaseUserResult>
def get_cloud_project_database_user(cluster_id: Optional[str] = None,
                                    engine: Optional[str] = None,
                                    name: Optional[str] = None,
                                    service_name: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabaseUserResult
def get_cloud_project_database_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[GetCloudProjectDatabaseUserResult]
func LookupCloudProjectDatabaseUser(ctx *Context, args *LookupCloudProjectDatabaseUserArgs, opts ...InvokeOption) (*LookupCloudProjectDatabaseUserResult, error)
func LookupCloudProjectDatabaseUserOutput(ctx *Context, args *LookupCloudProjectDatabaseUserOutputArgs, opts ...InvokeOption) LookupCloudProjectDatabaseUserResultOutput

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

public static class GetCloudProjectDatabaseUser 
{
    public static Task<GetCloudProjectDatabaseUserResult> InvokeAsync(GetCloudProjectDatabaseUserArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProjectDatabaseUserResult> Invoke(GetCloudProjectDatabaseUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProjectDatabaseUserResult> getCloudProjectDatabaseUser(GetCloudProjectDatabaseUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: ovh:index/getCloudProjectDatabaseUser:getCloudProjectDatabaseUser
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterId string

Cluster ID

Engine string

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
Name string

Name of the user.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

ClusterId string

Cluster ID

Engine string

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
Name string

Name of the user.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId String

Cluster ID

engine String

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
name String

Name of the user.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId string

Cluster ID

engine string

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
name string

Name of the user.

serviceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

cluster_id str

Cluster ID

engine str

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
name str

Name of the user.

service_name str

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

clusterId String

Cluster ID

engine String

The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation.
Available engines for this resource (other have specific resource):

  • cassandra
  • kafka
  • kafkaConnect
  • mysql
name String

Name of the user.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getCloudProjectDatabaseUser Result

The following output properties are available:

ClusterId string
CreatedAt string

Date of the creation of the user.

Engine string
Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the user.

ServiceName string
Status string

Current status of the user.

ClusterId string
CreatedAt string

Date of the creation of the user.

Engine string
Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the user.

ServiceName string
Status string

Current status of the user.

clusterId String
createdAt String

Date of the creation of the user.

engine String
id String

The provider-assigned unique ID for this managed resource.

name String

Name of the user.

serviceName String
status String

Current status of the user.

clusterId string
createdAt string

Date of the creation of the user.

engine string
id string

The provider-assigned unique ID for this managed resource.

name string

Name of the user.

serviceName string
status string

Current status of the user.

cluster_id str
created_at str

Date of the creation of the user.

engine str
id str

The provider-assigned unique ID for this managed resource.

name str

Name of the user.

service_name str
status str

Current status of the user.

clusterId String
createdAt String

Date of the creation of the user.

engine String
id String

The provider-assigned unique ID for this managed resource.

name String

Name of the user.

serviceName String
status String

Current status of the user.

Package Details

Repository
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.