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/botocore/docs/__pycache__/client.cpython-311.pyc
�

/�;f�C����ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZmZddl
mZddlmZdd	lmZmZd
�ZGd�d��ZGd
�d��ZGd�d��ZdS)�N)�
xform_name)�OrderedDict)�DocumentStructure)�ResponseExampleDocumenter)�document_custom_method�document_model_driven_method�get_instance_public_methods)�ResponseParamsDocumenter)�document_shared_examples)�DocumentedShape�get_official_service_namec��|dkrdS|dvS)N�generate_presigned_url)�s3�)�method_name�service_name�kwargss   �G/opt/alt/python311/lib/python3.11/site-packages/botocore/docs/client.py�!_allowlist_generate_presigned_urlrs���.�.�.��t��6�!�!�c�p�eZdZegZdd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�ZdS)�ClientDocumenterNc��||_|jjj|_||_||_|j�i|_|jjjj|_	dS�N)
�_client�	__class__�__name__�_client_class_name�_root_docs_path�_shared_examples�meta�
service_modelr�
_service_name)�self�client�root_docs_path�shared_exampless    r�__init__zClientDocumenter.__init__(sS�����"&�,�"8�"A���-��� /���� �(�$&�D�!�!�\�.�<�I����rc���|�|��|�|��|���}|�||��|�|��dS)z]Documents a client and its methods

        :param section: The section to write to.
        N)�
_add_title�_add_class_signature�_get_client_methods�_add_client_intro�_add_client_methods)r%�section�client_methodss   r�document_clientz ClientDocumenter.document_client1sk��
	
���� � � ��!�!�'�*�*�*��1�1�3�3�����w��7�7�7�� � ��0�0�0�0�0rc�T�t|j��}|�|��Sr)r	r�_filter_client_methods)r%r1s  rr-z$ClientDocumenter._get_client_methods<s%��4�T�\�B�B���*�*�>�:�:�:rc��i}|���D])\}}|�|||j���}|r|||<�*|S)N)�methodrr)�items�_filter_client_methodr$)r%r1�filtered_methodsrr6�includes      rr4z'ClientDocumenter._filter_client_methods@sj����#1�#7�#7�#9�#9�	7�	7��K���0�0��'�!�/�1���G�
�
7�06� ��-���rc�6�|jD]}|di|��}|�|cS�dS)NTr)�_CLIENT_METHODS_FILTERS)r%r�filter�filter_includes    rr8z&ClientDocumenter._filter_client_methodLsG���2�	&�	&�F�#�V�-�-�f�-�-�N��)�%�%�%�%�*��trc�:�|j�d��dS)N�Client��style�h2�r%r0s  rr+zClientDocumenter._add_titleVs���
����"�"�"�"�"rc�v�|�d��}t|jjj��}|�d|����|j���|�|jjjj	��|�
|��|j���|j���|�
d��|j���t|��D]&}|j�|j�d|�����'dS)N�introz A low-level client representing z These are the available methods:z/client/)�add_new_sectionr
rr"r#�writerB�new_line�include_doc_string�
documentation�_add_client_creation_example�dedent�
new_paragraph�writeln�toctree�sorted�tocitemr$)r%r0r1�official_service_namers     rr.z"ClientDocumenter._add_client_introYsF���)�)�'�2�2�� 9��L��+�!
�!
��	�
�
�F�/D�F�F�	
�	
�	
�	�
��� � � ��"�"��L��+�9�	
�	
�	
�
	
�)�)�'�2�2�2�	�
�������
�#�#�%�%�%����:�;�;�;��
������!�.�1�1�	P�	P�K��M�!�!�T�%7�"N�"N��"N�"N�O�O�O�O�	P�	Prc�L�|j�|j�d����dS)Nz.Client��
class_name)rB�start_sphinx_py_classrrDs  rr,z%ClientDocumenter._add_class_signaturers:���
�+�+��1�:�:�:�	,�	
�	
�	
�	
�	
rc��|j���|j���|�d�|j�����|j���dS)Nz+client = session.create_client('{service}'))�service)rB�start_codeblockrIrH�formatr$�
end_codeblockrDs  rrLz-ClientDocumenter._add_client_creation_examplews{���
�%�%�'�'�'��
��� � � ��
�
�;�B�B��*�
C�
�
�	
�	
�	
�
	�
�#�#�%�%�%�%�%rc��t|��D]q}t|d���}|�||||��tj�|j|jd��}|�||���rdS)N�html��targetr&)	rQr�_add_client_method�os�path�joinr r$�
write_to_file)r%r1r�method_doc_structure�client_dir_paths     rr/z$ClientDocumenter._add_client_methods�s���!�.�1�1�
	M�
	M�K�#4��F�$�$�$� �
