OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud
ovh.CloudProject.getM3dbNamespaces
Explore with Pulumi AI
Use this data source to get the list of namespaces of a M3DB cluster associated with a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const namespaces = ovh.CloudProject.getM3dbNamespaces({
serviceName: "XXX",
clusterId: "YYY",
});
export const namespaceIds = namespaces.then(namespaces => namespaces.namespaceIds);
import pulumi
import pulumi_ovh as ovh
namespaces = ovh.CloudProject.get_m3db_namespaces(service_name="XXX",
cluster_id="YYY")
pulumi.export("namespaceIds", namespaces.namespace_ids)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
namespaces, err := CloudProject.GetM3dbNamespaces(ctx, &cloudproject.GetM3dbNamespacesArgs{
ServiceName: "XXX",
ClusterId: "YYY",
}, nil)
if err != nil {
return err
}
ctx.Export("namespaceIds", namespaces.NamespaceIds)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var namespaces = Ovh.CloudProject.GetM3dbNamespaces.Invoke(new()
{
ServiceName = "XXX",
ClusterId = "YYY",
});
return new Dictionary<string, object?>
{
["namespaceIds"] = namespaces.Apply(getM3dbNamespacesResult => getM3dbNamespacesResult.NamespaceIds),
};
});
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.GetM3dbNamespacesArgs;
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 namespaces = CloudProjectFunctions.getM3dbNamespaces(GetM3dbNamespacesArgs.builder()
.serviceName("XXX")
.clusterId("YYY")
.build());
ctx.export("namespaceIds", namespaces.applyValue(getM3dbNamespacesResult -> getM3dbNamespacesResult.namespaceIds()));
}
}
variables:
namespaces:
fn::invoke:
Function: ovh:CloudProject:getM3dbNamespaces
Arguments:
serviceName: XXX
clusterId: YYY
outputs:
namespaceIds: ${namespaces.namespaceIds}
Using getM3dbNamespaces
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 getM3dbNamespaces(args: GetM3dbNamespacesArgs, opts?: InvokeOptions): Promise<GetM3dbNamespacesResult>
function getM3dbNamespacesOutput(args: GetM3dbNamespacesOutputArgs, opts?: InvokeOptions): Output<GetM3dbNamespacesResult>
def get_m3db_namespaces(cluster_id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetM3dbNamespacesResult
def get_m3db_namespaces_output(cluster_id: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetM3dbNamespacesResult]
func GetM3dbNamespaces(ctx *Context, args *GetM3dbNamespacesArgs, opts ...InvokeOption) (*GetM3dbNamespacesResult, error)
func GetM3dbNamespacesOutput(ctx *Context, args *GetM3dbNamespacesOutputArgs, opts ...InvokeOption) GetM3dbNamespacesResultOutput
> Note: This function is named GetM3dbNamespaces
in the Go SDK.
public static class GetM3dbNamespaces
{
public static Task<GetM3dbNamespacesResult> InvokeAsync(GetM3dbNamespacesArgs args, InvokeOptions? opts = null)
public static Output<GetM3dbNamespacesResult> Invoke(GetM3dbNamespacesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetM3dbNamespacesResult> getM3dbNamespaces(GetM3dbNamespacesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:CloudProject/getM3dbNamespaces:getM3dbNamespaces
arguments:
# arguments dictionary
The 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_SERVICE
environment variable is used.
- Cluster
Id string - Cluster ID
- Service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id String - Cluster ID
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id string - Cluster ID
- service
Name string - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster_
id str - Cluster ID
- service_
name str - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- cluster
Id String - Cluster ID
- service
Name String - The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
getM3dbNamespaces 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.
- Namespace
Ids List<string> - The list of namespaces ids of the M3DB cluster associated with the project.
- Service
Name string - See Argument Reference above.
- Cluster
Id string - See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Ids []string - The list of namespaces ids of the M3DB cluster associated with the project.
- Service
Name string - See Argument Reference above.
- cluster
Id String - See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Ids List<String> - The list of namespaces ids of the M3DB cluster associated with the project.
- service
Name String - See Argument Reference above.
- cluster
Id string - See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- namespace
Ids string[] - The list of namespaces ids of the M3DB cluster associated with the project.
- service
Name string - See Argument Reference above.
- cluster_
id str - See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- namespace_
ids Sequence[str] - The list of namespaces ids of the M3DB cluster associated with the project.
- service_
name str - See Argument Reference above.
- cluster
Id String - See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Ids List<String> - The list of namespaces ids of the M3DB cluster associated with the project.
- service
Name String - See Argument Reference above.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.