1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LogAnalytics
  5. getNamespaceTemplates
Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi

oci.LogAnalytics.getNamespaceTemplates

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi

    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 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.
    Filters List<GetNamespaceTemplatesFilter>
    Name string
    The template name used for filtering.
    NamespaceTemplateFilter string
    filter
    State string
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    TemplateDisplayText string
    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 []GetNamespaceTemplatesFilter
    Name string
    The template name used for filtering.
    NamespaceTemplateFilter string
    filter
    State string
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    TemplateDisplayText string
    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<GetNamespaceTemplatesFilter>
    name String
    The template name used for filtering.
    namespaceTemplateFilter String
    filter
    state String
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    templateDisplayText String
    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 GetNamespaceTemplatesFilter[]
    name string
    The template name used for filtering.
    namespaceTemplateFilter string
    filter
    state string
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    templateDisplayText string
    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[GetNamespaceTemplatesFilter]
    name str
    The template name used for filtering.
    namespace_template_filter str
    filter
    state str
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    template_display_text str
    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.
    namespaceTemplateFilter String
    filter
    state String
    The template lifecycle state used for filtering. Currently supported values are ACTIVE and DELETED.
    templateDisplayText String
    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.
    LogAnalyticsTemplateCollections List<GetNamespaceTemplatesLogAnalyticsTemplateCollection>
    The list of log_analytics_template_collection.
    Namespace string
    Filters List<GetNamespaceTemplatesFilter>
    Name string
    The template name.
    NamespaceTemplateFilter string
    State string
    The current state of the template.
    TemplateDisplayText string
    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.
    LogAnalyticsTemplateCollections []GetNamespaceTemplatesLogAnalyticsTemplateCollection
    The list of log_analytics_template_collection.
    Namespace string
    Filters []GetNamespaceTemplatesFilter
    Name string
    The template name.
    NamespaceTemplateFilter string
    State string
    The current state of the template.
    TemplateDisplayText string
    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.
    logAnalyticsTemplateCollections List<GetNamespaceTemplatesTemplateCollection>
    The list of log_analytics_template_collection.
    namespace String
    filters List<GetNamespaceTemplatesFilter>
    name String
    The template name.
    namespaceTemplateFilter String
    state String
    The current state of the template.
    templateDisplayText String
    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.
    logAnalyticsTemplateCollections GetNamespaceTemplatesLogAnalyticsTemplateCollection[]
    The list of log_analytics_template_collection.
    namespace string
    filters GetNamespaceTemplatesFilter[]
    name string
    The template name.
    namespaceTemplateFilter string
    state string
    The current state of the template.
    templateDisplayText string
    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_template_collections Sequence[GetNamespaceTemplatesLogAnalyticsTemplateCollection]
    The list of log_analytics_template_collection.
    namespace str
    filters Sequence[GetNamespaceTemplatesFilter]
    name str
    The template name.
    namespace_template_filter str
    state str
    The current state of the template.
    template_display_text str
    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.
    logAnalyticsTemplateCollections List<Property Map>
    The list of log_analytics_template_collection.
    namespace String
    filters List<Property Map>
    name String
    The template name.
    namespaceTemplateFilter String
    state String
    The current state of the template.
    templateDisplayText String
    type String
    The template type.

    Supporting Types

    GetNamespaceTemplatesFilter

    Name string
    The template name used for filtering.
    Values List<string>
    Regex bool
    Name string
    The template name used for filtering.
    Values []string
    Regex bool
    name String
    The template name used for filtering.
    values List<String>
    regex Boolean
    name string
    The template name used for filtering.
    values string[]
    regex boolean
    name str
    The template name used for filtering.
    values Sequence[str]
    regex bool
    name String
    The template name used for filtering.
    values List<String>
    regex Boolean

    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.
    DefinedTags 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<GetNamespaceTemplatesLogAnalyticsTemplateCollectionItemFacet>
    Facets of the template
    FreeformTags 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.
    DefinedTags 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 []GetNamespaceTemplatesLogAnalyticsTemplateCollectionItemFacet
    Facets of the template
    FreeformTags 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.
    definedTags 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<GetNamespaceTemplatesTemplateCollectionItemFacet>
    Facets of the template
    freeformTags 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.
    definedTags {[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 GetNamespaceTemplatesLogAnalyticsTemplateCollectionItemFacet[]
    Facets of the template
    freeformTags {[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.
    defined_tags 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[GetNamespaceTemplatesLogAnalyticsTemplateCollectionItemFacet]
    Facets of the template
    freeform_tags 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.
    definedTags 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
    freeformTags 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

    Name string
    The template name used for filtering.
    Value string
    The facet value.
    Name string
    The template name used for filtering.
    Value string
    The facet value.
    name String
    The template name used for filtering.
    value String
    The facet value.
    name string
    The template name used for filtering.
    value string
    The facet value.
    name str
    The template name used for filtering.
    value str
    The facet value.
    name String
    The template name used for filtering.
    value String
    The facet value.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.0.0 published on Thursday, Jun 5, 2025 by Pulumi