Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

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 Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testNamespaces = Output.Create(Oci.LogAnalytics.GetNamespaces.InvokeAsync(new Oci.LogAnalytics.GetNamespacesArgs
        {
            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
	})
}

Coming soon!

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,
});

Coming soon!

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:

CompartmentId string

The ID of the compartment in which to list resources.

Filters List<GetNamespacesFilter>
CompartmentId string

The ID of the compartment in which to list resources.

Filters []GetNamespacesFilter
compartmentId String

The ID of the compartment in which to list resources.

filters List<GetNamespacesFilter>
compartmentId string

The ID of the compartment in which to list resources.

filters GetNamespacesFilter[]
compartment_id str

The ID of the compartment in which to list resources.

filters GetNamespacesFilter]
compartmentId String

The ID of the compartment in which to list resources.

filters List<Property Map>

getNamespaces Result

The following output properties are available:

CompartmentId string

The is the tenancy ID

Id string

The provider-assigned unique ID for this managed resource.

NamespaceCollections List<GetNamespacesNamespaceCollection>

The list of namespace_collection.

Filters List<GetNamespacesFilter>
CompartmentId string

The is the tenancy ID

Id string

The provider-assigned unique ID for this managed resource.

NamespaceCollections []GetNamespacesNamespaceCollection

The list of namespace_collection.

Filters []GetNamespacesFilter
compartmentId String

The is the tenancy ID

id String

The provider-assigned unique ID for this managed resource.

namespaceCollections List<GetNamespacesNamespaceCollection>

The list of namespace_collection.

filters List<GetNamespacesFilter>
compartmentId string

The is the tenancy ID

id string

The provider-assigned unique ID for this managed resource.

namespaceCollections GetNamespacesNamespaceCollection[]

The list of namespace_collection.

filters GetNamespacesFilter[]
compartment_id str

The is the tenancy ID

id str

The provider-assigned unique ID for this managed resource.

namespace_collections GetNamespacesNamespaceCollection]

The list of namespace_collection.

filters GetNamespacesFilter]
compartmentId String

The is the tenancy ID

id String

The provider-assigned unique ID for this managed resource.

namespaceCollections List<Property Map>

The list of namespace_collection.

filters List<Property Map>

Supporting Types

GetNamespacesFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

GetNamespacesNamespaceCollection

GetNamespacesNamespaceCollectionItem

CompartmentId string

The ID of the compartment in which to list resources.

IsOnboarded bool

This indicates if the tenancy is onboarded to Logging Analytics

Namespace string

This is the namespace name of a tenancy

CompartmentId string

The ID of the compartment in which to list resources.

IsOnboarded bool

This indicates if the tenancy is onboarded to Logging Analytics

Namespace string

This is the namespace name of a tenancy

compartmentId String

The ID of the compartment in which to list resources.

isOnboarded Boolean

This indicates if the tenancy is onboarded to Logging Analytics

namespace String

This is the namespace name of a tenancy

compartmentId string

The ID of the compartment in which to list resources.

isOnboarded 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

compartmentId String

The ID of the compartment in which to list resources.

isOnboarded Boolean

This indicates if the tenancy is onboarded to Logging Analytics

namespace String

This is the namespace name of a tenancy

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.