iam

package
v0.22.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package iam include resources of ucloud iam product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKey added in v0.21.53

type AccessKey struct {

	// 用户公钥
	AccessKeyID string

	// 用户私钥
	AccessKeySecret string

	// 密钥创建时间
	CreatedAt int

	// 密钥删除时间
	DeletedAt int

	// 密钥备注
	Description string

	// 密钥过期时间
	ExpiredAt int

	// 密钥状态
	Status string

	// 密钥更新时间
	UpdatedAt int

	// 用户ID
	UserId int
}

AccessKey - 密钥信息实例

type AddUserToGroupRequest added in v0.21.53

type AddUserToGroupRequest struct {
	request.CommonBase

	// 用户组名
	GroupName *string `required:"true"`

	// 用户名
	UserName *string `required:"true"`
}

AddUserToGroupRequest is request schema for AddUserToGroup action

type AddUserToGroupResponse added in v0.21.53

type AddUserToGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

AddUserToGroupResponse is response schema for AddUserToGroup action

type AttachPoliciesToGroupRequest added in v0.21.53

type AttachPoliciesToGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`

	// 策略URN
	PolicyURNs []string `required:"true"`

	// 项目ID(当Scope=Specified时ProjectID必传)
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"true"`
}

AttachPoliciesToGroupRequest is request schema for AttachPoliciesToGroup action

type AttachPoliciesToGroupResponse added in v0.21.53

type AttachPoliciesToGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

AttachPoliciesToGroupResponse is response schema for AttachPoliciesToGroup action

type AttachPoliciesToUserRequest added in v0.21.53

type AttachPoliciesToUserRequest struct {
	request.CommonBase

	// 策略URN
	PolicyURNs []string `required:"true"`

	// 项目ID(当Scope=Specified时ProjectID必传)
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"true"`

	// 用户名称
	UserName *string `required:"true"`
}

AttachPoliciesToUserRequest is request schema for AttachPoliciesToUser action

type AttachPoliciesToUserResponse added in v0.21.53

type AttachPoliciesToUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

AttachPoliciesToUserResponse is response schema for AttachPoliciesToUser action

type CreateAccessKeyRequest added in v0.21.53

type CreateAccessKeyRequest struct {
	request.CommonBase

	// 用户名
	UserName *string `required:"true"`
}

CreateAccessKeyRequest is request schema for CreateAccessKey action

type CreateAccessKeyResponse added in v0.21.53

type CreateAccessKeyResponse struct {
	response.CommonBase

	// 密钥实例
	AccessKey AccessKey
}

CreateAccessKeyResponse is response schema for CreateAccessKey action

type CreateGroupRequest added in v0.21.53

type CreateGroupRequest struct {
	request.CommonBase

	// 对用户组的描述
	Description *string `required:"false"`

	// 用户组名称
	GroupName *string `required:"true"`
}

CreateGroupRequest is request schema for CreateGroup action

type CreateGroupResponse added in v0.21.53

type CreateGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

CreateGroupResponse is response schema for CreateGroup action

type CreateIAMPolicyRequest added in v0.21.53

type CreateIAMPolicyRequest struct {
	request.CommonBase

	// 描述
	Description *string `required:"false"`

	// 策略内容
	Document *string `required:"true"`

	// 策略名称
	PolicyName *string `required:"true"`

	// 策略作用域类型
	ScopeType *string `required:"false"`
}

CreateIAMPolicyRequest is request schema for CreateIAMPolicy action

type CreateIAMPolicyResponse added in v0.21.53

type CreateIAMPolicyResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

CreateIAMPolicyResponse is response schema for CreateIAMPolicy action

type CreateProjectRequest

type CreateProjectRequest struct {
	request.CommonBase

	// 【该字段已废弃,请谨慎使用】
	ParentId *string `required:"false" deprecated:"true"`

	// 项目名称,不得与现有项目重名
	ProjectName *string `required:"true"`
}

CreateProjectRequest is request schema for CreateProject action

type CreateProjectResponse

type CreateProjectResponse struct {
	response.CommonBase

	// 所创建项目的Id
	ProjectId string
}

CreateProjectResponse is response schema for CreateProject action

type CreateUserRequest added in v0.21.53

type CreateUserRequest struct {
	request.CommonBase

	// API密钥访问状态(LoginProfileStatus值为Inactive时,AccessKeyStatus不能为Inactive)
	AccessKeyStatus *string `required:"true"`

	// 显示名称
	DisplayName *string `required:"false"`

	// 用户邮箱(LoginProfileStatus值等于Active必传,LoginProfileStatus值等于Inactive不传)
	Email *string `required:"false"`

	// 控制台登录访问状态(AccessKeyStatus值为Inactive时,LoginProfileStatus不能为Inactive)
	LoginProfileStatus *string `required:"true"`

	// 用户名
	UserName *string `required:"true"`
}

CreateUserRequest is request schema for CreateUser action

type CreateUserResponse added in v0.21.53

type CreateUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

CreateUserResponse is response schema for CreateUser action

type DeleteAccessKeyRequest added in v0.21.53

type DeleteAccessKeyRequest struct {
	request.CommonBase

	// 用户公钥
	AccessKeyID *string `required:"true"`
}

DeleteAccessKeyRequest is request schema for DeleteAccessKey action

type DeleteAccessKeyResponse added in v0.21.53

type DeleteAccessKeyResponse struct {
	response.CommonBase
}

DeleteAccessKeyResponse is response schema for DeleteAccessKey action

type DeleteGroupRequest added in v0.21.53

type DeleteGroupRequest struct {
	request.CommonBase

	// 待删除用户组名称
	GroupName *string `required:"true"`
}

DeleteGroupRequest is request schema for DeleteGroup action

type DeleteGroupResponse added in v0.21.53

type DeleteGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DeleteGroupResponse is response schema for DeleteGroup action

type DeleteIAMPolicyRequest added in v0.21.53

type DeleteIAMPolicyRequest struct {
	request.CommonBase

	// 策略URN
	PolicyURN *string `required:"true"`
}

DeleteIAMPolicyRequest is request schema for DeleteIAMPolicy action

type DeleteIAMPolicyResponse added in v0.21.53

type DeleteIAMPolicyResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DeleteIAMPolicyResponse is response schema for DeleteIAMPolicy action

type DeleteProjectRequest

type DeleteProjectRequest struct {
	request.CommonBase

	// 项目ID
	ProjectID *string `required:"true"`
}

DeleteProjectRequest is request schema for DeleteProject action

type DeleteProjectResponse

type DeleteProjectResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DeleteProjectResponse is response schema for DeleteProject action

type DeleteUserRequest added in v0.21.53

type DeleteUserRequest struct {
	request.CommonBase

	// 用户名
	UserName *string `required:"true"`
}

DeleteUserRequest is request schema for DeleteUser action

type DeleteUserResponse added in v0.21.53

type DeleteUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DeleteUserResponse is response schema for DeleteUser action

type DetachPoliciesFromGroupRequest added in v0.21.53

type DetachPoliciesFromGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`

	// 策略URN
	PolicyURNs []string `required:"true"`

	// 项目ID(当Scope=Specified时ProjectID必传)
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"true"`
}

DetachPoliciesFromGroupRequest is request schema for DetachPoliciesFromGroup action

type DetachPoliciesFromGroupResponse added in v0.21.53

type DetachPoliciesFromGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DetachPoliciesFromGroupResponse is response schema for DetachPoliciesFromGroup action

type DetachPoliciesFromUserRequest added in v0.21.53

type DetachPoliciesFromUserRequest struct {
	request.CommonBase

	// 策略URN
	PolicyURNs []string `required:"true"`

	// 项目ID(当Scope=Specified时ProjectID必传)
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"true"`

	// 用户名
	UserName *string `required:"true"`
}

