oci.LogAnalytics.Namespace
This resource provides the Namespace resource in Oracle Cloud Infrastructure Log Analytics service.
Onboards a tenancy with Log Analytics or Offboards a tenancy from Log Analytics functionality.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testNamespace = new Oci.LogAnalytics.Namespace("testNamespace", new()
{
CompartmentId = @var.Compartment_id,
IsOnboarded = @var.Is_onboarded,
NamespaceName = @var.Namespace_namespace,
});
});
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.NewNamespace(ctx, "testNamespace", &LogAnalytics.NamespaceArgs{
CompartmentId: pulumi.Any(_var.Compartment_id),
IsOnboarded: pulumi.Any(_var.Is_onboarded),
Namespace: pulumi.Any(_var.Namespace_namespace),
})
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.Namespace;
import com.pulumi.oci.LogAnalytics.NamespaceArgs;
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) {
var testNamespace = new Namespace("testNamespace", NamespaceArgs.builder()
.compartmentId(var_.compartment_id())
.isOnboarded(var_.is_onboarded())
.namespace(var_.namespace_namespace())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_namespace = oci.log_analytics.Namespace("testNamespace",
compartment_id=var["compartment_id"],
is_onboarded=var["is_onboarded"],
namespace=var["namespace_namespace"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNamespace = new oci.loganalytics.Namespace("testNamespace", {
compartmentId: _var.compartment_id,
isOnboarded: _var.is_onboarded,
namespace: _var.namespace_namespace,
});
resources:
testNamespace:
type: oci:LogAnalytics:Namespace
properties:
#Required
compartmentId: ${var.compartment_id}
isOnboarded: ${var.is_onboarded}
namespace: ${var.namespace_namespace}
Create Namespace Resource
new Namespace(name: string, args: NamespaceArgs, opts?: CustomResourceOptions);
@overload
def Namespace(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
is_onboarded: Optional[bool] = None,
namespace: Optional[str] = None)
@overload
def Namespace(resource_name: str,
args: NamespaceArgs,
opts: Optional[ResourceOptions] = None)
func NewNamespace(ctx *Context, name string, args NamespaceArgs, opts ...ResourceOption) (*Namespace, error)
public Namespace(string name, NamespaceArgs args, CustomResourceOptions? opts = null)
public Namespace(String name, NamespaceArgs args)
public Namespace(String name, NamespaceArgs args, CustomResourceOptions options)
type: oci:LogAnalytics:Namespace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Namespace Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Namespace resource accepts the following input properties:
- Compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- Is
Onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- Namespace
Name string The Log Analytics namespace used for the request.
- Compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- Is
Onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- Namespace string
The Log Analytics namespace used for the request.
- compartment
Id String The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded Boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace String
The Log Analytics namespace used for the request.
- compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace string
The Log Analytics namespace used for the request.
- compartment_
id str The OCID of the root compartment i.e. OCID of the tenancy.
- is_
onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace str
The Log Analytics namespace used for the request.
- compartment
Id String The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded Boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace String
The Log Analytics namespace used for the request.
Outputs
All input properties are implicitly available as output properties. Additionally, the Namespace resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Namespace Resource
Get an existing Namespace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NamespaceState, opts?: CustomResourceOptions): Namespace
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
is_onboarded: Optional[bool] = None,
namespace: Optional[str] = None) -> Namespace
func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)
public static Namespace Get(string name, Input<string> id, NamespaceState? state, CustomResourceOptions? opts = null)
public static Namespace get(String name, Output<String> id, NamespaceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- Is
Onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- Namespace
Name string The Log Analytics namespace used for the request.
- Compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- Is
Onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- Namespace string
The Log Analytics namespace used for the request.
- compartment
Id String The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded Boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace String
The Log Analytics namespace used for the request.
- compartment
Id string The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace string
The Log Analytics namespace used for the request.
- compartment_
id str The OCID of the root compartment i.e. OCID of the tenancy.
- is_
onboarded bool Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace str
The Log Analytics namespace used for the request.
- compartment
Id String The OCID of the root compartment i.e. OCID of the tenancy.
- is
Onboarded Boolean Use
true
if tenancy is to be onboarded to logging analytics andfalse
if tenancy is to be offboarded- namespace String
The Log Analytics namespace used for the request.
Import
Namespace can be imported using the namespace
, e.g.
$ pulumi import oci:LogAnalytics/namespace:Namespace test_namespace "namespace"
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.