Connection module for Amazon Elasticsearch Service
New in version Natrium.
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: 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: es.keyid: GKTADJGHEIQSXMKKRBJ08H
es.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration: 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: myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
|
---|---|
codeauthor: | Herbert Buurman <herbert.buurman@ogd.nl> |
depends: | boto3 |
Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive key value pairs. An Elasticsearch domain may have up to 10 tags.
Parameters: | |
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.add_tags domain_name=mydomain tags='{"foo": "bar", "baz": "qux"}'
salt.modules.boto3_elasticsearch.
cancel_elasticsearch_service_software_update
(domain_name, region=None, keyid=None, key=None, profile=None)¶Cancels a scheduled service software update for an Amazon ES domain. You can only perform this operation before the AutomatedUpdateDate and when the UpdateStatus is in the PENDING_UPDATE state.
Parameters: | domain_name (str) -- The name of the domain that you want to stop the latest service software update on. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the current service software options. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
check_upgrade_eligibility
(domain_name, elasticsearch_version, region=None, keyid=None, key=None, profile=None)¶Helper function to determine in one call if an Elasticsearch domain can be upgraded to the specified Elasticsearch version.
This assumes that the Elasticsearch domain is at rest at the moment this function is called. I.e. The domain is not in the process of :
Behind the scenes, this does 3 things:
elasticsearch_version
is among the compatible elasticsearch versions.Parameters: | |
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with boolean result of the check. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.check_upgrade_eligibility mydomain '6.7'
salt.modules.boto3_elasticsearch.
create_elasticsearch_domain
(domain_name, elasticsearch_version=None, elasticsearch_cluster_config=None, ebs_options=None, access_policies=None, snapshot_options=None, vpc_options=None, cognito_options=None, encryption_at_rest_options=None, node_to_node_encryption_options=None, advanced_options=None, log_publishing_options=None, blocking=False, region=None, key=None, keyid=None, profile=None)¶Given a valid config, create a domain.
Parameters: |
|
---|
Note: Not all instance types allow enabling encryption at rest. See https://docs.aws.amazon.com /elasticsearch-service/latest/developerguide/aes-supported-instance-types.html
Return type: | dict |
---|---|
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the domain status configuration. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.create_elasticsearch_domain mydomain \
elasticsearch_cluster_config='{ \
"InstanceType": "t2.micro.elasticsearch", \
"InstanceCount": 1, \
"DedicatedMasterEnabled": False, \
"ZoneAwarenessEnabled": False}' \
ebs_options='{ \
"EBSEnabled": True, \
"VolumeType": "gp2", \
"VolumeSize": 10, \
"Iops": 0}' \
access_policies='{ \
"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"]}}}]}' \
snapshot_options='{"AutomatedSnapshotStartHour": 0}' \
advanced_options='{"rest.action.multi.allow_explicit_index": "true"}'
salt.modules.boto3_elasticsearch.
delete_elasticsearch_domain
(domain_name, blocking=False, region=None, key=None, keyid=None, profile=None)¶Permanently deletes the specified Elasticsearch domain and all of its data. Once a domain is deleted, it cannot be recovered.
Parameters: | |
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
delete_elasticsearch_service_role
(region=None, keyid=None, key=None, profile=None)¶Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains. Role deletion will fail if any existing VPC domains use the role. You must delete any such Elasticsearch domains before deleting the role.
Return type: | dict |
---|---|
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
describe_elasticsearch_domain
(domain_name, region=None, keyid=None, key=None, profile=None)¶Given a domain name gets its status description.
Parameters: | domain_name (str) -- The name of the domain to get the status of. |
---|---|
Return type: | dict |
Returns: | Dictionary ith key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the domain status information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
describe_elasticsearch_domain_config
(domain_name, region=None, keyid=None, key=None, profile=None)¶Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation date, update version, and update date for cluster options.
Parameters: | domain_name (str) -- The name of the domain to describe. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the current configuration information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
describe_elasticsearch_domains
(domain_names, region=None, keyid=None, key=None, profile=None)¶Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.
Parameters: | domain_names (list) -- List of domain names to get information for. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the list of domain status information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.describe_elasticsearch_domains '["domain_a", "domain_b"]'
salt.modules.boto3_elasticsearch.
describe_elasticsearch_instance_type_limits
(instance_type, elasticsearch_version, domain_name=None, region=None, keyid=None, key=None, profile=None)¶Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion. When modifying existing Domain, specify the `` DomainName `` to know what Limits are supported for modifying.
Parameters: |
|
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the limits information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.describe_elasticsearch_instance_type_limits \
instance_type=r3.8xlarge.elasticsearch \
elasticsearch_version='6.2'
salt.modules.boto3_elasticsearch.
describe_reserved_elasticsearch_instance_offerings
(reserved_elasticsearch_instance_offering_id=None, region=None, keyid=None, key=None, profile=None)¶Lists available reserved Elasticsearch instance offerings.
Parameters: | reserved_elasticsearch_instance_offering_id (str) -- The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation identifier. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the list of offerings information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
describe_reserved_elasticsearch_instances
(reserved_elasticsearch_instance_id=None, region=None, keyid=None, key=None, profile=None)¶Returns information about reserved Elasticsearch instances for this account.
Parameters: | reserved_elasticsearch_instance_id (str) -- The reserved instance identifier filter value. Use this parameter to show only the reservation that matches the specified reserved Elasticsearch instance ID. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of information on reserved instances. Upon failure, also contains a key 'error' with the error message as value. |
Note: | Version 1.9.174 of boto3 has a bug in that reserved_elasticsearch_instance_id is considered a required argument, even though the documentation says otherwise. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
exists
(domain_name, region=None, key=None, keyid=None, profile=None)¶Given a domain name, check to see if the given domain exists.
Parameters: | domain_name (str) -- The name of the domain to check. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
get_compatible_elasticsearch_versions
(domain_name=None, region=None, keyid=None, key=None, profile=None)¶Returns a list of upgrade compatible Elastisearch versions. You can optionally
pass a domain_name
to get all upgrade compatible Elasticsearch versions
for that specific domain.
Parameters: | domain_name (str) -- The name of an Elasticsearch domain. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of compatible versions. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
get_upgrade_history
(domain_name, region=None, keyid=None, key=None, profile=None)¶Retrieves the complete history of the last 10 upgrades that were performed on the domain.
Parameters: | domain_name (str) -- The name of an Elasticsearch domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of upgrade histories. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
get_upgrade_status
(domain_name, region=None, keyid=None, key=None, profile=None)¶Retrieves the latest status of the last upgrade or upgrade eligibility check that was performed on the domain.
Parameters: | domain_name (str) -- The name of an Elasticsearch domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with upgrade status information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
list_domain_names
(region=None, keyid=None, key=None, profile=None)¶Returns the name of all Elasticsearch domains owned by the current user's account.
Return type: | dict |
---|---|
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of domain names. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
list_elasticsearch_instance_types
(elasticsearch_version, domain_name=None, region=None, keyid=None, key=None, profile=None)¶List all Elasticsearch instance types that are supported for given ElasticsearchVersion.
Parameters: |
|
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of Elasticsearch instance types. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
list_elasticsearch_versions
(region=None, keyid=None, key=None, profile=None)¶List all supported Elasticsearch versions.
Return type: | dict |
---|---|
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a list of Elasticsearch versions. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
Returns all tags for the given Elasticsearch domain.
Return type: | dict |
---|---|
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with a dict of tags. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
purchase_reserved_elasticsearch_instance_offering
(reserved_elasticsearch_instance_offering_id, reservation_name, instance_count=None, region=None, keyid=None, key=None, profile=None)¶Allows you to purchase reserved Elasticsearch instances.
Parameters: | |
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with purchase information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
Removes the specified set of tags from the specified Elasticsearch domain.
Parameters: | |
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.remove_tags '["foo", "bar"]' domain_name=my_domain
salt.modules.boto3_elasticsearch.
start_elasticsearch_service_software_update
(domain_name, region=None, keyid=None, key=None, profile=None)¶Schedules a service software update for an Amazon ES domain.
Parameters: | domain_name (str) -- The name of the domain that you want to update to the latest service software. |
---|---|
Return type: | dict |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with service software information. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
salt.modules.boto3_elasticsearch.
update_elasticsearch_domain_config
(domain_name, elasticsearch_cluster_config=None, ebs_options=None, vpc_options=None, access_policies=None, snapshot_options=None, cognito_options=None, advanced_options=None, log_publishing_options=None, blocking=False, region=None, key=None, keyid=None, profile=None)¶Modifies the cluster configuration of the specified Elasticsearch domain, for example setting the instance type and the number of instances.
Parameters: |
|
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the domain configuration. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.update_elasticsearch_domain_config mydomain \
elasticsearch_cluster_config='{\
"InstanceType": "t2.micro.elasticsearch", \
"InstanceCount": 1, \
"DedicatedMasterEnabled": false,
"ZoneAwarenessEnabled": false}' \
ebs_options='{\
"EBSEnabled": true, \
"VolumeType": "gp2", \
"VolumeSize": 10, \
"Iops": 0}' \
access_policies='{"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"]}}}]}' \
snapshot_options='{"AutomatedSnapshotStartHour": 0}' \
advanced_options='{"rest.action.multi.allow_explicit_index": "true"}'
salt.modules.boto3_elasticsearch.
upgrade_elasticsearch_domain
(domain_name, target_version, perform_check_only=None, blocking=False, region=None, keyid=None, key=None, profile=None)¶Allows you to either upgrade your domain or perform an Upgrade eligibility check to a compatible Elasticsearch version.
Parameters: |
|
---|---|
Return type: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon success, also contains a key 'reponse' with the domain configuration. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
CLI Example:
salt myminion boto3_elasticsearch.upgrade_elasticsearch_domain mydomain \
target_version='6.7' \
perform_check_only=True
salt.modules.boto3_elasticsearch.
wait_for_upgrade
(domain_name, region=None, keyid=None, key=None, profile=None)¶Block until an upgrade-in-progress for domain name
is finished.
Parameters: | name (str) -- The name of the domain to wait for. |
---|---|
Rtype dict: | |
Returns: | Dictionary with key 'result' and as value a boolean denoting success or failure. Upon failure, also contains a key 'error' with the error message as value. |
New in version Natrium.
Docs for previous releases are available on readthedocs.org.
Latest Salt release: latest_release
salt.modules.boto3_elasticache module