def updateAWSRoles(ctx, targetRegion, targetEnv, targetRole): for role in ctx.currentRoles: roleName = role['RoleName'] if targetRole != None and roleName != targetRole: continue region, env, _ = utils.regionEnvAndRole(roleName) if targetRegion != None and region != targetRegion: continue if targetEnv != None and env != targetEnv: continue if not isRoleInModel(ctx, roleName): aws_roles.deleteRole(ctx,roleName)
def deleteRole(ctx, role): aws_roles.deleteRole(ctx, role)