1. Packages
  2. OVH
  3. API Docs
  4. Dbaas
  5. getLogsClustersRetention
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

ovh.Dbaas.getLogsClustersRetention

Explore with Pulumi AI

ovh logo
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 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 "@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:

    ClusterId string
    Cluster ID
    ServiceName string
    The service name. It's the ID of your Logs Data Platform instance.
    Duration string
    Indexed duration expressed in ISO-8601 format
    RetentionId string
    ID of the retention object
    ClusterId string
    Cluster ID
    ServiceName string
    The service name. It's the ID of your Logs Data Platform instance.
    Duration string
    Indexed duration expressed in ISO-8601 format
    RetentionId string
    ID of the retention object
    clusterId String
    Cluster ID
    serviceName String
    The service name. It's the ID of your Logs Data Platform instance.
    duration String
    Indexed duration expressed in ISO-8601 format
    retentionId String
    ID of the retention object
    clusterId string
    Cluster ID
    serviceName string
    The service name. It's the ID of your Logs Data Platform instance.
    duration string
    Indexed duration expressed in ISO-8601 format
    retentionId 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
    clusterId String
    Cluster ID
    serviceName String
    The service name. It's the ID of your Logs Data Platform instance.
    duration String
    Indexed duration expressed in ISO-8601 format
    retentionId String
    ID of the retention object

    getLogsClustersRetention Result

    The following output properties are available:

    ClusterId string
    Duration string
    Indexed duration expressed in ISO-8601 format
    Id string
    The provider-assigned unique ID for this managed resource.
    IsSupported bool
    Indicates if a new stream can use it
    RetentionId string
    ID of the retention that can be used when creating a stream
    ServiceName string
    ClusterId string
    Duration string
    Indexed duration expressed in ISO-8601 format
    Id string
    The provider-assigned unique ID for this managed resource.
    IsSupported bool
    Indicates if a new stream can use it
    RetentionId string
    ID of the retention that can be used when creating a stream
    ServiceName string
    clusterId String
    duration String
    Indexed duration expressed in ISO-8601 format
    id String
    The provider-assigned unique ID for this managed resource.
    isSupported Boolean
    Indicates if a new stream can use it
    retentionId String
    ID of the retention that can be used when creating a stream
    serviceName String
    clusterId string
    duration string
    Indexed duration expressed in ISO-8601 format
    id string
    The provider-assigned unique ID for this managed resource.
    isSupported boolean
    Indicates if a new stream can use it
    retentionId string
    ID of the retention that can be used when creating a stream
    serviceName 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
    clusterId String
    duration String
    Indexed duration expressed in ISO-8601 format
    id String
    The provider-assigned unique ID for this managed resource.
    isSupported Boolean
    Indicates if a new stream can use it
    retentionId String
    ID of the retention that can be used when creating a stream
    serviceName String

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud