HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/boto3/docs/__pycache__/resource.cpython-311.pyc
�

/�;f�;����ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZmZddl
mZddlmZdd	lmZdd
lmZmZmZmZddlmZGd�d
e��ZGd�de��ZdS)�N)�
xform_name)�DocumentStructure)�get_official_service_name)�ActionDocumenter)�document_attribute�document_identifier�document_reference)�BaseDocumenter)�CollectionDocumenter)�SubResourceDocumenter)�add_resource_type_overview�!get_identifier_args_for_signature�get_identifier_description�!get_identifier_values_for_example)�WaiterResourceDocumenterc�x��eZdZ�fd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Z�xZS)�ResourceDocumenterc����t���|��||_||_|j���|_|j|jkr	d|_dSdS)Nzservice-resource)�super�__init__�_botocore_session�_root_docs_path�_resource_name�lower�_resource_sub_path�
_service_name)�self�resource�botocore_session�root_docs_path�	__class__s    ��F/opt/alt/python311/lib/python3.11/site-packages/boto3/docs/resource.pyrzResourceDocumenter.__init__&si���
������"�"�"�!1���-���"&�"5�";�";�"=�"=�����$�"4�4�4�&8�D�#�#�#�5�4�c��|�|��|�|��|�|��|�|��|�|��|�|��|�|��|�|��|�|��|�	|��dS)N)
�
_add_title�_add_resource_note�
_add_intro�_add_identifiers�_add_attributes�_add_references�_add_actions�_add_sub_resources�_add_collections�_add_waiters�r�sections  r"�document_resourcez$ResourceDocumenter.document_resource.s������� � � �����(�(�(����� � � ����g�&�&�&����W�%�%�%����W�%�%�%����'�"�"�"�����(�(�(����g�&�&�&����'�"�"�"�"�"r#c�n�|�d��}|j�|j��dS)N�title)�add_new_section�style�h2r�rr0�
title_sections   r"r%zResourceDocumenter._add_title:s5���/�/��8�8�
�����t�2�3�3�3�3�3r#c�d�g}|jjr)|jjD]}|�|j���t	|��}|�d��}|j�|j�d|�d����|�d��}|�	|��|�d��}|�
||��|�d��}|�||��|�d��}	|	j���dS)	N�start_class�(�))�
class_name�description�example�params�	end_class)
�_resource_model�identifiers�append�namerr4r5�start_sphinx_py_classr=�_add_description�_add_example�_add_params_description�end_sphinx_py_class)
rr0�identifier_names�
identifier�
class_argsr:�description_section�example_section�
param_sectionrAs
          r"r'zResourceDocumenter._add_intro>sM������+�	9�"�2�>�
9�
9�
� �'�'�
��8�8�8�8�7�7G�H�H�
��-�-�m�<�<����/�/��/�9�9�J�9�9�9�	0�	
�	
�	
�
*�9�9�-�H�H�����1�2�2�2�&�5�5�i�@�@�����/�+;�<�<�<�$�3�3�H�=�=�
��$�$�]�4D�E�E�E��+�+�K�8�8�	���+�+�-�-�-�-�-r#c��t|j��}|�d�||j����dS)Nz A resource representing an {} {})r�_service_model�write�formatr�rr0�official_service_names   r"rGz#ResourceDocumenter._add_description[sN�� 9�$�:M� N� N���
�
�.�5�5�%�t�':�
�
�	
�	
�	
�	
�	
r#c�n�|j���|j���|�d��|j���|j���|�d�|j|j����|j���t
|��}|�d�t|j��|j|j|����|j�	��dS)N�import boto3z{} = boto3.resource('{}')z{} = {}.{}({}))
r5�start_codeblock�new_linerSrTrrrr�
end_codeblock)rr0rK�example_valuess    r"rHzResourceDocumenter._add_examplecs���
�%�%�'�'�'��
��� � � ��
�
�n�%�%�%��
��� � � ��
��� � � ��
�
�)�0�0��"�D�$6�
�
�	
�	
�	
�
	�
