403Webshell
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/secrets/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/surface/secrets/__pycache__/update.cpython-311.pyc
�

���P���dZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZ
dd	lmZdd
lmZddlmZddlmZdd
lmZe	je	jj��e	jGd�de	j������Ze	je	jj��e	jGd�de������ZdS)zUpdate an existing secret.�)�absolute_import)�division)�unicode_literals)�api)�base)�
exceptions)�args)�log)�util)�labels_util)�map_util)�
console_ioc�H�eZdZdZdZdZdZdZdZe	d���Z
d�Zd	�Zd
S)�Updatea�Update a secret's metadata.

      Update a secret's metadata (e.g. labels). This command will
      return an error if given a secret that does not exist.

      ## EXAMPLES

      Update the label of a secret named `my-secret`.

        $ {command} my-secret --update-labels=foo=bar

      Update the label of a secret using an etag.

        $ {command} my-secret --update-labels=foo=bar --etag=123

      Update a secret to have a next-rotation-time:

        $ {command} my-secret --next-rotation-time="2030-01-01T15:30:00-05:00"

      Update a secret to have a next-rotation-time and rotation-period:

        $ {command} my-secret --next-rotation-time="2030-01-01T15:30:00-05:00"
        --rotation-period="7200s"

      Update a secret to remove the next-rotation-time:

        $ {command} my-secret --remove-next-rotation-time

      Update a secret to clear rotation policy:

        $ {command} my-secret --remove-rotation-schedule

      Update version destroy ttl of a secret:

        $ {command} my-secret --version-destroy-ttl="86400s"

      Disable delayed secret version destroy:

        $ {command} my-secret --remove-version-destroy-ttl
  z9There are no changes to the secret [{secret}] for update.zxThe secret [{secret}] cannot be updated because it does not exist. Please use the create command to create a new secret.zrThis secret and all of its versions will be automatically deleted at the requested expire-time of [{expire_time}].zqThis secret and all of its versions will be automatically deleted after the requested ttl of [{ttl}] has elapsed.z�The --regional-kms-key-name or --remove-regional-kms-key-name flag can only be used when update a regional secret with "--location".c�,�tj|ddd���tj|dd���|�dd���}|�dd	���}t	j|��tj|d
���tj|��tj|��tj	|��tj
|��tj|��tj
|ddtt��tj|ddt��tj|dd��tj
|d
d	tt��tj|d
d	t��tj|d
d	��dS)z�Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that will be
        available to this command.
    �	to updateT��purpose�
