File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/boto_kms.cpython-310.pyc
o
�N�g-E � @ s� d Z ddlZddlZddlZddlm mZ ddlZe� e
�ZzddlZddl
Ze� d��ej� dZW n
eefyB dZY nw dd� Zdd � Z d8d
d�Z d9dd
�Z d:dd�Z d;dd�Zd8dd�Zd8dd�Zd8dd�Zd8dd�Zd8dd�Zd8dd�Zd8dd�Z d;d d!�Z d9d"d#�Z! d9d$d%�Z" d<d&d'�Z# d8d(d)�Z$d8d*d+�Z% d;d,d-�Z& d;d.d/�Z' d8d0d1�Z( d:d2d3�Z)d8d4d5�Z* d8d6d7�Z+dS )=ar
Connection module for Amazon KMS
.. versionadded:: 2015.8.0
:configuration: This module accepts explicit kms credentials but can also utilize
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::
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::
kms.keyid: GKTADJGHEIQSXMKKRBJ08H
kms.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration::
kms.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:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
:depends: boto
� N�botoTFc C s t jjjddd�S )z,
Only load if boto libraries exist.
z2.38.0F)Zboto_verZcheck_boto3)�salt�utilsZversionsZcheck_boto_reqs� r r �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/boto_kms.py�__virtual__= s r c C s t r
td tdtd� d S d S )Nzboto.assign_funcs�kms)�pack)�HAS_BOTO� __utils__�__name__Z__salt__)�optsr r r �__init__D s �r c
C �r t ||||d�}i }z
|�| |� d|d<