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

nomad.getNamespace

Start a Neo task
Explain and create a nomad.getNamespace resource
nomad logo
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",
    });
    
    import pulumi
    import pulumi_nomad as nomad
    
    namespaces = nomad.get_namespace(name="default")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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)
    public static Output<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
    
    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:

    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 List<string>
    Default string
    Denieds List<string>
    Alloweds []string
    Default string
    Denieds []string
    alloweds List<String>
    default_ String
    denieds List<String>
    alloweds string[]
    default string
    denieds string[]
    alloweds Sequence[str]
    default str
    denieds Sequence[str]
    alloweds List<String>
    default String
    denieds 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 logo
    Nomad v2.5.0 published on Thursday, Apr 17, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate