Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
published on Friday, Mar 6, 2026 by Pulumi
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
published on Friday, Mar 6, 2026 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,
});
import pulumi
import pulumi_oci as oci
test_log_analytics_preference = oci.LogAnalytics.get_log_analytics_preference(namespace=log_analytics_preference_namespace)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v4/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
})
}
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,
});
});
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());
}
}
variables:
testLogAnalyticsPreference:
fn::invoke:
function: oci:LogAnalytics:getLogAnalyticsPreference
arguments:
namespace: ${logAnalyticsPreferenceNamespace}
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>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]func GetLogAnalyticsPreference(ctx *Context, args *GetLogAnalyticsPreferenceArgs, opts ...InvokeOption) (*GetLogAnalyticsPreferenceResult, error)
func GetLogAnalyticsPreferenceOutput(ctx *Context, args *GetLogAnalyticsPreferenceOutputArgs, opts ...InvokeOption) GetLogAnalyticsPreferenceResultOutput> 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)
}public static CompletableFuture<GetLogAnalyticsPreferenceResult> getLogAnalyticsPreference(GetLogAnalyticsPreferenceArgs args, InvokeOptions options)
public static Output<GetLogAnalyticsPreferenceResult> getLogAnalyticsPreference(GetLogAnalyticsPreferenceArgs args, InvokeOptions options)
fn::invoke:
function: oci:LogAnalytics/getLogAnalyticsPreference:getLogAnalyticsPreference
arguments:
# arguments dictionaryThe following arguments are supported:
- Namespace string
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
- Namespace string
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
- namespace String
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
- namespace string
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
- namespace str
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
- namespace String
- The Log Analytics namespace used for the request. The namespace can be obtained by running 'oci os ns get'
getLogAnalyticsPreference Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Log Analytics Preference Item> - An array of tenant preferences.
- Namespace string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Log Analytics Preference Item - An array of tenant preferences.
- Namespace string
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Preference Item> - An array of tenant preferences.
- namespace String
- id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Log Analytics Preference Item[] - An array of tenant preferences.
- namespace string
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[Get
Log Analytics Preference Item] - 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
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
published on Friday, Mar 6, 2026 by Pulumi
