Пример #1
0
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)
Пример #2
0
def deleteRole(ctx, role):
    aws_roles.deleteRole(ctx, role)