oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.LogAnalytics.getNamespaceRules

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testNamespaceRules = Oci.LogAnalytics.GetNamespaceRules.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        Namespace = @var.Namespace_rule_namespace,
        DisplayName = @var.Namespace_rule_display_name,
        Kind = @var.Namespace_rule_kind,
        State = @var.Namespace_rule_state,
    });

});
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.GetNamespaceRules(ctx, &loganalytics.GetNamespaceRulesArgs{
			CompartmentId: _var.Compartment_id,
			Namespace:     _var.Namespace_rule_namespace,
			DisplayName:   pulumi.StringRef(_var.Namespace_rule_display_name),
			Kind:          pulumi.StringRef(_var.Namespace_rule_kind),
			State:         pulumi.StringRef(_var.Namespace_rule_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .namespace(var_.namespace_rule_namespace())
            .displayName(var_.namespace_rule_display_name())
            .kind(var_.namespace_rule_kind())
            .state(var_.namespace_rule_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_namespace_rules = oci.LogAnalytics.get_namespace_rules(compartment_id=var["compartment_id"],
    namespace=var["namespace_rule_namespace"],
    display_name=var["namespace_rule_display_name"],
    kind=var["namespace_rule_kind"],
    state=var["namespace_rule_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testNamespaceRules = oci.LogAnalytics.getNamespaceRules({
    compartmentId: _var.compartment_id,
    namespace: _var.namespace_rule_namespace,
    displayName: _var.namespace_rule_display_name,
    kind: _var.namespace_rule_kind,
    state: _var.namespace_rule_state,
});
variables:
  testNamespaceRules:
    fn::invoke:
      Function: oci:LogAnalytics:getNamespaceRules
      Arguments:
        compartmentId: ${var.compartment_id}
        namespace: ${var.namespace_rule_namespace}
        displayName: ${var.namespace_rule_display_name}
        kind: ${var.namespace_rule_kind}
        state: ${var.namespace_rule_state}

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>
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,
                        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,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceRulesResult]
func GetNamespaceRules(ctx *Context, args *GetNamespaceRulesArgs, opts ...InvokeOption) (*GetNamespaceRulesResult, error)
func GetNamespaceRulesOutput(ctx *Context, args *GetNamespaceRulesOutputArgs, opts ...InvokeOption) GetNamespaceRulesResultOutput

> 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)
}
public static CompletableFuture<GetNamespaceRulesResult> getNamespaceRules(GetNamespaceRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:LogAnalytics/getNamespaceRules:getNamespaceRules
  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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

Filters 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.

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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

Filters []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.

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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

filters 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.

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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

filters 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.

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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

filters 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.

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 rules whose displayName matches in whole or in part the specified value. The match is case-insensitive.

filters 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.

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.

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.

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.

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.

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 GetNamespaceRulesRuleSummaryCollection]

The list of rule_summary_collection.

display_name str

The ingest time rule or scheduled task display name.

filters 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.

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.

Supporting Types

GetNamespaceRulesFilter

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

GetNamespaceRulesRuleSummaryCollection

Items []GetNamespaceRulesRuleSummaryCollectionItem

An array of rule summary objects.

items GetNamespaceRulesRuleSummaryCollectionItem[]

An array of rule summary objects.

items GetNamespaceRulesRuleSummaryCollectionItem]

An array of rule summary objects.

items List<Property Map>

An array of rule summary objects.

GetNamespaceRulesRuleSummaryCollectionItem

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 rules whose displayName matches in whole or in part the specified value. 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.

IsEnabled bool

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

Kind string

The rule kind used for filtering. Only rules of the specified kind will be returned.

LastExecutionStatus string

The most recent task execution status.

State string

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeLastExecuted string

The date and time the scheduled task last executed, 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 rules whose displayName matches in whole or in part the specified value. 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.

IsEnabled bool

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

Kind string

The rule kind used for filtering. Only rules of the specified kind will be returned.

LastExecutionStatus string

The most recent task execution status.

State string

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

TimeCreated string

The date and time the resource was created, in the format defined by RFC3339.

TimeLastExecuted string

The date and time the scheduled task last executed, 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 rules whose displayName matches in whole or in part the specified value. 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.

isEnabled Boolean

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

kind String

The rule kind used for filtering. Only rules of the specified kind will be returned.

lastExecutionStatus String

The most recent task execution status.

state String

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeLastExecuted String

The date and time the scheduled task last executed, 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 rules whose displayName matches in whole or in part the specified value. 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.

isEnabled boolean

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

kind string

The rule kind used for filtering. Only rules of the specified kind will be returned.

lastExecutionStatus string

The most recent task execution status.

state string

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

timeCreated string

The date and time the resource was created, in the format defined by RFC3339.

timeLastExecuted string

The date and time the scheduled task last executed, 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 rules whose displayName matches in whole or in part the specified value. 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.

is_enabled bool

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

kind str

The rule kind used for filtering. Only rules of the specified kind will be returned.

last_execution_status str

The most recent task execution status.

state str

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

time_created str

The date and time the resource was created, in the format defined by RFC3339.

time_last_executed str

The date and time the scheduled task last executed, 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 rules whose displayName matches in whole or in part the specified value. 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.

isEnabled Boolean

A flag indicating whether or not the ingest time rule or scheduled task is enabled.

kind String

The rule kind used for filtering. Only rules of the specified kind will be returned.

lastExecutionStatus String

The most recent task execution status.

state String

The rule lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.

timeCreated String

The date and time the resource was created, in the format defined by RFC3339.

timeLastExecuted String

The date and time the scheduled task last executed, 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.