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__/create.cpython-311.pyc
�

���n���dZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZ
dd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZe	je	jj��e	jGd�de	j������Z e	je	jj!��e	jGd�de	j������Z"dS)zCreate a new secret.�)�absolute_import)�division)�unicode_literals)�api)�base)�
exceptions)�args)�log)�util)�crc32c)�labels_util)�map_util)�
properties)�
console_ioc�v�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZed���Zd�ZdS)�Createa�Create a new secret.

  Create a secret with the given name and creates a secret version with the
  given data, if any. If a secret already exists with the given name, this
  command will return an error.

  ## EXAMPLES

  Create a secret with an automatic replication policy without creating any
  versions:

    $ {command} my-secret

  Create a new secret named 'my-secret' with an automatic replication policy
  and data from a file:

    $ {command} my-secret --data-file=/tmp/secret

  Create a new secret named 'my-secret' in 'us-central1' with data from a file:

    $ {command} my-secret --data-file=/tmp/secret
    --replication-policy=user-managed \
        --locations=us-central1

  Create a new secret named 'my-secret' in 'us-central1' and 'us-east1' with
  the value "s3cr3t":

    $ printf "s3cr3t" | {command} my-secret --data-file=-
    --replication-policy=user-managed --locations=us-central1,us-east1

  Create a new secret named 'my-secret' in 'us-central1' and 'us-east1' with
  the value "s3cr3t" in PowerShell (Note: PowerShell will add a newline to the
  resulting secret):

    $ Write-Output "s3cr3t" | {command} my-secret --data-file=-
    --replication-policy=user-managed --locations=us-central1,us-east1

  Create a secret with an automatic replication policy and a next rotation time:

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

  Create a secret with an automatic replication policy and a rotation period:

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

  Create a secret with delayed secret version destroy enabled:

    $ {command} my-secret --version-destroy-ttl="86400s"
  ��The value provided for --data-file is the empty string. This can happen if you pass or pipe a variable that is undefined. Please verify that the --data-file flag is not the empty string. If you are not providing secret data, omit the --data-file flag.�hThe value provided for --replication-policy is invalid. Valid values are "automatic" and "user-managed".��Cannot use the secrets/replication-policy property because its value is invalid. Please either set it to a valid value ("automatic" or "user-managed") or override it for this command by using the --replication-policy flag.�(If --replication-policy is user-managed then --locations must also be provided. Please set the desired storage regions in --locations or the secrets/locations property. For an automatic replication policy, please set --replication-policy or the secrets/replication-policy property to "automatic".��If --replication-policy is "automatic" then --locations are not allowed. Please remove the --locations flag or set the --replication-policy to "user-managed".��The secrets/replication-policy property is "automatic" and not overridden so --locations are not allowed. Please remove the --locations flag or set the replication-policy to "user-managed".��Cannot create a secret with an "automatic" replication policy if the secrets/locations property is set. Please either use a "user-managed" replication policy or unset secrets/locations.��Locations are only allowed when creating a secret with a "user-managed" replication policy. Please use the --replication-policy flag to set it or remove --locations to use an automatic replication policy.��The --kms-key-name flag can only be used when creating a secret with an "automatic" replication policy. To specify encryption keys for secrets with a "user-managed" replication policy, please use --replication-policy-file.�NA --replication-policy-file and --replication-policy cannot both be specified.�EA --replication-policy-file and --locations cannot both be specified.�HA --replication-policy-file and --kms-key-name cannot both be specified.�File cannot be empty.��The --kms-key-name flag can only be set for automatically replicated secrets. To create a user managed secret with customer managed encryption keys, please use --replication-policy-file.�rThis secret and all of its versions will be automatically deleted at the requested expire-time of [{expire_time}].�qThis secret and all of its versions will be automatically deleted after the requested ttl of [{ttl}] has elapsed.��The --regional-kms-key-name flag can only be used when creating a regional secret with "--location" and should not be used with "--replication-policy-file" or "--kms-key-name"��Regional secret created using "--location" should not have flags like "--replication-policy-file" or "--kms-key-name" or "--locations" or --replication-policyc��tj|ddd���tj|dd���tj|��tj|��tj|��tj|��tj|��tj	|��tj
|��tj|��|�dd���}tj|d	dtt��d
S)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 the command.
    �	to createT��purpose�
positional�required�to create secretF�r(�hidden�Annotations��mutex�help�annotationsN)�secrets_args�	AddSecret�AddLocation�AddDataFile�AddCreateReplicationPolicyGroupr
�AddCreateLabelsFlags�AddCreateExpirationGroup�	AddTopics�AddCreateRotationGroup�AddRegionalKmsKeyName�AddCreateVersionDestroyTTL�	add_groupr�
AddMapSetFlag�str��parserr2s  �lib/surface/secrets/create.py�ArgszCreate.Args�s�������t�������V�-?��N�N�N�N���V�$�$�$��0��8�8�8��$�V�,�,�,��)�&�1�1�1���6�"�"�"��'��/�/�/��&�v�.�.�.��+�F�3�3�3��"�"��M�"�B�B�K���;�
�}�c�3�O�O�O�O�O�c�|��tj|�����}tj|����|jj���}|jdu}tj	|j
��}tj	|jd���}tj
|�jj��}|j}|j}	g}
|jr |jrt%j|j���|jr |jrt%j|j���|jr |jrt%j|j���|s |jrt%j|j���|jr'|js|jrt%j|j���|r0|s|js|js|jrt%j|j���|jr|
�|j��|jr6|st%jd|j���tj|��\}}	}
�nx|s(t>j j!j�"��}|du}|rd}|dvr;|jrt%jd|j#���t%jd|j$���|dkr|
rt%jd	|j%���|	s?t>j j!j�"��}	|	r|	�&d
��}	|dkr|	st%j'd|j(���|dkr||jrW|jrt%jd|j)���|rt%jd|j*���t%jd|j+���|	rt%jd|j,���g}	|j
dkrt%j-|j.���|j/r7|j0�1|j/�
��}tej3|dd���|j4r7|j5�1|j4���}tej3|dd���g}
|�6d��r%�fd�|j7�8��D��}
|rd}|j9r|j9�d�}nd}tj:|����;|||	||j/|j4|
|j<|
|j=|j>|j||j���}|r�tj@|��}tj:|����A||tjB|��|j���}|rt�jD|jE��}nt�jF|jE��}t�jH���I|��n&t�j:���I|��|S)z�Run is called by calliope to create the secret.

    Args:
      args: an argparse namespace, all the arguments that were provided to this
        command invocation.

    Returns:
      The response from the create secret API call.
    ��versionNF��	is_binary�replication-policy�	automatic>rL�user-managedrM�kms-key-name�,�	locations���expire_timeT��throw_if_unattended�cancel_on_no��ttl�set_annotationsc�X��g|]&\}}�jj�||�����'S�)�key�value��Secret�AnnotationsValue�AdditionalProperty��.0�
annotation�metadata�messagess   �rC�
<listcomp>zCreate.Run.<locals>.<listcomp>A�N������%�z�8��/�
*�
=�
=��H�>�.�.���rE�s��api_version)
�labelsrP�policyrSrX�keys�topicsr2�next_rotation_time�rotation_period�regional_kms_key_name�version_destroy_ttl�secret_location�rt)J�secrets_api�GetApiFromTrack�ReleaseTrack�GetMessages�CONCEPTS�secret�Parse�location�secrets_util�ReadFileOrStdin�	data_file�replication_policy_filer
�ParseCreateArgsr_�LabelsValue�replication_policyrPr�ConflictingArgumentsException�POLICY_AND_POLICY_FILE_MESSAGE�!LOCATIONS_AND_POLICY_FILE_MESSAGE�kms_key_name�KMS_KEY_AND_POLICY_FILE_MESSAGErr�REGIONAL_KMS_FLAG_MESSAGE�REGIONAL_SECRET_MESSAGE�append�InvalidArgumentException�%REPLICATION_POLICY_FILE_EMPTY_MESSAGE�ParseReplicationFileContentsr�VALUES�secrets�Get�INVALID_POLICY_MESSAGE�INVALID_POLICY_PROP_MESSAGE� KMS_KEY_AND_USER_MANAGED_MESSAGE�split�RequiredArgumentException� MANAGED_BUT_NO_LOCATIONS_MESSAGE�AUTOMATIC_AND_LOCATIONS_MESSAGE�NO_POLICY_AND_LOCATIONS_MESSAGE�$AUTOMATIC_PROP_AND_LOCATIONS_MESSAGE�$AUTOMATIC_AND_LOCATIONS_PROP_MESSAGE�BadFileException�EMPTY_DATA_FILE_MESSAGErS�CONFIRM_EXPIRE_TIME_MESSAGE�formatr�PromptContinuerX�CONFIRM_TTL_MESSAGE�IsSpecifiedrY�itemsrs�Secretsrrorprqr�
get_crc32c�
AddVersion�get_checksumr3�ParseRegionalVersionRef�name�ParseVersionRef�secrets_log�Versions�Created��selfr	rk�
secret_ref�is_regional�data�replication_policy_contentsrlr�rP�kms_keys�default_to_automatic�msgr2rs�response�data_crc32crH�version_refrfs                   @rC�Runz
Create.Run�s�����-�d�.?�.?�.A�.A�B�B�K��&�{�;�;�;�H���%�+�+�-�-�J��-�t�+�K��'���7�7�D�".�">��$��#7�#7�#7��
�
(��x��/J�
K�
K�F��0����I��H��#�/��(?�/��4�
�
-�
/�
/�/��#�2���2��4�
�
0�
2�
2�2��#�0��(9�0��4�
�
.�
0�
0�0���4�5���4�
�
(�
�
���!���$��(,�(9��
�4�
�
(�
�
����������'���>�	�
�4�
�
&�
�
����)��o�o�d�'�(�(�(��#�1�
(�
��1� �$�"L�
�
�	
��
3�4O�
P�
P�.��)�X�X� �P�'�.�6�I�M�M�O�O��/�4�7��	�)�(��	�#@�	@�	@��"�	Q��3�4H�48�4O�Q�Q�Q��1� �$�"B�D�D�	D�	�~�	-�	-�(�	-��1��D�A�C�C�	C��+��%�-�7�;�;�=�=�	��	+��o�o�c�*�*�)�	�~�	-�	-�i�	-��2���>�@�@�	@�	�{�	*�	*��>�	F��
$�C��5��T�A�C�C�
C�
!�C��5��T�A�C�C�
C��3��4�D�F�F�F��	O��3�"�D�$M�O�O�O��	��~�����'��(D�E�E�E���<��,�3�3��&�
4�
(�
(�c���

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

�4�d�<�<�<�<��K����)�*�*������)-�(<�(B�(B�(D�(D����k�� �����!�#�7�:�:�:��� ���"�{�;�;�;�B�B����!��$��H�
��{���2��,�"�8�/��
�C���H�"�0��%�d�+�+�k��#��<�<�<�G�G�
�
�
�
�k�
*�
*��-�	H���g�
�A�"�:�7�<�H�H���"�2�7�<�@�@������$�$�[�1�1�1�1�����#�#�J�/�/�/��OrEN��__name__�
__module__�__qualname__�__doc__r�r�r�r�r�r�r�r��MANAGED_AND_KMS_FLAG_MESSAGEr�r�r�r�r�r�r�r�r��staticmethodrDr��rErCrr"s������1�1�j0��,��
#���#�0�"�?�'�7�'�F�"�#���!�
N�$�Q�"�,C�'�?�#�6��
8��
9�����P�P��<�P�,g�g�g�g�grErc�v�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZed���Zd�ZdS)�
CreateBetaa�Create a new secret.

  Create a secret with the given name and creates a secret version with the
  given data, if any. Note, the created secret ends with a newline.
  If a secret already exists with the given name, this command will return
  an error.

  ## EXAMPLES

  Create a secret with an automatic replication policy without creating any
  versions:

    $ {command} my-secret

  Create a new secret named 'my-secret' with an automatic replication policy
  and data from a file:

    $ {command} my-secret --data-file=/tmp/secret

  Create a new secret named 'my-secret' in 'us-central1' with data from a file:

    $ {command} my-secret --data-file=/tmp/secret
    --replication-policy=user-managed \
        --locations=us-central1

  Create a new secret named 'my-secret' in 'us-central1' and 'us-east1' with
  the value "s3cr3t":

    $ printf "s3cr3t" | {command} my-secret --data-file=-
    --replication-policy=user-managed --locations=us-central1,us-east1

  Create a new secret named 'my-secret' in 'us-central1' and 'us-east1' with
  the value "s3cr3t" in PowerShell (Note: PowerShell will add a newline to the
  resulting secret):

    $ Write-Output "s3cr3t" | {command} my-secret --data-file=-
    --replication-policy=user-managed --locations=us-central1,us-east1

  Create an expiring secret with an automatic replication policy using a ttl:

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

  Create an expiring secret with an automatic replication policy using an
  expire-time:

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

  Create a secret with an automatic replication policy and a next rotation time:

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

  Create a secret with an automatic replication policy and a rotation period:

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

  Create a secret with delayed secret version destroy enabled:

    $ {command} my-secret --version-destroy-ttl="86400s"
  rrrrrrrrrrrrrr r!r"r#r$c��tj|ddd���tj|dd���tj|��tj|��tj|��tj|��tj|��tj	|��tj
|��tj|��|�dd���}tj|d	dtt��dS)
Nr&Tr'r+Fr,r.r/r2)r3r4r5r6r7r
r8r9r;r:r<r=r>rr?r@rAs  rCrDzCreateBeta.Argss��������t�������V�-?��N�N�N�N���V�$�$�$��0��8�8�8��$�V�,�,�,��)�&�1�1�1��'��/�/�/���6�"�"�"��&�v�.�.�.��+�F�3�3�3��"�"��M�"�B�B�K���;�
�}�c�3�O�O�O�O�OrEc�|��tj|�����}tj|����|jj���}|jdu}tj	|j
��}tj	|jd���}tj
|�jj��}|j}|j}	g}
|jr |jrt%j|j���|jr |jrt%j|j���|jr |jrt%j|j���|s |jrt%j|j���|jr'|js|jrt%j|j���|r0|s|js|js|jrt%j|j���|jr|
�|j��|jr6|st%jd|j���tj|��\}}	}
�nx|s(t>j j!j�"��}|du}|rd}|dvr;|jrt%jd|j#���t%jd|j$���|dkr|
rt%jd|j%���|	s?t>j j!j�"��}	|	r|	�&d	��}	|dkr|	st%j'd
|j(���|dkr||jrW|jrt%jd
|j)���|rt%jd
|j*���t%jd
|j+���|	rt%jd|j,���g}	|j
dkrt%j-|j.���|j/r7|j0�1|j/���}tej3|d
d
���|j4r7|j5�1|j4���}tej3|d
d
���g}
|�6d��r%�fd�|j7�8��D��}
|rd}|j9r|j9�d�}nd}tj:|����;|||	||j/|j4|
|j<|j=|j>|
|j||j���}|r�tj@|��}tj:|����A||tjB|��|j���}|rt�jD|jE��}nt�jF|jE��}t�jH���I|��n&t�j:���I|��|S)NrGFrIrKrL>rLrMrMrNrOrPrQrRTrTrWrYc�X��g|]&\}}�jj�||�����'Sr[r^rbs   �rCrgz"CreateBeta.Run.<locals>.<listcomp>�rhrErirj)
rlrPrmrSrXrnrprqror2rrrsrtru)Jrvrwrxryrzr{r|r}r~rr�r�r
r�r_r�r�rPrr�r�r�r�r�rrr�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rSr�r�rr�rXr�r�rYr�rsr�rrprqrorr�r�r�r3r�r�r�r�r�r�r�s                   @rCr�zCreateBeta.Runs�����-�d�.?�.?�.A�.A�B�B�K��&�{�;�;�;�H���%�+�+�-�-�J��-�t�+�K��'���7�7�D�".�">��$��#7�#7�#7��
�
(��x��/J�
K�
K�F��0����I��H��#�/��(?�/��4�
�
-�
/�
/�/��#�2���2��4�
�
0�
2�
2�2��#�0��(9�0��4�
�
.�
0�
0�0���4�5���4�
�
(�
�
���!���$��(,�(9��
�4�
�
(�
�
����������'���>�	�
�4�
�
&�
�
����)��o�o�d�'�(�(�(��#�3�
(�
��1� �$�"L�
�
�	
��
3�4O�
P�
P�.��)�X�X� �P�'�.�6�I�M�M�O�O��/�4�7��	�)�(��	�#@�	@�	@��"�	Q��3�4H�48�4O�Q�Q�Q��1� �$�"B�D�D�	D�	�~�	-�	-�(�	-��1��D�A�C�C�	C��+��%�-�7�;�;�=�=�	��	+��o�o�c�*�*�)�	�~�	-�	-�i�	-��2���>�@�@�	@�	�{�	*�	*��>�	F��
$�C��5��T�A�C�C�
C�
!�C��5��T�A�C�C�
C��3��4�D�F�F�F��	O��3�"�D�$M�O�O�O��	��~�����'��(D�E�E�E���<��,�3�3��&�
4�
(�
(�c���

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

�4�d�<�<�<�<��K����)�*�*������)-�(<�(B�(B�(D�(D����k�� �����!�#�7�:�:�:��� ���"�{�;�;�;�B�B����!��$��H�
��2��,��{��"�8�/��
�C���H�"�0��%�d�+�+�k��#��<�<�<�G�G�
�
�
�
�k�
*�
*��-�	H���g�
�A�"�:�7�<�H�H���"�2�7�<�@�@������$�$�[�1�1�1�1�����#�#�J�/�/�/��OrENr�r�rErCr�r�rs������;�;�~0��,��
#���#�0�"�?�'�7�'�F�"�#���!�
N�$�Q�"�,C�'�?�#�6��
8��
9�����P�P��<�P� `�`�`�`�`rEr�N)#r��
__future__rrr�googlecloudsdk.api_lib.secretsrrv�googlecloudsdk.callioperr�"googlecloudsdk.command_lib.secretsr	r3r
r�rr~�googlecloudsdk.command_lib.utilr�$googlecloudsdk.command_lib.util.argsr
r�googlecloudsdk.corer�googlecloudsdk.core.consoler�
ReleaseTracksrx�GA�DefaultUniverseOnly�
CreateCommandr�BETAr�r�rErC�<module>r�s�����&�&�&�&�&�&�������'�'�'�'�'�'�=�=�=�=�=�=�(�(�(�(�(�(�.�.�.�.�.�.�C�C�C�C�C�C�A�A�A�A�A�A�C�C�C�C�C�C�2�2�2�2�2�2�<�<�<�<�<�<�9�9�9�9�9�9�*�*�*�*�*�*�2�2�2�2�2�2����D�%�(�)�)���K�K�K�K�K�T�
�K�K���*�)�K�\
���D�%�*�+�+���H�H�H�H�H��#�H�H���,�+�H�H�HrE

Youez - 2016 - github.com/yon3zu
LinuXploit