DetachPoliciesFromUserRequest is request schema for DetachPoliciesFromUser action

type DetachPoliciesFromUserResponse added in v0.21.53

type DetachPoliciesFromUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

DetachPoliciesFromUserResponse is response schema for DetachPoliciesFromUser action

type Entity added in v0.21.53

type Entity struct {

	// 引用时间
	AttachedAt int

	// 实体类型(User:用户,Group)
	EntityKind string

	// 实体名称
	EntityName string
}

Entity - 权限策略的实体

type GetGroupRequest added in v0.21.53

type GetGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`
}

GetGroupRequest is request schema for GetGroup action

type GetGroupResponse added in v0.21.53

type GetGroupResponse struct {
	response.CommonBase

	// 用户组详情信息
	Group Group

	// 错误消息
	Message string
}

GetGroupResponse is response schema for GetGroup action

type GetIAMPolicyRequest added in v0.21.53

type GetIAMPolicyRequest struct {
	request.CommonBase

	// 策略URN
	PolicyURN *string `required:"true"`
}

GetIAMPolicyRequest is request schema for GetIAMPolicy action

type GetIAMPolicyResponse added in v0.21.53

type GetIAMPolicyResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 策略信息
	Policy IAMPolicy
}

GetIAMPolicyResponse is response schema for GetIAMPolicy action

type GetLoginProfileRequest added in v0.21.57

type GetLoginProfileRequest struct {
	request.CommonBase

	// 用户名
	UserName *string `required:"true"`
}

GetLoginProfileRequest is request schema for GetLoginProfile action

type GetLoginProfileResponse added in v0.21.57

type GetLoginProfileResponse struct {
	response.CommonBase

	// 登录资料
	LoginProfile LoginProfile
}

GetLoginProfileResponse is response schema for GetLoginProfile action

type GetUserRequest added in v0.21.53

type GetUserRequest struct {
	request.CommonBase

	// 用户名
	UserName *string `required:"true"`
}

GetUserRequest is request schema for GetUser action

type GetUserResponse added in v0.21.53

type GetUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 用户信息
	User User
}

GetUserResponse is response schema for GetUser action

type Group added in v0.21.53

type Group struct {

	// 用户组创建时间戳
	CreatedAt int

	// 用户组描述信息
	Description string

	// 用户组名称
	GroupName string
}

Group - 用户组模型

type IAMClient

type IAMClient struct {
	*ucloud.Client
}

IAMClient is the client of IAM

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *IAMClient

NewClient will return a instance of IAMClient

func (*IAMClient) AddUserToGroup added in v0.21.53

func (c *IAMClient) AddUserToGroup(req *AddUserToGroupRequest) (*AddUserToGroupResponse, error)

API: AddUserToGroup

添加成员到用户组

func (*IAMClient) AttachPoliciesToGroup added in v0.21.53

API: AttachPoliciesToGroup

关联IAM策略到用户组

func (*IAMClient) AttachPoliciesToUser added in v0.21.53

func (c *IAMClient) AttachPoliciesToUser(req *AttachPoliciesToUserRequest) (*AttachPoliciesToUserResponse, error)

API: AttachPoliciesToUser

关联IAM策略到用户

func (*IAMClient) CreateAccessKey added in v0.21.53

func (c *IAMClient) CreateAccessKey(req *CreateAccessKeyRequest) (*CreateAccessKeyResponse, error)

API: CreateAccessKey

创建用户密钥

func (*IAMClient) CreateGroup added in v0.21.53

func (c *IAMClient) CreateGroup(req *CreateGroupRequest) (*CreateGroupResponse, error)

API: CreateGroup

创建用户组

func (*IAMClient) CreateIAMPolicy added in v0.21.53

func (c *IAMClient) CreateIAMPolicy(req *CreateIAMPolicyRequest) (*CreateIAMPolicyResponse, error)

API: CreateIAMPolicy

创建IAM策略

func (*IAMClient) CreateProject

func (c *IAMClient) CreateProject(req *CreateProjectRequest) (*CreateProjectResponse, error)

API: CreateProject

创建项目

func (*IAMClient) CreateUser added in v0.21.53

func (c *IAMClient) CreateUser(req *CreateUserRequest) (*CreateUserResponse, error)

API: CreateUser

创建IAM用户

func (*IAMClient) DeleteAccessKey added in v0.21.53

func (c *IAMClient) DeleteAccessKey(req *DeleteAccessKeyRequest) (*DeleteAccessKeyResponse, error)

API: DeleteAccessKey

删除用户密钥

func (*IAMClient) DeleteGroup added in v0.21.53

func (c *IAMClient) DeleteGroup(req *DeleteGroupRequest) (*DeleteGroupResponse, error)

API: DeleteGroup

删除用户组

func (*IAMClient) DeleteIAMPolicy added in v0.21.53

func (c *IAMClient) DeleteIAMPolicy(req *DeleteIAMPolicyRequest) (*DeleteIAMPolicyResponse, error)

API: DeleteIAMPolicy

删除IAM策略

func (*IAMClient) DeleteProject

func (c *IAMClient) DeleteProject(req *DeleteProjectRequest) (*DeleteProjectResponse, error)

API: DeleteProject

删除项目

func (*IAMClient) DeleteUser added in v0.21.53

func (c *IAMClient) DeleteUser(req *DeleteUserRequest) (*DeleteUserResponse, error)

API: DeleteUser

删除用户

func (*IAMClient) DetachPoliciesFromGroup added in v0.21.53

API: DetachPoliciesFromGroup

移除用户组关联的IAM策略

func (*IAMClient) DetachPoliciesFromUser added in v0.21.53

API: DetachPoliciesFromUser

移除用户关联的IAM策略

func (*IAMClient) GetGroup added in v0.21.53

func (c *IAMClient) GetGroup(req *GetGroupRequest) (*GetGroupResponse, error)

API: GetGroup

查询用户组详情

func (*IAMClient) GetIAMPolicy added in v0.21.53

func (c *IAMClient) GetIAMPolicy(req *GetIAMPolicyRequest) (*GetIAMPolicyResponse, error)

API: GetIAMPolicy

获取策略详情

func (*IAMClient) GetLoginProfile added in v0.21.57

func (c *IAMClient) GetLoginProfile(req *GetLoginProfileRequest) (*GetLoginProfileResponse, error)

API: GetLoginProfile

获取用户登录资料

func (*IAMClient) GetUser added in v0.21.53

func (c *IAMClient) GetUser(req *GetUserRequest) (*GetUserResponse, error)

API: GetUser

获取用户信息

func (*IAMClient) ListAccessKeys added in v0.21.53

func (c *IAMClient) ListAccessKeys(req *ListAccessKeysRequest) (*ListAccessKeysResponse, error)

API: ListAccessKeys

获取指定用户密钥列表

func (*IAMClient) ListEntitiesForPolicy added in v0.21.53

API: ListEntitiesForPolicy

列出引用权限策略的实体

func (*IAMClient) ListEntitiesForProject added in v0.21.53

API: ListEntitiesForProject

列出拥有指定项目权限的实体

func (*IAMClient) ListGroups added in v0.21.57

func (c *IAMClient) ListGroups(req *ListGroupsRequest) (*ListGroupsResponse, error)

API: ListGroups

列出用户组

func (*IAMClient) ListPolicies added in v0.21.59

func (c *IAMClient) ListPolicies(req *ListPoliciesRequest) (*ListPoliciesResponse, error)

API: ListPolicies

获取IAM策略列表

func (*IAMClient) ListPoliciesForGroup added in v0.21.60

func (c *IAMClient) ListPoliciesForGroup(req *ListPoliciesForGroupRequest) (*ListPoliciesForGroupResponse, error)

API: ListPoliciesForGroup

列出用户组关联的权限策略

func (*IAMClient) ListPoliciesForUser added in v0.21.60

func (c *IAMClient) ListPoliciesForUser(req *ListPoliciesForUserRequest) (*ListPoliciesForUserResponse, error)

API: ListPoliciesForUser

列出用户关联的IAM策略

func (*IAMClient) ListProjects added in v0.21.53

func (c *IAMClient) ListProjects(req *ListProjectsRequest) (*ListProjectsResponse, error)

API: ListProjects

列出所有项目

func (*IAMClient) ListUsers added in v0.21.53

func (c *IAMClient) ListUsers(req *ListUsersRequest) (*ListUsersResponse, error)

API: ListUsers

列出用户列表

func (*IAMClient) ListUsersForGroup added in v0.21.53

func (c *IAMClient) ListUsersForGroup(req *ListUsersForGroupRequest) (*ListUsersForGroupResponse, error)

API: ListUsersForGroup

列出用户组包含的用户

func (*IAMClient) ModifyProject added in v0.21.53

func (c *IAMClient) ModifyProject(req *ModifyProjectRequest) (*ModifyProjectResponse, error)

API: ModifyProject

修改项目

func (*IAMClient) NewAddUserToGroupRequest added in v0.21.53

func (c *IAMClient) NewAddUserToGroupRequest() *AddUserToGroupRequest

NewAddUserToGroupRequest will create request of AddUserToGroup action.

func (*IAMClient) NewAttachPoliciesToGroupRequest added in v0.21.53

func (c *IAMClient) NewAttachPoliciesToGroupRequest() *AttachPoliciesToGroupRequest

NewAttachPoliciesToGroupRequest will create request of AttachPoliciesToGroup action.

func (*IAMClient) NewAttachPoliciesToUserRequest added in v0.21.53

func (c *IAMClient) NewAttachPoliciesToUserRequest() *AttachPoliciesToUserRequest

NewAttachPoliciesToUserRequest will create request of AttachPoliciesToUser action.

func (*IAMClient) NewCreateAccessKeyRequest added in v0.21.53

func (c *IAMClient) NewCreateAccessKeyRequest() *CreateAccessKeyRequest

NewCreateAccessKeyRequest will create request of CreateAccessKey action.

func (*IAMClient) NewCreateGroupRequest added in v0.21.53

func (c *IAMClient) NewCreateGroupRequest() *CreateGroupRequest

NewCreateGroupRequest will create request of CreateGroup action.

func (*IAMClient) NewCreateIAMPolicyRequest added in v0.21.53

func (c *IAMClient) NewCreateIAMPolicyRequest() *CreateIAMPolicyRequest

NewCreateIAMPolicyRequest will create request of CreateIAMPolicy action.

func (*IAMClient) NewCreateProjectRequest

func (c *IAMClient) NewCreateProjectRequest() *CreateProjectRequest

NewCreateProjectRequest will create request of CreateProject action.

func (*IAMClient) NewCreateUserRequest added in v0.21.53

func (c *IAMClient) NewCreateUserRequest() *CreateUserRequest

NewCreateUserRequest will create request of CreateUser action.

func (*IAMClient) NewDeleteAccessKeyRequest added in v0.21.53

func (c *IAMClient) NewDeleteAccessKeyRequest() *DeleteAccessKeyRequest

NewDeleteAccessKeyRequest will create request of DeleteAccessKey action.

func (*IAMClient) NewDeleteGroupRequest added in v0.21.53

func (c *IAMClient) NewDeleteGroupRequest() *DeleteGroupRequest

NewDeleteGroupRequest will create request of DeleteGroup action.

func (*IAMClient) NewDeleteIAMPolicyRequest added in v0.21.53

func (c *IAMClient) NewDeleteIAMPolicyRequest() *DeleteIAMPolicyRequest

NewDeleteIAMPolicyRequest will create request of DeleteIAMPolicy action.

func (*IAMClient) NewDeleteProjectRequest

func (c *IAMClient) NewDeleteProjectRequest() *DeleteProjectRequest

NewDeleteProjectRequest will create request of DeleteProject action.

func (*IAMClient) NewDeleteUserRequest added in v0.21.53

func (c *IAMClient) NewDeleteUserRequest() *DeleteUserRequest

NewDeleteUserRequest will create request of DeleteUser action.

func (*IAMClient) NewDetachPoliciesFromGroupRequest added in v0.21.53

func (c *IAMClient) NewDetachPoliciesFromGroupRequest() *DetachPoliciesFromGroupRequest

NewDetachPoliciesFromGroupRequest will create request of DetachPoliciesFromGroup action.

func (*IAMClient) NewDetachPoliciesFromUserRequest added in v0.21.53

func (c *IAMClient) NewDetachPoliciesFromUserRequest() *DetachPoliciesFromUserRequest

NewDetachPoliciesFromUserRequest will create request of DetachPoliciesFromUser action.

func (*IAMClient) NewGetGroupRequest added in v0.21.53

func (c *IAMClient) NewGetGroupRequest() *GetGroupRequest

NewGetGroupRequest will create request of GetGroup action.

func (*IAMClient) NewGetIAMPolicyRequest added in v0.21.53

func (c *IAMClient) NewGetIAMPolicyRequest() *GetIAMPolicyRequest

NewGetIAMPolicyRequest will create request of GetIAMPolicy action.

func (*IAMClient) NewGetLoginProfileRequest added in v0.21.57

func (c *IAMClient) NewGetLoginProfileRequest() *GetLoginProfileRequest

NewGetLoginProfileRequest will create request of GetLoginProfile action.

func (*IAMClient) NewGetUserRequest added in v0.21.53

func (c *IAMClient) NewGetUserRequest() *GetUserRequest

NewGetUserRequest will create request of GetUser action.

func (*IAMClient) NewListAccessKeysRequest added in v0.21.53

func (c *IAMClient) NewListAccessKeysRequest() *ListAccessKeysRequest

NewListAccessKeysRequest will create request of ListAccessKeys action.

func (*IAMClient) NewListEntitiesForPolicyRequest added in v0.21.53

func (c *IAMClient) NewListEntitiesForPolicyRequest() *ListEntitiesForPolicyRequest

NewListEntitiesForPolicyRequest will create request of ListEntitiesForPolicy action.

func (*IAMClient) NewListEntitiesForProjectRequest added in v0.21.53

func (c *IAMClient) NewListEntitiesForProjectRequest() *ListEntitiesForProjectRequest

NewListEntitiesForProjectRequest will create request of ListEntitiesForProject action.

func (*IAMClient) NewListGroupsRequest added in v0.21.57

func (c *IAMClient) NewListGroupsRequest() *ListGroupsRequest

NewListGroupsRequest will create request of ListGroups action.

func (*IAMClient) NewListPoliciesForGroupRequest added in v0.21.60

func (c *IAMClient) NewListPoliciesForGroupRequest() *ListPoliciesForGroupRequest

NewListPoliciesForGroupRequest will create request of ListPoliciesForGroup action.

func (*IAMClient) NewListPoliciesForUserRequest added in v0.21.60

func (c *IAMClient) NewListPoliciesForUserRequest() *ListPoliciesForUserRequest

NewListPoliciesForUserRequest will create request of ListPoliciesForUser action.

func (*IAMClient) NewListPoliciesRequest added in v0.21.59

func (c *IAMClient) NewListPoliciesRequest() *ListPoliciesRequest

NewListPoliciesRequest will create request of ListPolicies action.

func (*IAMClient) NewListProjectsRequest added in v0.21.53

func (c *IAMClient) NewListProjectsRequest() *ListProjectsRequest

NewListProjectsRequest will create request of ListProjects action.

func (*IAMClient) NewListUsersForGroupRequest added in v0.21.53

func (c *IAMClient) NewListUsersForGroupRequest() *ListUsersForGroupRequest

NewListUsersForGroupRequest will create request of ListUsersForGroup action.

func (*IAMClient) NewListUsersRequest added in v0.21.53

func (c *IAMClient) NewListUsersRequest() *ListUsersRequest

NewListUsersRequest will create request of ListUsers action.

func (*IAMClient) NewModifyProjectRequest added in v0.21.53

func (c *IAMClient) NewModifyProjectRequest() *ModifyProjectRequest

NewModifyProjectRequest will create request of ModifyProject action.

func (*IAMClient) NewRemoveUserFromGroupRequest added in v0.21.53

func (c *IAMClient) NewRemoveUserFromGroupRequest() *RemoveUserFromGroupRequest

NewRemoveUserFromGroupRequest will create request of RemoveUserFromGroup action.

func (*IAMClient) NewRemoveUserFromProjectRequest added in v0.21.53

func (c *IAMClient) NewRemoveUserFromProjectRequest() *RemoveUserFromProjectRequest

NewRemoveUserFromProjectRequest will create request of RemoveUserFromProject action.

func (*IAMClient) NewUpdateAccessKeyRequest added in v0.21.53

func (c *IAMClient) NewUpdateAccessKeyRequest() *UpdateAccessKeyRequest

NewUpdateAccessKeyRequest will create request of UpdateAccessKey action.

func (*IAMClient) NewUpdateGroupRequest added in v0.21.53

func (c *IAMClient) NewUpdateGroupRequest() *UpdateGroupRequest

NewUpdateGroupRequest will create request of UpdateGroup action.

func (*IAMClient) NewUpdateIAMPolicyNameRequest added in v0.21.53

func (c *IAMClient) NewUpdateIAMPolicyNameRequest() *UpdateIAMPolicyNameRequest

NewUpdateIAMPolicyNameRequest will create request of UpdateIAMPolicyName action.

func (*IAMClient) NewUpdateIAMPolicyRequest added in v0.21.53

func (c *IAMClient) NewUpdateIAMPolicyRequest() *UpdateIAMPolicyRequest

NewUpdateIAMPolicyRequest will create request of UpdateIAMPolicy action.

func (*IAMClient) NewUpdateLoginProfileRequest added in v0.21.57

func (c *IAMClient) NewUpdateLoginProfileRequest() *UpdateLoginProfileRequest

NewUpdateLoginProfileRequest will create request of UpdateLoginProfile action.

func (*IAMClient) NewUpdateUserRequest added in v0.21.53

func (c *IAMClient) NewUpdateUserRequest() *UpdateUserRequest

NewUpdateUserRequest will create request of UpdateUser action.

func (*IAMClient) RemoveUserFromGroup added in v0.21.53

func (c *IAMClient) RemoveUserFromGroup(req *RemoveUserFromGroupRequest) (*RemoveUserFromGroupResponse, error)

API: RemoveUserFromGroup

移除用户组中的IAM用户

func (*IAMClient) RemoveUserFromProject added in v0.21.53

API: RemoveUserFromProject

移除项目中的IAM用户,同时移除此用户在此项目下的所有权限

func (*IAMClient) UpdateAccessKey added in v0.21.53

func (c *IAMClient) UpdateAccessKey(req *UpdateAccessKeyRequest) (*UpdateAccessKeyResponse, error)

API: UpdateAccessKey

修改用户密钥状态

func (*IAMClient) UpdateGroup added in v0.21.53

func (c *IAMClient) UpdateGroup(req *UpdateGroupRequest) (*UpdateGroupResponse, error)

API: UpdateGroup

更新用户组信息

func (*IAMClient) UpdateIAMPolicy added in v0.21.53

func (c *IAMClient) UpdateIAMPolicy(req *UpdateIAMPolicyRequest) (*UpdateIAMPolicyResponse, error)

API: UpdateIAMPolicy

更新IAM策略

func (*IAMClient) UpdateIAMPolicyName added in v0.21.53

func (c *IAMClient) UpdateIAMPolicyName(req *UpdateIAMPolicyNameRequest) (*UpdateIAMPolicyNameResponse, error)

API: UpdateIAMPolicyName

修改自定义策略名称

func (*IAMClient) UpdateLoginProfile added in v0.21.57

func (c *IAMClient) UpdateLoginProfile(req *UpdateLoginProfileRequest) (*UpdateLoginProfileResponse, error)

API: UpdateLoginProfile

更新用户登录资料

func (*IAMClient) UpdateUser added in v0.21.53

func (c *IAMClient) UpdateUser(req *UpdateUserRequest) (*UpdateUserResponse, error)

API: UpdateUser

更新用户

type IAMPolicy added in v0.21.53

type IAMPolicy struct {

	// IAM权限策略创建时间
	CreatedAt int

	// IAM权限策略描述
	Description string

	// IAM权限策略文本
	Document string

	// 策略名称
	PolicyName string

	// IAM权限策略URN
	PolicyURN string

	// IAM权限策略应用范围(ScopeRequired:项目级, ScopeEmpty:全局级, ScopeUnrestricted:项目级/全局级)
	ScopeType string

	// IAM权限策略更新时间
	UpdatedAt int
}

IAMPolicy - 获取IAM权限策略详情

type ListAccessKeysRequest added in v0.21.53

type ListAccessKeysRequest struct {
	request.CommonBase

	// 用户名
	UserName *string `required:"true"`
}

ListAccessKeysRequest is request schema for ListAccessKeys action

type ListAccessKeysResponse added in v0.21.53

type ListAccessKeysResponse struct {
	response.CommonBase

	// 用户密钥信息列表
	AccessKey []AccessKey
}

ListAccessKeysResponse is response schema for ListAccessKeys action

type ListEntitiesForPolicyRequest added in v0.21.53

type ListEntitiesForPolicyRequest struct {
	request.CommonBase

	// 需要查询的用户组数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`

	// 策略URN
	PolicyURN *string `required:"true"`
}

