Class: Aws::EC2::Instance::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::EC2::Instance::Collection
- Defined in:
- lib/aws-sdk-ec2/instance.rb
Batch Actions collapse
- #batch_create_tags(options = {}) ⇒ void
- #batch_monitor(options = {}) ⇒ void
- #batch_reboot(options = {}) ⇒ void
- #batch_start(options = {}) ⇒ void
- #batch_stop(options = {}) ⇒ void
- #batch_terminate!(options = {}) ⇒ void
- #batch_unmonitor(options = {}) ⇒ void
Instance Method Details
#batch_create_tags(options = {}) ⇒ void
This method returns an undefined value.
1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1551 def ( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:resources] ||= [] batch.each do |item| params[:resources] << item.id end batch[0].client.(params) end nil end |
#batch_monitor(options = {}) ⇒ void
This method returns an undefined value.
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1575 def batch_monitor( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.monitor_instances(params) end nil end |
#batch_reboot(options = {}) ⇒ void
This method returns an undefined value.
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1599 def batch_reboot( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.reboot_instances(params) end nil end |
#batch_start(options = {}) ⇒ void
This method returns an undefined value.
1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1626 def batch_start( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.start_instances(params) end nil end |
#batch_stop(options = {}) ⇒ void
This method returns an undefined value.
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1670 def batch_stop( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.stop_instances(params) end nil end |
#batch_terminate!(options = {}) ⇒ void
This method returns an undefined value.
1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1694 def batch_terminate!( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.terminate_instances(params) end nil end |
#batch_unmonitor(options = {}) ⇒ void
This method returns an undefined value.
1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 |
# File 'lib/aws-sdk-ec2/instance.rb', line 1718 def batch_unmonitor( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.unmonitor_instances(params) end nil end |