Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.LogAnalytics.getLogAnalyticsLogGroups
Start a Neo task
Explain and create an oci.LogAnalytics.getLogAnalyticsLogGroups resource
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/v3/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[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[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)
public static Output<GetLogAnalyticsLogGroupsResult> getLogAnalyticsLogGroups(GetLogAnalyticsLogGroupsArgs args, InvokeOptions options)
fn::invoke:
function: oci:LogAnalytics/getLogAnalyticsLogGroups:getLogAnalyticsLogGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The ID of the compartment in which to list resources.
- Namespace string
- The Logging Analytics namespace used for the request.
- Display
Name 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<Get
Log Analytics Log Groups Filter>
- Compartment
Id string - The ID of the compartment in which to list resources.
- Namespace string
- The Logging Analytics namespace used for the request.
- Display
Name string - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- Filters
[]Get
Log Analytics Log Groups Filter
- compartment
Id String - The ID of the compartment in which to list resources.
- namespace String
- The Logging Analytics namespace used for the request.
- display
Name 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<Get
Log Groups Filter>
- compartment
Id string - The ID of the compartment in which to list resources.
- namespace string
- The Logging Analytics namespace used for the request.
- display
Name string - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- filters
Get
Log Analytics Log Groups Filter[]
- 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[Get
Log Analytics Log Groups Filter]
- compartment
Id String - The ID of the compartment in which to list resources.
- namespace String
- The Logging Analytics namespace used for the request.
- display
Name 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:
- Compartment
Id 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.
- Log
Analytics List<GetLog Group Summary Collections Log Analytics Log Groups Log Analytics Log Group Summary Collection> - The list of log_analytics_log_group_summary_collection.
- Namespace string
- Display
Name 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<Get
Log Analytics Log Groups Filter>
- Compartment
Id 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.
- Log
Analytics []GetLog Group Summary Collections Log Analytics Log Groups Log Analytics Log Group Summary Collection - The list of log_analytics_log_group_summary_collection.
- Namespace string
- Display
Name 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
[]Get
Log Analytics Log Groups Filter
- compartment
Id 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.
- log
Analytics List<GetLog Group Summary Collections Log Groups Log Group Summary Collection> - The list of log_analytics_log_group_summary_collection.
- namespace String
- display
Name 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<Get
Log Groups Filter>
- compartment
Id 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.
- log
Analytics GetLog Group Summary Collections Log Analytics Log Groups Log Analytics Log Group Summary Collection[] - The list of log_analytics_log_group_summary_collection.
- namespace string
- display
Name 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
Get
Log Analytics Log Groups Filter[]
- 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_ Sequence[Getlog_ group_ summary_ collections Log Analytics Log Groups Log Analytics Log Group Summary Collection] - 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[Get
Log Analytics Log Groups Filter]
- compartment
Id 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.
- log
Analytics List<Property Map>Log Group Summary Collections - The list of log_analytics_log_group_summary_collection.
- namespace String
- display
Name 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
GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollection
GetLogAnalyticsLogGroupsLogAnalyticsLogGroupSummaryCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Dictionary<string, string>
- 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.
- Display
Name string - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- Dictionary<string, string>
- 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.
- Time
Created string - The date and time the resource was created, in the format defined by RFC3339.
- Time
Updated string - The date and time the resource was last updated, in the format defined by RFC3339.
- Compartment
Id string - The ID of the compartment in which to list resources.
- map[string]string
- 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.
- Display
Name string - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- map[string]string
- 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.
- Time
Created string - The date and time the resource was created, in the format defined by RFC3339.
- Time
Updated string - The date and time the resource was last updated, in the format defined by RFC3339.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<String,String>
- 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.
- display
Name String - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- Map<String,String>
- 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.
- time
Created String - The date and time the resource was created, in the format defined by RFC3339.
- time
Updated String - The date and time the resource was last updated, in the format defined by RFC3339.
- compartment
Id string - The ID of the compartment in which to list resources.
- {[key: string]: string}
- 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.
- display
Name string - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- {[key: string]: string}
- 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.
- time
Created string - The date and time the resource was created, in the format defined by RFC3339.
- time
Updated 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.
- Mapping[str, str]
- 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.
- Mapping[str, str]
- 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.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<String>
- 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.
- display
Name String - A filter to return only log analytics log groups whose displayName matches the entire display name given. The match is case-insensitive.
- Map<String>
- 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.
- time
Created String - The date and time the resource was created, in the format defined by RFC3339.
- time
Updated 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
ociTerraform Provider.
