1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. getLogSetsCount
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.LogAnalytics.getLogSetsCount

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides details about a specific Log Sets Count resource in Oracle Cloud Infrastructure Log Analytics service.

    This API returns the count of distinct log sets.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLogSetsCount = oci.LogAnalytics.getLogSetsCount({
        namespace: logSetsCountNamespace,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log_sets_count = oci.LogAnalytics.get_log_sets_count(namespace=log_sets_count_namespace)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/LogAnalytics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := LogAnalytics.GetLogSetsCount(ctx, &loganalytics.GetLogSetsCountArgs{
    			Namespace: logSetsCountNamespace,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testLogSetsCount = Oci.LogAnalytics.GetLogSetsCount.Invoke(new()
        {
            Namespace = logSetsCountNamespace,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.LogAnalytics.LogAnalyticsFunctions;
    import com.pulumi.oci.LogAnalytics.inputs.GetLogSetsCountArgs;
    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 testLogSetsCount = LogAnalyticsFunctions.getLogSetsCount(GetLogSetsCountArgs.builder()
                .namespace(logSetsCountNamespace)
                .build());
    
        }
    }
    
    variables:
      testLogSetsCount:
        fn::invoke:
          Function: oci:LogAnalytics:getLogSetsCount
          Arguments:
            namespace: ${logSetsCountNamespace}
    

    Using getLogSetsCount

    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 getLogSetsCount(args: GetLogSetsCountArgs, opts?: InvokeOptions): Promise<GetLogSetsCountResult>
    function getLogSetsCountOutput(args: GetLogSetsCountOutputArgs, opts?: InvokeOptions): Output<GetLogSetsCountResult>
    def get_log_sets_count(namespace: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetLogSetsCountResult
    def get_log_sets_count_output(namespace: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetLogSetsCountResult]
    func GetLogSetsCount(ctx *Context, args *GetLogSetsCountArgs, opts ...InvokeOption) (*GetLogSetsCountResult, error)
    func GetLogSetsCountOutput(ctx *Context, args *GetLogSetsCountOutputArgs, opts ...InvokeOption) GetLogSetsCountResultOutput

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

    public static class GetLogSetsCount 
    {
        public static Task<GetLogSetsCountResult> InvokeAsync(GetLogSetsCountArgs args, InvokeOptions? opts = null)
        public static Output<GetLogSetsCountResult> Invoke(GetLogSetsCountInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogSetsCountResult> getLogSetsCount(GetLogSetsCountArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LogAnalytics/getLogSetsCount:getLogSetsCount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Namespace string
    The Logging Analytics namespace used for the request.
    Namespace string
    The Logging Analytics namespace used for the request.
    namespace String
    The Logging Analytics namespace used for the request.
    namespace string
    The Logging Analytics namespace used for the request.
    namespace str
    The Logging Analytics namespace used for the request.
    namespace String
    The Logging Analytics namespace used for the request.

    getLogSetsCount Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    LogSetsCount string
    This is the total number of log sets the tenancy has configured.
    Namespace string
    Id string
    The provider-assigned unique ID for this managed resource.
    LogSetsCount string
    This is the total number of log sets the tenancy has configured.
    Namespace string
    id String
    The provider-assigned unique ID for this managed resource.
    logSetsCount String
    This is the total number of log sets the tenancy has configured.
    namespace String
    id string
    The provider-assigned unique ID for this managed resource.
    logSetsCount string
    This is the total number of log sets the tenancy has configured.
    namespace string
    id str
    The provider-assigned unique ID for this managed resource.
    log_sets_count str
    This is the total number of log sets the tenancy has configured.
    namespace str
    id String
    The provider-assigned unique ID for this managed resource.
    logSetsCount String
    This is the total number of log sets the tenancy has configured.
    namespace String

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi