
    Vh4	                     `    	 d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d Zd Z	y# e$ r Y &w xY w)    N)is_boto3_error_code)ansible_dict_to_boto3_tag_list)boto3_tag_list_to_ansible_dict)compare_aws_tagsc                    |yt        | |||      }t        |||      \  }}t               }	|rt        |      |	d<   |r||	d<   |	sy| j                  ry	  |j
                  d	||d|	 y# t        j                  j                  t        j                  j                  f$ r"}
| j                  |
d| ||	       Y d }
~
yd }
~
ww xY w)
NF)
purge_tagsAddTagsRemoveTagKeysTResourceType
ResourceIdzFailed to update tags on )msgresource_idchange_params )get_tagsr   dictr   
check_modechange_tags_for_resourcebotocore
exceptionsBotoCoreErrorClientErrorfail_json_aws)moduleclientresource_typer   new_tagsr   old_tagstags_to_settags_to_deleter   es              k/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/amazon/aws/plugins/module_utils/route53.pymanage_tagsr$      s    {CH"28XR\"]KFM#A+#Ni )7o&
'''l]{l^kl  --x/B/B/N/NO 
+M?;#'	 	 	
 	
 
s   A+ +7C"B??Cc                 J   	 |j                  ||      }t        d   d         }|S # t        d      $ r i cY S t        d      $ r i cY S t        j                  j                  t        j                  j
                  f$ r!}| j                  |d| |       Y d }~d }~ww xY w)Nr   NoSuchHealthCheckNoSuchHostedZonezFailed to fetch tags on )r   r   ResourceTagSetTags)list_tags_for_resourcer   r   r   r   r   r   r   )r   r   r   r   tagsetr"   tagss          r#   r   r   0   s    i..&" / 
 *&1A*B6*JKDK 23 	12 	))'' i 	Q&>}o$N\ghh	is    ( B"B"6B"BB")
r   ImportError<ansible_collections.amazon.aws.plugins.module_utils.botocorer   ;ansible_collections.amazon.aws.plugins.module_utils.taggingr   r   r   r$   r   r       r#   <module>r1      s;   	 ] f f X>Q  		s   % --