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

ovh.CloudProjectDatabase.getDatabaseLogSubscription

Explore with Pulumi AI

ovh logo
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

    Use this data source to get information about a log subscription for a cluster associated with a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const subscription = ovh.CloudProjectDatabase.getDatabaseLogSubscription({
        serviceName: "VVV",
        engine: "XXX",
        clusterId: "YYY",
        id: "ZZZ",
    });
    export const subscriptionLdpName = subscription.then(subscription => subscription.ldpServiceName);
    
    import pulumi
    import pulumi_ovh as ovh
    
    subscription = ovh.CloudProjectDatabase.get_database_log_subscription(service_name="VVV",
        engine="XXX",
        cluster_id="YYY",
        id="ZZZ")
    pulumi.export("subscriptionLdpName", subscription.ldp_service_name)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		subscription, err := CloudProjectDatabase.GetDatabaseLogSubscription(ctx, &cloudprojectdatabase.GetDatabaseLogSubscriptionArgs{
    			ServiceName: "VVV",
    			Engine:      "XXX",
    			ClusterId:   "YYY",
    			Id:          "ZZZ",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("subscriptionLdpName", subscription.LdpServiceName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var subscription = Ovh.CloudProjectDatabase.GetDatabaseLogSubscription.Invoke(new()
        {
            ServiceName = "VVV",
            Engine = "XXX",
            ClusterId = "YYY",
            Id = "ZZZ",
        });
    
        return new Dictionary<string, object?>
        {
            ["subscriptionLdpName"] = subscription.Apply(getDatabaseLogSubscriptionResult => getDatabaseLogSubscriptionResult.LdpServiceName),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
    import com.pulumi.ovh.CloudProjectDatabase.inputs.GetDatabaseLogSubscriptionArgs;
    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 subscription = CloudProjectDatabaseFunctions.getDatabaseLogSubscription(GetDatabaseLogSubscriptionArgs.builder()
                .serviceName("VVV")
                .engine("XXX")
                .clusterId("YYY")
                .id("ZZZ")
                .build());
    
            ctx.export("subscriptionLdpName", subscription.applyValue(getDatabaseLogSubscriptionResult -> getDatabaseLogSubscriptionResult.ldpServiceName()));
        }
    }
    
    variables:
      subscription:
        fn::invoke:
          Function: ovh:CloudProjectDatabase:getDatabaseLogSubscription
          Arguments:
            serviceName: VVV
            engine: XXX
            clusterId: YYY
            id: ZZZ
    outputs:
      subscriptionLdpName: ${subscription.ldpServiceName}
    

    Using getDatabaseLogSubscription

    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 getDatabaseLogSubscription(args: GetDatabaseLogSubscriptionArgs, opts?: InvokeOptions): Promise<GetDatabaseLogSubscriptionResult>
    function getDatabaseLogSubscriptionOutput(args: GetDatabaseLogSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetDatabaseLogSubscriptionResult>
    def get_database_log_subscription(cluster_id: Optional[str] = None,
                                      engine: Optional[str] = None,
                                      id: Optional[str] = None,
                                      service_name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetDatabaseLogSubscriptionResult
    def get_database_log_subscription_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                      engine: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      service_name: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseLogSubscriptionResult]
    func GetDatabaseLogSubscription(ctx *Context, args *GetDatabaseLogSubscriptionArgs, opts ...InvokeOption) (*GetDatabaseLogSubscriptionResult, error)
    func GetDatabaseLogSubscriptionOutput(ctx *Context, args *GetDatabaseLogSubscriptionOutputArgs, opts ...InvokeOption) GetDatabaseLogSubscriptionResultOutput

    > Note: This function is named GetDatabaseLogSubscription in the Go SDK.

    public static class GetDatabaseLogSubscription 
    {
        public static Task<GetDatabaseLogSubscriptionResult> InvokeAsync(GetDatabaseLogSubscriptionArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseLogSubscriptionResult> Invoke(GetDatabaseLogSubscriptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseLogSubscriptionResult> getDatabaseLogSubscription(GetDatabaseLogSubscriptionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:CloudProjectDatabase/getDatabaseLogSubscription:getDatabaseLogSubscription
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Cluster ID.
    Engine string
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    Id string
    Id of the log subscription.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ClusterId string
    Cluster ID.
    Engine string
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    Id string
    Id of the log subscription.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID.
    engine String
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    id String
    Id of the log subscription.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId string
    Cluster ID.
    engine string
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    id string
    Id of the log subscription.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    cluster_id str
    Cluster ID.
    engine str
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    id str
    Id of the log subscription.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID.
    engine String
    The database engine for which you want to retrieve a subscription. To get a full list of available engine visit. public documentation.
    id String
    Id of the log subscription.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getDatabaseLogSubscription Result

    The following output properties are available:

    ClusterId string
    See Argument Reference above.
    CreatedAt string
    Creation date of the subscription.
    Engine string
    See Argument Reference above.
    Id string
    ID of the log subscription.
    Kind string
    Log kind name of this subscription.
    LdpServiceName string
    Name of the destination log service.
    ResourceName string
    Name of subscribed resource, where the logs come from.
    ResourceType string
    Type of subscribed resource, where the logs come from.
    ServiceName string
    See Argument Reference above.
    StreamId string
    See Argument Reference above.
    UpdatedAt string
    Last update date of the subscription.
    ClusterId string
    See Argument Reference above.
    CreatedAt string
    Creation date of the subscription.
    Engine string
    See Argument Reference above.
    Id string
    ID of the log subscription.
    Kind string
    Log kind name of this subscription.
    LdpServiceName string
    Name of the destination log service.
    ResourceName string
    Name of subscribed resource, where the logs come from.
    ResourceType string
    Type of subscribed resource, where the logs come from.
    ServiceName string
    See Argument Reference above.
    StreamId string
    See Argument Reference above.
    UpdatedAt string
    Last update date of the subscription.
    clusterId String
    See Argument Reference above.
    createdAt String
    Creation date of the subscription.
    engine String
    See Argument Reference above.
    id String
    ID of the log subscription.
    kind String
    Log kind name of this subscription.
    ldpServiceName String
    Name of the destination log service.
    resourceName String
    Name of subscribed resource, where the logs come from.
    resourceType String
    Type of subscribed resource, where the logs come from.
    serviceName String
    See Argument Reference above.
    streamId String
    See Argument Reference above.
    updatedAt String
    Last update date of the subscription.
    clusterId string
    See Argument Reference above.
    createdAt string
    Creation date of the subscription.
    engine string
    See Argument Reference above.
    id string
    ID of the log subscription.
    kind string
    Log kind name of this subscription.
    ldpServiceName string
    Name of the destination log service.
    resourceName string
    Name of subscribed resource, where the logs come from.
    resourceType string
    Type of subscribed resource, where the logs come from.
    serviceName string
    See Argument Reference above.
    streamId string
    See Argument Reference above.
    updatedAt string
    Last update date of the subscription.
    cluster_id str
    See Argument Reference above.
    created_at str
    Creation date of the subscription.
    engine str
    See Argument Reference above.
    id str
    ID of the log subscription.
    kind str
    Log kind name of this subscription.
    ldp_service_name str
    Name of the destination log service.
    resource_name str
    Name of subscribed resource, where the logs come from.
    resource_type str
    Type of subscribed resource, where the logs come from.
    service_name str
    See Argument Reference above.
    stream_id str
    See Argument Reference above.
    updated_at str
    Last update date of the subscription.
    clusterId String
    See Argument Reference above.
    createdAt String
    Creation date of the subscription.
    engine String
    See Argument Reference above.
    id String
    ID of the log subscription.
    kind String
    Log kind name of this subscription.
    ldpServiceName String
    Name of the destination log service.
    resourceName String
    Name of subscribed resource, where the logs come from.
    resourceType String
    Type of subscribed resource, where the logs come from.
    serviceName String
    See Argument Reference above.
    streamId String
    See Argument Reference above.
    updatedAt String
    Last update date of the subscription.

    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