��� � � �:�;K�L�L���
�
��#�#��4�.�/�/��"��#��	
�
�	
�	
�	
�	�
�#�#�%�%�%�%�%r#c��|D]}}t|j|��}|�d|�d���|j���|�d|�d|����|j����~dS)Nz:type z: stringz:param z: )rrrSr5rZ)rr0rK�identifier_namer>s     r"rIz*ResourceDocumenter._add_params_descriptionzs���/�	%�	%�O�4��#�_���K�
�M�M�<�?�<�<�<�=�=�=��M�"�"�$�$�$��M�M�D�O�D�D�{�D�D�E�E�E��M�"�"�$�$�$�$�	%�	%r#c�$�|j���|�d|�d���|j���|j���|j|D]}|j�|����dS)Nz#These are the resource's available �:)r5rZrS�toctree�
member_map�tocitem)rr0�resource_member_type�members    r"�_add_overview_of_member_typez/ResourceDocumenter._add_overview_of_member_type�s����
��� � � ��
�
�J�3G�J�J�J�	
�	
�	
�	�
��� � � ��
�������o�&:�;�	/�	/�F��M�!�!�V�+�.�.�.�.�	/�	/r#c�,�|jjjj}|�d��}g}|r||jd<t
|ddd���|D�])}|�|j��t|jd���}|�d��}|j
�|jd	��|�
d
|j����|�|j��|�|jd|j�d�i�
��}t!||j|���t$j�|j|j�|j���}|�||j����+|r|�|d��dSdS)NrC�IdentifierszYIdentifiers are properties of a resource that are set upon instantiation of the resource.�identifiers_attributes_intro�r0�
resource_typer>�
intro_link�html��target�
breadcrumb�indexz / Identifier / �	qualifier�.��context)r0�
resource_name�identifier_model)�	_resource�meta�resource_modelrCr4rbr
rDrErr5�ref�_resource_class_namerS�add_title_sectionr=rr�os�path�joinrrr�
write_to_filerf)	rr0rC�member_listrL�identifier_doc�breadcrumb_section�identifier_section�identifiers_dir_paths	         r"r(z#ResourceDocumenter._add_identifiers�s����n�)�8�D���)�)�-�8�8�����
	�-8�D�O�M�*�&��+�>�:�
�
�
�
�&�	P�	P�J����z��/�/�/�.�z��v�N�N�N�N�!/�!?�!?��!M�!M���$�(�(��)B�G�L�L�L��$�$�%I�
��%I�%I�J�J�J��,�,�Z�_�=�=�=�!/�!?�!?���$���&;�&;�&;�<�"@�"�"��
 �*�"�1�!+�
�
�
�
�$&�7�<�<��$��%�'��*�,�$�$� �

�(�(�)=�z��O�O�O�O��	F��-�-�g�}�E�E�E�E�E�	F�	Fr#c	�6�|jjjjj}i}|jjjjrM|�|jjjj��}|jjj�|��}|�d��}g}|rt|ddd���||j
d<t|��D�]7}||\}}|�|��t|d���}	|	�d��}
|
j�|jd	��|
�d
|����|	�|��|	�|d|j�d�i�
��}t)||j|j||jjjjj|���t0j�|j|j�|j���}|	�||����9|r|�|d��dSdS)N�
attributes�
Attributesz�Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.rirjrmrnrprqz / Attribute / rrrsrt)r0�service_namerv�	attr_name�
event_emitter�
attr_model)rxry�client�
service_modelrz�shape�	shape_for�get_attributesr4r
rb�sortedrDrr5r{r|rSr}r=rrr�eventsr~rr�rrr�rf)
rr0r�r�r��attribute_listr��_�
attr_shape�
attribute_docr��attribute_section�attributes_dir_paths
             r"r)z"ResourceDocumenter._add_attributes�sd����+�2�7�E�
��
��>��-�3�	�!�+�+���#�2�8���E���,�;�J�J����J��)�)�,�7�7�����	;�&��*�/�
:�

�

�

�

�-;�D�O�L�)��
�+�+�	H�	H�I�&�y�1�M�A�z��!�!�)�,�,�,�-�i��G�G�G�M�!.�!>�!>�|�!L�!L���$�(�(��)B�G�L�L�L��$�$�%B�y�%B�%B�C�C�C��+�+�I�6�6�6� -� =� =��$���&;�&;�&;�<�!>�!�!��
�)�!�/�"�1�#�"�n�1�8�=�D�%�

�
�
�
�#%�'�,�,��$��%�'��*�,�#�#��

�'�'�(;�Y�G�G�G�G��	E��-�-�g�|�D�D�D�D�D�	E�	Er#c� �|�d��}|jjjj}g}|rt|ddd���||jd<|D�]#}|�|j��t|jd���}|�d��}|j
�|jd	��|�
d
|j����|�|j��|�|jd|j�d�i�
��}t!||���t"j�|j|j�|j���}|�||j����%|r|�|d��dSdS)N�
references�
ReferenceszNReferences are related resource instances that have a belongs-to relationship.�references_introrjrmrnrprqz / Reference / rrrsrt)r0�reference_model)r4rxryrzr�r
rbrDrErr5r{r|rSr}r=r	r~rr�rrrr�rf)	rr0r��reference_list�	reference�
reference_docr��reference_section�references_dir_paths	         r"r*z"ResourceDocumenter._add_references�s����)�)�,�7�7���^�(�7�B�
����
	;�&��*�1�.�
�
�
�
�-;�D�O�L�)�#�	M�	M�I��!�!�)�.�1�1�1�-�i�n�V�L�L�L�M�!.�!>�!>�|�!L�!L���$�(�(��)B�G�L�L�L��$�$�%G�y�~�%G�%G�H�H�H��+�+�I�N�;�;�;� -� =� =���$���&;�&;�&;�<�!>�!�!��
�)� )�
�
�
�
�#%�'�,�,��$��%�'��*�,�#�#��

