lib/chef/provisioning/aws_driver/aws_resource_with_entry.rb
#
# Save the ID of this object to Chef.
#
# @param aws_object [::Aws::EC2::Core] The AWS object containing the ID.
# @param action_handler [Chef::Provisioning::ActionHandler] The action handler,
#        which handles progress reporting, update reporting ("little green text")
#        and dry run.
# @param existing_entry [Chef::Provisioning::ManagedEntry] The existing entry
#        (if any).  If this is passed in, and no values are changed, we will
#        not attempt to update it (this prevents us from retrieving it twice).
#
Save the ID of this object to Chef.
Save the ID of this object to Chef .
def save_managed_entry(aws_object, action_handler, existing_entry: nil)
    if should_have_managed_entry?
      managed_entry = existing_entry ||
        managed_entry_store.new_entry(self.class.managed_entry_type, name)
      updated = update_managed_entry(aws_object, managed_entry)
      managed_entry.save(action_handler) if updated || !existing_entry
    end
  end
def save_managed_entry ( aws_object , action_handler , existing_entry : nil ) if should_have_managed_entry? managed_entry = existing_entry || managed_entry_store . new_entry ( self . class . managed_entry_type , name ) updated = update_managed_entry ( aws_object , managed_entry ) managed_entry . save ( action_handler ) if updated || ! existing_entry end end
Save the ID of this object to Chef.
Save the ID of this object to Chef .
aws_object
The AWS object containing the ID.
The AWS object containing the ID .
action_handler
The action handler, which handles progress reporting, update reporting ("little green text") and dry run.
The action handler which handles progress reporting update reporting ( " little green text " ) and dry run .
existing_entry
The existing entry (if any). If this is passed in, and no values are changed, we will not attempt to update it (this prevents us from retrieving it twice).
The existing entry ( if any ) . If this is passed in and no values are changed we will not attempt to update it ( this prevents us from retrieving it twice ) .