MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / from_client

Method from_client

python/example_code/ec2/vpc.py:28–35  ·  view source on GitHub ↗

Creates a VpcWrapper instance with a default EC2 client. :return: An instance of VpcWrapper initialized with the default EC2 client.

(cls)

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by 1

test_scenario_happy_pathFunction · 0.36