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 retrieve information about a DBaas logs cluster retention.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const retention = ovh.Dbaas.getLogsClustersRetention({
serviceName: "ldp-xx-xxxxx",
clusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
retentionId: "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
});
import pulumi
import pulumi_ovh as ovh
retention = ovh.Dbaas.get_logs_clusters_retention(service_name="ldp-xx-xxxxx",
cluster_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
retention_id="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/dbaas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbaas.GetLogsClustersRetention(ctx, &dbaas.GetLogsClustersRetentionArgs{
ServiceName: "ldp-xx-xxxxx",
ClusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
RetentionId: pulumi.StringRef("yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var retention = Ovh.Dbaas.GetLogsClustersRetention.Invoke(new()
{
ServiceName = "ldp-xx-xxxxx",
ClusterId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
RetentionId = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Dbaas.DbaasFunctions;
import com.pulumi.ovh.Dbaas.inputs.GetLogsClustersRetentionArgs;
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 retention = DbaasFunctions.getLogsClustersRetention(GetLogsClustersRetentionArgs.builder()
.serviceName("ldp-xx-xxxxx")
.clusterId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.retentionId("yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy")
.build());
}
}
variables:
retention:
fn::invoke:
function: ovh:Dbaas:getLogsClustersRetention
arguments:
serviceName: ldp-xx-xxxxx
clusterId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
retentionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
It is also possible to retrieve a retention using its duration:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const retention = ovh.Dbaas.getLogsClustersRetention({
serviceName: "ldp-xx-xxxxx",
clusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration: "P14D",
});
import pulumi
import pulumi_ovh as ovh
retention = ovh.Dbaas.get_logs_clusters_retention(service_name="ldp-xx-xxxxx",
cluster_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration="P14D")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/dbaas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbaas.GetLogsClustersRetention(ctx, &dbaas.GetLogsClustersRetentionArgs{
ServiceName: "ldp-xx-xxxxx",
ClusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration: pulumi.StringRef("P14D"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var retention = Ovh.Dbaas.GetLogsClustersRetention.Invoke(new()
{
ServiceName = "ldp-xx-xxxxx",
ClusterId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration = "P14D",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Dbaas.DbaasFunctions;
import com.pulumi.ovh.Dbaas.inputs.GetLogsClustersRetentionArgs;
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 retention = DbaasFunctions.getLogsClustersRetention(GetLogsClustersRetentionArgs.builder()
.serviceName("ldp-xx-xxxxx")
.clusterId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.duration("P14D")
.build());
}
}
variables:
retention:
fn::invoke:
function: ovh:Dbaas:getLogsClustersRetention
arguments:
serviceName: ldp-xx-xxxxx
clusterId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
duration: P14D
Additionnaly, you can filter retentions on their type:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const retention = ovh.Dbaas.getLogsClustersRetention({
serviceName: "ldp-xx-xxxxx",
clusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration: "P14D",
retentionType: "LOGS_INDEXING",
});
import pulumi
import pulumi_ovh as ovh
retention = ovh.Dbaas.get_logs_clusters_retention(service_name="ldp-xx-xxxxx",
cluster_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration="P14D",
retention_type="LOGS_INDEXING")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/dbaas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbaas.GetLogsClustersRetention(ctx, &dbaas.GetLogsClustersRetentionArgs{
ServiceName: "ldp-xx-xxxxx",
ClusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration: pulumi.StringRef("P14D"),
RetentionType: pulumi.StringRef("LOGS_INDEXING"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var retention = Ovh.Dbaas.GetLogsClustersRetention.Invoke(new()
{
ServiceName = "ldp-xx-xxxxx",
ClusterId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration = "P14D",
RetentionType = "LOGS_INDEXING",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Dbaas.DbaasFunctions;
import com.pulumi.ovh.Dbaas.inputs.GetLogsClustersRetentionArgs;
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 retention = DbaasFunctions.getLogsClustersRetention(GetLogsClustersRetentionArgs.builder()
.serviceName("ldp-xx-xxxxx")
.clusterId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.duration("P14D")
.retentionType("LOGS_INDEXING")
.build());
}
}
variables:
retention:
fn::invoke:
function: ovh:Dbaas:getLogsClustersRetention
arguments:
serviceName: ldp-xx-xxxxx
clusterId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
duration: P14D
retentionType: LOGS_INDEXING
Using getLogsClustersRetention
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 getLogsClustersRetention(args: GetLogsClustersRetentionArgs, opts?: InvokeOptions): Promise<GetLogsClustersRetentionResult>
function getLogsClustersRetentionOutput(args: GetLogsClustersRetentionOutputArgs, opts?: InvokeOptions): Output<GetLogsClustersRetentionResult>def get_logs_clusters_retention(cluster_id: Optional[str] = None,
duration: Optional[str] = None,
retention_id: Optional[str] = None,
retention_type: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLogsClustersRetentionResult
def get_logs_clusters_retention_output(cluster_id: Optional[pulumi.Input[str]] = None,
duration: Optional[pulumi.Input[str]] = None,
retention_id: Optional[pulumi.Input[str]] = None,
retention_type: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLogsClustersRetentionResult]func GetLogsClustersRetention(ctx *Context, args *GetLogsClustersRetentionArgs, opts ...InvokeOption) (*GetLogsClustersRetentionResult, error)
func GetLogsClustersRetentionOutput(ctx *Context, args *GetLogsClustersRetentionOutputArgs, opts ...InvokeOption) GetLogsClustersRetentionResultOutput> Note: This function is named GetLogsClustersRetention in the Go SDK.
public static class GetLogsClustersRetention
{
public static Task<GetLogsClustersRetentionResult> InvokeAsync(GetLogsClustersRetentionArgs args, InvokeOptions? opts = null)
public static Output<GetLogsClustersRetentionResult> Invoke(GetLogsClustersRetentionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLogsClustersRetentionResult> getLogsClustersRetention(GetLogsClustersRetentionArgs args, InvokeOptions options)
public static Output<GetLogsClustersRetentionResult> getLogsClustersRetention(GetLogsClustersRetentionArgs args, InvokeOptions options)
fn::invoke:
function: ovh:Dbaas/getLogsClustersRetention:getLogsClustersRetention
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Id string - Cluster ID
- Service
Name string - The service name. It's the ID of your Logs Data Platform instance.
- Duration string
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - Retention
Id string - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - Retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
- Cluster
Id string - Cluster ID
- Service
Name string - The service name. It's the ID of your Logs Data Platform instance.
- Duration string
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - Retention
Id string - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - Retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
- cluster
Id String - Cluster ID
- service
Name String - The service name. It's the ID of your Logs Data Platform instance.
- duration String
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - retention
Id String - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - retention
Type String - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
- cluster
Id string - Cluster ID
- service
Name string - The service name. It's the ID of your Logs Data Platform instance.
- duration string
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - retention
Id string - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
- cluster_
id str - Cluster ID
- service_
name str - The service name. It's the ID of your Logs Data Platform instance.
- duration str
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - retention_
id str - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - retention_
type str - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
- cluster
Id String - Cluster ID
- service
Name String - The service name. It's the ID of your Logs Data Platform instance.
- duration String
- Indexed duration expressed in ISO-8601 format. Cannot be used if
retention_idis defined. - retention
Id String - ID of the retention object. Cannot be used if
durationorretention_typeis defined. - retention
Type String - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT). Cannot be used if
retention_idis defined. Defaults toLOGS_INDEXINGif not defined.
getLogsClustersRetention Result
The following output properties are available:
- Cluster
Id string - Duration string
- Indexed duration expressed in ISO-8601 format
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Supported bool - Indicates if a new stream can use it
- Retention
Id string - ID of the retention that can be used when creating a stream
- Retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- Service
Name string
- Cluster
Id string - Duration string
- Indexed duration expressed in ISO-8601 format
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Supported bool - Indicates if a new stream can use it
- Retention
Id string - ID of the retention that can be used when creating a stream
- Retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- Service
Name string
- cluster
Id String - duration String
- Indexed duration expressed in ISO-8601 format
- id String
- The provider-assigned unique ID for this managed resource.
- is
Supported Boolean - Indicates if a new stream can use it
- retention
Id String - ID of the retention that can be used when creating a stream
- retention
Type String - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- service
Name String
- cluster
Id string - duration string
- Indexed duration expressed in ISO-8601 format
- id string
- The provider-assigned unique ID for this managed resource.
- is
Supported boolean - Indicates if a new stream can use it
- retention
Id string - ID of the retention that can be used when creating a stream
- retention
Type string - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- service
Name string
- cluster_
id str - duration str
- Indexed duration expressed in ISO-8601 format
- id str
- The provider-assigned unique ID for this managed resource.
- is_
supported bool - Indicates if a new stream can use it
- retention_
id str - ID of the retention that can be used when creating a stream
- retention_
type str - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- service_
name str
- cluster
Id String - duration String
- Indexed duration expressed in ISO-8601 format
- id String
- The provider-assigned unique ID for this managed resource.
- is
Supported Boolean - Indicates if a new stream can use it
- retention
Id String - ID of the retention that can be used when creating a stream
- retention
Type String - Type of the retention (LOGS_INDEXING | LOGS_COLD_STORAGE | METRICS_TENANT)
- service
Name String
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