�#�#�$�k�>�+�3N�
�
�
�
!�g�l�l��$�d�&8�(���O�
!�.�.���L�L�L�L�
	M�
	Mrc��|�d��}|j�|jd|j����|�d|����|�|��|�|d|j�d�i���}|�|��r|�|||��dS|�	||��dS)N�
breadcrumbz../../z / Client / �	qualifierz.Client.)�context)
rGrB�refrr$rH�add_title_section�_is_custom_method�_add_custom_method�_add_model_driven_method)r%r0rr6�breadcrumb_section�method_sections      rraz#ClientDocumenter._add_client_method�s��$�4�4�\�B�B��� �$�$��#�%B�d�.@�%B�%B�	
�	
�	
�	� � �!=��!=�!=�>�>�>��!�!�+�.�.�.� �0�0�� �T�%<�"F�"F�"F�G�1�
�
���!�!�+�.�.�	G��#�#����
�
�
�
�
�
�)�)�.�+�F�F�F�F�Frc�(�||jjjvSr)rr"�method_to_api_mapping)r%rs  rrnz"ClientDocumenter._is_custom_method�s���$�,�"3�"I�I�Irc�(�t|||��dSr)r)r%r0rr6s    rroz#ClientDocumenter._add_custom_method�s���w��V�<�<�<�<�<rc�8�|�d��}|j���|j�d��|j���|jD]0}|j�d|j��}|j�d|z���1dS)N�
exceptions�
Exceptions�.Client.exceptions.z:py:class:`%s`)rGrBrI�bold�error_shapesr�name�li)r%r0�operation_model�
error_section�errorrVs      r�_add_method_exceptions_listz,ClientDocumenter._add_method_exceptions_list�s����/�/��=�=�
���$�$�&�&�&��� � ��.�.�.���$�$�&�&�&�$�1�	B�	B�E��*�K�K�u�z�K�K�
�
��"�"�#3�j�#@�A�A�A�A�		B�	Brc��|jjj}|jjj|}|�|��}d|z}|j�dd���|��}t||||jjj|j	|���|j
r|�||��|j�|��}|rt||||��dSdS)Nzresponse = client.%srj�)�
event_emitter�method_description�example_prefix)rr"r#rtr~rk�getr�eventsrKr{r�r!r)	r%r0rr#�operation_namer~r��full_method_namer(s	         rrpz)ClientDocumenter._add_model_driven_method�s����)�7�
���*�@��M��'�7�7��G�G��/�+�=����"�"�;��3�3�B�[�B�B�	�	%�����,�+�2�.�<�)�
	
�	
�	
�	
��'�	G��,�,�W�o�F�F�F��/�3�3�N�C�C���	�$���.�/�
�
�
�
�
�	�	rr)r�
__module__�__qualname__rr<r)r2r-r4r8r+r.r,rLr/rarnror�rprrrrr#s������)���J�J�J�J�	1�	1�	1�;�;�;�
 �
 �
 ����#�#�#�P�P�P�2
