a ?g`@s.ddlZddlZeZdZdZdddZdS)NSUCCESSFAILEDFc Cs|d}t|i}||d<d|j|d<|p2|j|d<|d|d<|d|d<|d|d<||d <||d <t|}td |d tt|d } z*tjd||d| d} td| j Wn4t y} ztdt| WYd} ~ n d} ~ 00dS)NZ ResponseURLZStatusz*See the details in CloudWatch Log Stream: ZReasonZPhysicalResourceIdZStackIdZ RequestIdZLogicalResourceIdZNoEchoZDatazResponse body: )z content-typezcontent-lengthPUTzutf-8)bodyheadersz Status code: z,send(..) failed executing requests.put(..): ) printZlog_stream_namejsondumpsstrlenhttprequestencodereason Exception) eventcontextZresponseStatusZ responseDataZphysicalResourceIdZnoEchoZ responseUrlZ responseBodyZjson_responseBodyrresponseero/private/var/folders/r9/42cgcfjj6kz4msl_ykncb94914h9jx/T/pip-target-j3nupzih/lib/python/cfnresponse/__init__.pysends*      r)NF)urllib3r PoolManagerr rrrrrrrs