OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud
ovh.Dbaas.getLogsClustersRetention
Explore with Pulumi AI
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 "@pulumi/ovh";
const retention = ovh.Dbaas.getLogsClustersRetention({
clusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
retentionId: "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
serviceName: "ldp-xx-xxxxx",
});
import pulumi
import pulumi_ovh as ovh
retention = ovh.Dbaas.get_logs_clusters_retention(cluster_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
retention_id="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
service_name="ldp-xx-xxxxx")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/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{
ClusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
RetentionId: pulumi.StringRef("yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"),
ServiceName: "ldp-xx-xxxxx",
}, 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()
{
ClusterId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
RetentionId = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
ServiceName = "ldp-xx-xxxxx",
});
});
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()
.clusterId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.retentionId("yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy")
.serviceName("ldp-xx-xxxxx")
.build());
}
}
variables:
retention:
fn::invoke:
Function: ovh:Dbaas:getLogsClustersRetention
Arguments:
clusterId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
retentionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
serviceName: ldp-xx-xxxxx
It is also possible to retrieve a retention using its duration:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const retention = ovh.Dbaas.getLogsClustersRetention({
clusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration: "P14D",
serviceName: "ldp-xx-xxxxx",
});
import pulumi
import pulumi_ovh as ovh
retention = ovh.Dbaas.get_logs_clusters_retention(cluster_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
duration="P14D",
service_name="ldp-xx-xxxxx")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/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{
ClusterId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration: pulumi.StringRef("P14D"),
ServiceName: "ldp-xx-xxxxx",
}, 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()
{
ClusterId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Duration = "P14D",
ServiceName = "ldp-xx-xxxxx",
});
});
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()
.clusterId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.duration("P14D")
.serviceName("ldp-xx-xxxxx")
.build());
}
}
variables:
retention:
fn::invoke:
Function: ovh:Dbaas:getLogsClustersRetention
Arguments:
clusterId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
duration: P14D
serviceName: ldp-xx-xxxxx
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,
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,
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:Dbaas/getLogsClustersRetention:getLogsClustersRetention
arguments:
# arguments dictionary
The 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
- Retention
Id string - ID of the retention object
- 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
- Retention
Id string - ID of the retention object
- 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
- retention
Id String - ID of the retention object
- 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
- retention
Id string - ID of the retention object
- 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
- retention_
id str - ID of the retention object
- 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
- retention
Id String - ID of the retention object
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
- 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
- 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
- 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
- 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
- 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
- service
Name String
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.