1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. getLogAnalyticsLogGroups
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.LogAnalytics.getLogAnalyticsLogGroups

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides the list of Log Analytics Log Groups in Oracle Cloud Infrastructure Log Analytics service.

    Returns a list of log groups in a compartment. You may limit the number of log groups, provide sorting options, and filter the results by specifying a display name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLogAnalyticsLogGroups = oci.LogAnalytics.getLogAnalyticsLogGroups({
        compartmentId: compartmentId,
        namespace: logAnalyticsLogGroupNamespace,
        displayName: logAnalyticsLogGroupDisplayName,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log_analytics_log_groups = oci.LogAnalytics.get_log_analytics_log_groups(compartment_id=compartment_id,
        namespace=log_analytics_log_group_namespace,
        display_name=log_analytics_log_group_display_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/LogAnalytics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := LogAnalytics.GetLogAnalyticsLogGroups(ctx, &loganalytics.GetLogAnalyticsLogGroupsArgs{
    			CompartmentId: compartmentId,
    			Namespace:     logAnalyticsLogGroupNamespace,
    			DisplayName:   pulumi.StringRef(logAnalyticsLogGroupDisplayName),
    		}, 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 testLogAnalyticsLogGroups = Oci.LogAnalytics.GetLogAnalyticsLogGroups.Invoke(new()
        {
            CompartmentId = compartmentId,
            Namespace = logAnalyticsLogGroupNamespace,
            DisplayName = logAnalyticsLogGroupDisplayName,
        });
    
    });
    
    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.GetLogAnalyticsLogGroupsArgs;
    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 testLogAnalyticsLogGroups = LogAnalyticsFunctions.getLogAnalyticsLogGroups(GetLogAnalyticsLogGroupsArgs.builder()
                .compartmentId(compartmentId)
                .namespace(logAnalyticsLogGroupNamespace)
                .displayName(logAnalyticsLogGroupDisplayName)
                .build());
    
        }
    }
    
    variables:
      testLogAnalyticsLogGroups:
        fn::invoke:
          Function: oci:LogAnalytics:getLogAnalyticsLogGroups
          Arguments:
            compartmentId: ${compartmentId}
            namespace: ${logAnalyticsLogGroupNamespace}
            displayName: ${logAnalyticsLogGroupDisplayName}
    

    Using getLogAnalyticsLogGroups

    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 getLogAnalyticsLogGroups(args: GetLogAnalyticsLogGroupsArgs, opts?: InvokeOptions): Promise<GetLogAnalyticsLogGroupsResult>
    function getLogAnalyticsLogGroupsOutput(args: GetLogAnalyticsLogGroupsOutputArgs, opts?: InvokeOptions): Output<GetLogAnalyticsLogGroupsResult>
    def get_log_analytics_log_groups(compartment_id: Optional[str] = None,
                                     display_name: Optional[str] = None,
                                     filters: Optional[Sequence[_loganalytics.GetLogAnalyticsLogGroupsFilter]] = None,
                                     namespace: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetLogAnalyticsLogGroupsResult
    def get_log_analytics_log_groups_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                     display_name: Optional[pulumi.Input[str]] = None,
                                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loganalytics.GetLogAnalyticsLogGroupsFilterArgs]]]] = None,
                                     namespace: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetLogAnalyticsLogGroupsResult]
    func GetLogAnalyticsLogGroups(ctx *Context, args *GetLogAnalyticsLogGroupsArgs, opts ...InvokeOption) (*GetLogAnalyticsLogGroupsResult, error)
    func GetLogAnalyticsLogGroupsOutput(ctx *Context, args *GetLogAnalyticsLogGroupsOutputArgs, opts ...InvokeOption) GetLogAnalyticsLogGroupsResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    Namespace string
    The Logging Analytics namespace used for the request.
    DisplayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    Filters List<GetLogAnalyticsLogGroupsFilter>
    CompartmentId string
    The ID of the compartment in which to list resources.
    Namespace string
    The Logging Analytics namespace used for the request.
    DisplayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    Filters []GetLogAnalyticsLogGroupsFilter
    compartmentId String
    The ID of the compartment in which to list resources.
    namespace String
    The Logging Analytics namespace used for the request.
    displayName String
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    filters List<GetLogGroupsFilter>
    compartmentId string
    The ID of the compartment in which to list resources.
    namespace string
    The Logging Analytics namespace used for the request.
    displayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    filters GetLogAnalyticsLogGroupsFilter[]
    compartment_id str
    The ID of the compartment in which to list resources.
    namespace str
    The Logging Analytics namespace used for the request.
    display_name str
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    filters Sequence[loganalytics.GetLogAnalyticsLogGroupsFilter]
    compartmentId String
    The ID of the compartment in which to list resources.
    namespace String
    The Logging Analytics namespace used for the request.
    displayName String
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    filters List<Property Map>

    getLogAnalyticsLogGroups Result

    The following output properties are available:

    CompartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    Id string
    The provider-assigned unique ID for this managed resource.
    LogAnalyticsLogGroupSummaryCollections List<GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection>
    The list of log_analytics_log_group_summary_collection.
    Namespace string
    DisplayName string
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    Filters List<GetLogAnalyticsLogGroupsFilter>
    CompartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    Id string
    The provider-assigned unique ID for this managed resource.
    LogAnalyticsLogGroupSummaryCollections []GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection
    The list of log_analytics_log_group_summary_collection.
    Namespace string
    DisplayName string
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    Filters []GetLogAnalyticsLogGroupsFilter
    compartmentId String
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    id String
    The provider-assigned unique ID for this managed resource.
    logAnalyticsLogGroupSummaryCollections List<GetLogGroupsLogGroupSummaryCollection>
    The list of log_analytics_log_group_summary_collection.
    namespace String
    displayName String
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    filters List<GetLogGroupsFilter>
    compartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    id string
    The provider-assigned unique ID for this managed resource.
    logAnalyticsLogGroupSummaryCollections GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection[]
    The list of log_analytics_log_group_summary_collection.
    namespace string
    displayName string
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    filters GetLogAnalyticsLogGroupsFilter[]
    compartment_id str
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    id str
    The provider-assigned unique ID for this managed resource.
    log_analytics_log_group_summary_collections Sequence[loganalytics.GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection]
    The list of log_analytics_log_group_summary_collection.
    namespace str
    display_name str
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    filters Sequence[loganalytics.GetLogAnalyticsLogGroupsFilter]
    compartmentId String
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    id String
    The provider-assigned unique ID for this managed resource.
    logAnalyticsLogGroupSummaryCollections List<Property Map>
    The list of log_analytics_log_group_summary_collection.
    namespace String
    displayName String
    A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
    filters List<Property Map>

    Supporting Types

    GetLogAnalyticsLogGroupsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection

    GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollectionItem

    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description for this resource.
    DisplayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    Namespace string
    The Logging Analytics namespace used for the request.
    TimeCreated string
    The date and time the resource was created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the resource was last updated, in the format defined by RFC3339.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description for this resource.
    DisplayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    Namespace string
    The Logging Analytics namespace used for the request.
    TimeCreated string
    The date and time the resource was created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the resource was last updated, in the format defined by RFC3339.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description for this resource.
    displayName String
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    namespace String
    The Logging Analytics namespace used for the request.
    timeCreated String
    The date and time the resource was created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the resource was last updated, in the format defined by RFC3339.
    compartmentId string
    The ID of the compartment in which to list resources.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    Description for this resource.
    displayName string
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    namespace string
    The Logging Analytics namespace used for the request.
    timeCreated string
    The date and time the resource was created, in the format defined by RFC3339.
    timeUpdated string
    The date and time the resource was last updated, in the format defined by RFC3339.
    compartment_id str
    The ID of the compartment in which to list resources.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    Description for this resource.
    display_name str
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    namespace str
    The Logging Analytics namespace used for the request.
    time_created str
    The date and time the resource was created, in the format defined by RFC3339.
    time_updated str
    The date and time the resource was last updated, in the format defined by RFC3339.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description for this resource.
    displayName String
    A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The log analytics entity OCID. This ID is a reference used by log analytics features and it represents a resource that is provisioned and managed by the customer on their premises or on the cloud.
    namespace String
    The Logging Analytics namespace used for the request.
    timeCreated String
    The date and time the resource was created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the resource was last updated, in the format defined by RFC3339.

    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi