1. Packages
  2. Ibm Provider
  3. API Docs
  4. getFunctionNamespace
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getFunctionNamespace

Explore with Pulumi AI

Import the details of an existing IBM Cloud Functions namespace. For more information, about managing namespace, see managing namespace.

Example Usage

The following example creates the namespace and package at a specific location.

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

const testNamespace = ibm.getFunctionNamespace({
    name: _var.namespace,
});
Copy
import pulumi
import pulumi_ibm as ibm

test_namespace = ibm.get_function_namespace(name=var["namespace"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.LookupFunctionNamespace(ctx, &ibm.LookupFunctionNamespaceArgs{
			Name: _var.Namespace,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var testNamespace = Ibm.GetFunctionNamespace.Invoke(new()
    {
        Name = @var.Namespace,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetFunctionNamespaceArgs;
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 testNamespace = IbmFunctions.getFunctionNamespace(GetFunctionNamespaceArgs.builder()
            .name(var_.namespace())
            .build());

    }
}
Copy
variables:
  testNamespace:
    fn::invoke:
      function: ibm:getFunctionNamespace
      arguments:
        name: ${var.namespace}
Copy

Using getFunctionNamespace

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 getFunctionNamespace(args: GetFunctionNamespaceArgs, opts?: InvokeOptions): Promise<GetFunctionNamespaceResult>
function getFunctionNamespaceOutput(args: GetFunctionNamespaceOutputArgs, opts?: InvokeOptions): Output<GetFunctionNamespaceResult>
Copy
def get_function_namespace(id: Optional[str] = None,
                           name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetFunctionNamespaceResult
def get_function_namespace_output(id: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetFunctionNamespaceResult]
Copy
func LookupFunctionNamespace(ctx *Context, args *LookupFunctionNamespaceArgs, opts ...InvokeOption) (*LookupFunctionNamespaceResult, error)
func LookupFunctionNamespaceOutput(ctx *Context, args *LookupFunctionNamespaceOutputArgs, opts ...InvokeOption) LookupFunctionNamespaceResultOutput
Copy

> Note: This function is named LookupFunctionNamespace in the Go SDK.

public static class GetFunctionNamespace 
{
    public static Task<GetFunctionNamespaceResult> InvokeAsync(GetFunctionNamespaceArgs args, InvokeOptions? opts = null)
    public static Output<GetFunctionNamespaceResult> Invoke(GetFunctionNamespaceInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFunctionNamespaceResult> getFunctionNamespace(GetFunctionNamespaceArgs args, InvokeOptions options)
public static Output<GetFunctionNamespaceResult> getFunctionNamespace(GetFunctionNamespaceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getFunctionNamespace:getFunctionNamespace
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

getFunctionNamespace Result

The following output properties are available:

Description string
Id string
(String) The ID of the namespace.
Location string
(String) The target location of the namespace.
Name string
ResourceGroupId string
(String) The ID of the resource group.
Description string
Id string
(String) The ID of the namespace.
Location string
(String) The target location of the namespace.
Name string
ResourceGroupId string
(String) The ID of the resource group.
description String
id String
(String) The ID of the namespace.
location String
(String) The target location of the namespace.
name String
resourceGroupId String
(String) The ID of the resource group.
description string
id string
(String) The ID of the namespace.
location string
(String) The target location of the namespace.
name string
resourceGroupId string
(String) The ID of the resource group.
description str
id str
(String) The ID of the namespace.
location str
(String) The target location of the namespace.
name str
resource_group_id str
(String) The ID of the resource group.
description String
id String
(String) The ID of the namespace.
location String
(String) The target location of the namespace.
name String
resourceGroupId String
(String) The ID of the resource group.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.