org.dasein.cloud.aws.identity
Class IAM
java.lang.Object
org.dasein.cloud.aws.identity.IAM
- All Implemented Interfaces:
- org.dasein.cloud.AccessControlledService, org.dasein.cloud.identity.IdentityAndAccessSupport
public class IAM
- extends Object
- implements org.dasein.cloud.identity.IdentityAndAccessSupport
Implementation of the AWS IAM APIs based on the Dasein Cloud identity and access support.
- Since:
- 2012.02
- Version:
- 2012.02
- Author:
- George Reese (george.reese@imaginary.com)
| Fields inherited from interface org.dasein.cloud.identity.IdentityAndAccessSupport |
ADD_GROUP_ACCESS, ADD_USER_ACCESS, ANY, CREATE_GROUP, CREATE_USER, DISABLE_API, DISABLE_CONSOLE, DROP_FROM_GROUP, ENABLE_API, ENABLE_CONSOLE, GET_ACCESS_KEY, GET_GROUP, GET_GROUP_POLICY, GET_USER, GET_USER_POLICY, JOIN_GROUP, LIST_ACCESS_KEY, LIST_GROUP, LIST_USER, REMOVE_GROUP, REMOVE_GROUP_ACCESS, REMOVE_USER, REMOVE_USER_ACCESS, UPDATE_GROUP, UPDATE_USER |
|
Method Summary |
void |
addUserToGroups(String providerUserId,
String... providerGroupIds)
|
org.dasein.cloud.identity.CloudGroup |
createGroup(String groupName,
String path,
boolean asAdminGroup)
|
org.dasein.cloud.identity.CloudUser |
createUser(String userName,
String path,
String... autoJoinGroupIds)
|
org.dasein.cloud.identity.AccessKey |
enableAPIAccess(String providerUserId)
|
void |
enableConsoleAccess(String providerUserId,
byte[] password)
|
org.dasein.cloud.identity.CloudGroup |
getGroup(String providerGroupId)
|
org.dasein.cloud.identity.CloudUser |
getUser(String providerUserId)
|
boolean |
isSubscribed()
|
Iterable<org.dasein.cloud.identity.CloudGroup> |
listGroups(String pathBase)
|
Iterable<org.dasein.cloud.identity.CloudGroup> |
listGroupsForUser(String providerUserId)
|
Iterable<org.dasein.cloud.identity.CloudPolicy> |
listPoliciesForGroup(String providerGroupId)
|
Iterable<org.dasein.cloud.identity.CloudPolicy> |
listPoliciesForUser(String providerUserId)
|
Iterable<org.dasein.cloud.identity.CloudUser> |
listUsersInGroup(String inProviderGroupId)
|
Iterable<org.dasein.cloud.identity.CloudUser> |
listUsersInPath(String pathBase)
|
String[] |
mapServiceAction(org.dasein.cloud.identity.ServiceAction action)
|
void |
removeAccessKey(String sharedKeyPart)
|
void |
removeAccessKey(String sharedKeyPart,
String providerUserId)
|
void |
removeConsoleAccess(String providerUserId)
|
void |
removeGroup(String providerGroupId)
|
void |
removeGroupPolicy(String providerGroupId,
String providerPolicyId)
|
void |
removeUser(String providerUserId)
|
void |
removeUserFromGroup(String providerUserId,
String providerGroupId)
|
void |
removeUserPolicy(String providerUserId,
String providerPolicyId)
|
void |
saveGroup(String providerGroupId,
String newGroupName,
String newPath)
|
String[] |
saveGroupPolicy(String providerGroupId,
String name,
org.dasein.cloud.identity.CloudPermission permission,
org.dasein.cloud.identity.ServiceAction action,
String resourceId)
|
void |
saveUser(String providerUserId,
String newUserName,
String newPath)
|
String[] |
saveUserPolicy(String providerUserId,
String name,
org.dasein.cloud.identity.CloudPermission permission,
org.dasein.cloud.identity.ServiceAction action,
String resourceId)
|
boolean |
supportsAccessControls()
|
boolean |
supportsAPIAccess()
|
boolean |
supportsConsoleAccess()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IAM
public IAM(@Nonnull
AWSCloud cloud)
addUserToGroups
public void addUserToGroups(@Nonnull
String providerUserId,
@Nonnull
String... providerGroupIds)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
addUserToGroups in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
createGroup
@Nonnull
public org.dasein.cloud.identity.CloudGroup createGroup(@Nonnull
String groupName,
@Nullable
String path,
boolean asAdminGroup)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
createGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
createUser
@Nonnull
public org.dasein.cloud.identity.CloudUser createUser(@Nonnull
String userName,
@Nullable
String path,
@Nullable
String... autoJoinGroupIds)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
createUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
enableAPIAccess
@Nonnull
public org.dasein.cloud.identity.AccessKey enableAPIAccess(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
enableAPIAccess in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
enableConsoleAccess
public void enableConsoleAccess(@Nonnull
String providerUserId,
@Nonnull
byte[] password)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
enableConsoleAccess in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
getGroup
@Nullable
public org.dasein.cloud.identity.CloudGroup getGroup(@Nonnull
String providerGroupId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
getGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
getUser
@Nullable
public org.dasein.cloud.identity.CloudUser getUser(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
getUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
isSubscribed
public boolean isSubscribed()
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
isSubscribed in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listGroups
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudGroup> listGroups(@Nullable
String pathBase)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listGroups in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listGroupsForUser
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudGroup> listGroupsForUser(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listGroupsForUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listPoliciesForGroup
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudPolicy> listPoliciesForGroup(@Nonnull
String providerGroupId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listPoliciesForGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listPoliciesForUser
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudPolicy> listPoliciesForUser(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listPoliciesForUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listUsersInGroup
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudUser> listUsersInGroup(@Nonnull
String inProviderGroupId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listUsersInGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listUsersInPath
@Nonnull
public Iterable<org.dasein.cloud.identity.CloudUser> listUsersInPath(@Nullable
String pathBase)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listUsersInPath in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
mapServiceAction
@Nonnull
public String[] mapServiceAction(@Nonnull
org.dasein.cloud.identity.ServiceAction action)
- Specified by:
mapServiceAction in interface org.dasein.cloud.AccessControlledService
removeAccessKey
public void removeAccessKey(@Nonnull
String sharedKeyPart)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeAccessKey in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeAccessKey
public void removeAccessKey(@Nonnull
String sharedKeyPart,
@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeAccessKey in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeConsoleAccess
public void removeConsoleAccess(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeConsoleAccess in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeGroup
public void removeGroup(@Nonnull
String providerGroupId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeGroupPolicy
public void removeGroupPolicy(@Nonnull
String providerGroupId,
@Nonnull
String providerPolicyId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeGroupPolicy in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeUser
public void removeUser(@Nonnull
String providerUserId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeUserPolicy
public void removeUserPolicy(@Nonnull
String providerUserId,
@Nonnull
String providerPolicyId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeUserPolicy in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeUserFromGroup
public void removeUserFromGroup(@Nonnull
String providerUserId,
@Nonnull
String providerGroupId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeUserFromGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
saveGroup
public void saveGroup(@Nonnull
String providerGroupId,
@Nullable
String newGroupName,
@Nullable
String newPath)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
saveGroup in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
saveGroupPolicy
@Nonnull
public String[] saveGroupPolicy(@Nonnull
String providerGroupId,
@Nonnull
String name,
@Nonnull
org.dasein.cloud.identity.CloudPermission permission,
@Nullable
org.dasein.cloud.identity.ServiceAction action,
@Nullable
String resourceId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
saveGroupPolicy in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
saveUserPolicy
public String[] saveUserPolicy(@Nonnull
String providerUserId,
@Nonnull
String name,
@Nonnull
org.dasein.cloud.identity.CloudPermission permission,
@Nullable
org.dasein.cloud.identity.ServiceAction action,
@Nullable
String resourceId)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
saveUserPolicy in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
saveUser
public void saveUser(@Nonnull
String providerUserId,
@Nullable
String newUserName,
@Nullable
String newPath)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
saveUser in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
supportsAccessControls
public boolean supportsAccessControls()
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
supportsAccessControls in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
supportsConsoleAccess
public boolean supportsConsoleAccess()
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
supportsConsoleAccess in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
supportsAPIAccess
public boolean supportsAPIAccess()
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
supportsAPIAccess in interface org.dasein.cloud.identity.IdentityAndAccessSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
Copyright © 2009-2014 Dell, Inc.. All Rights Reserved.