EC2ServiceResource#
Auto-generated documentation for EC2 type annotations stubs module mypy-boto3-ec2.
EC2ServiceResource#
Type annotations and code completion for boto3.resource("ec2")
, included resources and collections.
boto3 documentation
# EC2ServiceResource usage example
from mypy_boto3_ec2.service_resource import EC2ServiceResource
def get_ec2_resource() -> EC2ServiceResource:
return boto3.resource("ec2")
Attributes#
-
meta
: EC2ResourceMeta -
classic_addresses
: ServiceResourceClassicAddressesCollection -
dhcp_options_sets
: ServiceResourceDhcpOptionsSetsCollection -
images
: ServiceResourceImagesCollection -
instances
: ServiceResourceInstancesCollection -
internet_gateways
: ServiceResourceInternetGatewaysCollection -
key_pairs
: ServiceResourceKeyPairsCollection -
network_acls
: ServiceResourceNetworkAclsCollection -
network_interfaces
: ServiceResourceNetworkInterfacesCollection -
placement_groups
: ServiceResourcePlacementGroupsCollection -
route_tables
: ServiceResourceRouteTablesCollection -
security_groups
: ServiceResourceSecurityGroupsCollection -
snapshots
: ServiceResourceSnapshotsCollection -
subnets
: ServiceResourceSubnetsCollection -
volumes
: ServiceResourceVolumesCollection -
vpc_addresses
: ServiceResourceVpcAddressesCollection -
vpc_peering_connections
: ServiceResourceVpcPeeringConnectionsCollection
Collections#
ServiceResourceClassicAddressesCollection#
Provides access to ClassicAddress resource.
Type annotations and code completion for boto3.resource("ec2").classic_addresses
collection.
boto3 documentation
# ServiceResourceClassicAddressesCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceClassicAddressesCollection
def get_collection() -> ServiceResourceClassicAddressesCollection:
return boto3.resource("ec2").classic_addresses
ServiceResourceDhcpOptionsSetsCollection#
Provides access to DhcpOptions resource.
Type annotations and code completion for boto3.resource("ec2").dhcp_options_sets
collection.
boto3 documentation
# ServiceResourceDhcpOptionsSetsCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceDhcpOptionsSetsCollection
def get_collection() -> ServiceResourceDhcpOptionsSetsCollection:
return boto3.resource("ec2").dhcp_options_sets
ServiceResourceImagesCollection#
Provides access to Image resource.
Type annotations and code completion for boto3.resource("ec2").images
collection.
boto3 documentation
# ServiceResourceImagesCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceImagesCollection
def get_collection() -> ServiceResourceImagesCollection:
return boto3.resource("ec2").images
ServiceResourceInstancesCollection#
Provides access to Instance resource.
Type annotations and code completion for boto3.resource("ec2").instances
collection.
boto3 documentation
# ServiceResourceInstancesCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceInstancesCollection
def get_collection() -> ServiceResourceInstancesCollection:
return boto3.resource("ec2").instances
ServiceResourceInternetGatewaysCollection#
Provides access to InternetGateway resource.
Type annotations and code completion for boto3.resource("ec2").internet_gateways
collection.
boto3 documentation
# ServiceResourceInternetGatewaysCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceInternetGatewaysCollection
def get_collection() -> ServiceResourceInternetGatewaysCollection:
return boto3.resource("ec2").internet_gateways
ServiceResourceKeyPairsCollection#
Provides access to KeyPairInfo resource.
Type annotations and code completion for boto3.resource("ec2").key_pairs
collection.
boto3 documentation
# ServiceResourceKeyPairsCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceKeyPairsCollection
def get_collection() -> ServiceResourceKeyPairsCollection:
return boto3.resource("ec2").key_pairs
ServiceResourceNetworkAclsCollection#
Provides access to NetworkAcl resource.
Type annotations and code completion for boto3.resource("ec2").network_acls
collection.
boto3 documentation
# ServiceResourceNetworkAclsCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceNetworkAclsCollection
def get_collection() -> ServiceResourceNetworkAclsCollection:
return boto3.resource("ec2").network_acls
ServiceResourceNetworkInterfacesCollection#
Provides access to NetworkInterface resource.
Type annotations and code completion for boto3.resource("ec2").network_interfaces
collection.
boto3 documentation
# ServiceResourceNetworkInterfacesCollection usage example
from mypy_boto3_ec2.service_resource import ServiceResourceNetworkInterfacesCollection
def get_collection() -> ServiceResourceNetworkInterfacesCollection:
return boto3.resource("ec2").network_interfaces
ServiceResourcePlacementGroupsCollection#
Provides access to PlacementGroup resource.
Type annotations and code completion for boto3.resource("ec2").placement_groups
collection.