Module: Eaglenube::Synchronizer::AWS::Snapshot::SnapshotSyncMethods

Includes:
ApiWrapper::AWS::Snapshot, CloudObjectMapper::AWS
Defined in:
lib/eaglenube/synchronizer/aws/snapshot.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::Snapshot

#describe_snapshots

Methods included from AWSAgent

get_acm_agent, get_auto_scaling_agent, get_cloud_watch_agent, get_compute_agent, get_ecs_agent, get_elb_agent, get_iam_agent, get_kms_agent, get_rds_agent, get_redshift_agent, get_s3_agent

Methods included from AWSCredentialBuilder

#build_credential

Instance Method Details

#sync_resource(credential, region_code, **options) ⇒ Object



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

def sync_resource(credential, region_code, **options)
  remote_snapshots = describe_snapshots(credential, region_code, **options)
  remote_snapshots.each do |remote_snapshot|
    object_identifying_attributes, optional_attributes = yield(remote_snapshot)
    create_or_update(remote_snapshot, object_identifying_attributes, **optional_attributes)
  end
end