1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. getNamespaceRules
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.LogAnalytics.getNamespaceRules

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

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

Returns a list of ingest time rules and scheduled tasks in a compartment. You may limit the number of items returned, provide sorting options, and filter the results.

Example Usage

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

const testNamespaceRules = oci.LogAnalytics.getNamespaceRules({
    compartmentId: compartmentId,
    namespace: namespaceRuleNamespace,
    displayName: namespaceRuleDisplayName,
    kind: namespaceRuleKind,
    state: namespaceRuleState,
    targetService: namespaceRuleTargetService,
});
Copy
import pulumi
import pulumi_oci as oci

test_namespace_rules = oci.LogAnalytics.get_namespace_rules(compartment_id=compartment_id,
    namespace=namespace_rule_namespace,
    display_name=namespace_rule_display_name,
    kind=namespace_rule_kind,
    state=namespace_rule_state,
    target_service=namespace_rule_target_service)
Copy
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.GetNamespaceRules(ctx, &loganalytics.GetNamespaceRulesArgs{
			CompartmentId: compartmentId,
			Namespace:     namespaceRuleNamespace,
			DisplayName:   pulumi.StringRef(namespaceRuleDisplayName),
			Kind:          pulumi.StringRef(namespaceRuleKind),
			State:         pulumi.StringRef(namespaceRuleState),
			TargetService: pulumi.StringRef(namespaceRuleTargetService),
		}, 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 testNamespaceRules = Oci.LogAnalytics.GetNamespaceRules.Invoke(new()
    {
        CompartmentId = compartmentId,
        Namespace = namespaceRuleNamespace,
        DisplayName = namespaceRuleDisplayName,
        Kind = namespaceRuleKind,
        State = namespaceRuleState,
        TargetService = namespaceRuleTargetService,
    });

});
Copy
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.GetNamespaceRulesArgs;
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 testNamespaceRules = LogAnalyticsFunctions.getNamespaceRules(GetNamespaceRulesArgs.builder()
            .compartmentId(compartmentId)
            .namespace(namespaceRuleNamespace)
            .displayName(namespaceRuleDisplayName)
            .kind(namespaceRuleKind)
            .state(namespaceRuleState)
            .targetService(namespaceRuleTargetService)
            .build());

    }
}
Copy
variables:
  testNamespaceRules:
    fn::invoke:
      function: oci:LogAnalytics:getNamespaceRules
      arguments:
        compartmentId: ${compartmentId}
        namespace: ${namespaceRuleNamespace}
        displayName: ${namespaceRuleDisplayName}
        kind: ${namespaceRuleKind}
        state: ${namespaceRuleState}
        targetService: ${namespaceRuleTargetService}
Copy

Using getNamespaceRules

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 getNamespaceRules(args: GetNamespaceRulesArgs, opts?: InvokeOptions): Promise<GetNamespaceRulesResult>
function getNamespaceRulesOutput(args: GetNamespaceRulesOutputArgs, opts?: InvokeOptions): Output<GetNamespaceRulesResult>
Copy
def get_namespace_rules(compartment_id: Optional[str] = None,
                        display_name: Optional[str] = None,
                        filters: Optional[Sequence[_loganalytics.GetNamespaceRulesFilter]] = None,
                        kind: Optional[str] = None,
                        namespace: Optional[str] = None,
                        state: Optional[str] = None,
                        target_service: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNamespaceRulesResult
def get_namespace_rules_output(compartment_id: Optional[pulumi.Input[str]] = None,
                        display_name: Optional[pulumi.Input[str]] = None,
                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loganalytics.GetNamespaceRulesFilterArgs]]]] = None,
                        kind: Optional[pulumi.Input[str]] = None,
                        namespace: Optional[pulumi.Input[str]] = None,
                        state: Optional[pulumi.Input[str]] = None,
                        target_service: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceRulesResult]
Copy
func GetNamespaceRules(ctx *Context, args *GetNamespaceRulesArgs, opts ...InvokeOption) (*GetNamespaceRulesResult, error)
func GetNamespaceRulesOutput(ctx *Context, args *GetNamespaceRulesOutputArgs, opts ...InvokeOption) GetNamespaceRulesResultOutput
Copy

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

