Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Return IfExp CompareIn Str NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict Str Str Str Str NameLoad Num Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict Str Num If CompareIs NameLoad NameLoad body Assign NameStore Dict Str Str If CompareIs NameLoad NameLoad body Assign NameStore Dict If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr AttributeLoad NameLoad attr Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Dict Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad SubscriptLoad NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str Dict Assign NameStore SubscriptLoad Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad Call AttributeLoad NameLoad attr Str Dict attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Dict Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Dict Assign NameStore NameLoad For TupleStore NameStore NameStore Call AttributeLoad Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad attr body If CompareNotEq NameLoad SubscriptLoad NameLoad Index NameLoad body Assign NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Dict Index NameLoad NameLoad Assign SubscriptStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Dict Index NameLoad SubscriptLoad NameLoad Index NameLoad If NameLoad body If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad SubscriptLoad NameLoad Index Str Str Assign NameStore Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Dict Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return NameLoad If BoolOpAnd NameLoad UnaryOpNot SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Dict Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Dict Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list
N/A N/A 
Manage Elasticsearch Domains
=================

.. versionadded:: Carbon

Create and destroy Elasticsearch domains. Be aware that this interacts with Amazon's services,
and so may incur charges.

This module uses ``boto3``, which can be installed via package, or pip.

This module accepts explicit vpc 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 `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

    vpc.keyid: GKTADJGHEIQSXMKKRBJ08H
    vpc.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 domain exists:
        boto_elasticsearch_domain.present:
            - DomainName: mydomain
            - profile='user-credentials'
            - ElasticsearchClusterConfig:
                InstanceType": "t2.micro.elasticsearch"
                InstanceCount: 1
                DedicatedMasterEnabled: False
                ZoneAwarenessEnabled: False
            - EBSOptions:
                EBSEnabled: True
                VolumeType: "gp2"
                VolumeSize: 10
                Iops: 0
            - AccessPolicies:
                Version: "2012-10-17"
                Statement:
                  - Effect: "Allow"
                  - Principal:
                      AWS: "*"
                  - Action:
                    - "es:*"
                  - Resource: "arn:aws:es:*:111111111111:domain/mydomain/*
                  - Condition:
                      IpAddress:
                        "aws:SourceIp":
                          - "127.0.0.1",
                          - "127.0.0.2",
            - SnapshotOptions:
                AutomatedSnapshotStartHour: 0
            - AdvancedOptions:
                rest.action.multi.allow_explicit_index": "true"
            - Tags:
                a: "b"
            - region: us-east-1
            - keyid: GKTADJGHEIQSXMKKRBJ08H
            - key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

 __future__ absolute_import N/A logging N/A os N/A os.path N/A json salt.ext.six string_types N/A log N/A N/A logging getLogger __name__ __virtual__ N/A N/A N/A N/A N/A 
    Only load if boto is available.
     N/A N/A N/A boto_elasticsearch_domain.exists __salt__ boto_elasticsearch_domain False N/A present N/A N/A name DomainName ElasticsearchClusterConfig EBSOptions AccessPolicies SnapshotOptions AdvancedOptions Tags region key keyid profile N/A None None None None None None None None None None N/A N/A 
    Ensure domain exists.

    name
        The name of the state definition

    DomainName
        Name of the domain.

    ElasticsearchClusterConfig
        Configuration options for an Elasticsearch domain. Specifies the
        instance type and number of instances in the domain cluster.

        InstanceType (string) --
        The instance type for an Elasticsearch cluster.

        InstanceCount (integer) --
        The number of instances in the specified domain cluster.

        DedicatedMasterEnabled (boolean) --
        A boolean value to indicate whether a dedicated master node is enabled.
        See About Dedicated Master Nodes for more information.

        ZoneAwarenessEnabled (boolean) --
        A boolean value to indicate whether zone awareness is enabled. See About
        Zone Awareness for more information.

        DedicatedMasterType (string) --
        The instance type for a dedicated master node.

        DedicatedMasterCount (integer) --
        Total number of dedicated master nodes, active and on standby, for the
        cluster.

    EBSOptions
        Options to enable, disable and specify the type and size of EBS storage
        volumes.

        EBSEnabled (boolean) --
        Specifies whether EBS-based storage is enabled.

        VolumeType (string) --
        Specifies the volume type for EBS-based storage.

        VolumeSize (integer) --
        Integer to specify the size of an EBS volume.

        Iops (integer) --
        Specifies the IOPD for a Provisioned IOPS EBS volume (SSD).

    AccessPolicies
        IAM access policy

    SnapshotOptions
        Option to set time, in UTC format, of the daily automated snapshot.
        Default value is 0 hours.

        AutomatedSnapshotStartHour (integer) --
        Specifies the time, in UTC format, when the service takes a daily
        automated snapshot of the specified Elasticsearch domain. Default value
        is 0 hours.

    AdvancedOptions
        Option to allow references to indices in an HTTP request body. Must be
        false when configuring access to individual sub-resources. By default,
        the value is true .

    region
        Region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        A dict with region, key and keyid, or a pillar key (string) that
        contains a dict with region, key and keyid.
     N/A ret N/A name result comment changes DomainName True N/A N/A N/A ElasticsearchClusterConfig None N/A N/A ElasticsearchClusterConfig N/A DedicatedMasterEnabled InstanceCount InstanceType ZoneAwarenessEnabled False 1 m3.medium.elasticsearch False N/A N/A EBSOptions None N/A N/A EBSOptions N/A EBSEnabled False N/A N/A SnapshotOptions None N/A N/A SnapshotOptions N/A AutomatedSnapshotStartHour 0 N/A N/A AdvancedOptions None N/A N/A AdvancedOptions N/A rest.action.multi.allow_explicit_index true N/A N/A Tags None N/A N/A Tags N/A N/A N/A N/A AccessPolicies None N/A isinstance AccessPolicies string_types N/A N/A N/A N/A AccessPolicies N/A N/A json loads AccessPolicies N/A N/A N/A ValueError N/A e N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to create domain: {0}. format N/A e message N/A ret N/A r N/A N/A __salt__ N/A boto_elasticsearch_domain.exists DomainName DomainName region region key key keyid keyid profile profile N/A N/A error r N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to create domain: {0}. format N/A N/A r N/A error N/A message N/A ret N/A N/A N/A N/A r get exists N/A N/A N/A __opts__ N/A test N/A N/A N/A ret N/A comment N/A N/A Domain {0} is set to be created. format DomainName N/A N/A ret N/A result None N/A ret N/A r N/A N/A __salt__ N/A boto_elasticsearch_domain.create DomainName DomainName ElasticsearchClusterConfig ElasticsearchClusterConfig EBSOptions EBSOptions AccessPolicies AccessPolicies SnapshotOptions SnapshotOptions AdvancedOptions AdvancedOptions region region key key keyid keyid profile profile N/A N/A N/A N/A r get created N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to create domain: {0}. format N/A N/A r N/A error N/A message N/A ret N/A _describe N/A N/A __salt__ N/A boto_elasticsearch_domain.describe DomainName region region key key keyid keyid profile profile N/A N/A N/A ret N/A changes N/A old N/A domain None N/A N/A N/A ret N/A changes N/A new _describe N/A N/A ret N/A comment N/A N/A Domain {0} created. format DomainName N/A ret N/A N/A ret N/A comment N/A N/A N/A os linesep join N/A N/A ret N/A comment N/A N/A Domain {0} is present. format DomainName N/A N/A ret N/A changes N/A N/A _describe N/A N/A N/A __salt__ N/A boto_elasticsearch_domain.describe DomainName DomainName region region key key keyid keyid profile profile N/A domain N/A N/A _describe N/A AccessPolicies N/A N/A json loads N/A _describe N/A AccessPolicies N/A N/A N/A N/A N/A N/A _describe get EBSOptions N/A get EBSEnabled N/A N/A opts N/A N/A _describe get EBSOptions N/A N/A N/A N/A opts pop VolumeSize None N/A N/A N/A opts pop VolumeType None N/A comm_args N/A N/A need_update False N/A N/A k v N/A N/A N/A ElasticsearchClusterConfig EBSOptions AccessPolicies SnapshotOptions AdvancedOptions ElasticsearchClusterConfig EBSOptions AccessPolicies SnapshotOptions AdvancedOptions iteritems N/A N/A N/A v N/A _describe N/A k N/A N/A need_update True N/A N/A comm_args N/A k v N/A N/A N/A N/A N/A ret N/A changes setdefault new N/A N/A k v N/A N/A N/A N/A N/A ret N/A changes setdefault old N/A N/A k N/A _describe N/A k N/A need_update N/A N/A N/A __opts__ N/A test N/A N/A msg N/A N/A Domain {0} set to be modified. format DomainName N/A N/A ret N/A comment msg N/A N/A ret N/A result None N/A ret N/A N/A ret N/A comment N/A N/A N/A os linesep join N/A N/A ret N/A comment Domain to be modified N/A r N/A N/A __salt__ N/A boto_elasticsearch_domain.update DomainName DomainName region region key key keyid keyid profile profile comm_args N/A N/A N/A N/A r get updated N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to update domain: {0}. format N/A r N/A error N/A N/A ret N/A changes N/A N/A ret N/A ret N/A absent N/A N/A name DomainName region key keyid profile N/A None None None None N/A N/A 
    Ensure domain with passed properties is absent.

    name
        The name of the state definition.

    DomainName
        Name of the domain.

    region
        Region to connect to.

    key
        Secret key to be used.

    keyid
        Access key to be used.

    profile
        A dict with region, key and keyid, or a pillar key (string) that
        contains a dict with region, key and keyid.
     N/A ret N/A name result comment changes DomainName True N/A N/A r N/A N/A __salt__ N/A boto_elasticsearch_domain.exists DomainName region region key key keyid keyid profile profile N/A N/A error r N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to delete domain: {0}. format N/A N/A r N/A error N/A message N/A ret N/A N/A r N/A N/A r N/A exists N/A N/A N/A ret N/A comment N/A N/A Domain {0} does not exist. format DomainName N/A ret N/A N/A __opts__ N/A test N/A N/A N/A ret N/A comment N/A N/A Domain {0} is set to be removed. format DomainName N/A N/A ret N/A result None N/A ret N/A r N/A N/A __salt__ N/A boto_elasticsearch_domain.delete DomainName region region key key keyid keyid profile profile N/A N/A N/A r N/A deleted N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to delete domain: {0}. format N/A N/A r N/A error N/A message N/A ret N/A N/A N/A ret N/A changes N/A old N/A domain DomainName N/A N/A N/A ret N/A changes N/A new N/A domain None N/A N/A ret N/A comment N/A N/A Domain {0} deleted. format DomainName N/A ret N/A