Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Use this data source to get information about a prometheus of a MongoDB cluster associated with a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const prometheus = ovh.CloudProject.getMongoDbPrometheus({
serviceName: "XXX",
clusterId: "ZZZ",
});
export const name = prometheus.then(prometheus => prometheus.username);
import pulumi
import pulumi_ovh as ovh
prometheus = ovh.CloudProject.get_mongo_db_prometheus(service_name="XXX",
cluster_id="ZZZ")
pulumi.export("name", prometheus.username)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
prometheus, err := cloudproject.GetMongoDbPrometheus(ctx, &cloudproject.GetMongoDbPrometheusArgs{
ServiceName: "XXX",
ClusterId: "ZZZ",
}, nil)
if err != nil {
return err
}
ctx.Export("name", prometheus.Username)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var prometheus = Ovh.CloudProject.GetMongoDbPrometheus.Invoke(new()
{
ServiceName = "XXX",
ClusterId = "ZZZ",
});
return new Dictionary<string, object?>
{
["name"] = prometheus.Apply(getMongoDbPrometheusResult => getMongoDbPrometheusResult.Username),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetMongoDbPrometheusArgs;
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 prometheus = CloudProjectFunctions.getMongoDbPrometheus(GetMongoDbPrometheusArgs.builder()
.serviceName("XXX")
.clusterId("ZZZ")
.build());
ctx.export("name", prometheus.username());
}
}
variables:
prometheus:
fn::invoke:
function: ovh:CloudProject:getMongoDbPrometheus
arguments:
serviceName: XXX
clusterId: ZZZ
outputs:
name: ${prometheus.username}
Using getMongoDbPrometheus
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 getMongoDbPrometheus(args: GetMongoDbPrometheusArgs, opts?: InvokeOptions): Promise<GetMongoDbPrometheusResult>
function getMongoDbPrometheusOutput(args: GetMongoDbPrometheusOutputArgs, opts?: InvokeOptions): Output<GetMongoDbPrometheusResult>def get_mongo_db_prometheus(cluster_id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMongoDbPrometheusResult
def get_mongo_db_prometheus_output(cluster_id: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMongoDbPrometheusResult]func GetMongoDbPrometheus(ctx *Context, args *GetMongoDbPrometheusArgs, opts ...InvokeOption) (*GetMongoDbPrometheusResult, error)
func GetMongoDbPrometheusOutput(ctx *Context, args *GetMongoDbPrometheusOutputArgs, opts ...InvokeOption) GetMongoDbPrometheusResultOutput> Note: This function is named GetMongoDbPrometheus in the Go SDK.
public static class GetMongoDbPrometheus
{
public static Task<GetMongoDbPrometheusResult> InvokeAsync(GetMongoDbPrometheusArgs args, InvokeOptions? opts = null)
public static Output<GetMongoDbPrometheusResult> Invoke(GetMongoDbPrometheusInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMongoDbPrometheusResult> getMongoDbPrometheus(GetMongoDbPrometheusArgs args, InvokeOptions options)
public static Output<GetMongoDbPrometheusResult> getMongoDbPrometheus(GetMongoDbPrometheusArgs args, InvokeOptions options)
fn::invoke:
function: ovh:CloudProject/getMongoDbPrometheus:getMongoDbPrometheus
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Id string - Cluster ID
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- Cluster
Id string - Cluster ID
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- cluster
Id String - Cluster ID
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- cluster
Id string - Cluster ID
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- cluster_
id str - Cluster ID
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- cluster
Id String - Cluster ID
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
getMongoDbPrometheus Result
The following output properties are available:
- Cluster
Id string - See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- Srv
Domain string - Name of the srv domain endpoint.
- Username string
- name of the prometheus user.
- Cluster
Id string - See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- Srv
Domain string - Name of the srv domain endpoint.
- Username string
- name of the prometheus user.
- cluster
Id String - See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
- srv
Domain String - Name of the srv domain endpoint.
- username String
- name of the prometheus user.
- cluster
Id string - See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Name string - See Argument Reference above.
- srv
Domain string - Name of the srv domain endpoint.
- username string
- name of the prometheus user.
- cluster_
id str - See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
name str - See Argument Reference above.
- srv_
domain str - Name of the srv domain endpoint.
- username str
- name of the prometheus user.
- cluster
Id String - See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
- srv
Domain String - Name of the srv domain endpoint.
- username String
- name of the prometheus user.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
