Nomad v2.3.2 published on Wednesday, Aug 14, 2024 by Pulumi
nomad.getNamespace
Explore with Pulumi AI
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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: nomad:index/getNamespace:getNamespace
  arguments:
    # arguments dictionaryThe 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<GetNamespace Capability> 
- (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
- NodePool List<GetConfigs Namespace Node Pool Config> 
- Quota string
- (string)- The quota associated with the namespace.
- Capabilities
[]GetNamespace Capability 
- (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
- NodePool []GetConfigs Namespace Node Pool Config 
- Quota string
- (string)- The quota associated with the namespace.
- capabilities
List<GetNamespace Capability> 
- (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
- nodePool List<GetConfigs Namespace Node Pool Config> 
- quota String
- (string)- The quota associated with the namespace.
- capabilities
GetNamespace Capability[] 
- (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
- nodePool GetConfigs Namespace Node Pool Config[] 
- quota string
- (string)- The quota associated with the namespace.
- capabilities
Sequence[GetNamespace Capability] 
- (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_ Sequence[Getconfigs Namespace Node Pool Config] 
- 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
- nodePool List<Property Map>Configs 
- quota String
- (string)- The quota associated with the namespace.
Supporting Types
GetNamespaceCapability  
- DisabledTask List<string>Drivers 
- ([]string)- Task drivers disabled for the namespace.
- EnabledTask List<string>Drivers 
- ([]string)- Task drivers enabled for the namespace.
- DisabledTask []stringDrivers 
- ([]string)- Task drivers disabled for the namespace.
- EnabledTask []stringDrivers 
- ([]string)- Task drivers enabled for the namespace.
- disabledTask List<String>Drivers 
- ([]string)- Task drivers disabled for the namespace.
- enabledTask List<String>Drivers 
- ([]string)- Task drivers enabled for the namespace.
- disabledTask string[]Drivers 
- ([]string)- Task drivers disabled for the namespace.
- enabledTask string[]Drivers 
- ([]string)- Task drivers enabled for the namespace.
- disabled_task_ Sequence[str]drivers 
- ([]string)- Task drivers disabled for the namespace.
- enabled_task_ Sequence[str]drivers 
- ([]string)- Task drivers enabled for the namespace.
- disabledTask List<String>Drivers 
- ([]string)- Task drivers disabled for the namespace.
- enabledTask List<String>Drivers 
- ([]string)- Task drivers enabled for the namespace.
GetNamespaceNodePoolConfig    
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the nomadTerraform Provider.