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

oci.Logging.getLogSavedSearches

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

This data source provides the list of Log Saved Searches in Oracle Cloud Infrastructure Logging service.

Lists LogSavedSearches for this compartment.

Example Usage

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

const testLogSavedSearches = oci.Logging.getLogSavedSearches({
    compartmentId: compartmentId,
    logSavedSearchId: testLogSavedSearch.id,
    name: logSavedSearchName,
});
Copy
import pulumi
import pulumi_oci as oci

test_log_saved_searches = oci.Logging.get_log_saved_searches(compartment_id=compartment_id,
    log_saved_search_id=test_log_saved_search["id"],
    name=log_saved_search_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/logging"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := logging.GetLogSavedSearches(ctx, &logging.GetLogSavedSearchesArgs{
			CompartmentId:    compartmentId,
			LogSavedSearchId: pulumi.StringRef(testLogSavedSearch.Id),
			Name:             pulumi.StringRef(logSavedSearchName),
		}, 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 testLogSavedSearches = Oci.Logging.GetLogSavedSearches.Invoke(new()
    {
        CompartmentId = compartmentId,
        LogSavedSearchId = testLogSavedSearch.Id,
        Name = logSavedSearchName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Logging.LoggingFunctions;
import com.pulumi.oci.Logging.inputs.GetLogSavedSearchesArgs;
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 testLogSavedSearches = LoggingFunctions.getLogSavedSearches(GetLogSavedSearchesArgs.builder()
            .compartmentId(compartmentId)
            .logSavedSearchId(testLogSavedSearch.id())
            .name(logSavedSearchName)
            .build());

    }
}
Copy
variables:
  testLogSavedSearches:
    fn::invoke:
      function: oci:Logging:getLogSavedSearches
      arguments:
        compartmentId: ${compartmentId}
        logSavedSearchId: ${testLogSavedSearch.id}
        name: ${logSavedSearchName}
Copy

Using getLogSavedSearches

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 getLogSavedSearches(args: GetLogSavedSearchesArgs, opts?: InvokeOptions): Promise<GetLogSavedSearchesResult>
function getLogSavedSearchesOutput(args: GetLogSavedSearchesOutputArgs, opts?: InvokeOptions): Output<GetLogSavedSearchesResult>
Copy
def get_log_saved_searches(compartment_id: Optional[str] = None,
                           filters: Optional[Sequence[_logging.GetLogSavedSearchesFilter]] = None,
                           log_saved_search_id: Optional[str] = None,
                           name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetLogSavedSearchesResult
def get_log_saved_searches_output(compartment_id: Optional[pulumi.Input[str]] = None,
                           filters: Optional[pulumi.Input[Sequence[pulumi.Input[_logging.GetLogSavedSearchesFilterArgs]]]] = None,
                           log_saved_search_id: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetLogSavedSearchesResult]
Copy
func GetLogSavedSearches(ctx *Context, args *GetLogSavedSearchesArgs, opts ...InvokeOption) (*GetLogSavedSearchesResult, error)
func GetLogSavedSearchesOutput(ctx *Context, args *GetLogSavedSearchesOutputArgs, opts ...InvokeOption) GetLogSavedSearchesResultOutput
Copy

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

public static class GetLogSavedSearches 
{
    public static Task<GetLogSavedSearchesResult> InvokeAsync(GetLogSavedSearchesArgs args, InvokeOptions? opts = null)
    public static Output<GetLogSavedSearchesResult> Invoke(GetLogSavedSearchesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLogSavedSearchesResult> getLogSavedSearches(GetLogSavedSearchesArgs args, InvokeOptions options)
public static Output<GetLogSavedSearchesResult> getLogSavedSearches(GetLogSavedSearchesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Logging/getLogSavedSearches:getLogSavedSearches
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
Filters Changes to this property will trigger replacement. List<GetLogSavedSearchesFilter>
LogSavedSearchId string
OCID of the LogSavedSearch.
Name string
Resource name.
CompartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
Filters Changes to this property will trigger replacement. []GetLogSavedSearchesFilter
LogSavedSearchId string
OCID of the LogSavedSearch.
Name string
Resource name.
compartmentId This property is required. String
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
filters Changes to this property will trigger replacement. List<GetLogSavedSearchesFilter>
logSavedSearchId String
OCID of the LogSavedSearch.
name String
Resource name.
compartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
filters Changes to this property will trigger replacement. GetLogSavedSearchesFilter[]
logSavedSearchId string
OCID of the LogSavedSearch.
name string
Resource name.
compartment_id This property is required. str
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
filters Changes to this property will trigger replacement. Sequence[logging.GetLogSavedSearchesFilter]
log_saved_search_id str
OCID of the LogSavedSearch.
name str
Resource name.
compartmentId This property is required. String
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
filters Changes to this property will trigger replacement. List<Property Map>
logSavedSearchId String
OCID of the LogSavedSearch.
name String
Resource name.

getLogSavedSearches Result

The following output properties are available:

CompartmentId string
The OCID of the compartment that the resource belongs to.
Id string
The provider-assigned unique ID for this managed resource.
LogSavedSearchSummaryCollections List<GetLogSavedSearchesLogSavedSearchSummaryCollection>
The list of log_saved_search_summary_collection.
Filters List<GetLogSavedSearchesFilter>
LogSavedSearchId string
Name string
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
CompartmentId string
The OCID of the compartment that the resource belongs to.
Id string
The provider-assigned unique ID for this managed resource.
LogSavedSearchSummaryCollections []GetLogSavedSearchesLogSavedSearchSummaryCollection
The list of log_saved_search_summary_collection.
Filters []GetLogSavedSearchesFilter
LogSavedSearchId string
Name string
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
compartmentId String
The OCID of the compartment that the resource belongs to.
id String
The provider-assigned unique ID for this managed resource.
logSavedSearchSummaryCollections List<GetLogSavedSearchesLogSavedSearchSummaryCollection>
The list of log_saved_search_summary_collection.
filters List<GetLogSavedSearchesFilter>
logSavedSearchId String
name String
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
compartmentId string
The OCID of the compartment that the resource belongs to.
id string
The provider-assigned unique ID for this managed resource.
logSavedSearchSummaryCollections GetLogSavedSearchesLogSavedSearchSummaryCollection[]
The list of log_saved_search_summary_collection.
filters GetLogSavedSearchesFilter[]
logSavedSearchId string
name string
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
compartment_id str
The OCID of the compartment that the resource belongs to.
id str
The provider-assigned unique ID for this managed resource.
log_saved_search_summary_collections Sequence[logging.GetLogSavedSearchesLogSavedSearchSummaryCollection]
The list of log_saved_search_summary_collection.
filters Sequence[logging.GetLogSavedSearchesFilter]
log_saved_search_id str
name str
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
compartmentId String
The OCID of the compartment that the resource belongs to.
id String
The provider-assigned unique ID for this managed resource.
logSavedSearchSummaryCollections List<Property Map>
The list of log_saved_search_summary_collection.
filters List<Property Map>
logSavedSearchId String
name String
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.

Supporting Types

GetLogSavedSearchesFilter

Name This property is required. string
Resource name.
Values This property is required. List<string>
Regex bool
Name This property is required. string
Resource name.
Values This property is required. []string
Regex bool
name This property is required. String
Resource name.
values This property is required. List<String>
regex Boolean
name This property is required. string
Resource name.
values This property is required. string[]
regex boolean
name This property is required. str
Resource name.
values This property is required. Sequence[str]
regex bool
name This property is required. String
Resource name.
values This property is required. List<String>
regex Boolean

GetLogSavedSearchesLogSavedSearchSummaryCollection

items This property is required. List<Property Map>

GetLogSavedSearchesLogSavedSearchSummaryCollectionItem

CompartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
Description for this resource.
FreeformTags This property is required. Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
The OCID of the resource.
Name This property is required. string
Resource name.
Query This property is required. string
The search query that is saved.
State This property is required. string
The state of the LogSavedSearch
TimeCreated This property is required. string
Time the resource was created.
TimeLastModified This property is required. string
Time the resource was last modified.
CompartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
Description for this resource.
FreeformTags This property is required. map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
The OCID of the resource.
Name This property is required. string
Resource name.
Query This property is required. string
The search query that is saved.
State This property is required. string
The state of the LogSavedSearch
TimeCreated This property is required. string
Time the resource was created.
TimeLastModified This property is required. string
Time the resource was last modified.
compartmentId This property is required. String
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
Description for this resource.
freeformTags This property is required. Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
The OCID of the resource.
name This property is required. String
Resource name.
query This property is required. String
The search query that is saved.
state This property is required. String
The state of the LogSavedSearch
timeCreated This property is required. String
Time the resource was created.
timeLastModified This property is required. String
Time the resource was last modified.
compartmentId This property is required. string
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. string
Description for this resource.
freeformTags This property is required. {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. string
The OCID of the resource.
name This property is required. string
Resource name.
query This property is required. string
The search query that is saved.
state This property is required. string
The state of the LogSavedSearch
timeCreated This property is required. string
Time the resource was created.
timeLastModified This property is required. string
Time the resource was last modified.
compartment_id This property is required. str
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. str
Description for this resource.
freeform_tags This property is required. Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. str
The OCID of the resource.
name This property is required. str
Resource name.
query This property is required. str
The search query that is saved.
state This property is required. str
The state of the LogSavedSearch
time_created This property is required. str
Time the resource was created.
time_last_modified This property is required. str
Time the resource was last modified.
compartmentId This property is required. String
Compartment OCID to list resources in. See compartmentIdInSubtree for nested compartments traversal.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
Description for this resource.
freeformTags This property is required. Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
The OCID of the resource.
name This property is required. String
Resource name.
query This property is required. String
The search query that is saved.
state This property is required. String
The state of the LogSavedSearch
timeCreated This property is required. String
Time the resource was created.
timeLastModified This property is required. String
Time the resource was last modified.

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