%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/boto3_elasticache.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d � Z d � Z d e e e e e d � Z d e e e e d � Z d � Z d e e e e e d � Z d e e e e d � Z d � Z e e e e e d � Z e e e e d � Z d S( u� Manage Elasticache with boto3 ============================= .. versionadded:: 2017.7.0 Create, destroy and update Elasticache clusters. Be aware that this interacts with Amazon's services, and so may incur charges. This module uses boto3 behind the scenes - as a result it inherits any limitations it boto3's implementation of the AWS API. It is also designed to as directly as possible leverage boto3's parameter naming and semantics. This allows one to use http://boto3.readthedocs.io/en/latest/reference/services/elasticache.html as an excellent source for details too involved to reiterate here. Note: This module is designed to be transparent ("intentionally ignorant" is the phrase I used to describe it to my boss) to new AWS / boto options - since all AWS API params are passed directly through both the state and executions modules, any new args to existing functions which become available after this documentation is written should work immediately. Brand new API calls, of course, would still require new functions to be added :) This module accepts explicit elasticache 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 is available `here <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 file or in the minion's config file: .. code-block:: yaml elasticache.keyid: GKTADJGHEIQSXMKKRBJ08H elasticache.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs It's also possible to specify ``key``, ``keyid`` and ``region`` via a profile, either passed in as a dict, or as a string to pull from pillars or minion config: .. code-block:: yaml myprofile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-east-1 .. code-block:: yaml Ensure myelasticache exists: boto3_elasticache.present: - name: myelasticache - engine: redis - cache_node_type: cache.t1.micro - num_cache_nodes: 1 - notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic - region: us-east-1 - keyid: GKTADJGHEIQSXMKKRBJ08H - key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs .. code-block:: yaml # Using a profile from pillars Ensure myelasticache exists: boto3_elasticache.present: - name: myelasticache - engine: redis - cache_node_type: cache.t1.micro - num_cache_nodes: 1 - notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic - region: us-east-1 - profile: myprofile .. code-block:: yaml # Passing in a profile Ensure myelasticache exists: boto3_elasticache.present: - name: myelasticache - engine: redis - cache_node_type: cache.t1.micro - num_cache_nodes: 1 - notification_topic_arn: arn:aws:sns:us-east-1:879879:my-sns-topic - region: us-east-1 - profile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St Sd S( u) Only load if boto is available. u&