HashiCorp Nomad

v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getNamespace

Get information about a namespace in Nomad.

Example Usage

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var namespaces = Output.Create(Nomad.GetNamespace.InvokeAsync(new Nomad.GetNamespaceArgs
        {
            Name = "default",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.LookupNamespace(ctx, &GetNamespaceArgs{
			Name: "default",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_nomad as nomad

namespaces = nomad.get_namespace(name="default")
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const namespaces = pulumi.output(nomad.getNamespace({
    name: "default",
}));

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(name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetNamespaceResult
def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceResult]
func LookupNamespace(ctx *Context, args *LookupNamespaceArgs, opts ...InvokeOption) (*LookupNamespaceResult, error)
func LookupNamespaceOutput(ctx *Context, args *LookupNamespaceOutputArgs, opts ...InvokeOption) LookupNamespaceResultOutput

> Note: This function is named LookupNamespace 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)
}

The following arguments are supported:

Name string
(string) - The name of the namespace.
Name string
(string) - The name of the namespace.
name string
(string) - The name of the namespace.
name str
(string) - The name of the namespace.

getNamespace Result

The following output properties are available:

Description string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Quota string
Description string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Quota string
description string
id string
The provider-assigned unique ID for this managed resource.
name string
quota string
description str
id str
The provider-assigned unique ID for this managed resource.
name str
quota str

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.