Oracle Cloud Infrastructure

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

getNamespace

This data source provides details about a specific Namespace resource in Oracle Cloud Infrastructure Object Storage service.

Each Oracle Cloud Infrastructure tenant is assigned one unique and uneditable Object Storage namespace. The namespace is a system-generated string assigned during account creation. For some older tenancies, the namespace string may be the tenancy name in all lower-case letters. You cannot edit a namespace.

GetNamespace returns the name of the Object Storage namespace for the user making the request. If an optional compartmentId query parameter is provided, GetNamespace returns the namespace name of the corresponding tenancy, provided the user has access to it.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testNamespace = Output.Create(Oci.ObjectStorage.GetNamespace.InvokeAsync(new Oci.ObjectStorage.GetNamespaceArgs
        {
            CompartmentId = @var.Compartment_id,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/ObjectStorage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ObjectStorage.GetNamespace(ctx, &objectstorage.GetNamespaceArgs{
			CompartmentId: pulumi.StringRef(_var.Compartment_id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_namespace = oci.ObjectStorage.get_namespace(compartment_id=var["compartment_id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testNamespace = oci.ObjectStorage.getNamespace({
    compartmentId: _var.compartment_id,
});

Coming soon!

Using getNamespace

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 getNamespace(args: GetNamespaceArgs, opts?: InvokeOptions): Promise<GetNamespaceResult>
function getNamespaceOutput(args: GetNamespaceOutputArgs, opts?: InvokeOptions): Output<GetNamespaceResult>
def get_namespace(compartment_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetNamespaceResult
def get_namespace_output(compartment_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceResult]
func GetNamespace(ctx *Context, args *GetNamespaceArgs, opts ...InvokeOption) (*GetNamespaceResult, error)
func GetNamespaceOutput(ctx *Context, args *GetNamespaceOutputArgs, opts ...InvokeOption) GetNamespaceResultOutput

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

public static class GetNamespace 
{
    public static Task<GetNamespaceResult> InvokeAsync(GetNamespaceArgs args, InvokeOptions? opts = null)
    public static Output<GetNamespaceResult> Invoke(GetNamespaceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:ObjectStorage/getNamespace:getNamespace
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

CompartmentId string

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

compartmentId String

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

compartmentId string

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

compartment_id str

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

compartmentId String

This is an optional field representing either the tenancy OCID or the compartment OCID within the tenancy whose Object Storage namespace is to be retrieved.

getNamespace Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Namespace string

(Computed) The name of the user's namespace.

CompartmentId string
Id string

The provider-assigned unique ID for this managed resource.

Namespace string

(Computed) The name of the user's namespace.

CompartmentId string
id String

The provider-assigned unique ID for this managed resource.

namespace String

(Computed) The name of the user's namespace.

compartmentId String
id string

The provider-assigned unique ID for this managed resource.

namespace string

(Computed) The name of the user's namespace.

compartmentId string
id str

The provider-assigned unique ID for this managed resource.

namespace str

(Computed) The name of the user's namespace.

compartment_id str
id String

The provider-assigned unique ID for this managed resource.

namespace String

(Computed) The name of the user's namespace.

compartmentId String

Package Details

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

This Pulumi package is based on the oci Terraform Provider.