ListEntitiesForPolicyRequest is request schema for ListEntitiesForPolicy action

type ListEntitiesForPolicyResponse added in v0.21.53

type ListEntitiesForPolicyResponse struct {
	response.CommonBase

	// 引用实体信息
	Entities []Entity

	// 错误消息
	Message string

	// 数据集合数量
	TotalCount int
}

ListEntitiesForPolicyResponse is response schema for ListEntitiesForPolicy action

type ListEntitiesForProjectRequest added in v0.21.53

type ListEntitiesForProjectRequest struct {
	request.CommonBase

	// 需要查询的用户组数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`

	// 项目ID
	ProjectID *string `required:"true"`
}

ListEntitiesForProjectRequest is request schema for ListEntitiesForProject action

type ListEntitiesForProjectResponse added in v0.21.53

type ListEntitiesForProjectResponse struct {
	response.CommonBase

	// 授权项目权限的实体
	Entities []Entity

	// 错误消息
	Message string

	// 数据集合数量
	TotalCount int
}

ListEntitiesForProjectResponse is response schema for ListEntitiesForProject action

type ListGroupsRequest added in v0.21.57

type ListGroupsRequest struct {
	request.CommonBase
}

ListGroupsRequest is request schema for ListGroups action

type ListGroupsResponse added in v0.21.57

