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

oci.LogAnalytics.getNamespaceTemplate

Explore with Pulumi AI

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

    This data source provides details about a specific Namespace Template resource in Oracle Cloud Infrastructure Log Analytics service.

    Gets detailed information about the template with the specified ocid.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNamespaceTemplate = oci.LogAnalytics.getNamespaceTemplate({
        namespace: namespaceTemplateNamespace,
        templateId: testTemplate.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_namespace_template = oci.LogAnalytics.get_namespace_template(namespace=namespace_template_namespace,
        template_id=test_template["id"])
    
    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.GetNamespaceTemplate(ctx, &loganalytics.GetNamespaceTemplateArgs{
    			Namespace:  namespaceTemplateNamespace,
    			TemplateId: testTemplate.Id,
    		}, 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 testNamespaceTemplate = Oci.LogAnalytics.GetNamespaceTemplate.Invoke(new()
        {
            Namespace = namespaceTemplateNamespace,
            TemplateId = testTemplate.Id,
        });
    
    });
    
    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.GetNamespaceTemplateArgs;
    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 testNamespaceTemplate = LogAnalyticsFunctions.getNamespaceTemplate(GetNamespaceTemplateArgs.builder()
                .namespace(namespaceTemplateNamespace)
                .templateId(testTemplate.id())
                .build());
    
        }
    }
    
    variables:
      testNamespaceTemplate:
        fn::invoke:
          function: oci:LogAnalytics:getNamespaceTemplate
          arguments:
            namespace: ${namespaceTemplateNamespace}
            templateId: ${testTemplate.id}
    

    Using getNamespaceTemplate

    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 getNamespaceTemplate(args: GetNamespaceTemplateArgs, opts?: InvokeOptions): Promise<GetNamespaceTemplateResult>
    function getNamespaceTemplateOutput(args: GetNamespaceTemplateOutputArgs, opts?: InvokeOptions): Output<GetNamespaceTemplateResult>
    def get_namespace_template(namespace: Optional[str] = None,
                               template_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetNamespaceTemplateResult
    def get_namespace_template_output(namespace: Optional[pulumi.Input[str]] = None,
                               template_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceTemplateResult]
    func GetNamespaceTemplate(ctx *Context, args *GetNamespaceTemplateArgs, opts ...InvokeOption) (*GetNamespaceTemplateResult, error)
    func GetNamespaceTemplateOutput(ctx *Context, args *GetNamespaceTemplateOutputArgs, opts ...InvokeOption) GetNamespaceTemplateResultOutput

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

    public static class GetNamespaceTemplate 
    {
        public static Task<GetNamespaceTemplateResult> InvokeAsync(GetNamespaceTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetNamespaceTemplateResult> Invoke(GetNamespaceTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNamespaceTemplateResult> getNamespaceTemplate(GetNamespaceTemplateArgs args, InvokeOptions options)
    public static Output<GetNamespaceTemplateResult> getNamespaceTemplate(GetNamespaceTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:LogAnalytics/getNamespaceTemplate:getNamespaceTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Namespace string
    The Logging Analytics namespace used for the request.
    TemplateId string
    Unique ocid of the template.
    Namespace string
    The Logging Analytics namespace used for the request.
    TemplateId string
    Unique ocid of the template.
    namespace String
    The Logging Analytics namespace used for the request.
    templateId String
    Unique ocid of the template.
    namespace string
    The Logging Analytics namespace used for the request.
    templateId string
    Unique ocid of the template.
    namespace str
    The Logging Analytics namespace used for the request.
    template_id str
    Unique ocid of the template.
    namespace String
    The Logging Analytics namespace used for the request.
    templateId String
    Unique ocid of the template.

    getNamespaceTemplate Result

    The following output properties are available:

    CompartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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<GetNamespaceTemplateFacet>
    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 provider-assigned unique ID for this managed resource.
    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.
    Namespace string
    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 current state of the template.
    TemplateId string
    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.
    CompartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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 []GetNamespaceTemplateFacet
    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 provider-assigned unique ID for this managed resource.
    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.
    Namespace string
    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 current state of the template.
    TemplateId string
    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.
    compartmentId String
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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<GetNamespaceTemplateFacet>
    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 provider-assigned unique ID for this managed resource.
    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.
    namespace String
    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 current state of the template.
    templateId String
    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.
    compartmentId string
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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 GetNamespaceTemplateFacet[]
    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 provider-assigned unique ID for this managed resource.
    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.
    namespace string
    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 current state of the template.
    templateId string
    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.
    compartment_id str
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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[GetNamespaceTemplateFacet]
    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 provider-assigned unique ID for this managed resource.
    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.
    namespace str
    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 current state of the template.
    template_id str
    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.
    compartmentId String
    Compartment Identifier [OCID] (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    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 provider-assigned unique ID for this managed resource.
    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.
    namespace String
    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 current state of the template.
    templateId String
    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.

    Supporting Types

    GetNamespaceTemplateFacet

    Name string
    The template name.
    Value string
    The facet value.
    Name string
    The template name.
    Value string
    The facet value.
    name String
    The template name.
    value String
    The facet value.
    name string
    The template name.
    value string
    The facet value.
    name str
    The template name.
    value str
    The facet value.
    name String
    The template name.
    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