Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.LogAnalytics.getNamespaceTemplates
This data source provides the list of Namespace Templates in Oracle Cloud Infrastructure Log Analytics service.
Returns a list of templates, containing detailed information about them. You may limit the number of results, provide sorting order, and filter by information such as template name, type, display name and description.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNamespaceTemplates = oci.LogAnalytics.getNamespaceTemplates({
    compartmentId: compartmentId,
    namespace: namespaceTemplateNamespace,
    name: namespaceTemplateName,
    namespaceTemplateFilter: namespaceTemplateNamespaceTemplateFilter,
    state: namespaceTemplateState,
    templateDisplayText: namespaceTemplateTemplateDisplayText,
    type: namespaceTemplateType,
});
import pulumi
import pulumi_oci as oci
test_namespace_templates = oci.LogAnalytics.get_namespace_templates(compartment_id=compartment_id,
    namespace=namespace_template_namespace,
    name=namespace_template_name,
    namespace_template_filter=namespace_template_namespace_template_filter,
    state=namespace_template_state,
    template_display_text=namespace_template_template_display_text,
    type=namespace_template_type)
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.GetNamespaceTemplates(ctx, &loganalytics.GetNamespaceTemplatesArgs{
			CompartmentId:           compartmentId,
			Namespace:               namespaceTemplateNamespace,
			Name:                    pulumi.StringRef(namespaceTemplateName),
			NamespaceTemplateFilter: pulumi.StringRef(namespaceTemplateNamespaceTemplateFilter),
			State:                   pulumi.StringRef(namespaceTemplateState),
			TemplateDisplayText:     pulumi.StringRef(namespaceTemplateTemplateDisplayText),
			Type:                    pulumi.StringRef(namespaceTemplateType),
		}, 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 testNamespaceTemplates = Oci.LogAnalytics.GetNamespaceTemplates.Invoke(new()
    {
        CompartmentId = compartmentId,
        Namespace = namespaceTemplateNamespace,
        Name = namespaceTemplateName,
        NamespaceTemplateFilter = namespaceTemplateNamespaceTemplateFilter,
        State = namespaceTemplateState,
        TemplateDisplayText = namespaceTemplateTemplateDisplayText,
        Type = namespaceTemplateType,
    });
});
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.GetNamespaceTemplatesArgs;
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 testNamespaceTemplates = LogAnalyticsFunctions.getNamespaceTemplates(GetNamespaceTemplatesArgs.builder()
            .compartmentId(compartmentId)
            .namespace(namespaceTemplateNamespace)
            .name(namespaceTemplateName)
            .namespaceTemplateFilter(namespaceTemplateNamespaceTemplateFilter)
            .state(namespaceTemplateState)
            .templateDisplayText(namespaceTemplateTemplateDisplayText)
            .type(namespaceTemplateType)
            .build());
    }
}
variables:
  testNamespaceTemplates:
    fn::invoke:
      function: oci:LogAnalytics:getNamespaceTemplates
      arguments:
        compartmentId: ${compartmentId}
        namespace: ${namespaceTemplateNamespace}
        name: ${namespaceTemplateName}
        namespaceTemplateFilter: ${namespaceTemplateNamespaceTemplateFilter}
        state: ${namespaceTemplateState}
        templateDisplayText: ${namespaceTemplateTemplateDisplayText}
        type: ${namespaceTemplateType}
Using getNamespaceTemplates
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 getNamespaceTemplates(args: GetNamespaceTemplatesArgs, opts?: InvokeOptions): Promise<GetNamespaceTemplatesResult>
function getNamespaceTemplatesOutput(args: GetNamespaceTemplatesOutputArgs, opts?: InvokeOptions): Output<GetNamespaceTemplatesResult>def get_namespace_templates(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[GetNamespaceTemplatesFilter]] = None,
                            name: Optional[str] = None,
                            namespace: Optional[str] = None,
                            namespace_template_filter: Optional[str] = None,
                            state: Optional[str] = None,
                            template_display_text: Optional[str] = None,
                            type: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetNamespaceTemplatesResult
def get_namespace_templates_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNamespaceTemplatesFilterArgs]]]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            namespace: Optional[pulumi.Input[str]] = None,
                            namespace_template_filter: Optional[pulumi.Input[str]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            template_display_text: Optional[pulumi.Input[str]] = None,
                            type: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceTemplatesResult]func GetNamespaceTemplates(ctx *Context, args *GetNamespaceTemplatesArgs, opts ...InvokeOption) (*GetNamespaceTemplatesResult, error)