type ListGroupsResponse struct {
	response.CommonBase

	// 用户组数组
	Groups []Group

	// 错误消息
	Message string

	// 总数
	TotalCount int
}

ListGroupsResponse is response schema for ListGroups action

type ListPoliciesForGroupRequest added in v0.21.60

type ListPoliciesForGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`

	// 需要查询的用户组数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`

	// 项目ID
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"false"`
}

ListPoliciesForGroupRequest is request schema for ListPoliciesForGroup action

type ListPoliciesForGroupResponse added in v0.21.60

type ListPoliciesForGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 用户信息数组
	Policies []Policy

	// 总数
	TotalCount int
}

ListPoliciesForGroupResponse is response schema for ListPoliciesForGroup action

type ListPoliciesForUserRequest added in v0.21.60

type ListPoliciesForUserRequest struct {
	request.CommonBase

	// 需要查询的用户组数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`

	// 项目ID
	ProjectID *string `required:"false"`

	// 应用范围
	Scope *string `required:"false"`

	// 用户名
	UserName *string `required:"true"`
}

ListPoliciesForUserRequest is request schema for ListPoliciesForUser action

type ListPoliciesForUserResponse added in v0.21.60

type ListPoliciesForUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 策略信息
	Policies []Policy

	// 数据集合数量
	TotalCount int
}

