|
|
@ -71,8 +71,7 @@ EXAMPLES = '''
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import boto
|
|
|
|
import boto
|
|
|
|
from boto.elasticache.layer1 import ElastiCacheConnection
|
|
|
|
from boto.elasticache import connect_to_region
|
|
|
|
from boto.regioninfo import RegionInfo
|
|
|
|
|
|
|
|
from boto.exception import BotoServerError
|
|
|
|
from boto.exception import BotoServerError
|
|
|
|
HAS_BOTO = True
|
|
|
|
HAS_BOTO = True
|
|
|
|
except ImportError:
|
|
|
|
except ImportError:
|
|
|
@ -115,9 +114,7 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
"""Get an elasticache connection"""
|
|
|
|
"""Get an elasticache connection"""
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
endpoint = "elasticache.%s.amazonaws.com" % region
|
|
|
|
conn = connect_to_region(region_name=region, **aws_connect_kwargs)
|
|
|
|
connect_region = RegionInfo(name=region, endpoint=endpoint)
|
|
|
|
|
|
|
|
conn = ElastiCacheConnection(region=connect_region, **aws_connect_kwargs)
|
|
|
|
|
|
|
|
except boto.exception.NoAuthHandlerFound as e:
|
|
|
|
except boto.exception.NoAuthHandlerFound as e:
|
|
|
|
module.fail_json(msg=e.message)
|
|
|
|
module.fail_json(msg=e.message)
|
|
|
|
|
|
|
|
|
|
|
|