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

oci.LogAnalytics.getLogAnalyticsPreference

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 Analytics Preference resource in Oracle Cloud Infrastructure Log Analytics service.

Lists the tenant preferences such as DEFAULT_HOMEPAGE and collection properties.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testLogAnalyticsPreference = oci.LogAnalytics.getLogAnalyticsPreference({
    namespace: logAnalyticsPreferenceNamespace,
});
Copy
import pulumi
import pulumi_oci as oci

test_log_analytics_preference = oci.LogAnalytics.get_log_analytics_preference(namespace=log_analytics_preference_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.GetLogAnalyticsPreference(ctx, &loganalytics.GetLogAnalyticsPreferenceArgs{
			Namespace: logAnalyticsPreferenceNamespace,
		}, 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 testLogAnalyticsPreference = Oci.LogAnalytics.GetLogAnalyticsPreference.Invoke(new()
    {
        Namespace = logAnalyticsPreferenceNamespace,
    });

});
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.GetLogAnalyticsPreferenceArgs;
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 testLogAnalyticsPreference = LogAnalyticsFunctions.getLogAnalyticsPreference(GetLogAnalyticsPreferenceArgs.builder()
            .namespace(logAnalyticsPreferenceNamespace)
            .build());

    }
}
Copy
variables:
  testLogAnalyticsPreference:
    fn::invoke:
      function: oci:LogAnalytics:getLogAnalyticsPreference
      arguments:
        namespace: ${logAnalyticsPreferenceNamespace}
Copy

Using getLogAnalyticsPreference

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 getLogAnalyticsPreference(args: GetLogAnalyticsPreferenceArgs, opts?: InvokeOptions): Promise<GetLogAnalyticsPreferenceResult>
function getLogAnalyticsPreferenceOutput(args: GetLogAnalyticsPreferenceOutputArgs, opts?: InvokeOptions): Output<GetLogAnalyticsPreferenceResult>
Copy
def get_log_analytics_preference(namespace: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetLogAnalyticsPreferenceResult
def get_log_analytics_preference_output(namespace: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetLogAnalyticsPreferenceResult]
Copy
func GetLogAnalyticsPreference(ctx *Context, args *GetLogAnalyticsPreferenceArgs, opts ...InvokeOption) (*GetLogAnalyticsPreferenceResult, error)
func GetLogAnalyticsPreferenceOutput(ctx *Context, args *GetLogAnalyticsPreferenceOutputArgs, opts ...InvokeOption) GetLogAnalyticsPreferenceResultOutput
Copy

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

public static class GetLogAnalyticsPreference 
{
    public static Task<GetLogAnalyticsPreferenceResult> InvokeAsync(GetLogAnalyticsPreferenceArgs args, InvokeOptions? opts = null)
    public static Output<GetLogAnalyticsPreferenceResult> Invoke(GetLogAnalyticsPreferenceInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLogAnalyticsPreferenceResult> getLogAnalyticsPreference(GetLogAnalyticsPreferenceArgs args, InvokeOptions options)
public static Output<GetLogAnalyticsPreferenceResult> getLogAnalyticsPreference(GetLogAnalyticsPreferenceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:LogAnalytics/getLogAnalyticsPreference:getLogAnalyticsPreference
  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.

getLogAnalyticsPreference Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Items List<GetLogAnalyticsPreferenceItem>
An array of tenant preferences.
Namespace string
Id string
The provider-assigned unique ID for this managed resource.
Items []GetLogAnalyticsPreferenceItem
An array of tenant preferences.
Namespace string
id String
The provider-assigned unique ID for this managed resource.
items List<GetPreferenceItem>
An array of tenant preferences.
namespace String
id string
The provider-assigned unique ID for this managed resource.
items GetLogAnalyticsPreferenceItem[]
An array of tenant preferences.
namespace string
id str
The provider-assigned unique ID for this managed resource.
items Sequence[loganalytics.GetLogAnalyticsPreferenceItem]
An array of tenant preferences.
namespace str
id String
The provider-assigned unique ID for this managed resource.
items List<Property Map>
An array of tenant preferences.
namespace String

Supporting Types

GetLogAnalyticsPreferenceItem

Name This property is required. string
The preference name.
Value This property is required. string
The preference value.
Name This property is required. string
The preference name.
Value This property is required. string
The preference value.
name This property is required. String
The preference name.
value This property is required. String
The preference value.
name This property is required. string
The preference name.
value This property is required. string
The preference value.
name This property is required. str
The preference name.
value This property is required. str
The preference value.
name This property is required. String
The preference name.
value This property is required. String
The preference value.

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