1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. getLogSetsCount
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.LogAnalytics.getLogSetsCount

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 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,
});
Copy
import pulumi
import pulumi_oci as oci

test_log_sets_count = oci.LogAnalytics.get_log_sets_count(namespace=log_sets_count_namespace)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testLogSetsCount:
    fn::invoke:
      function: oci:LogAnalytics:getLogSetsCount
      arguments:
        namespace: ${logSetsCountNamespace}
Copy

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>
Copy
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]
Copy
func GetLogSetsCount(ctx *Context, args *GetLogSetsCountArgs, opts ...InvokeOption) (*GetLogSetsCountResult, error)
func GetLogSetsCountOutput(ctx *Context, args *GetLogSetsCountOutputArgs, opts ...InvokeOption) GetLogSetsCountResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetLogSetsCountResult> getLogSetsCount(GetLogSetsCountArgs args, InvokeOptions options)
public static Output<GetLogSetsCountResult> getLogSetsCount(GetLogSetsCountArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:LogAnalytics/getLogSetsCount:getLogSetsCount
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Namespace This property is required. string
The Logging Analytics namespace used for the request.
Namespace This property is required. string
The Logging Analytics namespace used for the request.
namespace This property is required. String
The Logging Analytics namespace used for the request.
namespace This property is required. string
The Logging Analytics namespace used for the request.
namespace This property is required. str
The Logging Analytics namespace used for the request.
namespace This property is required. 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.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi