1. Packages
  2. Ibm Provider
  3. API Docs
  4. getFunctionNamespace
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getFunctionNamespace

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_namespace = ibm.get_function_namespace(name=var["namespace"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      testNamespace:
        fn::invoke:
          function: ibm:getFunctionNamespace
          arguments:
            name: ${var.namespace}
    

    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>
    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]
    func LookupFunctionNamespace(ctx *Context, args *LookupFunctionNamespaceArgs, opts ...InvokeOption) (*LookupFunctionNamespaceResult, error)
    func LookupFunctionNamespaceOutput(ctx *Context, args *LookupFunctionNamespaceOutputArgs, opts ...InvokeOption) LookupFunctionNamespaceResultOutput

    > 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)
    }
    public static CompletableFuture<GetFunctionNamespaceResult> getFunctionNamespace(GetFunctionNamespaceArgs args, InvokeOptions options)
    public static Output<GetFunctionNamespaceResult> getFunctionNamespace(GetFunctionNamespaceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getFunctionNamespace:getFunctionNamespace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the namespace.
    Id string
    (String) The ID of the namespace.
    Name string
    The name of the namespace.
    Id string
    (String) The ID of the namespace.
    name String
    The name of the namespace.
    id String
    (String) The ID of the namespace.
    name string
    The name of the namespace.
    id string
    (String) The ID of the namespace.
    name str
    The name of the namespace.
    id str
    (String) The ID of the namespace.
    name 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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud