1. Packages
  2. Gcorelabs Provider
  3. API Docs
  4. FaasNamespace
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

gcorelabs.FaasNamespace

Explore with Pulumi AI

gcorelabs logo
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

    Represent FaaS namespace

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const ns = new gcore.index.Gcore_faas_namespace("ns", {
        projectId: 1,
        regionId: 1,
        name: "testns",
        description: "test description",
        envs: {
            BIGENV: "EXAMPLE",
        },
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    ns = gcore.index.Gcore_faas_namespace("ns",
        project_id=1,
        region_id=1,
        name=testns,
        description=test description,
        envs={
            BIGENV: EXAMPLE,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewGcore_faas_namespace(ctx, "ns", &gcore.Gcore_faas_namespaceArgs{
    			ProjectId:   1,
    			RegionId:    1,
    			Name:        "testns",
    			Description: "test description",
    			Envs: map[string]interface{}{
    				"BIGENV": "EXAMPLE",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var ns = new Gcore.Index.Gcore_faas_namespace("ns", new()
        {
            ProjectId = 1,
            RegionId = 1,
            Name = "testns",
            Description = "test description",
            Envs = 
            {
                { "BIGENV", "EXAMPLE" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.gcore_faas_namespace;
    import com.pulumi.gcore.Gcore_faas_namespaceArgs;
    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) {
            var ns = new Gcore_faas_namespace("ns", Gcore_faas_namespaceArgs.builder()
                .projectId(1)
                .regionId(1)
                .name("testns")
                .description("test description")
                .envs(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
        }
    }
    
    resources:
      ns:
        type: gcore:gcore_faas_namespace
        properties:
          projectId: 1
          regionId: 1
          name: testns
          description: test description
          envs:
            BIGENV: EXAMPLE
    

    Create FaasNamespace Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FaasNamespace(name: string, args?: FaasNamespaceArgs, opts?: CustomResourceOptions);
    @overload
    def FaasNamespace(resource_name: str,
                      args: Optional[FaasNamespaceArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def FaasNamespace(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      description: Optional[str] = None,
                      envs: Optional[Mapping[str, str]] = None,
                      faas_namespace_id: Optional[str] = None,
                      name: Optional[str] = None,
                      project_id: Optional[float] = None,
                      project_name: Optional[str] = None,
                      region_id: Optional[float] = None,
                      region_name: Optional[str] = None)
    func NewFaasNamespace(ctx *Context, name string, args *FaasNamespaceArgs, opts ...ResourceOption) (*FaasNamespace, error)
    public FaasNamespace(string name, FaasNamespaceArgs? args = null, CustomResourceOptions? opts = null)
    public FaasNamespace(String name, FaasNamespaceArgs args)
    public FaasNamespace(String name, FaasNamespaceArgs args, CustomResourceOptions options)
    
    type: gcorelabs:FaasNamespace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FaasNamespaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FaasNamespaceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FaasNamespaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FaasNamespaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FaasNamespaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var faasNamespaceResource = new Gcorelabs.FaasNamespace("faasNamespaceResource", new()
    {
        Description = "string",
        Envs = 
        {
            { "string", "string" },
        },
        FaasNamespaceId = "string",
        Name = "string",
        ProjectId = 0,
        ProjectName = "string",
        RegionId = 0,
        RegionName = "string",
    });
    
    example, err := gcorelabs.NewFaasNamespace(ctx, "faasNamespaceResource", &gcorelabs.FaasNamespaceArgs{
    	Description: pulumi.String("string"),
    	Envs: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	FaasNamespaceId: pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	ProjectId:       pulumi.Float64(0),
    	ProjectName:     pulumi.String("string"),
    	RegionId:        pulumi.Float64(0),
    	RegionName:      pulumi.String("string"),
    })
    
    var faasNamespaceResource = new FaasNamespace("faasNamespaceResource", FaasNamespaceArgs.builder()
        .description("string")
        .envs(Map.of("string", "string"))
        .faasNamespaceId("string")
        .name("string")
        .projectId(0)
        .projectName("string")
        .regionId(0)
        .regionName("string")
        .build());
    
    faas_namespace_resource = gcorelabs.FaasNamespace("faasNamespaceResource",
        description="string",
        envs={
            "string": "string",
        },
        faas_namespace_id="string",
        name="string",
        project_id=0,
        project_name="string",
        region_id=0,
        region_name="string")
    
    const faasNamespaceResource = new gcorelabs.FaasNamespace("faasNamespaceResource", {
        description: "string",
        envs: {
            string: "string",
        },
        faasNamespaceId: "string",
        name: "string",
        projectId: 0,
        projectName: "string",
        regionId: 0,
        regionName: "string",
    });
    
    type: gcorelabs:FaasNamespace
    properties:
        description: string
        envs:
            string: string
        faasNamespaceId: string
        name: string
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
    

    FaasNamespace Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FaasNamespace resource accepts the following input properties:

    Description string
    Envs Dictionary<string, string>
    FaasNamespaceId string
    The ID of this resource.
    Name string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Description string
    Envs map[string]string
    FaasNamespaceId string
    The ID of this resource.
    Name string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    description String
    envs Map<String,String>
    faasNamespaceId String
    The ID of this resource.
    name String
    projectId Double
    projectName String
    regionId Double
    regionName String
    description string
    envs {[key: string]: string}
    faasNamespaceId string
    The ID of this resource.
    name string
    projectId number
    projectName string
    regionId number
    regionName string
    description str
    envs Mapping[str, str]
    faas_namespace_id str
    The ID of this resource.
    name str
    project_id float
    project_name str
    region_id float
    region_name str
    description String
    envs Map<String>
    faasNamespaceId String
    The ID of this resource.
    name String
    projectId Number
    projectName String
    regionId Number
    regionName String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FaasNamespace resource produces the following output properties:

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    status String

    Look up Existing FaasNamespace Resource

    Get an existing FaasNamespace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FaasNamespaceState, opts?: CustomResourceOptions): FaasNamespace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            envs: Optional[Mapping[str, str]] = None,
            faas_namespace_id: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            status: Optional[str] = None) -> FaasNamespace
    func GetFaasNamespace(ctx *Context, name string, id IDInput, state *FaasNamespaceState, opts ...ResourceOption) (*FaasNamespace, error)
    public static FaasNamespace Get(string name, Input<string> id, FaasNamespaceState? state, CustomResourceOptions? opts = null)
    public static FaasNamespace get(String name, Output<String> id, FaasNamespaceState state, CustomResourceOptions options)
    resources:  _:    type: gcorelabs:FaasNamespace    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    Description string
    Envs Dictionary<string, string>
    FaasNamespaceId string
    The ID of this resource.
    Name string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Status string
    CreatedAt string
    Description string
    Envs map[string]string
    FaasNamespaceId string
    The ID of this resource.
    Name string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Status string
    createdAt String
    description String
    envs Map<String,String>
    faasNamespaceId String
    The ID of this resource.
    name String
    projectId Double
    projectName String
    regionId Double
    regionName String
    status String
    createdAt string
    description string
    envs {[key: string]: string}
    faasNamespaceId string
    The ID of this resource.
    name string
    projectId number
    projectName string
    regionId number
    regionName string
    status string
    created_at str
    description str
    envs Mapping[str, str]
    faas_namespace_id str
    The ID of this resource.
    name str
    project_id float
    project_name str
    region_id float
    region_name str
    status str
    createdAt String
    description String
    envs Map<String>
    faasNamespaceId String
    The ID of this resource.
    name String
    projectId Number
    projectName String
    regionId Number
    regionName String
    status String

    Import

    import using <project_id>:<region_id>:<namespace_name> format

    $ pulumi import gcorelabs:index/faasNamespace:FaasNamespace test 1:6:ns
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    gcorelabs g-core/terraform-provider-gcorelabs
    License
    Notes
    This Pulumi package is based on the gcorelabs Terraform Provider.
    gcorelabs logo
    gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core