Documentation
¶
Index ¶
- Constants
- type AccessKey
- type AccessKeyListResponse
- type AccessKeyResponse
- type AccountAlias
- type AccountAliasResponse
- type AssumeRolePolicyDocument
- type AssumeRolePolicyItem
- type AssumeRolePolicyPrincpal
- type AttachPolicyRequest
- type AttachPolicyToRoleRequest
- type Group
- type ListRoleResponse
- type ListUserRequest
- type ListUserResponse
- type LoginProfile
- type MFADevice
- type PasswordPolicy
- type PasswordPolicyRequest
- type PasswordPolicyResponse
- type Policy
- type PolicyDocument
- type PolicyItem
- type PolicyListResponse
- type PolicyQueryRequest
- type PolicyQueryResponse
- type PolicyRequest
- type PolicyResponse
- type PolicyVersionResponse
- type RamClient
- func (client *RamClient) AddUserToGroup()
- func (client *RamClient) AttachPolicyToRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
- func (client *RamClient) AttachPolicyToUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
- func (client *RamClient) BindMFADevice()
- func (client *RamClient) ClearAccountAlias() (RamCommonResponse, error)
- func (client *RamClient) CreateAccessKey(userQuery UserQueryRequest) (AccessKeyResponse, error)
- func (client *RamClient) CreateGroup()
- func (client *RamClient) CreateLoginProfile()
- func (client *RamClient) CreatePolicy(policyReq PolicyRequest) (PolicyResponse, error)
- func (client *RamClient) CreatePolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
- func (client *RamClient) CreateRole(role RoleRequest) (RoleResponse, error)
- func (client *RamClient) CreateUser(user UserRequest) (UserResponse, error)
- func (client *RamClient) CreateVirtualMFADevices()
- func (client *RamClient) DeleteAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
- func (client *RamClient) DeleteGroup()
- func (client *RamClient) DeleteLoginProfile()
- func (client *RamClient) DeletePolicy(policyReq PolicyRequest) (RamCommonResponse, error)
- func (client *RamClient) DeletePolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error)
- func (client *RamClient) DeleteRole(roleQuery RoleQueryRequest) (RamCommonResponse, error)
- func (client *RamClient) DeleteUser(userQuery UserQueryRequest) (RamCommonResponse, error)
- func (client *RamClient) DeleteVirtualMFADevices()
- func (client *RamClient) DetachPolicyFromRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
- func (client *RamClient) DetachPolicyFromUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
- func (client *RamClient) GetAccountAlias() (AccountAliasResponse, error)
- func (client *RamClient) GetGroup()
- func (client *RamClient) GetLoginProfile()
- func (client *RamClient) GetPasswordPolicy(accountAlias AccountAlias) (PasswordPolicyResponse, error)
- func (client *RamClient) GetPolicy(policyReq PolicyRequest) (PolicyResponse, error)
- func (client *RamClient) GetPolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
- func (client *RamClient) GetRole(roleQuery RoleQueryRequest) (RoleResponse, error)
- func (client *RamClient) GetUser(userQuery UserQueryRequest) (UserResponse, error)
- func (client *RamClient) GetUserMFAInfo()
- func (client *RamClient) ListAccessKeys(userQuery UserQueryRequest) (AccessKeyListResponse, error)
- func (client *RamClient) ListEnitiesForPolicy()
- func (client *RamClient) ListGroup()
- func (client *RamClient) ListGroupsForUser()
- func (client *RamClient) ListPolicies(policyQuery PolicyQueryRequest) (PolicyQueryResponse, error)
- func (client *RamClient) ListPoliciesForGroup()
- func (client *RamClient) ListPoliciesForRole(roleQuery RoleQueryRequest) (PolicyListResponse, error)
- func (client *RamClient) ListPoliciesForUser(userQuery UserQueryRequest) (PolicyListResponse, error)
- func (client *RamClient) ListPolicyVersions(policyReq PolicyRequest) (PolicyVersionResponse, error)
- func (client *RamClient) ListRoles() (ListRoleResponse, error)
- func (client *RamClient) ListUsers(listParams ListUserRequest) (ListUserResponse, error)
- func (client *RamClient) ListUsersForGroup()
- func (client *RamClient) ListVirtualMFADevices()
- func (client *RamClient) RemoveUserFromGroup()
- func (client *RamClient) SetAccountAlias(accountalias AccountAlias) (RamCommonResponse, error)
- func (client *RamClient) SetDefaultPolicyVersion()
- func (client *RamClient) SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error)
- func (client *RamClient) UpdateAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
- func (client *RamClient) UpdateGroup()
- func (client *RamClient) UpdateLoginProfile()
- func (client *RamClient) UpdateRole(newRole UpdateRoleRequest) (RoleResponse, error)
- func (client *RamClient) UpdateUser(newUser UpdateUserRequest) (UserResponse, error)
- type RamClientInterface
- type RamCommonResponse
- type Role
- type RoleQueryRequest
- type RoleRequest
- type RoleResponse
- type State
- type UpdateAccessKeyRequest
- type UpdateRoleRequest
- type UpdateUserRequest
- type User
- type UserQueryRequest
- type UserRequest
- type UserResponse
- type VirtualMFADevice
Constants ¶
View Source
const ( // RAMDefaultEndpoint is the default API endpoint of RAM services RAMDefaultEndpoint = "https://ram.aliyuncs.com" RAMAPIVersion = "2015-05-01" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKeyListResponse ¶
type AccessKeyListResponse struct {
RamCommonResponse
AccessKeys struct {
AccessKey []AccessKey
}
}
type AccessKeyResponse ¶
type AccessKeyResponse struct {
RamCommonResponse
AccessKey AccessKey
}
type AccountAlias ¶
type AccountAlias string
AccountAlias 类型:String 必须:是 描述:指定云账号的别名, 长度限制为3-63个字符 限制:^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$
type AccountAliasResponse ¶
type AccountAliasResponse struct {
RamCommonResponse
AccountAlias string
}
TODO implement ram api about security
SetAccountAlias() GetAccountAlias() ClearAccountAlias() SetPasswordPolicy() GetPasswordPolicy()
type AssumeRolePolicyDocument ¶
type AssumeRolePolicyDocument struct {
Statement []AssumeRolePolicyItem
Version string
}
type AssumeRolePolicyItem ¶
type AssumeRolePolicyItem struct {
Action string
Effect string
Principal AssumeRolePolicyPrincpal
}
type AssumeRolePolicyPrincpal ¶
type AssumeRolePolicyPrincpal struct {
RAM []string
}
type AttachPolicyRequest ¶
type AttachPolicyRequest struct {
PolicyRequest
UserName string
}
type AttachPolicyToRoleRequest ¶
type AttachPolicyToRoleRequest struct {
PolicyRequest
RoleName string
}
type ListRoleResponse ¶
type ListRoleResponse struct {
RamCommonResponse
Roles struct {
Role []Role
}
}
type ListUserRequest ¶
type ListUserResponse ¶
type ListUserResponse struct {
RamCommonResponse
IsTruncated bool
Marker string
Users struct {
User []User
}
}
type LoginProfile ¶
type LoginProfile struct {
}
type PasswordPolicy ¶
type PasswordPolicyRequest ¶
type PasswordPolicyRequest struct {
PasswordPolicy
}
type PasswordPolicyResponse ¶
type PasswordPolicyResponse struct {
RamCommonResponse
PasswordPolicy
}
type PolicyDocument ¶
type PolicyDocument struct {
Statement []PolicyItem
Version string
}
type PolicyItem ¶
type PolicyListResponse ¶
type PolicyListResponse struct {
RamCommonResponse
Policies struct {
Policy []Policy
}
}
type PolicyQueryRequest ¶
type PolicyQueryResponse ¶
type PolicyRequest ¶
type PolicyResponse ¶
type PolicyResponse struct {
RamCommonResponse
Policy Policy
}
type PolicyVersionResponse ¶
type PolicyVersionResponse struct {
RamCommonResponse
IsDefaultVersion bool
VersionId string
CreateDate string
PolicyDocument string
}
type RamClient ¶
func (*RamClient) AddUserToGroup ¶
func (client *RamClient) AddUserToGroup()
func (*RamClient) AttachPolicyToRole ¶
func (client *RamClient) AttachPolicyToRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
Role related
func (*RamClient) AttachPolicyToUser ¶
func (client *RamClient) AttachPolicyToUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
func (*RamClient) BindMFADevice ¶
func (client *RamClient) BindMFADevice()
func (*RamClient) ClearAccountAlias ¶
func (client *RamClient) ClearAccountAlias() (RamCommonResponse, error)
func (*RamClient) CreateAccessKey ¶
func (client *RamClient) CreateAccessKey(userQuery UserQueryRequest) (AccessKeyResponse, error)
func (*RamClient) CreateGroup ¶
func (client *RamClient) CreateGroup()
func (*RamClient) CreateLoginProfile ¶
func (client *RamClient) CreateLoginProfile()
func (*RamClient) CreatePolicy ¶
func (client *RamClient) CreatePolicy(policyReq PolicyRequest) (PolicyResponse, error)
func (*RamClient) CreatePolicyVersion ¶
func (client *RamClient) CreatePolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
func (*RamClient) CreateRole ¶
func (client *RamClient) CreateRole(role RoleRequest) (RoleResponse, error)
func (*RamClient) CreateUser ¶
func (client *RamClient) CreateUser(user UserRequest) (UserResponse, error)
func (*RamClient) CreateVirtualMFADevices ¶
func (client *RamClient) CreateVirtualMFADevices()
func (*RamClient) DeleteAccessKey ¶
func (client *RamClient) DeleteAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
func (*RamClient) DeleteGroup ¶
func (client *RamClient) DeleteGroup()
func (*RamClient) DeleteLoginProfile ¶
func (client *RamClient) DeleteLoginProfile()
func (*RamClient) DeletePolicy ¶
func (client *RamClient) DeletePolicy(policyReq PolicyRequest) (RamCommonResponse, error)
func (*RamClient) DeletePolicyVersion ¶
func (client *RamClient) DeletePolicyVersion(policyReq PolicyRequest) (RamCommonResponse, error)
func (*RamClient) DeleteRole ¶
func (client *RamClient) DeleteRole(roleQuery RoleQueryRequest) (RamCommonResponse, error)
func (*RamClient) DeleteUser ¶
func (client *RamClient) DeleteUser(userQuery UserQueryRequest) (RamCommonResponse, error)
func (*RamClient) DeleteVirtualMFADevices ¶
func (client *RamClient) DeleteVirtualMFADevices()
func (*RamClient) DetachPolicyFromRole ¶
func (client *RamClient) DetachPolicyFromRole(attachPolicyRequest AttachPolicyToRoleRequest) (RamCommonResponse, error)
func (*RamClient) DetachPolicyFromUser ¶
func (client *RamClient) DetachPolicyFromUser(attachPolicyRequest AttachPolicyRequest) (RamCommonResponse, error)
func (*RamClient) GetAccountAlias ¶
func (client *RamClient) GetAccountAlias() (AccountAliasResponse, error)
func (*RamClient) GetLoginProfile ¶
func (client *RamClient) GetLoginProfile()
func (*RamClient) GetPasswordPolicy ¶
func (client *RamClient) GetPasswordPolicy(accountAlias AccountAlias) (PasswordPolicyResponse, error)
func (*RamClient) GetPolicy ¶
func (client *RamClient) GetPolicy(policyReq PolicyRequest) (PolicyResponse, error)
func (*RamClient) GetPolicyVersion ¶
func (client *RamClient) GetPolicyVersion(policyReq PolicyRequest) (PolicyVersionResponse, error)
func (*RamClient) GetRole ¶
func (client *RamClient) GetRole(roleQuery RoleQueryRequest) (RoleResponse, error)
func (*RamClient) GetUser ¶
func (client *RamClient) GetUser(userQuery UserQueryRequest) (UserResponse, error)
func (*RamClient) GetUserMFAInfo ¶
func (client *RamClient) GetUserMFAInfo()
func (*RamClient) ListAccessKeys ¶
func (client *RamClient) ListAccessKeys(userQuery UserQueryRequest) (AccessKeyListResponse, error)
func (*RamClient) ListGroupsForUser ¶
func (client *RamClient) ListGroupsForUser()
func (*RamClient) ListPolicies ¶
func (client *RamClient) ListPolicies(policyQuery PolicyQueryRequest) (PolicyQueryResponse, error)
func (*RamClient) ListPoliciesForGroup ¶
func (client *RamClient) ListPoliciesForGroup()
Group related
TODO
func (*RamClient) ListPoliciesForRole ¶
func (client *RamClient) ListPoliciesForRole(roleQuery RoleQueryRequest) (PolicyListResponse, error)
func (*RamClient) ListPoliciesForUser ¶
func (client *RamClient) ListPoliciesForUser(userQuery UserQueryRequest) (PolicyListResponse, error)
func (*RamClient) ListPolicyVersions ¶
func (client *RamClient) ListPolicyVersions(policyReq PolicyRequest) (PolicyVersionResponse, error)
func (*RamClient) ListRoles ¶
func (client *RamClient) ListRoles() (ListRoleResponse, error)
func (*RamClient) ListUsers ¶
func (client *RamClient) ListUsers(listParams ListUserRequest) (ListUserResponse, error)
func (*RamClient) ListUsersForGroup ¶
func (client *RamClient) ListUsersForGroup()
func (*RamClient) ListVirtualMFADevices ¶
func (client *RamClient) ListVirtualMFADevices()
func (*RamClient) RemoveUserFromGroup ¶
func (client *RamClient) RemoveUserFromGroup()
func (*RamClient) SetAccountAlias ¶
func (client *RamClient) SetAccountAlias(accountalias AccountAlias) (RamCommonResponse, error)
func (*RamClient) SetPasswordPolicy ¶
func (client *RamClient) SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error)
func (*RamClient) UpdateAccessKey ¶
func (client *RamClient) UpdateAccessKey(accessKeyRequest UpdateAccessKeyRequest) (RamCommonResponse, error)
func (*RamClient) UpdateGroup ¶
func (client *RamClient) UpdateGroup()
func (*RamClient) UpdateLoginProfile ¶
func (client *RamClient) UpdateLoginProfile()
func (*RamClient) UpdateRole ¶
func (client *RamClient) UpdateRole(newRole UpdateRoleRequest) (RoleResponse, error)
func (*RamClient) UpdateUser ¶
func (client *RamClient) UpdateUser(newUser UpdateUserRequest) (UserResponse, error)
type RamClientInterface ¶
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)
}
func NewClient ¶
func NewClient(accessKeyId string, accessKeySecret string) RamClientInterface
func NewClientWithEndpoint ¶
func NewClientWithEndpoint(endpoint string, accessKeyId string, accessKeySecret string) RamClientInterface
type RamCommonResponse ¶
type RoleQueryRequest ¶
type RoleQueryRequest struct {
RoleName string
}
type RoleRequest ¶
type RoleResponse ¶
type RoleResponse struct {
RamCommonResponse
Role Role
}
type State ¶
type State string
CreateAccessKey() UpdateAccessKey() DeleteAccessKey() ListAccessKeys()
type UpdateAccessKeyRequest ¶
type UpdateRoleRequest ¶
type UpdateUserRequest ¶
type UserQueryRequest ¶
type UserQueryRequest struct {
UserName string
}
type UserRequest ¶
type UserRequest struct {
User
}
type UserResponse ¶
type UserResponse struct {
RamCommonResponse
User User
}
type VirtualMFADevice ¶
type VirtualMFADevice struct {
}
Click to show internal directories.
Click to hide internal directories.