File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/boto_efs.cpython-310.pyc
o
�N�g18 � @ s d Z ddlZddlZzddlZdZW n ey dZY nw e�e�Z dd� Z
ddd�Z dd
d�Z d dd
�Z
ddd�Z ddd�Z ddd�Z ddd�Z d dd�Z d dd�Zddd�Z ddd�ZdS )!a�
Connection module for Amazon EFS
.. versionadded:: 2017.7.0
:configuration: This module accepts explicit EFS credentials but can also
utilize IAM roles assigned to the instance through Instance Profiles or
it can read them from the ~/.aws/credentials file or from these
environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY.
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/efs/latest/ug/
access-control-managing-permissions.html
http://boto3.readthedocs.io/en/latest/guide/
configuration.html#guide-configuration
If IAM roles are not used you need to specify them either in a pillar or
in the minion's config file
.. code-block:: yaml
efs.keyid: GKTADJGHEIQSXMKKRBJ08H
efs.key: askd+ghsdfjkghWupU/asdflkdfklgjsdfjajkghs
A region may also be specified in the configuration
.. code-block:: yaml
efs.region: us-east-1
If a region is not specified, the default is us-east-1.
It's also possible to specify key, keyid, and region via a profile, either
as a passed in dict, or as a string to pull from pillars or minion config:
.. code-block:: yaml
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askd+ghsdfjkghWupU/asdflkdfklgjsdfjajkghs
region: us-east-1
:depends: boto3
� NTFc C s t jjjddd�S )zi
Only load if boto3 libraries exist and if boto3 libraries are greater than
a given version.
z1.0.0F)Z boto3_verZ
check_boto)�salt�utilsZversionsZcheck_boto_reqs� r r �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/boto_efs.py�__virtual__A s r c K s� d}|rt |t�r|tv rt| }n#|tv rt| }n| s!|s!|r5i }| r)| |d<