positional�required�to update secretF�r�hidden�Version Aliases��mutex�help�Annotations�updated��action�version-aliases�annotationsN)�secrets_args�	AddSecret�AddLocation�	add_groupr�AddUpdateLabelsFlags�
AddSecretEtag�AddUpdateExpirationGroup�AddUpdateTopicsGroup�AddUpdateRotationGroup�AddUpdateVersionDestroyTTL�AddUpdateRegionalKmsKeyr
�AddMapUpdateFlag�str�int�AddMapRemoveFlag�AddMapClearFlag��parser�aliasr#s   �lib/surface/secrets/update.py�ArgszUpdate.Args\s��������t�������V�-?��N�N�N�N����4�.?��@�@�E��"�"��M�"�B�B�K��$�V�,�,�,���v�i�8�8�8�8��)�&�1�1�1��%�f�-�-�-��'��/�/�/��+�F�3�3�3��(��0�0�0���e�%6�8I�3�!�#�#�#���e�%6�8I�3�O�O�O���U�$5�7H�I�I�I���k�=�-��!�#�#�#���k�=�-��M�M�M���[�-��G�G�G�G�G�c��tj|�����}tj|���}|jj���}g}tj�	|��}|�
��r|�d��|�d��r|�d��|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d	��|�d
��s*|�d��s|�d��r|�d��|�d
��s*|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d��|�d��s|�d��r|�d��|�d��s|�d��r|�d��|sBtjgd�|j�|���������|�|jj|j��}|j}	|jr|j}	|jr7|j�|j� ��}
t3j|
d!d!�"��|jr7|j�|j�#��}
t3j|
d!d!�"��d|vrt;j||j��}ng}g}d|vr�g}|j � |j�!g�$��|_ t;j"||j j#��}
|
�$��D]9\}}|�|jj!�%||�%�����:g}d|vr�|j&� |j�'g�$��|_&t;j(||j&j#��}|�$��D]9\}}|�|jj'�%||�%�����:|j)r|j)�d&�}nd}|j*s(|j+s|j,rtj-d'|j.���tj/|�(���0||	||||j1|j|j||j2|j3||j+|j*�)��}tij/���5|��|S)*N��version�labels�ttl�expire_time�remove_expiration�next_rotation_time�remove_next_rotation_time�remove_rotation_schedule�rotation.next_rotation_time�rotation_period�remove_rotation_period�rotation.rotation_period�
add_topics�
remove_topics�clear_topics�topics�update_version_aliases�remove_version_aliases�clear_version_aliases�version_aliases�update_annotations�remove_annotations�clear_annotationsr#�version_destroy_ttl�remove_version_destroy_ttl�regional_kms_key_name�remove_regional_kms_key_name�customer_managed_encryption�z--clear-labelsz--remove-labelsz--update-labelsz--ttlz
--expire-timez--remove-expirationz--clear-topicsz--remove-topicsz--add-topicsz--update-version-aliasesz--remove-version-aliasesz--clear-version-aliasesz--update-annotationsz--remove-annotationsz--clear-annotationsz--next-rotation-timez--remove-next-rotation-timez--rotation-periodz--remove-rotation-periodz--remove-rotation-schedulez--version-destroy-ttlz--remove-version-destroy-ttlz--remove_regional_kms_key_namez--regional-kms-key-name��secret�r?T��throw_if_unattended�cancel_on_no�r>��additionalProperties��key�value�s�location��api_version)�
secret_refr=rOr#�update_mask�etagr?r>rKrArErSrU�secret_location)6�secrets_api�GetApiFromTrack�ReleaseTrack�GetMessages�CONCEPTSrZ�Parser�Diff�FromUpdateArgs�MayHaveUpdates�append�IsSpecifiedr�MinimumArgumentException�NO_CHANGES_MESSAGE�format�Name�Apply�Secret�LabelsValuer=�needs_updater?�CONFIRM_EXPIRE_TIME_MESSAGEr�PromptContinuer>�CONFIRM_TTL_MESSAGE�secrets_util�ApplyTopicsUpdaterK�versionAliases�VersionAliasesValue�ApplyAliasUpdatera�items�AdditionalPropertyr#�AnnotationsValue�ApplyAnnotationsUpdaterSrfrUrV�RequiredArgumentException�REGIONAL_KMS_FLAG_MESSAGE�SecretsrrkrArE�secrets_log�Updated)�self�originalr	rh�messagesrirj�labels_diff�
labels_updater=�msgrKrO�version_aliases_dictr6r<r#�annotations_dict�
annotation�metadatarSrZs                      r7�
_RunUpdatezUpdate._RunUpdatezs
���-�d�.?�.?�.A�.A�B�B�K��&�{�;�;�;�H���%�+�+�-�-�J��K��"�1�1�$�7�7�K��!�!�#�#�#�����"�"�"������� �����������
�&�&�(�$�*:�*:�;N�*O�*O�(�����'�'�'�	
�	�	�.�	/�	/�8�	
�	�	�5�	6�	6�8����3�4�4�8����6�7�7�7�	
�	�	�+�	,�	,�5�	
�	�	�2�	3�	3�5����3�4�4�5����3�4�4�4�����%�%�#��)9�)9��*�*�#� �,�,�^�<�<�#�����"�"�"����0�1�1�,�T�5E�5E� �6"�6"�,�%)�%5�%5�6M�%N�%N�,����*�+�+�+����,�-�-�(��1A�1A��2�2�(�!%�!1�!1�2E�!F�!F�(�����'�'�'����-�.�.�0�$�2B�2B�$�3�3�0����.�/�/�/����/�0�0�8�D�4D�4D�&�5�5�8����6�7�7�7����/����4�
!�
(�
(�
���0A�0A�
(�
B�
B�7
�
��< �%�%�h�o�&A�&.�o�7�7�M�
�_�F��!�$��#�f���<��,�3�3��&�
4�
(�
(�c���

�4�d�<�<�<�<��x�<��$�+�+���+�9�9�c���

�4�d�<�<�<�<��;����-�d�H�O�D�D�f�f��f��O��K�'�'��o�	�	 �	(�"*�/�"E�"E�!#�#F�#%�#%���)�:�
��'�<�>�>��0�6�6�8�8�+�+�.�%������O�/�B�B���
C�
*�
*�	+�	+�	+�	+��K���#�#�	�	�	%�'��?�?�!#� @� %� %���%�<�
��$�9�;�;��"2�"8�"8�":�":�1�1�
�*�h�����O�,�?�?��h�
@�
0�
0�	1�	1�	1�	1���!�#�7�:�:�:��� ���=���"��&*�&G��
�0�
�d�4�
�
���
 �[�
9�
9�
9�
@�
@���'���
�Y��$��H���2��,�/�"�8��
�A���F� ����!�!�*�-�-�-��Mr9c��tj|�����}|jj���}tj|����||j���}|�@tj
d|j�|�
��������|�||��S)z�Run is called by calliope to update the secret.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      The API call to service for secret update.
    rg�rlNrZrY�rmrnrorqrZrrr��	GetOrNonerfr�InvalidArgumentException�SECRET_MISSING_MESSAGErzr{r��r�r	rhrirZs     r7�Runz
Update.Runs����-�d�.?�.?�.A�.A�B�B�K���%�+�+�-�-�J�
�
 �[�
9�
9�
9�
C�
C��D�M�D���F�
�~��/�
�D�/�6�6�j�o�o�>O�>O�6�P�P�
�
��
�?�?�6�4�(�(�(r9N)
�__name__�
__module__�__qualname__�__doc__ryr�r�r�r��staticmethodr8r�r��r9r7rr s�������'�'�TB��>��6��8��G��
�H�H��<�H�:Y�Y�Y�v)�)�)�)�)r9rc�8�eZdZdZdZed���Zd�Zd�ZdS)�
UpdateBetaa�Update a secret's metadata.

  Update a secret's metadata (e.g. labels). This command will
  return an error if given a secret that does not exist.

  ## EXAMPLES

      Update the label of a secret named `my-secret`.

    $ {command} my-secret --update-labels=foo=bar

  Update the label of a secret using etag.

        $ {command} my-secret --update-labels=foo=bar --etag=123

  Update the expiration of a secret named 'my-secret' using a ttl.

    $ {command} my-secret --ttl="600s"

  Update the expiration of a secret named 'my-secret' using an expire-time.

    $ {command} my-secret --expire-time="2030-01-01T08:15:30-05:00"

  Remove the expiration of a secret named 'my-secret'.

    $ {command} my-secret --remove-expiration

  Update a secret to have a next-rotation-time:

    $ {command} my-secret --next-rotation-time="2030-01-01T15:30:00-05:00"

  Update a secret to have a next-rotation-time and rotation-period:

    $ {command} my-secret --next-rotation-time="2030-01-01T15:30:00-05:00"
    --rotation-period="7200s"

  Update a secret to remove the next-rotation-time:

    $ {command} my-secret --remove-next-rotation-time

  Update a secret to clear rotation policy:

    $ {command} my-secret --remove-rotation-schedule

  Update version destroy ttl of a secret:

    $ {command} my-secret --version-destroy-ttl="86400s"

  Disable delayed secret version destroy:

    $ {command} my-secret --remove-version-destroy-ttl
  z8There are no changes to the secret [{secret}] for updatec�,�tj|ddd���tj|dd���|�dd���}|�dd	���}t	j|��tj|d
���tj|��tj|��tj	|��tj
|��tj|��tj
|ddtt��tj|ddt��tj|dd��tj
|d
d	tt��tj|d
d	t��tj|d
d	��dS)NrTrrFrrrrrr r"r#)r$r%r&r'rr(r)r*r,r+r-r.r
r/r0r1r2r3r4s   r7r8zUpdateBeta.Argsks��������t�������V�-?��N�N�N�N����4�.?��@�@�E��"�"��M�"�B�B�K��$�V�,�,�,���v�i�8�8�8�8��)�&�1�1�1��'��/�/�/��%�f�-�-�-��+�F�3�3�3��(��0�0�0���e�%6�8I�3�!�#�#�#���e�%6�8I�3�O�O�O���U�$5�7H�I�I�I���k�=�-��!�#�#�#���k�=�-��M�M�M���[�-��G�G�G�G�Gr9c��tj|�����}tj|���}|jj���}g}tj�	|��}|�
��r|�d��|�d��r|�d��|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d	��|�d
��s*|�d��s|�d��r|�d
��|�d��s*|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d��|�d��s*|�d��s|�d��r|�d��|�d��s|�d��r|�d��|�d��s|�d��r|�d��|sBtjgd�|j�|���������|�|jj|j��}|j}	|jr|j}	d	|vrt/j||j��}
ng}
g}d|vr�|j� |j�g� ��|_t/j||jj��}|���D]9\}
}|�|jj�|
|�!�����:g}d|vr�g}|j � |j�!g� ��|_ t/j"||j j��}|���D]9\}}|�|jj!�||�!�����:|j#r7|j$�|j#�"��}tKj&|d#d#�$��|j'r7|j(�|j'�%��}tKj&|d#d#�$��|j)r|j)�d&�}nd}|j*s(|j+s|j,rtj-d'|j.���tj/|�(���0||	||||j1|j#|j'|
|j2|j3||j+|j*�)��}tij/���5|��|S)*Nr;r=r>r?r@rHrIrJrKrArBrCrDrErFrGrLrMrNrOrPrQrRr#rSrTrUrVrWrXrYr`rbr[Tr\r_rerfrg)rir=rjrOr#rkr?r>rKrArErSrUrl)6rmrnrorprqrZrrrrsrtrurvrwrrxryrzr{r|r}r~r=rr�r�rKr�r�r�rar�r�r#r�r�r?r�rr�r>r�rSrfrUrVr�r�r�rrkrArEr�r�)r�r�r	rhr�rirjr�r�r=rKrOr�r6r<r#r�r�r�r�rSrZs                      r7r�zUpdateBeta._RunUpdate�s���-�d�.?�.?�.A�.A�B�B�K��&�{�;�;�;�H���%�+�+�-�-�J��K��"�1�1�$�7�7�K��!�!�#�#�#�����"�"�"������� �����������
�&�&�(�$�*:�*:�;N�*O�*O�(�����'�'�'�����%�%�#��)9�)9��*�*�#� �,�,�^�<�<�#�����"�"�"�	
�	�	�.�	/�	/�8�	
�	�	�5�	6�	6�8����3�4�4�8����6�7�7�7�	
�	�	�+�	,�	,�5�	
�	�	�2�	3�	3�5����3�4�4�5����3�4�4�4����0�1�1�,�T�5E�5E� �6"�6"�,�%)�%5�%5�6M�%N�%N�,����*�+�+�+����,�-�-�(��1A�1A��2�2�(�!%�!1�!1�2E�!F�!F�(�����'�'�'����-�.�.�0�$�2B�2B�$�3�3�0����.�/�/�/����/�0�0�8�D�4D�4D�&�5�5�8����6�7�7�7����/����4�
!�
(�
(�
���0A�0A�
(�
B�
B�7
�
��< �%�%�h�o�&A�&.�o�7�7�M�
�_�F��!�$��#�f��;����-�d�H�O�D�D�f�f��f��O��K�'�'�	�	 �	(�"*�/�"E�"E�!#�#F�#
�#
���*�:�
��'�<����1�6�6�8�8�
�
�.�%������O�/�B�B���
C�
�
�	
�	
�	
�	
�
�K���#�#��k�	�	�	%�'��?�?�!#� @� 
� 
���&�<�
��$�9����#3�"8�"8�":�":�
�
�
�*�h�����O�,�?�?��h�
@�
�
�	
�	
�	
�	
�
����,�3�3��&�
4�
�
�c���

�4�d������x���$�+�+���+�9�9�c���

�4�d�������!�#�7�:�:�:��� ���=���"��&*�&G��
�0�
�d�4�
�
���
 �[�
9�
9�
9�
@�
@����'��
�Y��$��H���2��,�/�"�8��
�A���F� ����!�!�*�-�-�-��Mr9c��tj|�����}|jj���}tj|����||j���}|�@tj
d|j�|�
��������|�||��S)Nrgr�rZrYr�r�s     r7r�zUpdateBeta.Run*s����-�d�.?�.?�.A�.A�B�B�K���%�+�+�-�-�J�
�
 �[�
9�
9�
9�
C�
C��D�M�D���F�
�~��/�
�D�/�6�6�j�o�o�>O�>O�6�P�P�
�
��
�?�?�6�4�(�(�(r9N)	r�r�r�r�ryr�r8r�r�r�r9r7r�r�/sj������3�3�lA���H�H��<�H�.e�e�e�N)�)�)�)�)r9r�N)r��
__future__rrr�googlecloudsdk.api_lib.secretsrrm�googlecloudsdk.callioperr�"googlecloudsdk.command_lib.secretsr	r$r
r�rr��$googlecloudsdk.command_lib.util.argsrr
�googlecloudsdk.core.consoler�
ReleaseTracksro�GA�DefaultUniverseOnly�
UpdateCommandr�BETAr�r�r9r7�<module>r�s���!� �&�&�&�&�&�&�������'�'�'�'�'�'�=�=�=�=�=�=�(�(�(�(�(�(�.�.�.�.�.�.�C�C�C�C�C�C�A�A�A�A�A�A�C�C�C�C�C�C�<�<�<�<�<�<�9�9�9�9�9�9�2�2�2�2�2�2����D�%�(�)�)���J)�J)�J)�J)�J)�T�
�J)�J)���*�)�J)�Z���D�%�*�+�+���G)�G)�G)�G)�G)��G)�G)���,�+�G)�G)�G)r9

Youez - 2016 - github.com/yon3zu
LinuXploit