lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.459.0 vs lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.460.0

- old
+ new

@@ -306,11 +306,11 @@ # # image.reload.data # # @return [self] def load - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.describe_images(image_ids: [@id]) end @data = resp.images[0] self end @@ -353,11 +353,11 @@ # @return [Image] def wait_until_exists(options = {}, &block) options, params = separate_params_and_options(options) waiter = Waiters::ImageExists.new(options) yield_waiter_and_warn(waiter, &block) if block_given? - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do waiter.wait(params.merge(image_ids: [@id])) end Image.new({ id: @id, data: resp.data.images[0], @@ -457,11 +457,11 @@ else self_copy.reload unless attempts == options[:max_attempts] :retry end end - Aws::Plugins::UserAgent.feature('resource') do + Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do Aws::Waiters::Waiter.new(options).wait({}) end end # @!group Actions @@ -489,11 +489,11 @@ # set the value to an empty string. # @return [Tag::Collection] def create_tags(options = {}) batch = [] options = Aws::Util.deep_merge(options, resources: [@id]) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.create_tags(options) end options[:tags].each do |t| batch << Tag.new( resource_id: @id, @@ -536,11 +536,11 @@ # Constraints: Up to 1000 tags. # @return [Tag::Collection] def delete_tags(options = {}) batch = [] options = Aws::Util.deep_merge(options, resources: [@id]) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.delete_tags(options) end options[:tags].each do |t| batch << Tag.new( resource_id: @id, @@ -564,11 +564,11 @@ # If you have the required permissions, the error response is # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. # @return [EmptyStructure] def deregister(options = {}) options = options.merge(image_id: @id) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.deregister_image(options) end resp.data end @@ -592,11 +592,11 @@ # If you have the required permissions, the error response is # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. # @return [Types::ImageAttribute] def describe_attribute(options = {}) options = options.merge(image_id: @id) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.describe_image_attribute(options) end resp.data end @@ -684,11 +684,11 @@ # # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration # @return [EmptyStructure] def modify_attribute(options = {}) options = options.merge(image_id: @id) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.modify_image_attribute(options) end resp.data end @@ -708,10 +708,10 @@ # If you have the required permissions, the error response is # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`. # @return [EmptyStructure] def reset_attribute(options = {}) options = options.merge(image_id: @id) - resp = Aws::Plugins::UserAgent.feature('resource') do + resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.reset_image_attribute(options) end resp.data end