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

oci.LogAnalytics.getLogAnalyticsPreference

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 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/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
    	})
    }
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LogAnalytics/getLogAnalyticsPreference:getLogAnalyticsPreference
      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.

    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 string
    The preference name.
    Value string
    The preference value.
    Name string
    The preference name.
    Value string
    The preference value.
    name String
    The preference name.
    value String
    The preference value.
    name string
    The preference name.
    value string
    The preference value.
    name str
    The preference name.
    value str
    The preference value.
    name String
    The preference name.
    value 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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi