Merge pull request #2548 from bblommers/feature/implement-iam-delete-group-endpoint
Feature/implement iam delete group endpoint
This commit is contained in:
commit
3afb93d9db
3 changed files with 37 additions and 0 deletions
|
|
@ -1233,6 +1233,14 @@ class IAMBackend(BaseBackend):
|
|||
group = self.get_group(group_name)
|
||||
return group.get_policy(policy_name)
|
||||
|
||||
def delete_group(self, group_name):
|
||||
try:
|
||||
del self.groups[group_name]
|
||||
except KeyError:
|
||||
raise IAMNotFoundException(
|
||||
"The group with name {0} cannot be found.".format(group_name)
|
||||
)
|
||||
|
||||
def create_user(self, user_name, path="/"):
|
||||
if user_name in self.users:
|
||||
raise IAMConflictException(
|
||||
|
|
|
|||
|
|
@ -428,6 +428,12 @@ class IamResponse(BaseResponse):
|
|||
template = self.response_template(GET_GROUP_POLICY_TEMPLATE)
|
||||
return template.render(name="GetGroupPolicyResponse", **policy_result)
|
||||
|
||||
def delete_group(self):
|
||||
group_name = self._get_param("GroupName")
|
||||
iam_backend.delete_group(group_name)
|
||||
template = self.response_template(GENERIC_EMPTY_TEMPLATE)
|
||||
return template.render(name="DeleteGroup")
|
||||
|
||||
def create_user(self):
|
||||
user_name = self._get_param("UserName")
|
||||
path = self._get_param("Path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue