Creates a VpcWrapper instance with a default EC2 client. :return: An instance of VpcWrapper initialized with the default EC2 client.
(cls)
| 26 | |
| 27 | @classmethod |
| 28 | def from_client(cls) -> "VpcWrapper": |
| 29 | """ |
| 30 | Creates a VpcWrapper instance with a default EC2 client. |
| 31 | |
| 32 | :return: An instance of VpcWrapper initialized with the default EC2 client. |
| 33 | """ |
| 34 | ec2_client = boto3.client("ec2") |
| 35 | return cls(ec2_client) |
| 36 | |
| 37 | # snippet-end:[python.example_code.ec2.VpcWrapper.decl] |
| 38 |
no outgoing calls