def _get_retention_policy_value(self):
if self.RetentionPolicy is None or self.RetentionPolicy.lower() == self.RETAIN.lower():<EOL><INDENT>return self.RETAIN<EOL><DEDENT>elif self.RetentionPolicy.lower() == self.DELETE.lower():<EOL><INDENT>return self.DELETE<EOL><DEDENT>elif self.RetentionPolicy.lower() not in self.retention_policy_options:<EOL><INDENT>raise InvalidResourceException(self.logical_id,<EOL>"<STR_LIT>"<EOL>.format('<STR_LIT>', [self.RETAIN, self.DELETE]))<EOL><DEDENT>
Sets the deletion policy on this resource. The default is 'Retain'.

:return: value for the DeletionPolicy attribute.