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 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<Get
Namespace 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
- Node
Pool List<GetConfigs Namespace Node Pool Config> - Quota string
(string)
- The quota associated with the namespace.
- Capabilities
[]Get
Namespace 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
- Node
Pool []GetConfigs Namespace Node Pool Config - Quota string
(string)
- The quota associated with the namespace.
- capabilities
List<Get
Namespace 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
- node
Pool List<GetConfigs Namespace Node Pool Config> - quota String
(string)
- The quota associated with the namespace.
- capabilities
Get
Namespace 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
- node
Pool GetConfigs Namespace Node Pool Config[] - quota string
(string)
- The quota associated with the namespace.
- capabilities
Sequence[Get
Namespace 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
- node
Pool List<Property Map>Configs - quota String
(string)
- The quota associated with the namespace.
Supporting Types
GetNamespaceCapability
- Disabled
Task List<string>Drivers ([]string)
- Task drivers disabled for the namespace.- Enabled
Task List<string>Drivers ([]string)
- Task drivers enabled for the namespace.
- Disabled
Task []stringDrivers ([]string)
- Task drivers disabled for the namespace.- Enabled
Task []stringDrivers ([]string)
- Task drivers enabled for the namespace.
- disabled
Task List<String>Drivers ([]string)
- Task drivers disabled for the namespace.- enabled
Task List<String>Drivers ([]string)
- Task drivers enabled for the namespace.
- disabled
Task string[]Drivers ([]string)
- Task drivers disabled for the namespace.- enabled
Task 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.
- disabled
Task List<String>Drivers ([]string)
- Task drivers disabled for the namespace.- enabled
Task 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
nomad
Terraform Provider.