Start a stopped EC2 instance. Args: instance_id: The ID of the instance to start. wait: Whether to wait for the instance to be running. Returns: Updated instance details.
(self, instance_id: str, wait: bool = True)
| 193 | |
| 194 | @aws_operation("start_instance") |
| 195 | def start_instance(self, instance_id: str, wait: bool = True) -> Dict[str, Any]: |
| 196 | """ |
| 197 | Start a stopped EC2 instance. |
| 198 | |
| 199 | Args: |
| 200 | instance_id: The ID of the instance to start. |
| 201 | wait: Whether to wait for the instance to be running. |
| 202 | |
| 203 | Returns: |
| 204 | Updated instance details. |
| 205 | """ |
| 206 | self.client.start_instances(InstanceIds=[instance_id]) |
| 207 | |
| 208 | if wait: |
| 209 | self.wait_for('instance_running', {'InstanceIds': [instance_id]}) |
| 210 | |
| 211 | return self.get_instance(instance_id) |
| 212 | |
| 213 | @aws_operation("stop_instance") |
| 214 | def stop_instance( |