oci.LogAnalytics.getNamespaces
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 Logging Analytics.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testNamespaces = Oci.LogAnalytics.GetNamespaces.Invoke(new()
{
CompartmentId = @var.Compartment_id,
});
});
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.GetNamespaces(ctx, &loganalytics.GetNamespacesArgs{
CompartmentId: _var.Compartment_id,
}, 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.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(var_.compartment_id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_namespaces = oci.LogAnalytics.get_namespaces(compartment_id=var["compartment_id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNamespaces = oci.LogAnalytics.getNamespaces({
compartmentId: _var.compartment_id,
});
variables:
testNamespaces:
fn::invoke:
Function: oci:LogAnalytics:getNamespaces
Arguments:
compartmentId: ${var.compartment_id}
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[_loganalytics.GetNamespacesFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespacesResult
def get_namespaces_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_loganalytics.GetNamespacesFilterArgs]]]] = 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:LogAnalytics/getNamespaces:getNamespaces
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string The ID of the compartment in which to list resources.
- Filters
List<Get
Namespaces Filter>
- Compartment
Id string The ID of the compartment in which to list resources.
- Filters
[]Get
Namespaces Filter
- compartment
Id String The ID of the compartment in which to list resources.
- filters
List<Get
Namespaces Filter>
- compartment
Id string The ID of the compartment in which to list resources.
- filters
Get
Namespaces Filter[]
- compartment_
id str The ID of the compartment in which to list resources.
- filters
Get
Namespaces Filter]
- compartment
Id String The ID of the compartment in which to list resources.
- filters List<Property Map>
getNamespaces Result
The following output properties are available:
- Compartment
Id string The 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>
- Compartment
Id string The 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
- compartment
Id String The 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>
- compartment
Id string The 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[]
- compartment_
id str The is the tenancy ID
- id str
The provider-assigned unique ID for this managed resource.
- namespace_
collections GetNamespaces Namespace Collection] The list of namespace_collection.
- filters
Get
Namespaces Filter]
- compartment
Id String The 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>
Supporting Types
GetNamespacesFilter
GetNamespacesNamespaceCollection
GetNamespacesNamespaceCollectionItem
- Compartment
Id string The ID of the compartment in which to list resources.
- Is
Onboarded bool This indicates if the tenancy is onboarded to Logging Analytics
- Namespace string
This is the namespace name of a tenancy
- Compartment
Id string The ID of the compartment in which to list resources.
- Is
Onboarded bool This indicates if the tenancy is onboarded to Logging Analytics
- Namespace string
This is the namespace name of a tenancy
- compartment
Id String The ID of the compartment in which to list resources.
- is
Onboarded Boolean This indicates if the tenancy is onboarded to Logging Analytics
- namespace String
This is the namespace name of a tenancy
- compartment
Id string The ID of the compartment in which to list resources.
- is
Onboarded boolean This indicates if the tenancy is onboarded to Logging Analytics
- namespace string
This is the namespace name of a tenancy
- compartment_
id str The ID of the compartment in which to list resources.
- is_
onboarded bool This indicates if the tenancy is onboarded to Logging Analytics
- namespace str
This is the namespace name of a tenancy
- compartment
Id String The ID of the compartment in which to list resources.
- is
Onboarded Boolean This indicates if the tenancy is onboarded to Logging Analytics
- namespace String
This is the namespace name of a tenancy
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.