lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.141.0 vs lib/aws-sdk-ec2/image.rb in aws-sdk-ec2-1.142.0
- old
+ new
@@ -409,9 +409,52 @@
Tag::Collection.new([batch], size: batch.size)
end
# @example Request syntax with placeholder values
#
+ # tag = image.delete_tags({
+ # dry_run: false,
+ # tags: [
+ # {
+ # key: "String",
+ # value: "String",
+ # },
+ # ],
+ # })
+ # @param [Hash] options ({})
+ # @option options [Boolean] :dry_run
+ # Checks whether you have the required permissions for the action,
+ # without actually making the request, and provides an error response.
+ # If you have the required permissions, the error response is
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
+ # @option options [Array<Types::Tag>] :tags
+ # The tags to delete. Specify a tag key and an optional tag value to
+ # delete specific tags. If you specify a tag key without a tag value, we
+ # delete any tag with this key regardless of its value. If you specify a
+ # tag key with an empty string as the tag value, we delete the tag only
+ # if its value is an empty string.
+ #
+ # If you omit this parameter, we delete all user-defined tags for the
+ # specified resources. We do not delete AWS-generated tags (tags that
+ # have the `aws:` prefix).
+ # @return [Tag::Collection]
+ def delete_tags(options = {})
+ batch = []
+ options = Aws::Util.deep_merge(options, resources: [@id])
+ resp = @client.delete_tags(options)
+ options[:tags].each do |t|
+ batch << Tag.new(
+ resource_id: @id,
+ key: t[:key],
+ value: t[:value],
+ client: @client
+ )
+ end
+ Tag::Collection.new([batch], size: batch.size)
+ end
+
+ # @example Request syntax with placeholder values
+ #
# image.deregister({
# dry_run: false,
# })
# @param [Hash] options ({})
# @option options [Boolean] :dry_run