HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/functions/__pycache__/detach.cpython-312.pyc
�

��,����dZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZddlm
Z
dd	lmZej ej"ej$j&�Gd
�dej(���Zej"ej$j,�Gd�d
e��Zej"ej$j0�Gd�de��Zy)zMDetach GCF 2nd gen function from GCF and make it a native Cloud Run function.�)�client)�
exceptions)�util)�base)�flags)�run_util)�log)�
console_ioc�,�eZdZdZed��Zd�Zd�Zy)�Detach�kDetach a Cloud Functions v2 function from its existing environment and make it a native Cloud Run function.c�2�tj|d��y)Nz6The name of the Cloud Functions v2 function to detach.)�help_text_override)r�AddFunctionResourceArg)�parsers �lib/surface/functions/detach.py�ArgszDetach.Args s��	� � ��D��c�d�tj|j��}|jjj�}|j
�}d|�d�}tj�rtj|dd��|j|�}|s$tjdj|���|j|�}d}tj |j"|j$||�t'j(|�}	|j+||	j,�y)Nz-WARNING: This command detaches your function z� from the Cloud Functions API (cloudfunctions.googleapis.com). Detached functions continue to serve traffic, and retain the `cloudfunctions.net` URL. You can only manage your detached functions using the Cloud Run Admin API or the `gcloud run <command>`. T)�default�cancel_on_nozFunction [{}] does not exist.zRDetaching function from Google Cloud Functions API (cloudfunctions.googleapis.com))�	client_v2�FunctionsClient�ReleaseTrack�CONCEPTS�name�Parse�RelativeNamer
�	CanPrompt�PromptContinue�GetFunctionr�FunctionsError�format�DetachFunction�api_util�WaitForOperationr�messagesr�
GetService�_PrintSuccessMessage�urls)
�self�argsr�function_ref�
function_name�message�function�	operation�description�services
          r�Runz
Detach.Run)s��
�
&�
&�t�'8�'8�':�
;�F��=�=�%�%�+�+�-�L� �-�-�/�M�8�
��G�	�����������D�I��!�!�-�0�H���%�%�
)�
0�
0��
?�
���%�%�m�4�I�	+��
����
�
�v���	�;��
�!�!�(�+�G����m�W�\�\�:rc��tjj�tjjd|�d��|D]$}tjjd|����&tjjd�y)Nz	Function zh has been detached successfully! Your function will continue to be available at the following endpoints:z* z�Any existing event triggers associated with your function will continue to work and can be managed through Eventarc API.
Reminder, your function can now be managed through the Cloud Run API. )r	�status�Print)r+r.r*�urls    rr)zDetach._PrintSuccessMessageLss���J�J�����J�J���
�M�?�#N�	N����	�j�j����C�5�z�"���J�J���	Q�rN)�__name__�
__module__�__qualname__�__doc__�staticmethodrr4r)�rrrrs%��t�����!;�Frrc��eZdZdZy)�
DetachBetar
N�r9r:r;r<r>rrr@r@[���srr@c��eZdZdZy)�DetachAlphar
NrAr>rrrDrD`rBrrDN)r<�#googlecloudsdk.api_lib.functions.v2rrrrr%�googlecloudsdk.callioper�$googlecloudsdk.command_lib.functionsrr�googlecloudsdk.corer	�googlecloudsdk.core.consoler
�DefaultUniverseOnly�
ReleaseTracksr�GA�Commandr�BETAr@�ALPHArDr>rr�<module>rPs���T�C�:�@�(�6�9�#�2��������D�%�%�(�(�)�;�T�\�\�;�*��;�|����D�%�%�*�*�+�t��t�,�t�����D�%�%�+�+�,�t�*�t�-�tr