企业组织的创建者管理员账号可以新建组织单元来搭建企业的组织结构,对账号进行分组织单元管理。组织单元可以分多个组织单元层级,管理员账号也可属于任意层级的任意组织单元节点。
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)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
- 组织单元名称。
- Parent
Id string - 父单元Id。
- Description string
- 描述。
- Name string
- 组织单元名称。
- Parent
Id string - 父单元Id。
- Description string
- 描述。
- name String
- 组织单元名称。
- parent
Id String - 父单元Id。
- description String
- 描述。
- name string
- 组织单元名称。
- parent
Id string - 父单元Id。
- description string
- 描述。
- name str
- 组织单元名称。
- parent_
id str - 父单元Id。
- description str
- 描述。
- name String
- 组织单元名称。
- parent
Id String - 父单元Id。
- description String
- 描述。
Outputs
All input properties are implicitly available as output properties. Additionally, the Unit resource produces the following output properties:
- Created
Time string - 创建时间。
- Delete
Uk string - 删除标识。
- Deleted
Time string - 删除时间。
- Depth int
- 深度。
- Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - 组织ID。
- Org
Type int - 组织类型。企业组织: 1
- Org
Unit stringId - 组织单元ID。
- Owner string
- 管理员ID。
- Updated
Time string - 更新时间。
- Created
Time string - 创建时间。
- Delete
Uk string - 删除标识。
- Deleted
Time string - 删除时间。
- Depth int
- 深度。
- Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - 组织ID。
- Org
Type int - 组织类型。企业组织: 1
- Org
Unit stringId - 组织单元ID。
- Owner string
- 管理员ID。
- Updated
Time string - 更新时间。
- created
Time String - 创建时间。
- delete
Uk String - 删除标识。
- deleted
Time String - 删除时间。
- depth Integer
- 深度。
- id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - 组织ID。
- org
Type Integer - 组织类型。企业组织: 1
- org
Unit StringId - 组织单元ID。
- owner String
- 管理员ID。
- updated
Time String - 更新时间。
- created
Time string - 创建时间。
- delete
Uk string - 删除标识。
- deleted
Time string - 删除时间。
- depth number
- 深度。
- id string
- The provider-assigned unique ID for this managed resource.
- org
Id string - 组织ID。
- org
Type number - 组织类型。企业组织: 1
- org
Unit stringId - 组织单元ID。
- owner string
- 管理员ID。
- updated
Time 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_ strid - 组织单元ID。
- owner str
- 管理员ID。
- updated_
time str - 更新时间。
- created
Time String - 创建时间。
- delete
Uk String - 删除标识。
- deleted
Time String - 删除时间。
- depth Number
- 深度。
- id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - 组织ID。
- org
Type Number - 组织类型。企业组织: 1
- org
Unit StringId - 组织单元ID。
- owner String
- 管理员ID。
- updated
Time 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) -> Unitfunc 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.
- Created
Time string - 创建时间。
- Delete
Uk string - 删除标识。
- Deleted
Time string - 删除时间。
- Depth int
- 深度。
- Description string
- 描述。
- Name string
- 组织单元名称。
- Org
Id string - 组织ID。
- Org
Type int - 组织类型。企业组织: 1
- Org
Unit stringId - 组织单元ID。
- Owner string
- 管理员ID。
- Parent
Id string - 父单元Id。
- Updated
Time string - 更新时间。
- Created
Time string - 创建时间。
- Delete
Uk string - 删除标识。
- Deleted
Time string - 删除时间。
- Depth int
- 深度。
- Description string
- 描述。
- Name string
- 组织单元名称。
- Org
Id string - 组织ID。
- Org
Type int - 组织类型。企业组织: 1
- Org
Unit stringId - 组织单元ID。
- Owner string
- 管理员ID。
- Parent
Id string - 父单元Id。
- Updated
Time string - 更新时间。
- created
Time String - 创建时间。
- delete
Uk String - 删除标识。
- deleted
Time String - 删除时间。
- depth Integer
- 深度。
- description String
- 描述。
- name String
- 组织单元名称。
- org
Id String - 组织ID。
- org
Type Integer - 组织类型。企业组织: 1
- org
Unit StringId - 组织单元ID。
- owner String
- 管理员ID。
- parent
Id String - 父单元Id。
- updated
Time String - 更新时间。
- created
Time string - 创建时间。
- delete
Uk string - 删除标识。
- deleted
Time string - 删除时间。
- depth number
- 深度。
- description string
- 描述。
- name string
- 组织单元名称。
- org
Id string - 组织ID。
- org
Type number - 组织类型。企业组织: 1
- org
Unit stringId - 组织单元ID。
- owner string
- 管理员ID。
- parent
Id string - 父单元Id。
- updated
Time 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_ strid - 组织单元ID。
- owner str
- 管理员ID。
- parent_
id str - 父单元Id。
- updated_
time str - 更新时间。
- created
Time String - 创建时间。
- delete
Uk String - 删除标识。
- deleted
Time String - 删除时间。
- depth Number
- 深度。
- description String
- 描述。
- name String
- 组织单元名称。
- org
Id String - 组织ID。
- org
Type Number - 组织类型。企业组织: 1
- org
Unit StringId - 组织单元ID。
- owner String
- 管理员ID。
- parent
Id String - 父单元Id。
- updated
Time 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
volcengineccTerraform Provider.
