def to_cloudformation(self, **kwargs):
function = kwargs.get('<STR_LIT>')<EOL>if not function:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>resources = []<EOL>events_rule = EventsRule(self.logical_id)<EOL>events_rule.EventPattern = self.Pattern<EOL>events_rule.Targets = [self._construct_target(function)]<EOL>if CONDITION in function.resource_attributes:<EOL><INDENT>events_rule.set_resource_attribute(CONDITION, function.resource_attributes[CONDITION])<EOL><DEDENT>resources.append(events_rule)<EOL>source_arn = events_rule.get_runtime_attr("<STR_LIT>")<EOL>resources.append(self._construct_permission(function, source_arn=source_arn))<EOL>return resources<EOL>
Returns the CloudWatch Events Rule and Lambda Permission to which this CloudWatch Events event source
        corresponds.

        :param dict kwargs: no existing resources need to be modified
        :returns: a list of vanilla CloudFormation Resources, to which this pull event expands
        :rtype: list