ListPoliciesForUserResponse is response schema for ListPoliciesForUser action

type ListPoliciesRequest added in v0.21.59

type ListPoliciesRequest struct {
	request.CommonBase

	// 需要查询的用户组数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`

	// 策略所有者
	Owner *string `required:"true"`
}

ListPoliciesRequest is request schema for ListPolicies action

type ListPoliciesResponse added in v0.21.59

type ListPoliciesResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 策略信息
	Policies []IAMPolicy

	// 数据集合数量
	TotalCount int
}

ListPoliciesResponse is response schema for ListPolicies action

type ListProjectsRequest added in v0.21.53

type ListProjectsRequest struct {
	request.CommonBase

	//
	Limit *string `required:"false"`

	//
	Offset *string `required:"false"`
}

ListProjectsRequest is request schema for ListProjects action

type ListProjectsResponse added in v0.21.53

type ListProjectsResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 项目信息
	Projects []Project

	// 总数
	TotalCount int
}

ListProjectsResponse is response schema for ListProjects action

type ListUsersForGroupRequest added in v0.21.53

type ListUsersForGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`

	// 需要查询的组内用户数量
	Limit *string `required:"false"`

	// 从第几条数据开始查询
	Offset *string `required:"false"`
}

ListUsersForGroupRequest is request schema for ListUsersForGroup action

type ListUsersForGroupResponse added in v0.21.53

type ListUsersForGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 总数
	TotalCount int

	// 用户信息数组
	Users []UserForGroup
}

ListUsersForGroupResponse is response schema for ListUsersForGroup action

type ListUsersRequest added in v0.21.53

type ListUsersRequest struct {
	request.CommonBase

	// 分页Limit(默认:10,最大100)
	Limit *string `required:"false"`

	// 分页offset
	Offset *string `required:"false"`
}

ListUsersRequest is request schema for ListUsers action

type ListUsersResponse added in v0.21.53

type ListUsersResponse struct {
	response.CommonBase

	// 错误消息
	Message string

	// 用户数量
	TotalCount int

	// 用户信息
	Users []Users
}

ListUsersResponse is response schema for ListUsers action

type LoginProfile added in v0.21.57

type LoginProfile struct {

	// 是否必需绑定MFA
	MFABindRequired bool

	// 密码最长有效期,单位:天
	MaxPasswordAge int

	// 登录资料状态
	Status string
}

LoginProfile - 登录资料

type ModifyProjectRequest added in v0.21.53

type ModifyProjectRequest struct {
	request.CommonBase

	// 新的项目名称
	ProjectName *string `required:"true"`
}

ModifyProjectRequest is request schema for ModifyProject action

type ModifyProjectResponse added in v0.21.53

type ModifyProjectResponse struct {
	response.CommonBase
}

ModifyProjectResponse is response schema for ModifyProject action

type Policy added in v0.21.60

type Policy struct {

	// 策略被添加到用户组时的时间戳
	AttachedAt int

	// 创建时间
	CreatedAt int

	// 描述
	Description string

	// 权限策略名称
	PolicyName string

	// 策略URN
	PolicyURN string

	// 项目ID
	ProjectID string

	// 应用范围(ScopeRequired:项目级, ScopeEmpty:全局级, ScopeUnrestricted:项目级/全局级)
	Scope string
}

Policy - 权限策略

type Project added in v0.21.53

type Project struct {

	// 创建时间
	CreatedAt int

	// 项目ID
	ProjectID string

	// 项目名称
	ProjectName string

	// 用户数量
	UserCount int
}

Project - 项目模型

type RemoveUserFromGroupRequest added in v0.21.53

type RemoveUserFromGroupRequest struct {
	request.CommonBase

	// 用户组名称
	GroupName *string `required:"true"`

	// 用户名
	UserName *string `required:"true"`
}

RemoveUserFromGroupRequest is request schema for RemoveUserFromGroup action

type RemoveUserFromGroupResponse added in v0.21.53

type RemoveUserFromGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

RemoveUserFromGroupResponse is response schema for RemoveUserFromGroup action

type RemoveUserFromProjectRequest added in v0.21.53

type RemoveUserFromProjectRequest struct {
	request.CommonBase

	// 项目ID
	ProjectID *string `required:"true"`

	// 用户名
	UserName *string `required:"true"`
}

RemoveUserFromProjectRequest is request schema for RemoveUserFromProject action

type RemoveUserFromProjectResponse added in v0.21.53

type RemoveUserFromProjectResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

RemoveUserFromProjectResponse is response schema for RemoveUserFromProject action

type UpdateAccessKeyRequest added in v0.21.53

type UpdateAccessKeyRequest struct {
	request.CommonBase

	// 用户公钥
	AccessKeyID *string `required:"true"`

	// 密钥描述
	Description *string `required:"false"`

	// 密钥状态
	Status *string `required:"false"`
}

UpdateAccessKeyRequest is request schema for UpdateAccessKey action

type UpdateAccessKeyResponse added in v0.21.53

type UpdateAccessKeyResponse struct {
	response.CommonBase
}

UpdateAccessKeyResponse is response schema for UpdateAccessKey action

type UpdateGroupRequest added in v0.21.53

type UpdateGroupRequest struct {
	request.CommonBase

	// 用户组描述信息
	Description *string `required:"true"`

	// 用户组名称
	GroupName *string `required:"true"`
}

UpdateGroupRequest is request schema for UpdateGroup action

type UpdateGroupResponse added in v0.21.53

type UpdateGroupResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

UpdateGroupResponse is response schema for UpdateGroup action

type UpdateIAMPolicyNameRequest added in v0.21.53

type UpdateIAMPolicyNameRequest struct {
	request.CommonBase

	// 策略描述
	Description *string `required:"true"`

	// 策略名称
	PolicyName *string `required:"true"`

	// 策略URN
	PolicyURN *string `required:"true"`
}

UpdateIAMPolicyNameRequest is request schema for UpdateIAMPolicyName action

type UpdateIAMPolicyNameResponse added in v0.21.53

type UpdateIAMPolicyNameResponse struct {
	response.CommonBase
}

UpdateIAMPolicyNameResponse is response schema for UpdateIAMPolicyName action

type UpdateIAMPolicyRequest added in v0.21.53

type UpdateIAMPolicyRequest struct {
	request.CommonBase

	// 描述
	Description *string `required:"false"`

	// 策略内容
	Document *string `required:"true"`

	// 策略URN
	PolicyURN *string `required:"true"`

	// 策略版本描述
	VersionDescription *string `required:"false"`
}

UpdateIAMPolicyRequest is request schema for UpdateIAMPolicy action

type UpdateIAMPolicyResponse added in v0.21.53

type UpdateIAMPolicyResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

UpdateIAMPolicyResponse is response schema for UpdateIAMPolicy action

type UpdateLoginProfileRequest added in v0.21.57

type UpdateLoginProfileRequest struct {
	request.CommonBase

	// 是否必需绑定MFA
	MFABindRequired *bool `required:"false"`

	// 密码最长有效期,单位:天
	MaxPasswordAge *int `required:"false"`

	// 登录资料状态
	Status *string `required:"false"`

	// 用户真实邮箱
	UserEmail *string `required:"false"`

	// 用户名
	UserName *string `required:"true"`
}

UpdateLoginProfileRequest is request schema for UpdateLoginProfile action

type UpdateLoginProfileResponse added in v0.21.57

type UpdateLoginProfileResponse struct {
	response.CommonBase
}

UpdateLoginProfileResponse is response schema for UpdateLoginProfile action

type UpdateUserRequest added in v0.21.53

type UpdateUserRequest struct {
	request.CommonBase

	// 用户名称(用户名称和用户状态不能同时为空)
	DisplayName *string `required:"false"`

	// 新用户名
	NewUserName *string `required:"false"`

	// 用户状态(用户名称和用户状态不能同时为空,枚举值:Active:解冻,Frozen:冻结)
	Status *string `required:"false"`

	// 用户名
	UserName *string `required:"true"`
}

UpdateUserRequest is request schema for UpdateUser action

type UpdateUserResponse added in v0.21.53

type UpdateUserResponse struct {
	response.CommonBase

	// 错误消息
	Message string
}

UpdateUserResponse is response schema for UpdateUser action

type User added in v0.21.53

type User struct {

	// 创建时间戳
	CreatedAt int

	// 昵称
	DisplayName string

	// 邮箱
	Email string

	// 状态(Active:正常,Inactive:未激活,Frozen:冻结,ConsoleInactive:控制台未激活)
	Status string

	// 用户名
	UserName string
}

User - 用户模型

type UserForGroup added in v0.21.53

type UserForGroup struct {

	// 昵称
	DisplayName string

	// 邮箱
	Email string

	// 用户被添加到用户组时的时间戳
	JoinedAt int

	// 用户名
	UserName string
}

UserForGroup - 用户模型

type Users added in v0.21.53

type Users struct {

	// 创建时间戳
	CreatedAt int

	// 昵称
	DisplayName string

	// 邮箱
	Email string

	// 状态(Active:正常,Inactive:未激活,Frozen:冻结,ConsoleInactive:控制台未激活)
	Status string

	// 用户名
	UserName string
}

Users - 用户模型

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL