1. Packages
  2. Volcenginecc Provider
  3. API Docs
  4. organization
  5. Unit
volcenginecc v0.0.11 published on Thursday, Dec 4, 2025 by Volcengine
volcenginecc logo
volcenginecc v0.0.11 published on Thursday, Dec 4, 2025 by Volcengine

    企业组织的创建者管理员账号可以新建组织单元来搭建企业的组织结构,对账号进行分组织单元管理。组织单元可以分多个组织单元层级,管理员账号也可属于任意层级的任意组织单元节点。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
    
    const organizationUnitDemo = new volcenginecc.organization.Unit("OrganizationUnitDemo", {
        parentId: "735281472xxxx3651635",
        name: "OrganizationUnitDemo",
        description: "OrganizationUnitDemo description",
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    organization_unit_demo = volcenginecc.organization.Unit("OrganizationUnitDemo",
        parent_id="735281472xxxx3651635",
        name="OrganizationUnitDemo",
        description="OrganizationUnitDemo description")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/organization"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := organization.NewUnit(ctx, "OrganizationUnitDemo", &organization.UnitArgs{
    			ParentId:    pulumi.String("735281472xxxx3651635"),
    			Name:        pulumi.String("OrganizationUnitDemo"),
    			Description: pulumi.String("OrganizationUnitDemo description"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var organizationUnitDemo = new Volcenginecc.Organization.Unit("OrganizationUnitDemo", new()
        {
            ParentId = "735281472xxxx3651635",
            Name = "OrganizationUnitDemo",
            Description = "OrganizationUnitDemo description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.volcengine.volcenginecc.organization.Unit;
    import com.volcengine.volcenginecc.organization.UnitArgs;
    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 organizationUnitDemo = new Unit("organizationUnitDemo", UnitArgs.builder()
                .parentId("735281472xxxx3651635")
                .name("OrganizationUnitDemo")
                .description("OrganizationUnitDemo description")
                .build());
    
        }
    }
    
    resources:
      organizationUnitDemo:
        type: volcenginecc:organization:Unit
        name: OrganizationUnitDemo
        properties:
          parentId: 735281472xxxx3651635
          name: OrganizationUnitDemo
          description: OrganizationUnitDemo description
    

    Create Unit Resource

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

    Constructor syntax

    new Unit(name: string, args: UnitArgs, opts?: CustomResourceOptions);
    @overload
    def Unit(resource_name: str,
             args: UnitArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Unit(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             name: Optional[str] = None,
             parent_id: Optional[str] = None,
             description: Optional[str] = None)
    func NewUnit(ctx *Context, name string, args UnitArgs, opts ...ResourceOption) (*Unit, error)
    public Unit(string name, UnitArgs args, CustomResourceOptions? opts = null)
    public Unit(String name, UnitArgs args)
    public Unit(String name, UnitArgs args, CustomResourceOptions options)
    
    type: volcenginecc:organization:Unit
    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 UnitArgs
    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 UnitArgs
    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 UnitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UnitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UnitArgs
    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 unitResource = new Volcenginecc.Organization.Unit("unitResource", new()
    {
        Name = "string",
        ParentId = "string",
        Description = "string",
    });
    
    example, err := organization.NewUnit(ctx, "unitResource", &organization.UnitArgs{
    	Name:        pulumi.String("string"),
    	ParentId:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var unitResource = new Unit("unitResource", UnitArgs.builder()
        .name("string")
        .parentId("string")
        .description("string")
        .build());
    
    unit_resource = volcenginecc.organization.Unit("unitResource",
        name="string",
        parent_id="string",
        description="string")
    
    const unitResource = new volcenginecc.organization.Unit("unitResource", {
        name: "string",
        parentId: "string",
        description: "string",
    });
    
    type: volcenginecc:organization:Unit
    properties:
        description: string
        name: string
        parentId: string
    

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

    Name string
    组织单元名称。
    ParentId string
    父单元Id。
    Description string
    描述。
    Name string
    组织单元名称。
    ParentId string
    父单元Id。
    Description string
    描述。
    name String
    组织单元名称。
    parentId String
    父单元Id。
    description String
    描述。
    name string
    组织单元名称。
    parentId string
    父单元Id。
    description string
    描述。
    name str
    组织单元名称。
    parent_id str
    父单元Id。
    description str
    描述。
    name String
    组织单元名称。
    parentId String
    父单元Id。
    description String
    描述。

    Outputs

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

    CreatedTime string
    创建时间。
    DeleteUk string
    删除标识。
    DeletedTime string
    删除时间。
    Depth int
    深度。
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    组织ID。
    OrgType int
    组织类型。企业组织: 1
    OrgUnitId string
    组织单元ID。
    Owner string
    管理员ID。
    UpdatedTime string
    更新时间。
    CreatedTime string
    创建时间。
    DeleteUk string
    删除标识。
    DeletedTime string
    删除时间。
    Depth int
    深度。
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    组织ID。
    OrgType int
    组织类型。企业组织: 1
    OrgUnitId string
    组织单元ID。
    Owner string
    管理员ID。
    UpdatedTime string
    更新时间。
    createdTime String
    创建时间。
    deleteUk String
    删除标识。
    deletedTime String
    删除时间。
    depth Integer
    深度。
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    组织ID。
    orgType Integer
    组织类型。企业组织: 1
    orgUnitId String
    组织单元ID。
    owner String
    管理员ID。
    updatedTime String
    更新时间。
    createdTime string
    创建时间。
    deleteUk string
    删除标识。
    deletedTime string
    删除时间。
    depth number
    深度。
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    组织ID。
    orgType number
    组织类型。企业组织: 1
    orgUnitId string
    组织单元ID。
    owner string
    管理员ID。
    updatedTime string
    更新时间。
    created_time str
    创建时间。
    delete_uk str
    删除标识。
    deleted_time str
    删除时间。
    depth int
    深度。
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    组织ID。
    org_type int
    组织类型。企业组织: 1
    org_unit_id str
    组织单元ID。
    owner str
    管理员ID。
    updated_time str
    更新时间。
    createdTime String
    创建时间。
    deleteUk String
    删除标识。
    deletedTime String
    删除时间。
    depth Number
    深度。
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    组织ID。
    orgType Number
    组织类型。企业组织: 1
    orgUnitId String
    组织单元ID。
    owner String
    管理员ID。
    updatedTime String
    更新时间。

    Look up Existing Unit Resource

    Get an existing Unit 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?: UnitState, opts?: CustomResourceOptions): Unit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_time: Optional[str] = None,
            delete_uk: Optional[str] = None,
            deleted_time: Optional[str] = None,
            depth: Optional[int] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            org_type: Optional[int] = None,
            org_unit_id: Optional[str] = None,
            owner: Optional[str] = None,
            parent_id: Optional[str] = None,
            updated_time: Optional[str] = None) -> Unit
    func GetUnit(ctx *Context, name string, id IDInput, state *UnitState, opts ...ResourceOption) (*Unit, error)
    public static Unit Get(string name, Input<string> id, UnitState? state, CustomResourceOptions? opts = null)
    public static Unit get(String name, Output<String> id, UnitState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:organization:Unit    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
    创建时间。
    DeleteUk string
    删除标识。
    DeletedTime string
    删除时间。
    Depth int
    深度。
    Description string
    描述。
    Name string
    组织单元名称。
    OrgId string
    组织ID。
    OrgType int
    组织类型。企业组织: 1
    OrgUnitId string
    组织单元ID。
    Owner string
    管理员ID。
    ParentId string
    父单元Id。
    UpdatedTime string
    更新时间。
    CreatedTime string
    创建时间。
    DeleteUk string
    删除标识。
    DeletedTime string
    删除时间。
    Depth int
    深度。
    Description string
    描述。
    Name string
    组织单元名称。
    OrgId string
    组织ID。
    OrgType int
    组织类型。企业组织: 1
    OrgUnitId string
    组织单元ID。
    Owner string
    管理员ID。
    ParentId string
    父单元Id。
    UpdatedTime string
    更新时间。
    createdTime String
    创建时间。
    deleteUk String
    删除标识。
    deletedTime String
    删除时间。
    depth Integer
    深度。
    description String
    描述。
    name String
    组织单元名称。
    orgId String
    组织ID。
    orgType Integer
    组织类型。企业组织: 1
    orgUnitId String
    组织单元ID。
    owner String
    管理员ID。
    parentId String
    父单元Id。
    updatedTime String
    更新时间。
    createdTime string
    创建时间。
    deleteUk string
    删除标识。
    deletedTime string
    删除时间。
    depth number
    深度。
    description string
    描述。
    name string
    组织单元名称。
    orgId string
    组织ID。
    orgType number
    组织类型。企业组织: 1
    orgUnitId string
    组织单元ID。
    owner string
    管理员ID。
    parentId string
    父单元Id。
    updatedTime string
    更新时间。
    created_time str
    创建时间。
    delete_uk str
    删除标识。
    deleted_time str
    删除时间。
    depth int
    深度。
    description str
    描述。
    name str
    组织单元名称。
    org_id str
    组织ID。
    org_type int
    组织类型。企业组织: 1
    org_unit_id str
    组织单元ID。
    owner str
    管理员ID。
    parent_id str
    父单元Id。
    updated_time str
    更新时间。
    createdTime String
    创建时间。
    deleteUk String
    删除标识。
    deletedTime String
    删除时间。
    depth Number
    深度。
    description String
    描述。
    name String
    组织单元名称。
    orgId String
    组织ID。
    orgType Number
    组织类型。企业组织: 1
    orgUnitId String
    组织单元ID。
    owner String
    管理员ID。
    parentId String
    父单元Id。
    updatedTime String
    更新时间。

    Import

    $ pulumi import volcenginecc:organization/unit:Unit example "org_unit_id"
    

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

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    volcenginecc v0.0.11 published on Thursday, Dec 4, 2025 by Volcengine
      Meet Neo: Your AI Platform Teammate