1. Packages
  2. Nomad Provider
  3. API Docs
  4. getNamespace
Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi

nomad.getNamespace

Explore with Pulumi AI

Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi

Get information about a namespace in Nomad.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const namespaces = nomad.getNamespace({
    name: "default",
});
Copy
import pulumi
import pulumi_nomad as nomad

namespaces = nomad.get_namespace(name="default")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.LookupNamespace(ctx, &nomad.LookupNamespaceArgs{
			Name: "default",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var namespaces = Nomad.GetNamespace.Invoke(new()
    {
        Name = "default",
    });

});
Copy
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());

    }
}
Copy
variables:
  namespaces:
    fn::invoke:
      function: nomad:getNamespace
      arguments:
        name: default
Copy

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>
Copy
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]
Copy
func LookupNamespace(ctx *Context, args *LookupNamespaceArgs, opts ...InvokeOption) (*LookupNamespaceResult, error)
func LookupNamespaceOutput(ctx *Context, args *LookupNamespaceOutputArgs, opts ...InvokeOption) LookupNamespaceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
public static Output<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nomad:index/getNamespace:getNamespace
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
(string) - The name of the namespace.
Name This property is required. string
(string) - The name of the namespace.
name This property is required. String
(string) - The name of the namespace.
name This property is required. string
(string) - The name of the namespace.
name This property is required. str
(string) - The name of the namespace.
name This property is required. String
(string) - The name of the namespace.

getNamespace Result

The following output properties are available:

Capabilities List<GetNamespaceCapability>
(block) - Capabilities of the namespace
Description string
(string) - The description of the namespace.
Id string
The provider-assigned unique ID for this managed resource.
Meta Dictionary<string, string>
(map[string]string) - Arbitrary KV metadata associated with the namespace.
Name string
NodePoolConfigs List<GetNamespaceNodePoolConfig>
Quota string
(string) - The quota associated with the namespace.
Capabilities []GetNamespaceCapability
(block) - Capabilities of the namespace
Description string
(string) - The description of the namespace.
Id string
The provider-assigned unique ID for this managed resource.
Meta map[string]string
(map[string]string) - Arbitrary KV metadata associated with the namespace.
Name string
NodePoolConfigs []GetNamespaceNodePoolConfig
Quota string
(string) - The quota associated with the namespace.
capabilities List<GetNamespaceCapability>
(block) - Capabilities of the namespace
description String
(string) - The description of the namespace.
id String
The provider-assigned unique ID for this managed resource.
meta Map<String,String>
(map[string]string) - Arbitrary KV metadata associated with the namespace.
name String
nodePoolConfigs List<GetNamespaceNodePoolConfig>
quota String
(string) - The quota associated with the namespace.
capabilities GetNamespaceCapability[]
(block) - Capabilities of the namespace
description string
(string) - The description of the namespace.
id string
The provider-assigned unique ID for this managed resource.
meta {[key: string]: string}
(map[string]string) - Arbitrary KV metadata associated with the namespace.
name string
nodePoolConfigs GetNamespaceNodePoolConfig[]
quota string
(string) - The quota associated with the namespace.
capabilities Sequence[GetNamespaceCapability]
(block) - Capabilities of the namespace
description str
(string) - The description of the namespace.
id str
The provider-assigned unique ID for this managed resource.
meta Mapping[str, str]
(map[string]string) - Arbitrary KV metadata associated with the namespace.
name str
node_pool_configs Sequence[GetNamespaceNodePoolConfig]
quota str
(string) - The quota associated with the namespace.
capabilities List<Property Map>
(block) - Capabilities of the namespace
description String
(string) - The description of the namespace.
id String
The provider-assigned unique ID for this managed resource.
meta Map<String>
(map[string]string) - Arbitrary KV metadata associated with the namespace.
name String
nodePoolConfigs List<Property Map>
quota String
(string) - The quota associated with the namespace.

Supporting Types

GetNamespaceCapability

DisabledTaskDrivers List<string>
([]string) - Task drivers disabled for the namespace.
EnabledTaskDrivers List<string>
([]string) - Task drivers enabled for the namespace.
DisabledTaskDrivers []string
([]string) - Task drivers disabled for the namespace.
EnabledTaskDrivers []string
([]string) - Task drivers enabled for the namespace.
disabledTaskDrivers List<String>
([]string) - Task drivers disabled for the namespace.
enabledTaskDrivers List<String>
([]string) - Task drivers enabled for the namespace.
disabledTaskDrivers string[]
([]string) - Task drivers disabled for the namespace.
enabledTaskDrivers string[]
([]string) - Task drivers enabled for the namespace.
disabled_task_drivers Sequence[str]
([]string) - Task drivers disabled for the namespace.
enabled_task_drivers Sequence[str]
([]string) - Task drivers enabled for the namespace.
disabledTaskDrivers List<String>
([]string) - Task drivers disabled for the namespace.
enabledTaskDrivers List<String>
([]string) - Task drivers enabled for the namespace.

GetNamespaceNodePoolConfig

Alloweds This property is required. List<string>
Default This property is required. string
Denieds This property is required. List<string>
Alloweds This property is required. []string
Default This property is required. string
Denieds This property is required. []string
alloweds This property is required. List<String>
default_ This property is required. String
denieds This property is required. List<String>
alloweds This property is required. string[]
default This property is required. string
denieds This property is required. string[]
alloweds This property is required. Sequence[str]
default This property is required. str
denieds This property is required. Sequence[str]
alloweds This property is required. List<String>
default This property is required. String
denieds This property is required. List<String>

Package Details

Repository
HashiCorp Nomad pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.
Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi