salt.modules.boto_elasticsearch_domain

Connection module for Amazon Elasticsearch Service

New in version 2016.11.0.

configuration:

This module accepts explicit AWS 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:

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:

lambda.keyid: GKTADJGHEIQSXMKKRBJ08H
lambda.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

lambda.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

Create and delete methods return:

created: true

or

created: false
error:
  message: error message

Request methods (e.g., describe_function) return:

domain:
  - {...}
  - {...}

or

error:
  message: error message
depends:

boto3

salt.modules.boto_elasticsearch_domain.add_tags(DomainName=None, ARN=None, region=None, key=None, keyid=None, profile=None, **kwargs)

Add tags to a domain

Returns {tagged: true} if the domain was tagged and returns {tagged: False} if the domain was not tagged.

CLI Example:

salt myminion boto_elasticsearch_domain.add_tags mydomain tag_a=tag_value tag_b=tag_value
salt.modules.boto_elasticsearch_domain.create(DomainName, ElasticsearchClusterConfig=None, EBSOptions=None, AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None, region=None, key=None, keyid=None, profile=None, ElasticsearchVersion=None)

Given a valid config, create a domain.

Returns {created: true} if the domain was created and returns {created: False} if the domain was not created.

CLI Example:

salt myminion boto_elasticsearch_domain.create mydomain \
      {'InstanceType': 't2.micro.elasticsearch', 'InstanceCount': 1, \
      'DedicatedMasterEnabled': false, 'ZoneAwarenessEnabled': false} \
      {'EBSEnabled': true, 'VolumeType': 'gp2', 'VolumeSize': 10, \
      'Iops': 0} \
      {"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "es:*", \
       "Resource": "arn:aws:es:us-east-1:111111111111:domain/mydomain/*", \
       "Condition": {"IpAddress": {"aws:SourceIp": ["127.0.0.1"]}}}]} \
      {"AutomatedSnapshotStartHour": 0} \
      {"rest.action.multi.allow_explicit_index": "true"}
salt.modules.boto_elasticsearch_domain.delete(DomainName, region=None, key=None, keyid=None, profile=None)

Given a domain name, delete it.

Returns {deleted: true} if the domain was deleted and returns {deleted: false} if the domain was not deleted.

CLI Example:

salt myminion boto_elasticsearch_domain.delete mydomain
salt.modules.boto_elasticsearch_domain.describe(DomainName, region=None, key=None, keyid=None, profile=None)

Given a domain name describe its properties.

Returns a dictionary of interesting properties.

CLI Example:

salt myminion boto_elasticsearch_domain.describe mydomain
salt.modules.boto_elasticsearch_domain.exists(DomainName, region=None, key=None, keyid=None, profile=None)

Given a domain name, check to see if the given domain exists.

Returns True if the given domain exists and returns False if the given function does not exist.

CLI Example:

salt myminion boto_elasticsearch_domain.exists mydomain
salt.modules.boto_elasticsearch_domain.list_tags(DomainName=None, ARN=None, region=None, key=None, keyid=None, profile=None)

List tags of a trail

Returns:

  • {...}

  • {...}

Return type:

tags

CLI Example:

salt myminion boto_cloudtrail.list_tags my_trail
salt.modules.boto_elasticsearch_domain.remove_tags(TagKeys, DomainName=None, ARN=None, region=None, key=None, keyid=None, profile=None)

Remove tags from a trail

Returns {tagged: true} if the trail was tagged and returns {tagged: False} if the trail was not tagged.

CLI Example:

salt myminion boto_cloudtrail.remove_tags my_trail tag_a=tag_value tag_b=tag_value
salt.modules.boto_elasticsearch_domain.status(DomainName, region=None, key=None, keyid=None, profile=None)

Given a domain name describe its status.

Returns a dictionary of interesting properties.

CLI Example:

salt myminion boto_elasticsearch_domain.status mydomain
salt.modules.boto_elasticsearch_domain.update(DomainName, ElasticsearchClusterConfig=None, EBSOptions=None, AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None, region=None, key=None, keyid=None, profile=None)

Update the named domain to the configuration.

Returns {updated: true} if the domain was updated and returns {updated: False} if the domain was not updated.

CLI Example:

salt myminion boto_elasticsearch_domain.update mydomain \
      {'InstanceType': 't2.micro.elasticsearch', 'InstanceCount': 1, \
      'DedicatedMasterEnabled': false, 'ZoneAwarenessEnabled': false} \
      {'EBSEnabled': true, 'VolumeType': 'gp2', 'VolumeSize': 10, \
      'Iops': 0} \
      {"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "es:*", \
       "Resource": "arn:aws:es:us-east-1:111111111111:domain/mydomain/*", \
       "Condition": {"IpAddress": {"aws:SourceIp": ["127.0.0.1"]}}}]} \
      {"AutomatedSnapshotStartHour": 0} \
      {"rest.action.multi.allow_explicit_index": "true"}