B =1a@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 } y*tjd||d| d} td| j Wn2t k r} ztdt| Wdd} ~ XYnXdS)NZ ResponseURLZStatusz*See the details in CloudWatch Log Stream: ZReasonZPhysicalResourceIdZStackIdZ RequestIdZLogicalResourceIdZNoEchoDatazResponse 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/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-xeynbemc/lib/python/cfnresponse/__init__.pysends(     r)NF)urllib3r PoolManagerrrrrrrrrs