forked from denverdino/aliyungo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.go
79 lines (69 loc) · 2.91 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package ram
/*
ringtail 2016/1/19
All RAM apis provided
*/
type RamClientInterface interface {
//ram user
CreateUser(user UserRequest) (UserResponse, error)
GetUser(userQuery UserQueryRequest) (UserResponse, error)
UpdateUser(newUser UpdateUserRequest) (UserResponse, error)
DeleteUser(userQuery UserQueryRequest) (RamCommonResponse, error)
ListUsers(listParams ListUserRequest) (ListUserResponse, error)
//TODO login ram console
CreateLoginProfile()
GetLoginProfile()
DeleteLoginProfile()
UpdateLoginProfile()
//ram ak
CreateAccessKey(userQuery UserQueryRequest) (AccessKeyResponse, error)
UpdateAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
DeleteAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
ListAccessKeys(userQuery UserQueryRequest) (AccessKeyListResponse, error)
//TODO MFA
CreateVirtualMFADevices()
ListVirtualMFADevices()
DeleteVirtualMFADevices()
BindMFADevice()
GetUserMFAInfo()
//TODO group
CreateGroup()
GetGroup()
UpdateGroup()
ListGroup()
DeleteGroup()
AddUserToGroup()
RemoveUserFromGroup()
ListGroupsForUser()
ListUsersForGroup()
CreateRole(role RoleRequest) (RoleResponse, error)
GetRole(roleQuery RoleQueryRequest) (RoleResponse, error)
UpdateRole(newRole UpdateRoleRequest) (RoleResponse, error)
ListRoles() (ListRoleResponse, error)
DeleteRole(roleQuery RoleQueryRequest) (RamCommonResponse, error)
//DONE policy
CreatePolicy(policyReq PolicyRequest) (PolicyResponse, error)
GetPolicy(policyReq PolicyRequest) (PolicyResponse, error)
DeletePolicy(policyReq PolicyRequest) (RamCommonResponse, error)
ListPolicies(policyQuery PolicyQueryRequest) (PolicyQueryResponse, error)
ListPoliciesForUser(userQuery UserQueryRequest) (PolicyListResponse, error)
//TODO policy
CreatePolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
GetPolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
DeletePolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error)
ListPolicyVersions(policyReq PolicyRequest) (PolicyVersionResponse, error)
AttachPolicyToUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
DetachPolicyFromUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
ListEnitiesForPolicy()
SetDefaultPolicyVersion()
ListPoliciesForGroup()
AttachPolicyToRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
DetachPolicyFromRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
ListPoliciesForRole(roleQuery RoleQueryRequest) (PolicyListResponse, error)
//TODO security apis
SetAccountAlias(accountAlias AccountAlias) (RamCommonResponse, error)
GetAccountAlias() (AccountAliasResponse, error)
ClearAccountAlias() (RamCommonResponse, error)
SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error)
GetPasswordPolicy(accountAlias AccountAlias) (PasswordPolicyResponse, error)
}