1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. cr
  5. NameSpace
bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus
bytepluscc logo
bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus

    命名空间是 OCI 制品仓库的集合,管理多个具有关联属性的 OCI 制品仓库。命名空间的名称通常为企业内部的组织团队名称、产品项目名称或个人自定义名称。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const namespaceDemo = new bytepluscc.cr.NameSpace("NamespaceDemo", {
        registry: "test",
        name: "testnamespace",
        project: "default",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    namespace_demo = bytepluscc.cr.NameSpace("NamespaceDemo",
        registry="test",
        name="testnamespace",
        project="default")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/cr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cr.NewNameSpace(ctx, "NamespaceDemo", &cr.NameSpaceArgs{
    			Registry: pulumi.String("test"),
    			Name:     pulumi.String("testnamespace"),
    			Project:  pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var namespaceDemo = new Bytepluscc.Cr.NameSpace("NamespaceDemo", new()
        {
            Registry = "test",
            Name = "testnamespace",
            Project = "default",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.cr.NameSpace;
    import com.byteplus.bytepluscc.cr.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 namespaceDemo = new NameSpace("namespaceDemo", NameSpaceArgs.builder()
                .registry("test")
                .name("testnamespace")
                .project("default")
                .build());
    
        }
    }
    
    resources:
      namespaceDemo:
        type: bytepluscc:cr:NameSpace
        name: NamespaceDemo
        properties:
          registry: test
          name: testnamespace
          project: default
    

    Create NameSpace Resource

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

    Constructor syntax

    new NameSpace(name: string, args: NameSpaceArgs, opts?: CustomResourceOptions);
    @overload
    def NameSpace(resource_name: str,
                  args: NameSpaceArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def NameSpace(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  name: Optional[str] = None,
                  registry: Optional[str] = None,
                  project: Optional[str] = None)
    func NewNameSpace(ctx *Context, name string, args NameSpaceArgs, opts ...ResourceOption) (*NameSpace, error)
    public NameSpace(string name, NameSpaceArgs args, CustomResourceOptions? opts = null)
    public NameSpace(String name, NameSpaceArgs args)
    public NameSpace(String name, NameSpaceArgs args, CustomResourceOptions options)
    
    type: bytepluscc:cr:NameSpace
    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 NameSpaceArgs
    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 NameSpaceArgs
    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 NameSpaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NameSpaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NameSpaceArgs
    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 nameSpaceResource = new Bytepluscc.Cr.NameSpace("nameSpaceResource", new()
    {
        Name = "string",
        Registry = "string",
        Project = "string",
    });
    
    example, err := cr.NewNameSpace(ctx, "nameSpaceResource", &cr.NameSpaceArgs{
    	Name:     pulumi.String("string"),
    	Registry: pulumi.String("string"),
    	Project:  pulumi.String("string"),
    })
    
    var nameSpaceResource = new NameSpace("nameSpaceResource", NameSpaceArgs.builder()
        .name("string")
        .registry("string")
        .project("string")
        .build());
    
    name_space_resource = bytepluscc.cr.NameSpace("nameSpaceResource",
        name="string",
        registry="string",
        project="string")
    
    const nameSpaceResource = new bytepluscc.cr.NameSpace("nameSpaceResource", {
        name: "string",
        registry: "string",
        project: "string",
    });
    
    type: bytepluscc:cr:NameSpace
    properties:
        name: string
        project: string
        registry: string
    

    NameSpace 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 NameSpace resource accepts the following input properties:

    Name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    Registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    Project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    Name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    Registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    Project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    name String
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    registry String
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    project String
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    name str
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    registry str
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    project str
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    name String
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    registry String
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    project String
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。

    Outputs

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

    CreatedTime string
    命名空间的创建时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedTime string
    命名空间的创建时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    createdTime String
    命名空间的创建时间。
    id String
    The provider-assigned unique ID for this managed resource.
    createdTime string
    命名空间的创建时间。
    id string
    The provider-assigned unique ID for this managed resource.
    created_time str
    命名空间的创建时间。
    id str
    The provider-assigned unique ID for this managed resource.
    createdTime String
    命名空间的创建时间。
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NameSpace Resource

    Get an existing NameSpace 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?: NameSpaceState, opts?: CustomResourceOptions): NameSpace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_time: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            registry: Optional[str] = None) -> NameSpace
    func GetNameSpace(ctx *Context, name string, id IDInput, state *NameSpaceState, opts ...ResourceOption) (*NameSpace, error)
    public static NameSpace Get(string name, Input<string> id, NameSpaceState? state, CustomResourceOptions? opts = null)
    public static NameSpace get(String name, Output<String> id, NameSpaceState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:cr:NameSpace    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:
    CreatedTime string
    命名空间的创建时间。
    Name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    Project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    Registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    CreatedTime string
    命名空间的创建时间。
    Name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    Project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    Registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    createdTime String
    命名空间的创建时间。
    name String
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    project String
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    registry String
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    createdTime string
    命名空间的创建时间。
    name string
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    project string
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    registry string
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    created_time str
    命名空间的创建时间。
    name str
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    project str
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    registry str
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。
    createdTime String
    命名空间的创建时间。
    name String
    命名空间名称。支持小写英文、数字、英文句号(.)、短划线(-)、下划线(_),标点符号不能出现在首位或末位,也不能连续输入。长度限制为 2~90 个字符。标准版实例:同一个镜像仓库实例下,名称必须唯一。体验版实例:同一地域下,所有账号范围内的命名空间名称需要保持唯一。如果您设置的命名空间名称已被占用,请尝试其他名称或者 购买标准版实例。
    project String
    命名空间所属项目的名称。参数值大小写敏感,不得超过 64 个字符。参数为空时,命名空间关联默认的 default项目。
    registry String
    指定的镜像仓库实例名称。通过 ListRegistries 或在 镜像仓库控制台 的 实例列表页面获取。

    Import

    $ pulumi import bytepluscc:cr/nameSpace:NameSpace example "registry|name"
    

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    bytepluscc v0.0.11 published on Wednesday, Jan 21, 2026 by Byteplus
      Meet Neo: Your AI Platform Teammate