�'�'�(;�Y�^�L�L�L�L��	E��-�-�g�|�D�D�D�D�D�	E�	Er#c��|�d��}|jjjj}|rSt|j|j��}|j|_|�|��|�	|d��dSdS)N�actions)
r4rxryrzr�rrrb�document_actionsrf)rr0r��
documenters    r"r+zResourceDocumenter._add_actionss����)�)�)�4�4���.�%�4�<���	B�)�$�.�$�:N�O�O�J�$(�O�J�!��'�'��0�0�0��-�-�g�y�A�A�A�A�A�		B�	Br#c��|�d��}|jjjj}|rSt|j|j��}|j|_|�|��|�	|d��dSdS)Nz
sub-resources)
r4rxryrz�subresourcesrrrb�document_sub_resourcesrf)rr0�
sub_resourcesr�s    r"r,z%ResourceDocumenter._add_sub_resources&s����)�)�/�:�:����+�:�G�
��	H�.���� 4���J�%)�O�J�!��-�-�g�6�6�6��-�-�g��G�G�G�G�G�
	H�	Hr#c��|�d��}|jjjj}|rSt|j|j��}|j|_|�|��|�	|d��dSdS)N�collections)
r4rxryrzr�rrrb�document_collectionsrf)rr0r�r�s    r"r-z#ResourceDocumenter._add_collections1s����)�)�-�8�8���n�)�8�D���	F�-���� 4���J�%)�O�J�!��+�+�G�4�4�4��-�-�g�}�E�E�E�E�E�
	F�	Fr#c�F�|�d��}|jjjj}|rs|j�|j��}t|j||j	��}|j
|_
|�|��|�|d��dSdS)N�waiters)
r4rxryrzr�r�get_waiter_modelrrrrb�document_resource_waitersrf)rr0r��service_waiter_modelr�s     r"r.zResourceDocumenter._add_waiters<s����)�)�)�4�4���.�%�4�<���		B�#'�#9�#J�#J��"�$�$� �2��� 4�d�6J���J�%)�O�J�!��0�0��9�9�9��-�-�g�y�A�A�A�A�A�		B�		Br#c��|�d��}|j���|�d��|j���dS)Nzfeature-freezez�Before using anything on this page, please refer to the resources :doc:`user guide <../../../../guide/resources>` for the most recent guidance on using resources.)r4r5�
start_noterS�end_noter/s  r"r&z%ResourceDocumenter._add_resource_noteJsa���)�)�*:�;�;���
� � �"�"�"��
�
�
+�	
�	
�	
�
	�
��� � � � � r#)�__name__�
__module__�__qualname__rr1r%r'rGrHrIrfr(r)r*r+r,r-r.r&�
__classcell__)r!s@r"rr%s1�������9�9�9�9�9�
#�
#�
#�4�4�4�.�.�.�:
�
�
�&�&�&�.%�%�%�/�/�/�*F�*F�*F�X7E�7E�7E�r(E�(E�(E�TB�B�B�	H�	H�	H�	F�	F�	F�B�B�B�!�!�!�!�!�!�!r#rc�6�eZdZed���Zd�Zd�Zd�ZdS)�ServiceResourceDocumenterc��|j�d�S)Nz.ServiceResource)�_service_docs_name)rs r"r=z$ServiceResourceDocumenter.class_nameVs���)�;�;�;�;r#c�d�|�d��}|j�d��dS)Nr3zService Resource)r4r5r6r7s   r"r%z$ServiceResourceDocumenter._add_titleZs3���/�/��8�8�
�����1�2�2�2�2�2r#c�^�t|j��}|�d|����dS)NzA resource representing )rrRrSrUs   r"rGz*ServiceResourceDocumenter._add_description^s5�� 9�$�:M� N� N���
�
�H�1F�H�H�I�I�I�I�Ir#c�t�|j���|j���|�d��|j���|j���|�|j�d|j�d���|j���dS)NrXz = boto3.resource('z'))r5rYrZrSrr[)rr0rKs   r"rHz&ServiceResourceDocumenter._add_examplebs����
�%�%�'�'�'��
��� � � ��
�
�n�%�%�%��
��� � � ��
��� � � ��
�
��!�N�N�t�7I�N�N�N�	
�	
�	
�	�
�#�#�%�%�%�%�%r#N)r�r�r��propertyr=r%rGrH�r#r"r�r�Us]������
�<�<��X�<�3�3�3�J�J�J�	&�	&�	&�	&�	&r#r�)r~�botocorer�botocore.docs.bcdoc.restdocr�botocore.docs.utilsr�boto3.docs.actionr�boto3.docs.attrrrr	�boto3.docs.baser
�boto3.docs.collectionr�boto3.docs.subresourcer�boto3.docs.utilsr
rrr�boto3.docs.waiterrrr�r�r#r"�<module>r�sz��
�	�	�	�������9�9�9�9�9�9�9�9�9�9�9�9�.�.�.�.�.�.�����������
+�*�*�*�*�*�6�6�6�6�6�6�8�8�8�8�8�8�������������7�6�6�6�6�6�m!�m!�m!�m!�m!��m!�m!�m!�`	&�&�&�&�&� 2�&�&�&�&�&r#