def DeleteConfigTemplateBlue()

in functions/source/TerminateandReSwap/index.py [0:0]


def DeleteConfigTemplateBlue(AppName,TempName):
    #check if the config template exists
    ListTemplates = beanstalkclient.describe_applications(ApplicationNames=[AppName])['Applications'][0]['ConfigurationTemplates']
    if TempName not in ListTemplates:
        return ("Config Template does not exist")
    else:
        response = beanstalkclient.delete_configuration_template(ApplicationName=AppName,TemplateName=TempName)
        return ("Config Template Deleted")