title: How to get cache_cluster_id from elasticache using boto
body: <p>I'd like to get elasticache cache_cluster_id in order to populate a jinja2 template.</p>
  
  <p>I'm using boto to get some stuff from the API, such as ec2 instances or elb data but for elasticache it seems more difficult.</p>
  
  <pre><code>import boto.elasticache
  
  conn = boto.elasticache.connect_to_region(region)
  elasticache_data = conn.describe_cache_clusters()
  </code></pre>
  
  <p>That's what I manage to get, but I'm not sure to understand how I can loop through cache_cluster_id to get all the data I need.</p>
  
  <p>ref: <a href="http://docs.pythonboto.org/en/latest/ref/elasticache.html" rel="nofollow">http://docs.pythonboto.org/en/latest/ref/elasticache.html</a></p>
  
  <p>The api answer looks like that:</p>
  
  <pre><code>&gt; {u'DescribeCacheClustersResponse': 
  &gt;     {u'ResponseMetadata': 
  &gt;         {u'RequestId': u'ID'}, 
  &gt;      u'DescribeCacheClustersResult': 
  &gt;            {u'Marker': None, 
  &gt;            u'CacheClusters': 
  &gt;                 [
  &gt;                     {u'Engine': u'redis', u'CacheParameterGroup': 
  &gt;                         {u'CacheNodeIdsToReboot': [], 
  &gt;                         u'CacheParameterGroupName': u'default', 
  &gt;                         u'ParameterApplyStatus': u'in-sync'},
  &gt;                      u'CacheClusterId': u'whatever', 
  &gt;                      u'CacheSecurityGroups': [], 
  &gt;                      u'ConfigurationEndpoint': None, 
  &gt;                      u'CacheClusterCreateTime': 1415217879.493, 
  &gt;                      u'ReplicationGroupId': u'whatever', 
  &gt;                      u'AutoMinorVersionUpgrade': True, 
  &gt;                      u'CacheClusterStatus': u'available', 
  &gt;                      u'NumCacheNodes': 1, 
  &gt;                      u'ClientDownloadLandingPage': u'https://console.aws.amazon.com...', 
  &gt;                      u'PreferredAvailabilityZone': u'us-east-1a', 
  &gt;                      u'SecurityGroups': [{u'Status': u'active', u'SecurityGroupId': u'123'}],   
  &gt;                      u'CacheSubnetGroupName': u'whatever',
  &gt;                      u'EngineVersion': u'2.8.6', 
  &gt;                      u'PendingModifiedValues': 
  &gt;                         {u'NumCacheNodes': None, 
  &gt;                         u'EngineVersion': None,
  &gt;                         u'CacheNodeIdsToRemove': None}, 
  &gt;                      u'CacheNodeType': u'cache.m1.small', 
  &gt;                      u'NotificationConfiguration': None, 
  &gt;                      u'PreferredMaintenanceWindow': 
  &gt;                      u'sat:04:30-sat:05:30', 
  &gt;                      u'CacheNodes': None
  &gt;                     }
  &gt;                 ]
  &gt;             }
  &gt;     } }
  </code></pre>