Class: Chef::Resource::AwsCacheCluster

Inherits:
Provisioning::AWSDriver::AWSResource show all
Defined in:
lib/chef/resource/aws_cache_cluster.rb

Overview

AWS Elasticache Cluster

Constant Summary

Constants inherited from Provisioning::AWSDriver::AWSResource

Provisioning::AWSDriver::AWSResource::NOT_PASSED

Instance Method Summary collapse

Methods inherited from Provisioning::AWSDriver::AWSResource

#action, #action=, #aws_object_id, get_aws_object, get_aws_object_id, #initialize, lookup_options

Methods inherited from Provisioning::AWSDriver::SuperLWRP

#_pv_is, attribute, lazy

Constructor Details

This class inherits a constructor from Chef::Provisioning::AWSDriver::AWSResource

Instance Method Details

#aws_objectObject



72
73
74
75
76
77
78
79
80
# File 'lib/chef/resource/aws_cache_cluster.rb', line 72

def aws_object
  begin
    driver.elasticache
      .describe_cache_clusters(cache_cluster_id: cluster_name)
      .data[:cache_clusters].first
  rescue AWS::ElastiCache::Errors::CacheClusterNotFound
    nil
  end
end