�
�
�
&�&�&�M�M�M� G�G�G�(J�J�J�=�=�=�	B�	B�	B�����rrc���eZdZdZedddededdd���fd	ed	dd
���fg�����Zd�Zd
�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�ClientExceptionsDocumenterzQhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html�Error�	structurez1Normalized access to common exception attributes.�Code�stringz,An identifier specifying the exception type.)r|�	type_namerK�Messagez;A descriptive message explaining why the exception occured.)r|r�rK�membersc��||_|jjj|_|jjjj|_||_dSr)	rrrrr"r#rr$r )r%r&r's   rr)z#ClientExceptionsDocumenter.__init__�s:�����"&�,�"8�"A���!�\�.�<�I���-����rc��|�|��|�|��|�|��|���dSr)r+�
_add_overview�_add_exceptions_list�_add_exception_classesrDs  r�document_exceptionsz.ClientExceptionsDocumenter.document_exceptions�sT������ � � ����7�#�#�#��!�!�'�*�*�*��#�#�%�%�%�%�%rc�:�|j�d��dS)NzClient ExceptionsrArDs  rr+z%ClientExceptionsDocumenter._add_titles���
���,�-�-�-�-�-rc��|j���|�d��|j�d|j���|�d��|j���dS)Nz�Client exceptions are available on a client instance via the ``exceptions`` property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling z
user guide��title�link�.)rBrIrH�
external_link�_USER_GUIDE_LINKrDs  rr�z(ClientExceptionsDocumenter._add_overviews����
��� � � ��
�
�
�	
�	
�	
�	�
�#�#���&�	$�	
�	
�	
�	�
�
�c�����
��� � � � � rc�$�|j�d|j��S)Nry)rr|)r%�shapes  r�_exception_class_namez0ClientExceptionsDocumenter._exception_class_names���)�J�J�e�j�J�J�Jrc��|jjjj}|sI|j���|�d��|j���dS|j���|�d��|j���|D]+}|j�	|j
�d|j�����,dS)Nz-This client has no modeled exception classes.z$The available client exceptions are:z/client/exceptions/)rr"r#r{rBrIrHrOrPrRr$r|)r%r0r{r�s    rr�z/ClientExceptionsDocumenter._add_exceptions_lists����|�(�6�C���	��M�"�"�$�$�$��M�M�I�J�J�J��M�"�"�$�$�$��F��
��� � � ����>�?�?�?��
������!�	�	�E��M�!�!��%�F�F�%�*�F�F�
�
�
�
�	�	rc��|jjjjD]u}t	|jd���}|�||��tj�	|j
|jdd��}|�||j���vdS)Nr^r_r&rw)
rr"r#r{rr|�_add_exception_classrbrcrdr r$re)r%r��exception_doc_structure�exception_dir_paths    rr�z1ClientExceptionsDocumenter._add_exception_classes(s����\�&�4�A�	�	�E�&7��
�6�'�'�'�#�
�%�%�&=�u�E�E�E�"$�����$��"���	"�"��
$�1�1�"�E�J�
�
�
�
�	�	rc�8�|�d��}|j�|jd|j����|�d|j����|�|j��|�|j��}|�|��}|j�	|���|�
||��|�||��|�||��|j�
��dS)Nriz	../../../z / Client / exceptions / rU)rGrBrlrr$rHr|rmr�rW�_add_top_level_documentation�_add_exception_catch_example�_add_response_attr�end_sphinx_py_class)r%r0r�rq�
class_sectionrVs      rr�z/ClientExceptionsDocumenter._add_exception_class;s��$�4�4�\�B�B��� �$�$��#�%E��1C�%E�%E�	
�	
�	
�	� � �!I�U�Z�!I�!I�J�J�J��!�!�%�*�-�-�-��/�/��
�;�;�
��/�/��6�6�
���1�1�Z�1�H�H�H��)�)�-��?�?�?��)�)�-��?�?�?����
�u�5�5�5���/�/�1�1�1�1�1rc��|jrN|j���|�|j��|j���dSdSr)rKrBrIrJ�r%r0r�s   rr�z7ClientExceptionsDocumenter._add_top_level_documentationJs\����	%��M�"�"�$�$�$��&�&�u�':�;�;�;��M�"�"�$�$�$�$�$�	%�	%rc��|j���|j�d��|j���|j���|�d��|j���|j���|�d��|j���|j���|�d|jz��|j���|j���|�d��|j���|j�	��dS)N�Exampleztry:z...z!except client.exceptions.%s as e:zprint(e.response))
rBrIrzrNrZrH�indentrMr|r\r�s   rr�z7ClientExceptionsDocumenter._add_exception_catch_examplePsK���
��� � � ��
���9�%�%�%��
�#�#�%�%�%��
�%�%�'�'�'��
�
�f�����
�������
��� � � ��
�
�e�����
�������
��� � � ��
�
�9�E�J�F�G�G�G��
�������
��� � � ��
�
�)�*�*�*��
�������
�#�#�%�%�%�%�%rc��|�d��}|j�d��|�|��|�||��|�||��|j���dS)N�response)rGrB�start_sphinx_py_attr�_add_response_attr_description�_add_response_example�_add_response_params�end_sphinx_py_attr)r%r0r��response_sections    rr�z-ClientExceptionsDocumenter._add_response_attrbs���"�2�2�:�>�>����3�3�J�?�?�?��+�+�,<�=�=�=��"�"�#3�U�;�;�;��!�!�"2�E�:�:�:���1�1�3�3�3�3�3rc��|j���|�d��|j���dS)Nz�The parsed error response. All exceptions have a top level ``Error`` key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.)rBrIrJrDs  rr�z9ClientExceptionsDocumenter._add_response_attr_descriptionjsO���
��� � � ��"�"�
*�	
�	
�	
�	�
��� � � � � rc�P�|�d��}|j���|j�d��|j���t|jd|jjj	���}|�
|||jg���dS)N�syntax�Syntax�rr�r��r:)rGrBrIrzrNrr$rr"r��document_example�_GENERIC_ERROR_SHAPE)r%r0r��example_section�
documenters     rr�z0ClientExceptionsDocumenter._add_response_examplets���!�1�1�(�;�;����&�&�(�(�(���"�"�8�,�,�,���+�+�-�-�-�.��+���,�+�2�
�
�
�
�
	�#�#����.�/�	$�	
�	
�	
�	
�	
rc�P�|�d��}|j���|j�d��|j���t|jd|jjj	���}|�
|||jg���dS)N�	Structurer�r�)rGrBrIrzrNr
r$rr"r��document_paramsr�)r%r0r��params_sectionr�s     rr�z/ClientExceptionsDocumenter._add_response_params�s��� �0�0��=�=����%�%�'�'�'���!�!�+�.�.�.���*�*�,�,�,�-��+���,�+�2�
�
�
�
�
	�"�"����.�/�	#�	
