Ovh

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

getCloudProjectDatabaseUsers

Use this data source to get the list of users 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 users = Ovh.GetCloudProjectDatabaseUsers.Invoke(new()
    {
        ServiceName = "XXXX",
        Engine = "YYYY",
        ClusterId = "ZZZ",
    });

    return new Dictionary<string, object?>
    {
        ["userIds"] = users.Apply(getCloudProjectDatabaseUsersResult => getCloudProjectDatabaseUsersResult.UserIds),
    };
});
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 {
		users, err := ovh.GetCloudProjectDatabaseUsers(ctx, &GetCloudProjectDatabaseUsersArgs{
			ServiceName: "XXXX",
			Engine:      "YYYY",
			ClusterId:   "ZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("userIds", users.UserIds)
		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.GetCloudProjectDatabaseUsersArgs;
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 users = OvhFunctions.getCloudProjectDatabaseUsers(GetCloudProjectDatabaseUsersArgs.builder()
            .serviceName("XXXX")
            .engine("YYYY")
            .clusterId("ZZZ")
            .build());

        ctx.export("userIds", users.applyValue(getCloudProjectDatabaseUsersResult -> getCloudProjectDatabaseUsersResult.userIds()));
    }
}
import pulumi
import pulumi_ovh as ovh

users = ovh.get_cloud_project_database_users(service_name="XXXX",
    engine="YYYY",
    cluster_id="ZZZ")
pulumi.export("userIds", users.user_ids)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const users = ovh.getCloudProjectDatabaseUsers({
    serviceName: "XXXX",
    engine: "YYYY",
    clusterId: "ZZZ",
});
export const userIds = users.then(users => users.userIds);
variables:
  users:
    Fn::Invoke:
      Function: ovh:getCloudProjectDatabaseUsers
      Arguments:
        serviceName: XXXX
        engine: YYYY
        clusterId: ZZZ
outputs:
  userIds: ${users.userIds}

Using getCloudProjectDatabaseUsers

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 getCloudProjectDatabaseUsers(args: GetCloudProjectDatabaseUsersArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabaseUsersResult>
function getCloudProjectDatabaseUsersOutput(args: GetCloudProjectDatabaseUsersOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabaseUsersResult>
def get_cloud_project_database_users(cluster_id: Optional[str] = None,
                                     engine: Optional[str] = None,
                                     service_name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabaseUsersResult
def get_cloud_project_database_users_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                     engine: Optional[pulumi.Input[str]] = None,
                                     service_name: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectDatabaseUsersResult]
func GetCloudProjectDatabaseUsers(ctx *Context, args *GetCloudProjectDatabaseUsersArgs, opts ...InvokeOption) (*GetCloudProjectDatabaseUsersResult, error)
func GetCloudProjectDatabaseUsersOutput(ctx *Context, args *GetCloudProjectDatabaseUsersOutputArgs, opts ...InvokeOption) GetCloudProjectDatabaseUsersResultOutput

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

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

The following arguments are supported:

ClusterId string

Cluster ID

Engine string

The engine of the database cluster you want to list users. To get a full list of available engine visit. public documentation.

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 to list users. To get a full list of available engine visit. public documentation.

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 to list users. To get a full list of available engine visit. public documentation.

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 to list users. To get a full list of available engine visit. public documentation.

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 to list users. To get a full list of available engine visit. public documentation.

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 to list users. To get a full list of available engine visit. public documentation.

serviceName String

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

getCloudProjectDatabaseUsers Result

The following output properties are available:

ClusterId string
Engine string
Id string

The provider-assigned unique ID for this managed resource.

ServiceName string
UserIds List<string>

The list of users ids of the database cluster associated with the project.

ClusterId string
Engine string
Id string

The provider-assigned unique ID for this managed resource.

ServiceName string
UserIds []string

The list of users ids of the database cluster associated with the project.

clusterId String
engine String
id String

The provider-assigned unique ID for this managed resource.

serviceName String
userIds List<String>

The list of users ids of the database cluster associated with the project.

clusterId string
engine string
id string

The provider-assigned unique ID for this managed resource.

serviceName string
userIds string[]

The list of users ids of the database cluster associated with the project.

cluster_id str
engine str
id str

The provider-assigned unique ID for this managed resource.

service_name str
user_ids Sequence[str]

The list of users ids of the database cluster associated with the project.

clusterId String
engine String
id String

The provider-assigned unique ID for this managed resource.

serviceName String
userIds List<String>

The list of users ids of the database cluster associated with the project.

Package Details

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

This Pulumi package is based on the ovh Terraform Provider.