:return: a dict that can be used as part of a cloudformation template

def to_dict(self):
        """
        :return: a dict that can be used as part of a cloudformation template
        """
        dict_with_nones = self._asdict()
        codedeploy_lambda_alias_update_dict = dict((k, v) for k, v in dict_with_nones.items()
                                                   if v != ref(None) and v is not None)
        return {'CodeDeployLambdaAliasUpdate': codedeploy_lambda_alias_update_dict}