Viewing docs for Oracle Cloud Infrastructure v4.5.1
published on Friday, Apr 3, 2026 by Pulumi
published on Friday, Apr 3, 2026 by Pulumi
Viewing docs for Oracle Cloud Infrastructure v4.5.1
published on Friday, Apr 3, 2026 by Pulumi
published on Friday, Apr 3, 2026 by Pulumi
This data source provides the list of Namespaces in Oracle Cloud Infrastructure Log Analytics service.
Given a tenancy OCID, this API returns the namespace of the tenancy if it is valid and subscribed to the region. The result also indicates if the tenancy is onboarded with Log Analytics.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNamespaces = oci.LogAnalytics.getNamespaces({
compartmentId: compartmentId,
isCompartmentDelete: namespaceIsCompartmentDelete,
});
import pulumi
import pulumi_oci as oci
test_namespaces = oci.LogAnalytics.get_namespaces(compartment_id=compartment_id,
is_compartment_delete=namespace_is_compartment_delete)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/loganalytics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := loganalytics.GetNamespaces(ctx, &loganalytics.GetNamespacesArgs{
CompartmentId: compartmentId,
IsCompartmentDelete: pulumi.BoolRef(namespaceIsCompartmentDelete),
}, 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 testNamespaces = Oci.LogAnalytics.GetNamespaces.Invoke(new()
{
CompartmentId = compartmentId,
IsCompartmentDelete = namespaceIsCompartmentDelete,
});
});
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.GetNamespacesArgs;
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 testNamespaces = LogAnalyticsFunctions.getNamespaces(GetNamespacesArgs.builder()
.compartmentId(compartmentId)
.isCompartmentDelete(namespaceIsCompartmentDelete)
.build());
}
}
variables:
testNamespaces:
fn::invoke:
function: oci:LogAnalytics:getNamespaces
arguments:
compartmentId: ${compartmentId}
isCompartmentDelete: ${namespaceIsCompartmentDelete}
Using getNamespaces
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 getNamespaces(args: GetNamespacesArgs, opts?: InvokeOptions): Promise<GetNamespacesResult>
function getNamespacesOutput(args: GetNamespacesOutputArgs, opts?: InvokeOptions): Output<GetNamespacesResult>def get_namespaces(compartment_id: Optional[str] = None,
filters: Optional[Sequence[GetNamespacesFilter]] = None,
is_compartment_delete: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespacesResult
def get_namespaces_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNamespacesFilterArgs]]]] = None,
is_compartment_delete: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNamespacesResult]func GetNamespaces(ctx *Context, args *GetNamespacesArgs, opts ...InvokeOption) (*GetNamespacesResult, error)
func GetNamespacesOutput(ctx *Context, args *GetNamespacesOutputArgs, opts ...InvokeOption) GetNamespacesResultOutput> Note: This function is named GetNamespaces in the Go SDK.
public static class GetNamespaces
{
public static Task<GetNamespacesResult> InvokeAsync(GetNamespacesArgs args, InvokeOptions? opts = null)
public static Output<GetNamespacesResult> Invoke(GetNamespacesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespacesResult> getNamespaces(GetNamespacesArgs args, InvokeOptions options)
public static Output<GetNamespacesResult> getNamespaces(GetNamespacesArgs args, InvokeOptions options)
fn::invoke:
function: oci:LogAnalytics/getNamespaces:getNamespaces
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
List<Get
Namespaces Filter> - Is
Compartment boolDelete - if true, the request is from compartment delete service.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
[]Get
Namespaces Filter - Is
Compartment boolDelete - if true, the request is from compartment delete service.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters
List<Get
Namespaces Filter> - is
Compartment BooleanDelete - if true, the request is from compartment delete service.
- compartment
Id string - The ID of the compartment in which to list resources.
- filters
Get
Namespaces Filter[] - is
Compartment booleanDelete - if true, the request is from compartment delete service.
- compartment_
id str - The ID of the compartment in which to list resources.
- filters
Sequence[Get
Namespaces Filter] - is_
compartment_ booldelete - if true, the request is from compartment delete service.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters List<Property Map>
- is
Compartment BooleanDelete - if true, the request is from compartment delete service.
getNamespaces Result
The following output properties are available:
- Compartment
Id string - This is the tenancy ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Collections List<GetNamespaces Namespace Collection> - The list of namespace_collection.
- Filters
List<Get
Namespaces Filter> - Is
Compartment boolDelete
- Compartment
Id string - This is the tenancy ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Collections []GetNamespaces Namespace Collection - The list of namespace_collection.
- Filters
[]Get
Namespaces Filter - Is
Compartment boolDelete
- compartment
Id String - This is the tenancy ID
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Collections List<GetNamespaces Namespace Collection> - The list of namespace_collection.
- filters
List<Get
Namespaces Filter> - is
Compartment BooleanDelete
- compartment
Id string - This is the tenancy ID
- id string
- The provider-assigned unique ID for this managed resource.
- namespace
Collections GetNamespaces Namespace Collection[] - The list of namespace_collection.
- filters
Get
Namespaces Filter[] - is
Compartment booleanDelete
- compartment_
id str - This is the tenancy ID
- id str
- The provider-assigned unique ID for this managed resource.
- namespace_
collections Sequence[GetNamespaces Namespace Collection] - The list of namespace_collection.
- filters
Sequence[Get
Namespaces Filter] - is_
compartment_ booldelete
- compartment
Id String - This is the tenancy ID
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Collections List<Property Map> - The list of namespace_collection.
- filters List<Property Map>
- is
Compartment BooleanDelete
Supporting Types
GetNamespacesFilter
GetNamespacesNamespaceCollection
GetNamespacesNamespaceCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Is
Archiving boolEnabled - This indicates if old data can be archived for a tenancy
- Is
Data boolEver Ingested - This indicates if the tenancy is data ever ingested
- Is
Logset boolEnabled - Is
Onboarded bool - This indicates if the tenancy is onboarded to Log Analytics
- Namespace string
- This is the namespace name of a tenancy
- State string
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
- Compartment
Id string - The ID of the compartment in which to list resources.
- Is
Archiving boolEnabled - This indicates if old data can be archived for a tenancy
- Is
Data boolEver Ingested - This indicates if the tenancy is data ever ingested
- Is
Logset boolEnabled - Is
Onboarded bool - This indicates if the tenancy is onboarded to Log Analytics
- Namespace string
- This is the namespace name of a tenancy
- State string
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
- compartment
Id String - The ID of the compartment in which to list resources.
- is
Archiving BooleanEnabled - This indicates if old data can be archived for a tenancy
- is
Data BooleanEver Ingested - This indicates if the tenancy is data ever ingested
- is
Logset BooleanEnabled - is
Onboarded Boolean - This indicates if the tenancy is onboarded to Log Analytics
- namespace String
- This is the namespace name of a tenancy
- state String
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
- compartment
Id string - The ID of the compartment in which to list resources.
- is
Archiving booleanEnabled - This indicates if old data can be archived for a tenancy
- is
Data booleanEver Ingested - This indicates if the tenancy is data ever ingested
- is
Logset booleanEnabled - is
Onboarded boolean - This indicates if the tenancy is onboarded to Log Analytics
- namespace string
- This is the namespace name of a tenancy
- state string
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
- compartment_
id str - The ID of the compartment in which to list resources.
- is_
archiving_ boolenabled - This indicates if old data can be archived for a tenancy
- is_
data_ boolever_ ingested - This indicates if the tenancy is data ever ingested
- is_
logset_ boolenabled - is_
onboarded bool - This indicates if the tenancy is onboarded to Log Analytics
- namespace str
- This is the namespace name of a tenancy
- state str
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
- compartment
Id String - The ID of the compartment in which to list resources.
- is
Archiving BooleanEnabled - This indicates if old data can be archived for a tenancy
- is
Data BooleanEver Ingested - This indicates if the tenancy is data ever ingested
- is
Logset BooleanEnabled - is
Onboarded Boolean - This indicates if the tenancy is onboarded to Log Analytics
- namespace String
- This is the namespace name of a tenancy
- state String
- The current state of the compartment.
is_logSet_enabled- This indicates if the tenancy is logSet enable
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Viewing docs for Oracle Cloud Infrastructure v4.5.1
published on Friday, Apr 3, 2026 by Pulumi
published on Friday, Apr 3, 2026 by Pulumi
