HashiCorp Nomad

v0.3.0 published on Tuesday, Sep 27, 2022 by Pulumi

getNamespace

Get information about a namespace in Nomad.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var namespaces = Nomad.GetNamespace.Invoke(new()
    {
        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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
import com.pulumi.nomad.inputs.GetNamespaceArgs;
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 namespaces = NomadFunctions.getNamespace(GetNamespaceArgs.builder()
            .name("default")
            .build());

    }
}
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",
}));
variables:
  namespaces:
    Fn::Invoke:
      Function: nomad:getNamespace
      Arguments:
        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)
}
public static CompletableFuture<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: nomad:index/getNamespace:getNamespace
  Arguments:
    # Arguments dictionary

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 string

(string) - The name of the namespace.

name str

(string) - The name of the namespace.

name String

(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 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
description String
id String

The provider-assigned unique ID for this managed resource.

name String
quota String

Package Details

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

This Pulumi package is based on the nomad Terraform Provider.