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/dataflow/jobs/__pycache__/cancel.cpython-312.pyc
�

���
��8�dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZdd
lmZe
j"e
j$j&e
j$j(�e
j*Gd�de
j,���Zy
)z6Implementation of gcloud dataflow jobs cancel command.�)�absolute_import)�division)�unicode_literals)�apis)�
exceptions)�base)�	job_utils)�log)�
console_ioc�&�eZdZdZed��Zd�Zy)�Cancelz7Cancels all jobs that match the command line arguments.c�Z�tj|d��|jddd��y)z Register flags for this command.�+)�nargsz--force�
store_truez�Forcibly cancels a Dataflow job. Regular cancel must have been attempted at least 30 minutes prior for a job to be force cancelled.)�action�helpN)r	�ArgsForJobRefs�add_argument)�parsers �#lib/surface/dataflow/jobs/cancel.py�ArgszCancel.Args"s2�����V�3�/�
�����
�	��c	�x�tj|�D]�}	|jrtjdd��t
jj|j|j|j|j��tjjdj|j����y#tj $rc}tjjdj|j|j"j$|j��Yd}~��d}~wwxYw)z�This is what gets called when the user runs this command.

    Args:
      args: all the arguments that were provided to this command invocation.
    zeForce cancellation will leak VMs the cancelled Dataflow job created that must be manually cleaned up.T)�message�cancel_on_no)�
project_id�	region_idzCancelled job [{0}]z�Failed to cancel job [{0}]: {1} Ensure that you have permission to access the job and that the `--region` flag, {2}, matches the job's region.N)r	�ExtractJobRefs�forcer�PromptContinuer�Jobsr
�jobId�	projectId�locationr
�status�Print�formatr�
HttpException�payload�status_message)�self�args�job_ref�errors    r�Runz
Cancel.Run0s����+�+�D�1��
��:�:�
�
#�
#�}���	
�	�	����M�M��J�J��(�(��&�&�		�	(�
	�
�
���.�5�5�g�m�m�D�E�2���
%�
%�
��
�
���
�#�V��
�
�u�}�}�;�;�W�=M�=M��	
�	
��
�s�B&C�D9�AD4�4D9N)�__name__�
__module__�__qualname__�__doc__�staticmethodrr0�rrr
r
s��@�����
rr
N)r4�
__future__rrr�googlecloudsdk.api_lib.dataflowr�googlecloudsdk.api_lib.utilr�googlecloudsdk.callioper�#googlecloudsdk.command_lib.dataflowr	�googlecloudsdk.corer
�googlecloudsdk.core.consoler�
ReleaseTracks�ReleaseTrack�BETA�GA�DefaultUniverseOnly�Commandr
r6rr�<module>rDsz��=�&��'�0�2�(�9�#�2�����D�%�%�*�*�D�,=�,=�,@�,@�A����+
�T�\�\�+
��B�+
r