volcenginecc.iam.Group
用户组是用户的集合。当用户组被关联上策略后,同一用户组里的所有用户会拥有对应的策略权限,同一个用户可存在于多个用户组中,可同时拥有多个用户组的权限。
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
groupDemo:
type: volcenginecc:iam:Group
name: GroupDemo
properties:
userGroupName: GroupDemo
description: GroupDemo-Description
displayName: GroupDemo-DisplayName
users:
- user_name: demo
attachedPolicys:
- policy_type: System
policy_name: ECSFullAccess
policy_scope:
- attachTime: 20230810T071***Z
policyScopeType: Project
projectDisplayName: demo
projectName: Project
Create Group Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
@overload
def Group(resource_name: str,
args: GroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Group(resource_name: str,
opts: Optional[ResourceOptions] = None,
user_group_name: Optional[str] = None,
attached_policys: Optional[Sequence[GroupAttachedPolicyArgs]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
users: Optional[Sequence[GroupUserArgs]] = None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
type: volcenginecc:iam:Group
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 GroupArgs
- 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 GroupArgs
- 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 GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupArgs
- 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 groupResource = new Volcenginecc.Iam.Group("groupResource", new()
{
UserGroupName = "string",
AttachedPolicys = new[]
{
new Volcenginecc.Iam.Inputs.GroupAttachedPolicyArgs
{
PolicyName = "string",
PolicyScopes = new[]
{
new Volcenginecc.Iam.Inputs.GroupAttachedPolicyPolicyScopeArgs
{
AttachTime = "string",
PolicyScopeType = "string",
ProjectDisplayName = "string",
ProjectName = "string",
},
},
PolicyType = "string",
},
},
Description = "string",
DisplayName = "string",
Users = new[]
{
new Volcenginecc.Iam.Inputs.GroupUserArgs
{
UserName = "string",
},
},
});
example, err := iam.NewGroup(ctx, "groupResource", &iam.GroupArgs{
UserGroupName: pulumi.String("string"),
AttachedPolicys: iam.GroupAttachedPolicyArray{
&iam.GroupAttachedPolicyArgs{
PolicyName: pulumi.String("string"),
PolicyScopes: iam.GroupAttachedPolicyPolicyScopeArray{
&iam.GroupAttachedPolicyPolicyScopeArgs{
AttachTime: pulumi.String("string"),
PolicyScopeType: pulumi.String("string"),
ProjectDisplayName: pulumi.String("string"),
ProjectName: pulumi.String("string"),
},
},
PolicyType: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Users: iam.GroupUserArray{
&iam.GroupUserArgs{
UserName: pulumi.String("string"),
},
},
})
var groupResource = new Group("groupResource", GroupArgs.builder()
.userGroupName("string")
.attachedPolicys(GroupAttachedPolicyArgs.builder()
.policyName("string")
.policyScopes(GroupAttachedPolicyPolicyScopeArgs.builder()
.attachTime("string")
.policyScopeType("string")
.projectDisplayName("string")
.projectName("string")
.build())
.policyType("string")
.build())
.description("string")
.displayName("string")
.users(GroupUserArgs.builder()
.userName("string")
.build())
.build());
group_resource = volcenginecc.iam.Group("groupResource",
user_group_name="string",
attached_policys=[{
"policy_name": "string",
"policy_scopes": [{
"attach_time": "string",
"policy_scope_type": "string",
"project_display_name": "string",
"project_name": "string",
}],
"policy_type": "string",
}],
description="string",
display_name="string",
users=[{
"user_name": "string",
}])
const groupResource = new volcenginecc.iam.Group("groupResource", {
userGroupName: "string",
attachedPolicys: [{
policyName: "string",
policyScopes: [{
attachTime: "string",
policyScopeType: "string",
projectDisplayName: "string",
projectName: "string",
}],
policyType: "string",
}],
description: "string",
displayName: "string",
users: [{
userName: "string",
}],
});
type: volcenginecc:iam:Group
properties:
attachedPolicys:
- policyName: string
policyScopes:
- attachTime: string
policyScopeType: string
projectDisplayName: string
projectName: string
policyType: string
description: string
displayName: string
userGroupName: string
users:
- userName: string
Group 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 Group resource accepts the following input properties:
- User
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- Attached
Policys List<Volcengine.Group Attached Policy> - Description string
- 用户组描述信息。长度不超过128。
- Display
Name string - 用户组显示名称。长度不超过64。
- Users
List<Volcengine.
Group User>
- User
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- Attached
Policys []GroupAttached Policy Args - Description string
- 用户组描述信息。长度不超过128。
- Display
Name string - 用户组显示名称。长度不超过64。
- Users
[]Group
User Args
- user
Group StringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- attached
Policys List<GroupAttached Policy> - description String
- 用户组描述信息。长度不超过128。
- display
Name String - 用户组显示名称。长度不超过64。
- users
List<Group
User>
- user
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- attached
Policys GroupAttached Policy[] - description string
- 用户组描述信息。长度不超过128。
- display
Name string - 用户组显示名称。长度不超过64。
- users
Group
User[]
- user_
group_ strname - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- attached_
policys Sequence[GroupAttached Policy Args] - description str
- 用户组描述信息。长度不超过128。
- display_
name str - 用户组显示名称。长度不超过64。
- users
Sequence[Group
User Args]
- user
Group StringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- attached
Policys List<Property Map> - description String
- 用户组描述信息。长度不超过128。
- display
Name String - 用户组显示名称。长度不超过64。
- users List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:
- Account
Id int - 用户组所属主账号的ID。
- Created
Time string - 用户组的创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time string - 用户组的更新时间。
- User
Group intId - 用户组ID。
- Account
Id int - 用户组所属主账号的ID。
- Created
Time string - 用户组的创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time string - 用户组的更新时间。
- User
Group intId - 用户组ID。
- account
Id Integer - 用户组所属主账号的ID。
- created
Time String - 用户组的创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time String - 用户组的更新时间。
- user
Group IntegerId - 用户组ID。
- account
Id number - 用户组所属主账号的ID。
- created
Time string - 用户组的创建时间。
- id string
- The provider-assigned unique ID for this managed resource.
- updated
Time string - 用户组的更新时间。
- user
Group numberId - 用户组ID。
- account_
id int - 用户组所属主账号的ID。
- created_
time str - 用户组的创建时间。
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
time str - 用户组的更新时间。
- user_
group_ intid - 用户组ID。
- account
Id Number - 用户组所属主账号的ID。
- created
Time String - 用户组的创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time String - 用户组的更新时间。
- user
Group NumberId - 用户组ID。
Look up Existing Group Resource
Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
attached_policys: Optional[Sequence[GroupAttachedPolicyArgs]] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
updated_time: Optional[str] = None,
user_group_id: Optional[int] = None,
user_group_name: Optional[str] = None,
users: Optional[Sequence[GroupUserArgs]] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
resources: _: type: volcenginecc:iam:Group 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.
- Account
Id int - 用户组所属主账号的ID。
- Attached
Policys List<Volcengine.Group Attached Policy> - Created
Time string - 用户组的创建时间。
- Description string
- 用户组描述信息。长度不超过128。
- Display
Name string - 用户组显示名称。长度不超过64。
- Updated
Time string - 用户组的更新时间。
- User
Group intId - 用户组ID。
- User
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- Users
List<Volcengine.
Group User>
- Account
Id int - 用户组所属主账号的ID。
- Attached
Policys []GroupAttached Policy Args - Created
Time string - 用户组的创建时间。
- Description string
- 用户组描述信息。长度不超过128。
- Display
Name string - 用户组显示名称。长度不超过64。
- Updated
Time string - 用户组的更新时间。
- User
Group intId - 用户组ID。
- User
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- Users
[]Group
User Args
- account
Id Integer - 用户组所属主账号的ID。
- attached
Policys List<GroupAttached Policy> - created
Time String - 用户组的创建时间。
- description String
- 用户组描述信息。长度不超过128。
- display
Name String - 用户组显示名称。长度不超过64。
- updated
Time String - 用户组的更新时间。
- user
Group IntegerId - 用户组ID。
- user
Group StringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- users
List<Group
User>
- account
Id number - 用户组所属主账号的ID。
- attached
Policys GroupAttached Policy[] - created
Time string - 用户组的创建时间。
- description string
- 用户组描述信息。长度不超过128。
- display
Name string - 用户组显示名称。长度不超过64。
- updated
Time string - 用户组的更新时间。
- user
Group numberId - 用户组ID。
- user
Group stringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- users
Group
User[]
- account_
id int - 用户组所属主账号的ID。
- attached_
policys Sequence[GroupAttached Policy Args] - created_
time str - 用户组的创建时间。
- description str
- 用户组描述信息。长度不超过128。
- display_
name str - 用户组显示名称。长度不超过64。
- updated_
time str - 用户组的更新时间。
- user_
group_ intid - 用户组ID。
- user_
group_ strname - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- users
Sequence[Group
User Args]
- account
Id Number - 用户组所属主账号的ID。
- attached
Policys List<Property Map> - created
Time String - 用户组的创建时间。
- description String
- 用户组描述信息。长度不超过128。
- display
Name String - 用户组显示名称。长度不超过64。
- updated
Time String - 用户组的更新时间。
- user
Group NumberId - 用户组ID。
- user
Group StringName - 用户组名称。长度1~64,支持英文、数字和.-_符号。
- users List<Property Map>
Supporting Types
GroupAttachedPolicy, GroupAttachedPolicyArgs
- Policy
Name string - 策略名。
- Policy
Scopes List<Volcengine.Group Attached Policy Policy Scope> - Policy
Type string - 策略类型。System代表系统预设策略,Custom代表自定义策略。
- Policy
Name string - 策略名。
- Policy
Scopes []GroupAttached Policy Policy Scope - Policy
Type string - 策略类型。System代表系统预设策略,Custom代表自定义策略。
- policy
Name String - 策略名。
- policy
Scopes List<GroupAttached Policy Policy Scope> - policy
Type String - 策略类型。System代表系统预设策略,Custom代表自定义策略。
- policy
Name string - 策略名。
- policy
Scopes GroupAttached Policy Policy Scope[] - policy
Type string - 策略类型。System代表系统预设策略,Custom代表自定义策略。
- policy_
name str - 策略名。
- policy_
scopes Sequence[GroupAttached Policy Policy Scope] - policy_
type str - 策略类型。System代表系统预设策略,Custom代表自定义策略。
- policy
Name String - 策略名。
- policy
Scopes List<Property Map> - policy
Type String - 策略类型。System代表系统预设策略,Custom代表自定义策略。
GroupAttachedPolicyPolicyScope, GroupAttachedPolicyPolicyScopeArgs
- Attach
Time string - 项目授权时间。
- Policy
Scope stringType - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- Project
Display stringName - 按项目授权时的项目显示名。
- Project
Name string - 按项目授权时的项目名。
- Attach
Time string - 项目授权时间。
- Policy
Scope stringType - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- Project
Display stringName - 按项目授权时的项目显示名。
- Project
Name string - 按项目授权时的项目名。
- attach
Time String - 项目授权时间。
- policy
Scope StringType - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- project
Display StringName - 按项目授权时的项目显示名。
- project
Name String - 按项目授权时的项目名。
- attach
Time string - 项目授权时间。
- policy
Scope stringType - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- project
Display stringName - 按项目授权时的项目显示名。
- project
Name string - 按项目授权时的项目名。
- attach_
time str - 项目授权时间。
- policy_
scope_ strtype - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- project_
display_ strname - 按项目授权时的项目显示名。
- project_
name str - 按项目授权时的项目名。
- attach
Time String - 项目授权时间。
- policy
Scope StringType - 授权类型。Global代表全局授权(不限制项目),Project代表按项目授权。
- project
Display StringName - 按项目授权时的项目显示名。
- project
Name String - 按项目授权时的项目名。
GroupUser, GroupUserArgs
- User
Name string - 用户名。
- User
Name string - 用户名。
- user
Name String - 用户名。
- user
Name string - 用户名。
- user_
name str - 用户名。
- user
Name String - 用户名。
Import
$ pulumi import volcenginecc:iam/group:Group example "user_group_name"
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.