getNamespaces

Example Usage

Child namespaces

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const children = vault.getNamespaces({});
import pulumi
import pulumi_vault as vault
children = vault.get_namespaces()
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var children = Vault.GetNamespaces.Invoke();
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.GetNamespaces(ctx, &vault.GetNamespacesArgs{}, 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.vault.VaultFunctions;
import com.pulumi.vault.inputs.GetNamespacesArgs;
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 children = VaultFunctions.getNamespaces();
}
}
variables:
children:
fn::invoke:
function: vault:getNamespaces
arguments: {}

Nested namespace

To fetch the details of nested namespaces:

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const children = vault.getNamespaces({
namespace: "parent",
});
const child = .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: vault.getNamespace({
namespace: _arg0_.namespace,
path: __key,
}) }));
import pulumi
import pulumi_vault as vault
children = vault.get_namespaces(namespace="parent")
child = {__key: vault.get_namespace(namespace=children.namespace,
path=__key) for __key, __value in children.paths}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var children = Vault.GetNamespaces.Invoke(new()
{
Namespace = "parent",
});
var child = .ToDictionary(item => {
var __key = item.Key;
return __key;
}, item => {
var __key = item.Key;
return Vault.GetNamespace.Invoke(new()
{
Namespace = _arg0_.Namespace,
Path = __key,
});
});
});

Return

A collection of values returned by getNamespaces.

Parameters

argument

A collection of arguments for invoking getNamespaces.


suspend fun getNamespaces(namespace: String? = null): GetNamespacesResult

Return

A collection of values returned by getNamespaces.

Parameters

namespace

The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.

See also


Return

A collection of values returned by getNamespaces.

Parameters

argument

Builder for com.pulumi.vault.kotlin.inputs.GetNamespacesPlainArgs.

See also