public static class GetNamespaceRules 
{
    public static Task<GetNamespaceRulesResult> InvokeAsync(GetNamespaceRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetNamespaceRulesResult> Invoke(GetNamespaceRulesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNamespaceRulesResult> getNamespaceRules(GetNamespaceRulesArgs args, InvokeOptions options)
public static Output<GetNamespaceRulesResult> getNamespaceRules(GetNamespaceRulesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:LogAnalytics/getNamespaceRules:getNamespaceRules
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
Namespace This property is required. string
The Logging Analytics namespace used for the request.
DisplayName string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
Filters Changes to this property will trigger replacement. List<GetNamespaceRulesFilter>
Kind string
The rule kind used for filtering. Only rules of the specified kind will be returned.
State string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
TargetService string
The target service to use for filtering.
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
Namespace This property is required. string
The Logging Analytics namespace used for the request.
DisplayName string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
Filters Changes to this property will trigger replacement. []GetNamespaceRulesFilter
Kind string
The rule kind used for filtering. Only rules of the specified kind will be returned.
State string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
TargetService string
The target service to use for filtering.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
namespace This property is required. String
The Logging Analytics namespace used for the request.
displayName String
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
filters Changes to this property will trigger replacement. List<GetNamespaceRulesFilter>
kind String
The rule kind used for filtering. Only rules of the specified kind will be returned.
state String
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService String
The target service to use for filtering.
compartmentId This property is required. string
The ID of the compartment in which to list resources.
namespace This property is required. string
The Logging Analytics namespace used for the request.
displayName string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
filters Changes to this property will trigger replacement. GetNamespaceRulesFilter[]
kind string
The rule kind used for filtering. Only rules of the specified kind will be returned.
state string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService string
The target service to use for filtering.
compartment_id This property is required. str
The ID of the compartment in which to list resources.
namespace This property is required. str
The Logging Analytics namespace used for the request.
display_name str
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
filters Changes to this property will trigger replacement. Sequence[loganalytics.GetNamespaceRulesFilter]
kind str
The rule kind used for filtering. Only rules of the specified kind will be returned.
state str
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
target_service str
The target service to use for filtering.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
namespace This property is required. String
The Logging Analytics namespace used for the request.
displayName String
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
filters Changes to this property will trigger replacement. List<Property Map>
kind String
The rule kind used for filtering. Only rules of the specified kind will be returned.
state String
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService String
The target service to use for filtering.

getNamespaceRules 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.
Namespace string
RuleSummaryCollections List<GetNamespaceRulesRuleSummaryCollection>
The list of rule_summary_collection.
DisplayName string
The ingest time rule or scheduled task display name.
Filters List<GetNamespaceRulesFilter>
Kind string
The kind of rule - either an ingest time rule or a scheduled task.
State string
The current state of the logging analytics rule.
TargetService string
The target service.
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.
Namespace string
RuleSummaryCollections []GetNamespaceRulesRuleSummaryCollection
The list of rule_summary_collection.
DisplayName string
The ingest time rule or scheduled task display name.
Filters []GetNamespaceRulesFilter
Kind string
The kind of rule - either an ingest time rule or a scheduled task.
State string
The current state of the logging analytics rule.
TargetService string
The target service.
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.
namespace String
ruleSummaryCollections List<GetNamespaceRulesRuleSummaryCollection>
The list of rule_summary_collection.
displayName String
The ingest time rule or scheduled task display name.
filters List<GetNamespaceRulesFilter>
kind String
The kind of rule - either an ingest time rule or a scheduled task.
state String
The current state of the logging analytics rule.
targetService String
The target service.
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.
namespace string
ruleSummaryCollections GetNamespaceRulesRuleSummaryCollection[]
The list of rule_summary_collection.
displayName string
The ingest time rule or scheduled task display name.
filters GetNamespaceRulesFilter[]
kind string
The kind of rule - either an ingest time rule or a scheduled task.
state string
The current state of the logging analytics rule.
targetService string
The target service.
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.
namespace str
rule_summary_collections Sequence[loganalytics.GetNamespaceRulesRuleSummaryCollection]
The list of rule_summary_collection.
display_name str
The ingest time rule or scheduled task display name.
filters Sequence[loganalytics.GetNamespaceRulesFilter]
kind str
The kind of rule - either an ingest time rule or a scheduled task.
state str
The current state of the logging analytics rule.
target_service str
The target service.
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.
namespace String
ruleSummaryCollections List<Property Map>
The list of rule_summary_collection.
displayName String
The ingest time rule or scheduled task display name.
filters List<Property Map>
kind String
The kind of rule - either an ingest time rule or a scheduled task.
state String
The current state of the logging analytics rule.
targetService String
The target service.

Supporting Types

GetNamespaceRulesFilter

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

GetNamespaceRulesRuleSummaryCollection

Items This property is required. List<GetNamespaceRulesRuleSummaryCollectionItem>
An array of rule summary objects.
Items This property is required. []GetNamespaceRulesRuleSummaryCollectionItem
An array of rule summary objects.
items This property is required. List<GetNamespaceRulesRuleSummaryCollectionItem>
An array of rule summary objects.
items This property is required. GetNamespaceRulesRuleSummaryCollectionItem[]
An array of rule summary objects.
items This property is required. Sequence[loganalytics.GetNamespaceRulesRuleSummaryCollectionItem]
An array of rule summary objects.
items This property is required. List<Property Map>
An array of rule summary objects.

GetNamespaceRulesRuleSummaryCollectionItem

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description This property is required. string
Description for this resource.
DisplayName This property is required. string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
FreeformTags This property is required. 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 This property is required. 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.
IsEnabled This property is required. bool
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
Kind This property is required. string
The rule kind used for filtering. Only rules of the specified kind will be returned.
LastExecutionStatus This property is required. string
The most recent task execution status.
State This property is required. string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
TargetService This property is required. string
The target service to use for filtering.
TimeCreated This property is required. string
The date and time the resource was created, in the format defined by RFC3339.
TimeLastExecuted This property is required. string
The date and time the scheduled task last executed, in the format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the resource was last updated, in the format defined by RFC3339.
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description This property is required. string
Description for this resource.
DisplayName This property is required. string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
FreeformTags This property is required. 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 This property is required. 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.
IsEnabled This property is required. bool
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
Kind This property is required. string
The rule kind used for filtering. Only rules of the specified kind will be returned.
LastExecutionStatus This property is required. string
The most recent task execution status.
State This property is required. string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
TargetService This property is required. string
The target service to use for filtering.
TimeCreated This property is required. string
The date and time the resource was created, in the format defined by RFC3339.
TimeLastExecuted This property is required. string
The date and time the scheduled task last executed, in the format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the resource was last updated, in the format defined by RFC3339.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description This property is required. String
Description for this resource.
displayName This property is required. String
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
freeformTags This property is required. 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 This property is required. 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.
isEnabled This property is required. Boolean
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
kind This property is required. String
The rule kind used for filtering. Only rules of the specified kind will be returned.
lastExecutionStatus This property is required. String
The most recent task execution status.
state This property is required. String
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService This property is required. String
The target service to use for filtering.
timeCreated This property is required. String
The date and time the resource was created, in the format defined by RFC3339.
timeLastExecuted This property is required. String
The date and time the scheduled task last executed, in the format defined by RFC3339.
timeUpdated This property is required. String
The date and time the resource was last updated, in the format defined by RFC3339.
compartmentId This property is required. string
The ID of the compartment in which to list resources.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description This property is required. string
Description for this resource.
displayName This property is required. string
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
freeformTags This property is required. {[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 This property is required. 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.
isEnabled This property is required. boolean
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
kind This property is required. string
The rule kind used for filtering. Only rules of the specified kind will be returned.
lastExecutionStatus This property is required. string
The most recent task execution status.
state This property is required. string
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService This property is required. string
The target service to use for filtering.
timeCreated This property is required. string
The date and time the resource was created, in the format defined by RFC3339.
timeLastExecuted This property is required. string
The date and time the scheduled task last executed, in the format defined by RFC3339.
timeUpdated This property is required. string
The date and time the resource was last updated, in the format defined by RFC3339.
compartment_id This property is required. str
The ID of the compartment in which to list resources.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description This property is required. str
Description for this resource.
display_name This property is required. str
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
freeform_tags This property is required. 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 This property is required. 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.
is_enabled This property is required. bool
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
kind This property is required. str
The rule kind used for filtering. Only rules of the specified kind will be returned.
last_execution_status This property is required. str
The most recent task execution status.
state This property is required. str
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
target_service This property is required. str
The target service to use for filtering.
time_created This property is required. str
The date and time the resource was created, in the format defined by RFC3339.
time_last_executed This property is required. str
The date and time the scheduled task last executed, in the format defined by RFC3339.
time_updated This property is required. str
The date and time the resource was last updated, in the format defined by RFC3339.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description This property is required. String
Description for this resource.
displayName This property is required. String
A filter to return rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.
freeformTags This property is required. 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 This property is required. 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.
isEnabled This property is required. Boolean
A flag indicating whether or not the ingest time rule or scheduled task is enabled.
kind This property is required. String
The rule kind used for filtering. Only rules of the specified kind will be returned.
lastExecutionStatus This property is required. String
The most recent task execution status.
state This property is required. String
The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
targetService This property is required. String
The target service to use for filtering.
timeCreated This property is required. String
The date and time the resource was created, in the format defined by RFC3339.
timeLastExecuted This property is required. String
The date and time the scheduled task last executed, in the format defined by RFC3339.
timeUpdated This property is required. 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.
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi