| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/alloydb/backups/__pycache__/ |
Upload File : |
�
��# � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
dd
lmZ ddlmZ ddlmZ e j e j j e j j e j j � � G d
� de j � � � � ZdS )zDeletes an AlloyDB backup.� )�absolute_import)�division)�unicode_literals)�api_util)�backup_operations)�base)�flags)�log)�
properties)� resources)�
console_ioc �8 � e Zd ZdZddd�Zed� � � Zd� ZdS )�Deletez1Deletes an AlloyDB backup within a given project.z
{description}z_ To delete a backup, run:
$ {command} my-backup --region=us-central1
)�DESCRIPTION�EXAMPLESc � � t j � | � � t j | � � t j | � � dS )zxSpecifies additional command flags.
Args:
parser: argparse.Parser, Parser object for command line inputs
N)r �
ASYNC_FLAG�AddToParserr � AddBackup� AddRegion)�parsers �%lib/surface/alloydb/backups/delete.py�ArgszDelete.Args1 s@ � � �O����'�'�'� �O�F���� �O�F������ c �� � t j | � � � � � }|j }|j }|j � dt j j j
j |j |j
�� � }d}t j |�� � sdS |� |� � � �� � }|j � |� � }t( j � |j d�� � } t0 j � d � | � � � � � � � |j s)t= j | d
| � � � d� � |S )z�Constructs and sends request.
Args:
args: argparse.Namespace, An object that contains the values for the
arguments specified in the .Args() method.
Returns:
ProcessHttpResponse of the request made.
z"alloydb.projects.locations.backups)�
projectsId�locationsId� backupsIdz2All of the backup data will be lost upon deletion.)�messageN)�namez%alloydb.projects.locations.operations)�
collectionzOperation ID: {}zDeleting backupF) r �
AlloyDBClient�ReleaseTrack�alloydb_client�alloydb_messages�resource_parser�Creater �VALUES�core�project� GetOrFail�region�backupr
�PromptContinue�,AlloydbProjectsLocationsBackupsDeleteRequest�RelativeName�projects_locations_backupsr r �REGISTRY�ParseRelativeNamer r
�status�Print�format�Name�async_r �Await)
�self�args�clientr$ r% �
backup_ref�prompt_message�req�op�op_refs
r �Runz
Delete.Run<