File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/boto3_elasticsearch.cpython-310.pyc
Back
o ;j�� � @ s d Z ddlZddlZddlZddlZddlmZ ddlm Z zddl Z ddlZddlm Z mZmZ e�d��ej� dZW n eyH dZY nw e�e�Zd d � Zdd� Z dHd d�Ze ddd� dIdd��Z dJdd�Z dKdd�Ze ddd�dIdd��Z dIdd�Z dIdd�Z dIdd �Z e dd!d� dLd"d#��Z!e dd$d� dLd%d&��Z"e dd$d� dLd'd(��Z#e dd)d� dLd*d+��Z$e dd)d�dId,d-��Z%e dd)d�dId.d/��Z&dId0d1�Z'e dd!d� dLd2d3��Z(e dd!d�dId4d5��Z) dMd6d7�Z*e dd$d� dLd8d9��Z+ dMd:d;�Z,e ddd� dId<d=��Z- dNd>d?�Z.e dd)d� dOd@dA��Z/dIdBdC�Z0dIdDdE�Z1e dd)d� dIdFdG��Z2dS )Pa* Connection module for Amazon Elasticsearch Service .. versionadded:: 3001 :configuration: This module accepts explicit IAM credentials but can also utilize IAM roles assigned to the instance trough 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 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 es.keyid: GKTADJGHEIQSXMKKRBJ08H es.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs A region may also be specified in the configuration: .. code-block:: yaml es.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: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-east-1 All methods return a dict with: 'result' key containing a boolean indicating success or failure, 'error' key containing the errormessage returned by boto on error, 'response' key containing the data of the response returned by boto on success. :codeauthor: Herbert Buurman <herbert.buurman@ogd.nl> :depends: boto3 � N)�SaltInvocationError)�depends)�ClientError�ParamValidationError�WaiterError�boto3TFc C s t o tjjjddd�S )zg Only load if boto libraries exist and if boto libraries are greater than a given version. z1.2.7F)Z boto3_verZ check_boto)�HAS_BOTO�salt�utilsZversionsZcheck_boto_reqs� r r �T/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/boto3_elasticsearch.py�__virtual__O s �r c C s | }t r td td� d S d S )Nzboto3.assign_funcs�es)r � __utils__�__name__)�opts�_r r r �__init__Y s �r c C s t || f�s td��ddi}|du r;t| ||||d�}d|v r%|�|� n|d s4|�dd�| �i� n|d �d �}|r�|d d� |pDi �� D �d�} zt||||d �} | jdi | �� d|d<