1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudProjectKubeLogSubscription
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Use this data source to get a log subscription for a Managed Kubernetes cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    export = async () => {
        const sub = await ovh.getCloudProjectKubeLogSubscription({
            serviceName: "XXXXXX",
            kubeId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            subscriptionId: "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
        });
        return {
            "resource-name": sub.resources?.[0]?.name,
        };
    }
    
    import pulumi
    import pulumi_ovh as ovh
    
    sub = ovh.get_cloud_project_kube_log_subscription(service_name="XXXXXX",
        kube_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        subscription_id="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy")
    pulumi.export("resource-name", sub.resources[0].name)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		sub, err := ovh.LookupCloudProjectKubeLogSubscription(ctx, &ovh.LookupCloudProjectKubeLogSubscriptionArgs{
    			ServiceName:    "XXXXXX",
    			KubeId:         "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    			SubscriptionId: "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("resource-name", sub.Resources[0].Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var sub = Ovh.GetCloudProjectKubeLogSubscription.Invoke(new()
        {
            ServiceName = "XXXXXX",
            KubeId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            SubscriptionId = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
        });
    
        return new Dictionary<string, object?>
        {
            ["resource-name"] = sub.Apply(getCloudProjectKubeLogSubscriptionResult => getCloudProjectKubeLogSubscriptionResult.Resources[0]?.Name),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudProjectKubeLogSubscriptionArgs;
    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 sub = OvhFunctions.getCloudProjectKubeLogSubscription(GetCloudProjectKubeLogSubscriptionArgs.builder()
                .serviceName("XXXXXX")
                .kubeId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                .subscriptionId("yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy")
                .build());
    
            ctx.export("resource-name", sub.resources()[0].name());
        }
    }
    
    variables:
      sub:
        fn::invoke:
          function: ovh:getCloudProjectKubeLogSubscription
          arguments:
            serviceName: XXXXXX
            kubeId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
            subscriptionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
    outputs:
      resource-name: ${sub.resources[0].name}
    
    Example coming soon!
    

    Using getCloudProjectKubeLogSubscription

    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 getCloudProjectKubeLogSubscription(args: GetCloudProjectKubeLogSubscriptionArgs, opts?: InvokeOptions): Promise<GetCloudProjectKubeLogSubscriptionResult>
    function getCloudProjectKubeLogSubscriptionOutput(args: GetCloudProjectKubeLogSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectKubeLogSubscriptionResult>
    def get_cloud_project_kube_log_subscription(kube_id: Optional[str] = None,
                                                service_name: Optional[str] = None,
                                                subscription_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetCloudProjectKubeLogSubscriptionResult
    def get_cloud_project_kube_log_subscription_output(kube_id: pulumi.Input[Optional[str]] = None,
                                                service_name: pulumi.Input[Optional[str]] = None,
                                                subscription_id: pulumi.Input[Optional[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectKubeLogSubscriptionResult]
    func LookupCloudProjectKubeLogSubscription(ctx *Context, args *LookupCloudProjectKubeLogSubscriptionArgs, opts ...InvokeOption) (*LookupCloudProjectKubeLogSubscriptionResult, error)
    func LookupCloudProjectKubeLogSubscriptionOutput(ctx *Context, args *LookupCloudProjectKubeLogSubscriptionOutputArgs, opts ...InvokeOption) LookupCloudProjectKubeLogSubscriptionResultOutput

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

    public static class GetCloudProjectKubeLogSubscription 
    {
        public static Task<GetCloudProjectKubeLogSubscriptionResult> InvokeAsync(GetCloudProjectKubeLogSubscriptionArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudProjectKubeLogSubscriptionResult> Invoke(GetCloudProjectKubeLogSubscriptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudProjectKubeLogSubscriptionResult> getCloudProjectKubeLogSubscription(GetCloudProjectKubeLogSubscriptionArgs args, InvokeOptions options)
    public static Output<GetCloudProjectKubeLogSubscriptionResult> getCloudProjectKubeLogSubscription(GetCloudProjectKubeLogSubscriptionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudProjectKubeLogSubscription:getCloudProjectKubeLogSubscription
      arguments:
        # arguments dictionary
    data "ovh_getcloudprojectkubelogsubscription" "name" {
        # arguments
    }

    The following arguments are supported:

    KubeId string
    The id of the managed kubernetes cluster.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    SubscriptionId string
    The id of the log subscription.
    KubeId string
    The id of the managed kubernetes cluster.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    SubscriptionId string
    The id of the log subscription.
    kube_id string
    The id of the managed kubernetes cluster.
    service_name string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    subscription_id string
    The id of the log subscription.
    kubeId String
    The id of the managed kubernetes cluster.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    subscriptionId String
    The id of the log subscription.
    kubeId string
    The id of the managed kubernetes cluster.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    subscriptionId string
    The id of the log subscription.
    kube_id str
    The id of the managed kubernetes cluster.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    subscription_id str
    The id of the log subscription.
    kubeId String
    The id of the managed kubernetes cluster.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    subscriptionId String
    The id of the log subscription.

    getCloudProjectKubeLogSubscription Result

    The following output properties are available:

    CreatedAt string
    Creation date of the subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    See Argument Reference above.
    Resources List<GetCloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    ServiceName string
    See Argument Reference above.
    StreamId string
    Id of the target Log data platform stream.
    SubscriptionId string
    See Argument Reference above.
    UpdatedAt string
    Last update date of the subscription.
    CreatedAt string
    Creation date of the subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    See Argument Reference above.
    Resources []GetCloudProjectKubeLogSubscriptionResource
    Information about the subscribed resource.
    ServiceName string
    See Argument Reference above.
    StreamId string
    Id of the target Log data platform stream.
    SubscriptionId string
    See Argument Reference above.
    UpdatedAt string
    Last update date of the subscription.
    created_at string
    Creation date of the subscription.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kube_id string
    See Argument Reference above.
    resources list(object)
    Information about the subscribed resource.
    service_name string
    See Argument Reference above.
    stream_id string
    Id of the target Log data platform stream.
    subscription_id string
    See Argument Reference above.
    updated_at string
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    See Argument Reference above.
    resources List<GetCloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    serviceName String
    See Argument Reference above.
    streamId String
    Id of the target Log data platform stream.
    subscriptionId String
    See Argument Reference above.
    updatedAt String
    Last update date of the subscription.
    createdAt string
    Creation date of the subscription.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kubeId string
    See Argument Reference above.
    resources GetCloudProjectKubeLogSubscriptionResource[]
    Information about the subscribed resource.
    serviceName string
    See Argument Reference above.
    streamId string
    Id of the target Log data platform stream.
    subscriptionId string
    See Argument Reference above.
    updatedAt string
    Last update date of the subscription.
    created_at str
    Creation date of the subscription.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    Log kind name of this subscription. Only audit is currently supported.
    kube_id str
    See Argument Reference above.
    resources Sequence[GetCloudProjectKubeLogSubscriptionResource]
    Information about the subscribed resource.
    service_name str
    See Argument Reference above.
    stream_id str
    Id of the target Log data platform stream.
    subscription_id str
    See Argument Reference above.
    updated_at str
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    See Argument Reference above.
    resources List<Property Map>
    Information about the subscribed resource.
    serviceName String
    See Argument Reference above.
    streamId String
    Id of the target Log data platform stream.
    subscriptionId String
    See Argument Reference above.
    updatedAt String
    Last update date of the subscription.

    Supporting Types

    GetCloudProjectKubeLogSubscriptionResource

    Name string
    Name of the subscribed resource, where the logs come from.
    Type string
    Type of the subscribed resource, where the logs come from.
    Name string
    Name of the subscribed resource, where the logs come from.
    Type string
    Type of the subscribed resource, where the logs come from.
    name string
    Name of the subscribed resource, where the logs come from.
    type string
    Type of the subscribed resource, where the logs come from.
    name String
    Name of the subscribed resource, where the logs come from.
    type String
    Type of the subscribed resource, where the logs come from.
    name string
    Name of the subscribed resource, where the logs come from.
    type string
    Type of the subscribed resource, where the logs come from.
    name str
    Name of the subscribed resource, where the logs come from.
    type str
    Type of the subscribed resource, where the logs come from.
    name String
    Name of the subscribed resource, where the logs come from.
    type String
    Type of the subscribed resource, where the logs come from.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial