MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / get_instance

Method get_instance

scripts/agents/devops/src/aws/ec2.py:89–105  ·  view source on GitHub ↗

Get details for a specific EC2 instance. Args: instance_id: The ID of the instance. Returns: Instance details. Raises: ResourceNotFoundError: If the instance does not exist.

(self, instance_id: str)

Source from the content-addressed store, hash-verified

87
88 @aws_operation("get_instance")
89 def get_instance(self, instance_id: str) -> Dict[str, Any]:
90 """
91 Get details for a specific EC2 instance.
92
93 Args:
94 instance_id: The ID of the instance.
95
96 Returns:
97 Instance details.
98
99 Raises:
100 ResourceNotFoundError: If the instance does not exist.
101 """
102 instances = self.list_instances(instance_ids=[instance_id])
103 if not instances:
104 raise ResourceNotFoundError(f"Instance {instance_id} not found")
105 return instances[0]
106
107 @aws_operation("create_instance")
108 def create_instance(

Callers 10

handle_ec2_commandFunction · 0.95
handle_deploy_commandFunction · 0.95
create_instanceMethod · 0.95
start_instanceMethod · 0.95
stop_instanceMethod · 0.95
terminate_instanceMethod · 0.95
reboot_instanceMethod · 0.95
resize_instanceMethod · 0.95
deploy_from_githubMethod · 0.95

Calls 2

list_instancesMethod · 0.95

Tested by 1