Module: Eaglenube::Synchronizer::AWS::Redshift::RedshiftSyncMethods

Includes:
ApiWrapper::AWS::Redshift, CloudObjectMapper::AWS
Defined in:
lib/eaglenube/synchronizer/aws/redshift.rb

Instance Method Summary collapse

Methods included from CloudObjectMapper::AWS

#cloud_obj_mapper, #cloud_obj_mapper_yml, #parse_provider_data

Methods included from ApiWrapper::AWS::Redshift

#describe_redshift_clusters

Instance Method Details

#sync_resource(credential, region_code, &_block) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/eaglenube/synchronizer/aws/redshift.rb', line 21

def sync_resource(credential, region_code, &_block)
  remote_redshift_clusters = describe_redshift_clusters(credential, region_code)
  remote_redshift_clusters.each do |remote_redshift_cluster|
    object_identifying_attributes, optional_attributes = yield(remote_redshift_cluster)
    create_or_update(remote_redshift_cluster, object_identifying_attributes, **optional_attributes)
  end
end