:doc:`ServiceResource <index>` / Sub-Resource / Subnet

******
Subnet
******



.. py:method:: EC2.ServiceResource.Subnet(id)

  Creates a Subnet resource.::

    subnet = ec2.Subnet('id')

  :type id: string
  :param id: The Subnet's id identifier. This **must** be set.
  
  :rtype: :py:class:`EC2.Subnet`
  :returns: A Subnet resource
  