2014-05-21 49 views

回答

1

即使boto文档缺乏,您可以通过the codeAWSAPI了解它。

看看boto.route53.healthcheck.HealthCheck和实施作为

route = boto.connect_route53() 
hc = boto.route53.healthcheck.HealthCheck(...) 
route = create_health_check(hc) 

...将健康检查的the help page填写:

Help on HealthCheck in module boto.route53.healthcheck object: 

class HealthCheck(__builtin__.object) 
| An individual health check 
| 
| Methods defined here: 
| 
| __init__(self, ip_addr, port, hc_type, resource_path, fqdn=None, string_match=None, request_interval=30, failure_threshold=3) 
|  HealthCheck object 
|  
|  :type ip_addr: str 
|  :param ip_addr: IP Address 
|  
|  :type port: int 
|  :param port: Port to check 
|  
|  :type hc_type: str 
|  :param ip_addr: One of HTTP | HTTPS | HTTP_STR_MATCH | HTTPS_STR_MATCH | TCP 
|  
|  :type resource_path: str 
|  :param resource_path: Path to check 
|  
|  :type fqdn: str 
|  :param fqdn: domain name of the endpoint to check 
|  
|  :type string_match: str 
|  :param string_match: if hc_type is HTTP_STR_MATCH or HTTPS_STR_MATCH, the string to search for in the response body from the specified resource 
|  
|  :type request_interval: int 
|  :param request_interval: The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request. 
|  
|  :type failure_threshold: int 
|  :param failure_threshold: The number of consecutive health checks that an endpoint must pass or fail for Amazon Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. 
| 
| to_xml(self) 
| 
| ---------------------------------------------------------------------- 
| Data descriptors defined here: 
| 
| __dict__ 
|  dictionary for instance variables (if defined) 
| 
| __weakref__ 
|  list of weak references to the object (if defined) 
| 
| ---------------------------------------------------------------------- 
| Data and other attributes defined here: 
| 
| POSTXMLBody = '\n  <HealthCheckConfig>\n   <IPAddr...il... 
| 
| XMLFQDNPart = '<FullyQualifiedDomainName>%(fqdn)s</FullyQualifiedDomai... 
| 
| XMLRequestIntervalPart = '<RequestInterval>%(request_interval)d</Reque... 
| 
| XMLStringMatchPart = '<SearchString>%(string_match)s</SearchString>' 
| 
| valid_request_intervals = (10, 30)