�	
�	
�	
�	
rN)rr�r�r�rrr�r)r�r+r�r�r�r�r�r�r�r�r�r�r�rrrr�r��sz������	@��+�?�
��J����#�O�#�"*�J�	���	��#�O�&�"*�'�	���
�
�
�
�	����>.�.�.�&�&�&�.�.�.�
!�
!�
!�K�K�K�
�
�
����&
2�
2�
2�%�%�%�&�&�&�$4�4�4�!�!�!�
�
�
� 
�
�
�
�
rr�c�:�eZdZdZddd�Zd�Zd�Zd�Zd�Zd	�Z	d
S)�ClientContextParamsDocumenterzPhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html)�
Accelerate�DisableMultiRegionAccessPoints�ForcePathStyle�UseArnRegion)r�)r�	s3controlc�"�||_||_dSr)r$�_context_params)r%r�context_paramss   rr)z&ClientContextParamsDocumenter.__init__�s��)���-����rc��|�|��|�|��|�|��dSr)r+r��_add_context_params_listrDs  r�document_context_paramsz5ClientContextParamsDocumenter.document_context_params�sB������ � � ����7�#�#�#��%�%�g�.�.�.�.�.rc�:�|j�d��dS)NzClient Context ParametersrArDs  rr+z(ClientContextParamsDocumenter._add_title�s���
���4�5�5�5�5�5rc��|j���|�d��|j�d|j���|�d��|j���dS)Nz�Client context parameters are configurable on a client instance via the ``client_context_params`` parameter in the ``Config`` object. For more detailed instructions and examples on the exact usage of context params see the zconfiguration guider�r�)rBrIrHr��_CONFIG_GUIDE_LINKrDs  rr�z+ClientContextParamsDocumenter._add_overview�s����
��� � � ��
�
�
<�	
�	
�	
�	�
�#�#�'��(�	$�	
�	
�	
�	�
�
�c�����
��� � � � � rc	�F�|j���d|j�d�}|�d|�d���|jD][}|j���dt|j���d�}|�d|�d|j�d|j	�����\dS)Nz``zThe available z client context params are:z* z (z) - )
rBrIr$rOr�rr|rH�typerK)r%r0�sn�paramr|s     rr�z6ClientContextParamsDocumenter._add_context_params_list�s����
��� � � �
(�$�$�
(�
(�
(�����H��H�H�H�I�I�I��)�	N�	N�E��M�"�"�$�$�$�2�
�5�:�.�.�2�2�2�D��M�M�L�t�L�L�u�z�L�L�u�7J�L�L�M�M�M�M�	N�	NrN)
rr�r�r��OMITTED_CONTEXT_PARAMSr)r�r+r�r�rrrr�r��s�������	?��
�'����.�.�.�/�/�/�
6�6�6�
!�
!�
!�N�N�N�N�Nrr�)rb�botocorer�botocore.compatr�botocore.docs.bcdoc.restdocr�botocore.docs.exampler�botocore.docs.methodrrr	�botocore.docs.paramsr
�botocore.docs.sharedexampler�botocore.docs.utilsrr
rrr�r�rrr�<module>r�su��
�	�	�	�������'�'�'�'�'�'�9�9�9�9�9�9�;�;�;�;�;�;�����������
:�9�9�9�9�9�@�@�@�@�@�@�J�J�J�J�J�J�J�J�"�"�"�n�n�n�n�n�n�n�n�b~
�~
�~
�~
�~
�~
�~
�~
�B2N�2N�2N�2N�2N�2N�2N�2N�2N�2Nr