func GetNamespaceTemplatesOutput(ctx *Context, args *GetNamespaceTemplatesOutputArgs, opts ...InvokeOption) GetNamespaceTemplatesResultOutput> Note: This function is named GetNamespaceTemplates in the Go SDK.
public static class GetNamespaceTemplates 
{
    public static Task<GetNamespaceTemplatesResult> InvokeAsync(GetNamespaceTemplatesArgs args, InvokeOptions? opts = null)
    public static Output<GetNamespaceTemplatesResult> Invoke(GetNamespaceTemplatesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespaceTemplatesResult> getNamespaceTemplates(GetNamespaceTemplatesArgs args, InvokeOptions options)
public static Output<GetNamespaceTemplatesResult> getNamespaceTemplates(GetNamespaceTemplatesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:LogAnalytics/getNamespaceTemplates:getNamespaceTemplates
  arguments:
    # arguments dictionaryThe 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.
- Filters
List<GetNamespace Templates Filter> 
- Name string
- The template name used for filtering.
- NamespaceTemplate stringFilter 
- filter
- State string
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- TemplateDisplay stringText 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- Type string
- The template type used for filtering. Only templates of the specified type will be returned.
- CompartmentId string
- The ID of the compartment in which to list resources.
- Namespace string
- The Logging Analytics namespace used for the request.
- Filters
[]GetNamespace Templates Filter 
- Name string
- The template name used for filtering.
- NamespaceTemplate stringFilter 
- filter
- State string
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- TemplateDisplay stringText 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- Type string
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId String
- The ID of the compartment in which to list resources.
- namespace String
- The Logging Analytics namespace used for the request.
- filters
List<GetNamespace Templates Filter> 
- name String
- The template name used for filtering.
- namespaceTemplate StringFilter 
- filter
- state String
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- templateDisplay StringText 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- type String
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId string
- The ID of the compartment in which to list resources.
- namespace string
- The Logging Analytics namespace used for the request.
- filters
GetNamespace Templates Filter[] 
- name string
- The template name used for filtering.
- namespaceTemplate stringFilter 
- filter
- state string
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- templateDisplay stringText 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- type string
- The template type used for filtering. Only templates of the specified type will be returned.
- compartment_id str
- The ID of the compartment in which to list resources.
- namespace str
- The Logging Analytics namespace used for the request.
- filters
Sequence[GetNamespace Templates Filter] 
- name str
- The template name used for filtering.
- namespace_template_ strfilter 
- filter
- state str
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- template_display_ strtext 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- type str
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId String
- The ID of the compartment in which to list resources.
- namespace String
- The Logging Analytics namespace used for the request.
- filters List<Property Map>
- name String
- The template name used for filtering.
- namespaceTemplate StringFilter 
- filter
- state String
- The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
- templateDisplay StringText 
- The template display text used for filtering. Only templates with the specified name or description will be returned.
- type String
- The template type used for filtering. Only templates of the specified type will be returned.
getNamespaceTemplates 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.
- LogAnalytics List<GetTemplate Collections Namespace Templates Log Analytics Template Collection> 
- The list of log_analytics_template_collection.
- Namespace string
- Filters
List<GetNamespace Templates Filter> 
- Name string
- The template name.
- NamespaceTemplate stringFilter 
- State string
- The current state of the template.
- TemplateDisplay stringText 
- Type string
- The template type.
- 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.
- LogAnalytics []GetTemplate Collections Namespace Templates Log Analytics Template Collection 
- The list of log_analytics_template_collection.
- Namespace string
- Filters
[]GetNamespace Templates Filter 
- Name string
- The template name.
- NamespaceTemplate stringFilter 
- State string
- The current state of the template.
- TemplateDisplay stringText 
- Type string
- The template type.
- 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.
- logAnalytics List<GetTemplate Collections Namespace Templates Template Collection> 
- The list of log_analytics_template_collection.
- namespace String
- filters
List<GetNamespace Templates Filter> 
- name String
- The template name.
- namespaceTemplate StringFilter 
- state String
- The current state of the template.
- templateDisplay StringText 
- type String
- The template type.
- 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.
- logAnalytics GetTemplate Collections Namespace Templates Log Analytics Template Collection[] 
- The list of log_analytics_template_collection.
- namespace string
- filters
GetNamespace Templates Filter[] 
- name string
- The template name.
- namespaceTemplate stringFilter 
- state string
- The current state of the template.
- templateDisplay stringText 
- type string
- The template type.
- 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[Gettemplate_ collections Namespace Templates Log Analytics Template Collection] 
- The list of log_analytics_template_collection.
- namespace str
- filters
Sequence[GetNamespace Templates Filter] 
- name str
- The template name.
- namespace_template_ strfilter 
- state str
- The current state of the template.
- template_display_ strtext 
- type str
- The template type.
- 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.
- logAnalytics List<Property Map>Template Collections 
- The list of log_analytics_template_collection.
- namespace String
- filters List<Property Map>
- name String
- The template name.
- namespaceTemplate StringFilter 
- state String
- The current state of the template.
- templateDisplay StringText 
- type String
- The template type.
Supporting Types
GetNamespaceTemplatesFilter   
GetNamespaceTemplatesLogAnalyticsTemplateCollection      
GetNamespaceTemplatesLogAnalyticsTemplateCollectionItem       
- CompartmentId string
- The ID of the compartment in which to list resources.
- Content string
- Base64 encoded template content.
- ContentFormat string
- Content format. For example - XML.
- 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.
- Facets
List<GetNamespace Templates Log Analytics Template Collection Item Facet> 
- Facets of the template
- 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.
- IsSystem bool
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- Name string
- The template name used for filtering.
- Parameters string
- Base64 encoded template parameters.
- ParametersFormat string
- Parameters format. For example - NAME_VALUE_PAIR.
- ParametersMetadata string
- Base64 encoded parameters metadata definition.
- State string
- The template 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.
- TimeUpdated string
- The date and time the resource was last updated, in the format defined by RFC3339.
- Type string
- The template type used for filtering. Only templates of the specified type will be returned.
- CompartmentId string
- The ID of the compartment in which to list resources.
- Content string
- Base64 encoded template content.
- ContentFormat string
- Content format. For example - XML.
- 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.
- Facets
[]GetNamespace Templates Log Analytics Template Collection Item Facet 
- Facets of the template
- 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.
- IsSystem bool
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- Name string
- The template name used for filtering.
- Parameters string
- Base64 encoded template parameters.
- ParametersFormat string
- Parameters format. For example - NAME_VALUE_PAIR.
- ParametersMetadata string
- Base64 encoded parameters metadata definition.
- State string
- The template 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.
- TimeUpdated string
- The date and time the resource was last updated, in the format defined by RFC3339.
- Type string
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId String
- The ID of the compartment in which to list resources.
- content String
- Base64 encoded template content.
- contentFormat String
- Content format. For example - XML.
- 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.
- facets
List<GetNamespace Templates Template Collection Item Facet> 
- Facets of the template
- 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.
- isSystem Boolean
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- name String
- The template name used for filtering.
- parameters String
- Base64 encoded template parameters.
- parametersFormat String
- Parameters format. For example - NAME_VALUE_PAIR.
- parametersMetadata String
- Base64 encoded parameters metadata definition.
- state String
- The template 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.
- timeUpdated String
- The date and time the resource was last updated, in the format defined by RFC3339.
- type String
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId string
- The ID of the compartment in which to list resources.
- content string
- Base64 encoded template content.
- contentFormat string
- Content format. For example - XML.
- {[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.
- facets
GetNamespace Templates Log Analytics Template Collection Item Facet[] 
- Facets of the template
- {[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.
- isSystem boolean
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- name string
- The template name used for filtering.
- parameters string
- Base64 encoded template parameters.
- parametersFormat string
- Parameters format. For example - NAME_VALUE_PAIR.
- parametersMetadata string
- Base64 encoded parameters metadata definition.
- state string
- The template 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.
- timeUpdated string
- The date and time the resource was last updated, in the format defined by RFC3339.
- type string
- The template type used for filtering. Only templates of the specified type will be returned.
- compartment_id str
- The ID of the compartment in which to list resources.
- content str
- Base64 encoded template content.
- content_format str
- Content format. For example - XML.
- 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.
- facets
Sequence[GetNamespace Templates Log Analytics Template Collection Item Facet] 
- Facets of the template
- 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.
- is_system bool
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- name str
- The template name used for filtering.
- parameters str
- Base64 encoded template parameters.
- parameters_format str
- Parameters format. For example - NAME_VALUE_PAIR.
- parameters_metadata str
- Base64 encoded parameters metadata definition.
- state str
- The template 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_updated str
- The date and time the resource was last updated, in the format defined by RFC3339.
- type str
- The template type used for filtering. Only templates of the specified type will be returned.
- compartmentId String
- The ID of the compartment in which to list resources.
- content String
- Base64 encoded template content.
- contentFormat String
- Content format. For example - XML.
- 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.
- facets List<Property Map>
- Facets of the template
- 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.
- isSystem Boolean
- The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
- name String
- The template name used for filtering.
- parameters String
- Base64 encoded template parameters.
- parametersFormat String
- Parameters format. For example - NAME_VALUE_PAIR.
- parametersMetadata String
- Base64 encoded parameters metadata definition.
- state String
- The template 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.
- timeUpdated String
- The date and time the resource was last updated, in the format defined by RFC3339.
- type String
- The template type used for filtering. Only templates of the specified type will be returned.
GetNamespaceTemplatesLogAnalyticsTemplateCollectionItemFacet        
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
