parameters: (self)
return_statement: return self.XMLBody % params
docstring: Spit this resource record set out as XML
docstring_summary: Spit this resource record set out as XML
docstring_tokens: Spit this resource record set out as XML
function: def to_xml(self):
          """Spit this resource record set out as XML"""
          if self.alias_hosted_zone_id is not None and self.alias_dns_name is not None:
              # Use alias
              if self.alias_evaluate_target_health is not None:
                  eval_target_health = self.EvaluateTargetHealth % ('true' if self.alias_evaluate_target_health else 'false')
              else:
                  eval_target_health = ""
  
              body = self.AliasBody % {"hosted_zone_id": self.alias_hosted_zone_id,
                                       "dns_name": self.alias_dns_name,
                                       "eval_target_health": eval_target_health}
          else:
              # Use resource record(s)
              records = ""
  
              for r in self.resource_records:
                  records += self.ResourceRecordBody % r
  
              body = self.ResourceRecordsBody % {
                  "ttl": self.ttl,
                  "records": records,
              }
  
          weight = ""
  
          if self.identifier is not None and self.weight is not None:
              weight = self.WRRBody % {"identifier": self.identifier,
                                       "weight": self.weight}
          elif self.identifier is not None and self.region is not None:
              weight = self.RRRBody % {"identifier": self.identifier,
                                       "region": self.region}
          elif self.identifier is not None and self.failover is not None:
              weight = self.FailoverBody % {"identifier": self.identifier,
                                            "failover": self.failover}
  
          health_check = ""
          if self.health_check is not None:
              health_check = self.HealthCheckBody % (self.health_check)
  
          params = {
              "name": self.name,
              "type": self.type,
              "weight": weight,
              "body": body,
              "health_check": health_check
          }
          return self.XMLBody % params
function_tokens: def to_xml ( self ) : if self . alias_hosted_zone_id is not None and self . alias_dns_name is not None : # Use alias if self . alias_evaluate_target_health is not None : eval_target_health = self . EvaluateTargetHealth % ( 'true' if self . alias_evaluate_target_health else 'false' ) else : eval_target_health = "" body = self . AliasBody % { "hosted_zone_id" : self . alias_hosted_zone_id , "dns_name" : self . alias_dns_name , "eval_target_health" : eval_target_health } else : # Use resource record(s) records = "" for r in self . resource_records : records += self . ResourceRecordBody % r body = self . ResourceRecordsBody % { "ttl" : self . ttl , "records" : records , } weight = "" if self . identifier is not None and self . weight is not None : weight = self . WRRBody % { "identifier" : self . identifier , "weight" : self . weight } elif self . identifier is not None and self . region is not None : weight = self . RRRBody % { "identifier" : self . identifier , "region" : self . region } elif self . identifier is not None and self . failover is not None : weight = self . FailoverBody % { "identifier" : self . identifier , "failover" : self . failover } health_check = "" if self . health_check is not None : health_check = self . HealthCheckBody % ( self . health_check ) params = { "name" : self . name , "type" : self . type , "weight" : weight , "body" : body , "health_check" : health_check } return self . XMLBody % params