Documentation ¶
Index ¶
- Constants
- func DefaultConfig() *config
- type AddOrRemoveUserToGroupRequest
- type Component
- func (c *Component) AddUserToGroup(req AddOrRemoveUserToGroupRequest) error
- func (c *Component) CreateRamUser(req SaveRamUserRequest) (*RamUserResponse, error)
- func (c *Component) DelRamUser(userName string) error
- func (c *Component) GetGroup(groupName string) (*GroupInfo, error)
- func (c *Component) GetRamUser(userName string) (*RamUserResponse, error)
- func (c *Component) ListGroups() ([]*GroupInfo, error)
- func (c *Component) ListGroupsForUser(userName string) ([]*GroupInfo, error)
- func (c *Component) RemoveUserFromGroup(req AddOrRemoveUserToGroupRequest) error
- type Container
- type GroupInfo
- type Option
- type RamUserInfo
- type RamUserResponse
- type SaveRamUserRequest
Constants ¶
View Source
const (
// MaxItems for const
MaxItems = 1000
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component for aliyun
func (*Component) AddUserToGroup ¶
func (c *Component) AddUserToGroup(req AddOrRemoveUserToGroupRequest) error
AddUserToGroup 添加用户至用户组
func (*Component) CreateRamUser ¶
func (c *Component) CreateRamUser(req SaveRamUserRequest) (*RamUserResponse, error)
CreateRamUser ...
func (*Component) DelRamUser ¶
DelRamUser 删除用户前,需要保证用户不拥有任何权限且不属于任何用户组。
func (*Component) GetRamUser ¶
func (c *Component) GetRamUser(userName string) (*RamUserResponse, error)
GetRamUser ...
func (*Component) ListGroups ¶
ListGroups 获取全部用户组
func (*Component) ListGroupsForUser ¶
ListGroupsForUser 查询用户所属的用户组
func (*Component) RemoveUserFromGroup ¶
func (c *Component) RemoveUserFromGroup(req AddOrRemoveUserToGroupRequest) error
RemoveUserFromGroup 将用户从用户组移除
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func DefaultContainer ¶
func DefaultContainer() *Container
type RamUserInfo ¶
type RamUserInfo struct { UserID string `json:"user_id"` CreateDate string `json:"create_date"` UpdateDate string `json:"update_date"` UserPrincipalName string `json:"user_principal_name"` DisplayName string `json:"display_name"` MobilePhone string `json:"mobile_phone"` Email string `json:"email"` Comments string `json:"comments"` LastLoginDate string `json:"last_login_date"` }
type RamUserResponse ¶
type RamUserResponse struct { RequestID string `json:"request_id"` User RamUserInfo `json:"user"` }
type SaveRamUserRequest ¶
type SaveRamUserRequest struct { UserName string `json:"user_name"` DisplayName string `json:"display_name"` MobilePhone string `json:"mobile_phone"` Email string `json:"email"` Comments string `json:"comments"` }
SaveRamUserRequest 具体注释参考: https://help.aliyun.com/document_detail/185726.html?spm=a2c4g.11186623.6.737.207d1f2fRXubtd
Click to show internal directories.
Click to hide internal directories.