

***
EC2
***

.. contents:: Table of Contents
   :depth: 2


======
Client
======



.. py:class:: EC2.Client

  A low-level client representing Amazon Elastic Compute Cloud (EC2)::

    
    import boto3
    
    client = boto3.client('ec2')

  
  These are the available methods:
  
  *   :py:meth:`~EC2.Client.accept_reserved_instances_exchange_quote`

  
  *   :py:meth:`~EC2.Client.accept_vpc_peering_connection`

  
  *   :py:meth:`~EC2.Client.allocate_address`

  
  *   :py:meth:`~EC2.Client.allocate_hosts`

  
  *   :py:meth:`~EC2.Client.assign_ipv6_addresses`

  
  *   :py:meth:`~EC2.Client.assign_private_ip_addresses`

  
  *   :py:meth:`~EC2.Client.associate_address`

  
  *   :py:meth:`~EC2.Client.associate_dhcp_options`

  
  *   :py:meth:`~EC2.Client.associate_iam_instance_profile`

  
  *   :py:meth:`~EC2.Client.associate_route_table`

  
  *   :py:meth:`~EC2.Client.associate_subnet_cidr_block`

  
  *   :py:meth:`~EC2.Client.associate_vpc_cidr_block`

  
  *   :py:meth:`~EC2.Client.attach_classic_link_vpc`

  
  *   :py:meth:`~EC2.Client.attach_internet_gateway`

  
  *   :py:meth:`~EC2.Client.attach_network_interface`

  
  *   :py:meth:`~EC2.Client.attach_volume`

  
  *   :py:meth:`~EC2.Client.attach_vpn_gateway`

  
  *   :py:meth:`~EC2.Client.authorize_security_group_egress`

  
  *   :py:meth:`~EC2.Client.authorize_security_group_ingress`

  
  *   :py:meth:`~EC2.Client.bundle_instance`

  
  *   :py:meth:`~EC2.Client.can_paginate`

  
  *   :py:meth:`~EC2.Client.cancel_bundle_task`

  
  *   :py:meth:`~EC2.Client.cancel_conversion_task`

  
  *   :py:meth:`~EC2.Client.cancel_export_task`

  
  *   :py:meth:`~EC2.Client.cancel_import_task`

  
  *   :py:meth:`~EC2.Client.cancel_reserved_instances_listing`

  
  *   :py:meth:`~EC2.Client.cancel_spot_fleet_requests`

  
  *   :py:meth:`~EC2.Client.cancel_spot_instance_requests`

  
  *   :py:meth:`~EC2.Client.confirm_product_instance`

  
  *   :py:meth:`~EC2.Client.copy_image`

  
  *   :py:meth:`~EC2.Client.copy_snapshot`

  
  *   :py:meth:`~EC2.Client.create_customer_gateway`

  
  *   :py:meth:`~EC2.Client.create_default_vpc`

  
  *   :py:meth:`~EC2.Client.create_dhcp_options`

  
  *   :py:meth:`~EC2.Client.create_egress_only_internet_gateway`

  
  *   :py:meth:`~EC2.Client.create_flow_logs`

  
  *   :py:meth:`~EC2.Client.create_fpga_image`

  
  *   :py:meth:`~EC2.Client.create_image`

  
  *   :py:meth:`~EC2.Client.create_instance_export_task`

  
  *   :py:meth:`~EC2.Client.create_internet_gateway`

  
  *   :py:meth:`~EC2.Client.create_key_pair`

  
  *   :py:meth:`~EC2.Client.create_nat_gateway`

  
  *   :py:meth:`~EC2.Client.create_network_acl`

  
  *   :py:meth:`~EC2.Client.create_network_acl_entry`

  
  *   :py:meth:`~EC2.Client.create_network_interface`

  
  *   :py:meth:`~EC2.Client.create_network_interface_permission`

  
  *   :py:meth:`~EC2.Client.create_placement_group`

  
  *   :py:meth:`~EC2.Client.create_reserved_instances_listing`

  
  *   :py:meth:`~EC2.Client.create_route`

  
  *   :py:meth:`~EC2.Client.create_route_table`

  
  *   :py:meth:`~EC2.Client.create_security_group`

  
  *   :py:meth:`~EC2.Client.create_snapshot`

  
  *   :py:meth:`~EC2.Client.create_spot_datafeed_subscription`

  
  *   :py:meth:`~EC2.Client.create_subnet`

  
  *   :py:meth:`~EC2.Client.create_tags`

  
  *   :py:meth:`~EC2.Client.create_volume`

  
  *   :py:meth:`~EC2.Client.create_vpc`

  
  *   :py:meth:`~EC2.Client.create_vpc_endpoint`

  
  *   :py:meth:`~EC2.Client.create_vpc_peering_connection`

  
  *   :py:meth:`~EC2.Client.create_vpn_connection`

  
  *   :py:meth:`~EC2.Client.create_vpn_connection_route`

  
  *   :py:meth:`~EC2.Client.create_vpn_gateway`

  
  *   :py:meth:`~EC2.Client.delete_customer_gateway`

  
  *   :py:meth:`~EC2.Client.delete_dhcp_options`

  
  *   :py:meth:`~EC2.Client.delete_egress_only_internet_gateway`

  
  *   :py:meth:`~EC2.Client.delete_flow_logs`

  
  *   :py:meth:`~EC2.Client.delete_internet_gateway`

  
  *   :py:meth:`~EC2.Client.delete_key_pair`

  
  *   :py:meth:`~EC2.Client.delete_nat_gateway`

  
  *   :py:meth:`~EC2.Client.delete_network_acl`

  
  *   :py:meth:`~EC2.Client.delete_network_acl_entry`

  
  *   :py:meth:`~EC2.Client.delete_network_interface`

  
  *   :py:meth:`~EC2.Client.delete_network_interface_permission`

  
  *   :py:meth:`~EC2.Client.delete_placement_group`

  
  *   :py:meth:`~EC2.Client.delete_route`

  
  *   :py:meth:`~EC2.Client.delete_route_table`

  
  *   :py:meth:`~EC2.Client.delete_security_group`

  
  *   :py:meth:`~EC2.Client.delete_snapshot`

  
  *   :py:meth:`~EC2.Client.delete_spot_datafeed_subscription`

  
  *   :py:meth:`~EC2.Client.delete_subnet`

  
  *   :py:meth:`~EC2.Client.delete_tags`

  
  *   :py:meth:`~EC2.Client.delete_volume`

  
  *   :py:meth:`~EC2.Client.delete_vpc`

  
  *   :py:meth:`~EC2.Client.delete_vpc_endpoints`

  
  *   :py:meth:`~EC2.Client.delete_vpc_peering_connection`

  
  *   :py:meth:`~EC2.Client.delete_vpn_connection`

  
  *   :py:meth:`~EC2.Client.delete_vpn_connection_route`

  
  *   :py:meth:`~EC2.Client.delete_vpn_gateway`

  
  *   :py:meth:`~EC2.Client.deregister_image`

  
  *   :py:meth:`~EC2.Client.describe_account_attributes`

  
  *   :py:meth:`~EC2.Client.describe_addresses`

  
  *   :py:meth:`~EC2.Client.describe_availability_zones`

  
  *   :py:meth:`~EC2.Client.describe_bundle_tasks`

  
  *   :py:meth:`~EC2.Client.describe_classic_link_instances`

  
  *   :py:meth:`~EC2.Client.describe_conversion_tasks`

  
  *   :py:meth:`~EC2.Client.describe_customer_gateways`

  
  *   :py:meth:`~EC2.Client.describe_dhcp_options`

  
  *   :py:meth:`~EC2.Client.describe_egress_only_internet_gateways`

  
  *   :py:meth:`~EC2.Client.describe_elastic_gpus`

  
  *   :py:meth:`~EC2.Client.describe_export_tasks`

  
  *   :py:meth:`~EC2.Client.describe_flow_logs`

  
  *   :py:meth:`~EC2.Client.describe_fpga_images`

  
  *   :py:meth:`~EC2.Client.describe_host_reservation_offerings`

  
  *   :py:meth:`~EC2.Client.describe_host_reservations`

  
  *   :py:meth:`~EC2.Client.describe_hosts`

  
  *   :py:meth:`~EC2.Client.describe_iam_instance_profile_associations`

  
  *   :py:meth:`~EC2.Client.describe_id_format`

  
  *   :py:meth:`~EC2.Client.describe_identity_id_format`

  
  *   :py:meth:`~EC2.Client.describe_image_attribute`

  
  *   :py:meth:`~EC2.Client.describe_images`

  
  *   :py:meth:`~EC2.Client.describe_import_image_tasks`

  
  *   :py:meth:`~EC2.Client.describe_import_snapshot_tasks`

  
  *   :py:meth:`~EC2.Client.describe_instance_attribute`

  
  *   :py:meth:`~EC2.Client.describe_instance_status`

  
  *   :py:meth:`~EC2.Client.describe_instances`

  
  *   :py:meth:`~EC2.Client.describe_internet_gateways`

  
  *   :py:meth:`~EC2.Client.describe_key_pairs`

  
  *   :py:meth:`~EC2.Client.describe_moving_addresses`

  
  *   :py:meth:`~EC2.Client.describe_nat_gateways`

  
  *   :py:meth:`~EC2.Client.describe_network_acls`

  
  *   :py:meth:`~EC2.Client.describe_network_interface_attribute`

  
  *   :py:meth:`~EC2.Client.describe_network_interface_permissions`

  
  *   :py:meth:`~EC2.Client.describe_network_interfaces`

  
  *   :py:meth:`~EC2.Client.describe_placement_groups`

  
  *   :py:meth:`~EC2.Client.describe_prefix_lists`

  
  *   :py:meth:`~EC2.Client.describe_regions`

  
  *   :py:meth:`~EC2.Client.describe_reserved_instances`

  
  *   :py:meth:`~EC2.Client.describe_reserved_instances_listings`

  
  *   :py:meth:`~EC2.Client.describe_reserved_instances_modifications`

  
  *   :py:meth:`~EC2.Client.describe_reserved_instances_offerings`

  
  *   :py:meth:`~EC2.Client.describe_route_tables`

  
  *   :py:meth:`~EC2.Client.describe_scheduled_instance_availability`

  
  *   :py:meth:`~EC2.Client.describe_scheduled_instances`

  
  *   :py:meth:`~EC2.Client.describe_security_group_references`

  
  *   :py:meth:`~EC2.Client.describe_security_groups`

  
  *   :py:meth:`~EC2.Client.describe_snapshot_attribute`

  
  *   :py:meth:`~EC2.Client.describe_snapshots`

  
  *   :py:meth:`~EC2.Client.describe_spot_datafeed_subscription`

  
  *   :py:meth:`~EC2.Client.describe_spot_fleet_instances`

  
  *   :py:meth:`~EC2.Client.describe_spot_fleet_request_history`

  
  *   :py:meth:`~EC2.Client.describe_spot_fleet_requests`

  
  *   :py:meth:`~EC2.Client.describe_spot_instance_requests`

  
  *   :py:meth:`~EC2.Client.describe_spot_price_history`

  
  *   :py:meth:`~EC2.Client.describe_stale_security_groups`

  
  *   :py:meth:`~EC2.Client.describe_subnets`

  
  *   :py:meth:`~EC2.Client.describe_tags`

  
  *   :py:meth:`~EC2.Client.describe_volume_attribute`

  
  *   :py:meth:`~EC2.Client.describe_volume_status`

  
  *   :py:meth:`~EC2.Client.describe_volumes`

  
  *   :py:meth:`~EC2.Client.describe_volumes_modifications`

  
  *   :py:meth:`~EC2.Client.describe_vpc_attribute`

  
  *   :py:meth:`~EC2.Client.describe_vpc_classic_link`

  
  *   :py:meth:`~EC2.Client.describe_vpc_classic_link_dns_support`

  
  *   :py:meth:`~EC2.Client.describe_vpc_endpoint_services`

  
  *   :py:meth:`~EC2.Client.describe_vpc_endpoints`

  
  *   :py:meth:`~EC2.Client.describe_vpc_peering_connections`

  
  *   :py:meth:`~EC2.Client.describe_vpcs`

  
  *   :py:meth:`~EC2.Client.describe_vpn_connections`

  
  *   :py:meth:`~EC2.Client.describe_vpn_gateways`

  
  *   :py:meth:`~EC2.Client.detach_classic_link_vpc`

  
  *   :py:meth:`~EC2.Client.detach_internet_gateway`

  
  *   :py:meth:`~EC2.Client.detach_network_interface`

  
  *   :py:meth:`~EC2.Client.detach_volume`

  
  *   :py:meth:`~EC2.Client.detach_vpn_gateway`

  
  *   :py:meth:`~EC2.Client.disable_vgw_route_propagation`

  
  *   :py:meth:`~EC2.Client.disable_vpc_classic_link`

  
  *   :py:meth:`~EC2.Client.disable_vpc_classic_link_dns_support`

  
  *   :py:meth:`~EC2.Client.disassociate_address`

  
  *   :py:meth:`~EC2.Client.disassociate_iam_instance_profile`

  
  *   :py:meth:`~EC2.Client.disassociate_route_table`

  
  *   :py:meth:`~EC2.Client.disassociate_subnet_cidr_block`

  
  *   :py:meth:`~EC2.Client.disassociate_vpc_cidr_block`

  
  *   :py:meth:`~EC2.Client.enable_vgw_route_propagation`

  
  *   :py:meth:`~EC2.Client.enable_volume_io`

  
  *   :py:meth:`~EC2.Client.enable_vpc_classic_link`

  
  *   :py:meth:`~EC2.Client.enable_vpc_classic_link_dns_support`

  
  *   :py:meth:`~EC2.Client.generate_presigned_url`

  
  *   :py:meth:`~EC2.Client.get_console_output`

  
  *   :py:meth:`~EC2.Client.get_console_screenshot`

  
  *   :py:meth:`~EC2.Client.get_host_reservation_purchase_preview`

  
  *   :py:meth:`~EC2.Client.get_paginator`

  
  *   :py:meth:`~EC2.Client.get_password_data`

  
  *   :py:meth:`~EC2.Client.get_reserved_instances_exchange_quote`

  
  *   :py:meth:`~EC2.Client.get_waiter`

  
  *   :py:meth:`~EC2.Client.import_image`

  
  *   :py:meth:`~EC2.Client.import_instance`

  
  *   :py:meth:`~EC2.Client.import_key_pair`

  
  *   :py:meth:`~EC2.Client.import_snapshot`

  
  *   :py:meth:`~EC2.Client.import_volume`

  
  *   :py:meth:`~EC2.Client.modify_hosts`

  
  *   :py:meth:`~EC2.Client.modify_id_format`

  
  *   :py:meth:`~EC2.Client.modify_identity_id_format`

  
  *   :py:meth:`~EC2.Client.modify_image_attribute`

  
  *   :py:meth:`~EC2.Client.modify_instance_attribute`

  
  *   :py:meth:`~EC2.Client.modify_instance_placement`

  
  *   :py:meth:`~EC2.Client.modify_network_interface_attribute`

  
  *   :py:meth:`~EC2.Client.modify_reserved_instances`

  
  *   :py:meth:`~EC2.Client.modify_snapshot_attribute`

  
  *   :py:meth:`~EC2.Client.modify_spot_fleet_request`

  
  *   :py:meth:`~EC2.Client.modify_subnet_attribute`

  
  *   :py:meth:`~EC2.Client.modify_volume`

  
  *   :py:meth:`~EC2.Client.modify_volume_attribute`

  
  *   :py:meth:`~EC2.Client.modify_vpc_attribute`

  
  *   :py:meth:`~EC2.Client.modify_vpc_endpoint`

  
  *   :py:meth:`~EC2.Client.modify_vpc_peering_connection_options`

  
  *   :py:meth:`~EC2.Client.monitor_instances`

  
  *   :py:meth:`~EC2.Client.move_address_to_vpc`

  
  *   :py:meth:`~EC2.Client.purchase_host_reservation`

  
  *   :py:meth:`~EC2.Client.purchase_reserved_instances_offering`

  
  *   :py:meth:`~EC2.Client.purchase_scheduled_instances`

  
  *   :py:meth:`~EC2.Client.reboot_instances`

  
  *   :py:meth:`~EC2.Client.register_image`

  
  *   :py:meth:`~EC2.Client.reject_vpc_peering_connection`

  
  *   :py:meth:`~EC2.Client.release_address`

  
  *   :py:meth:`~EC2.Client.release_hosts`

  
  *   :py:meth:`~EC2.Client.replace_iam_instance_profile_association`

  
  *   :py:meth:`~EC2.Client.replace_network_acl_association`

  
  *   :py:meth:`~EC2.Client.replace_network_acl_entry`

  
  *   :py:meth:`~EC2.Client.replace_route`

  
  *   :py:meth:`~EC2.Client.replace_route_table_association`

  
  *   :py:meth:`~EC2.Client.report_instance_status`

  
  *   :py:meth:`~EC2.Client.request_spot_fleet`

  
  *   :py:meth:`~EC2.Client.request_spot_instances`

  
  *   :py:meth:`~EC2.Client.reset_image_attribute`

  
  *   :py:meth:`~EC2.Client.reset_instance_attribute`

  
  *   :py:meth:`~EC2.Client.reset_network_interface_attribute`

  
  *   :py:meth:`~EC2.Client.reset_snapshot_attribute`

  
  *   :py:meth:`~EC2.Client.restore_address_to_classic`

  
  *   :py:meth:`~EC2.Client.revoke_security_group_egress`

  
  *   :py:meth:`~EC2.Client.revoke_security_group_ingress`

  
  *   :py:meth:`~EC2.Client.run_instances`

  
  *   :py:meth:`~EC2.Client.run_scheduled_instances`

  
  *   :py:meth:`~EC2.Client.start_instances`

  
  *   :py:meth:`~EC2.Client.stop_instances`

  
  *   :py:meth:`~EC2.Client.terminate_instances`

  
  *   :py:meth:`~EC2.Client.unassign_ipv6_addresses`

  
  *   :py:meth:`~EC2.Client.unassign_private_ip_addresses`

  
  *   :py:meth:`~EC2.Client.unmonitor_instances`

  

  .. py:method:: accept_reserved_instances_exchange_quote(**kwargs)

    

    Accepts the Convertible Reserved Instance exchange quote described in the  GetReservedInstancesExchangeQuote call.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote>`_    


    **Request Syntax** 
    ::

      response = client.accept_reserved_instances_exchange_quote(
          DryRun=True|False,
          ReservedInstanceIds=[
              'string',
          ],
          TargetConfigurations=[
              {
                  'InstanceCount': 123,
                  'OfferingId': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type ReservedInstanceIds: list
    :param ReservedInstanceIds: **[REQUIRED]** 

      The IDs of the Convertible Reserved Instances to exchange for other Convertible Reserved Instances of the same or higher value.

      

    
      - *(string) --* 

      
  
    :type TargetConfigurations: list
    :param TargetConfigurations: 

      The configurations of the Convertible Reserved Instance offerings that you are purchasing in this exchange.

      

    
      - *(dict) --* 

        Details about the target configuration.

        

      
        - **InstanceCount** *(integer) --* 

          The number of instances the Covertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

          

        
        - **OfferingId** *(string) --* **[REQUIRED]** 

          The Convertible Reserved Instance offering ID.

          

        
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ExchangeId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        The result of the exchange and whether it was ``successful`` .

        
        

        - **ExchangeId** *(string) --* 

          The ID of the successful exchange.

          
    

  .. py:method:: accept_vpc_peering_connection(**kwargs)

    

    Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the ``pending-acceptance`` state, and you must be the owner of the peer VPC. Use  DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = client.accept_vpc_peering_connection(
          DryRun=True|False,
          VpcPeeringConnectionId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: 

      The ID of the VPC peering connection.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcPeeringConnection': {
                'AccepterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'ExpirationTime': datetime(2015, 1, 1),
                'RequesterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'Status': {
                    'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                    'Message': 'string'
                },
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcPeeringConnectionId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AcceptVpcPeeringConnection.

        
        

        - **VpcPeeringConnection** *(dict) --* 

          Information about the VPC peering connection.

          
          

          - **AccepterVpcInfo** *(dict) --* 

            Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **ExpirationTime** *(datetime) --* 

            The time that an unaccepted VPC peering connection will expire.

            
          

          - **RequesterVpcInfo** *(dict) --* 

            Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **Status** *(dict) --* 

            The status of the VPC peering connection.

            
            

            - **Code** *(string) --* 

              The status of the VPC peering connection.

              
            

            - **Message** *(string) --* 

              A message that provides more information about the status, if applicable.

              
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the resource.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcPeeringConnectionId** *(string) --* 

            The ID of the VPC peering connection.

            
      
    

  .. py:method:: allocate_address(**kwargs)

    

    Allocates an Elastic IP address.

     

    An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per region and 5 Elastic IP addresses for EC2-VPC per region.

     

    If you release an Elastic IP address for use in a VPC, you might be able to recover it. To recover an Elastic IP address that you released, specify it in the ``Address`` parameter. Note that you cannot recover an Elastic IP address that you released after it is allocated to another AWS account.

     

    For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress>`_    


    **Request Syntax** 
    ::

      response = client.allocate_address(
          Domain='vpc'|'standard',
          Address='string',
          DryRun=True|False
      )
    :type Domain: string
    :param Domain: 

      Set to ``vpc`` to allocate the address for use with instances in a VPC.

       

      Default: The address is for use with instances in EC2-Classic.

      

    
    :type Address: string
    :param Address: 

      [EC2-VPC] The Elastic IP address to recover.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'PublicIp': 'string',
            'AllocationId': 'string',
            'Domain': 'vpc'|'standard'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AllocateAddress.

        
        

        - **PublicIp** *(string) --* 

          The Elastic IP address.

          
        

        - **AllocationId** *(string) --* 

          [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.

          
        

        - **Domain** *(string) --* 

          Indicates whether this Elastic IP address is for use with instances in EC2-Classic (``standard`` ) or instances in a VPC (``vpc`` ).

          
    

    **Examples** 

    This example allocates an Elastic IP address to use with an instance in a VPC.
    ::

      response = client.allocate_address(
          Domain='vpc',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AllocationId': 'eipalloc-64d5890a',
          'Domain': 'vpc',
          'PublicIp': '203.0.113.0',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example allocates an Elastic IP address to use with an instance in EC2-Classic.
    ::

      response = client.allocate_address(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Domain': 'standard',
          'PublicIp': '198.51.100.0',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: allocate_hosts(**kwargs)

    

    Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts>`_    


    **Request Syntax** 
    ::

      response = client.allocate_hosts(
          AutoPlacement='on'|'off',
          AvailabilityZone='string',
          ClientToken='string',
          InstanceType='string',
          Quantity=123
      )
    :type AutoPlacement: string
    :param AutoPlacement: 

      This is enabled by default. This property allows instances to be automatically placed onto available Dedicated Hosts, when you are launching instances without specifying a host ID.

       

      Default: Enabled

      

    
    :type AvailabilityZone: string
    :param AvailabilityZone: **[REQUIRED]** 

      The Availability Zone for the Dedicated Hosts.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

      

    
    :type InstanceType: string
    :param InstanceType: **[REQUIRED]** 

      Specify the instance type that you want your Dedicated Hosts to be configured for. When you specify the instance type, that is the only instance type that you can launch onto that host.

      

    
    :type Quantity: integer
    :param Quantity: **[REQUIRED]** 

      The number of Dedicated Hosts you want to allocate to your account with these parameters.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'HostIds': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AllocateHosts.

        
        

        - **HostIds** *(list) --* 

          The ID of the allocated Dedicated Host. This is used when you want to launch an instance onto a specific host.

          
          

          - *(string) --* 
      
    

  .. py:method:: assign_ipv6_addresses(**kwargs)

    

    Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see `IP Addresses Per Network Interface Per Instance Type <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses>`_    


    **Request Syntax** 
    ::

      response = client.assign_ipv6_addresses(
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              'string',
          ],
          NetworkInterfaceId='string'
      )
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      The number of IPv6 addresses to assign to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.

      

    
      - *(string) --* 

      
  
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AssignedIpv6Addresses': [
                'string',
            ],
            'NetworkInterfaceId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **AssignedIpv6Addresses** *(list) --* 

          The IPv6 addresses assigned to the network interface.

          
          

          - *(string) --* 
      
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
    

  .. py:method:: assign_private_ip_addresses(**kwargs)

    

    Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about Elastic IP addresses, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    AssignPrivateIpAddresses is available only in EC2-VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses>`_    


    **Request Syntax** 
    ::

      response = client.assign_private_ip_addresses(
          AllowReassignment=True|False,
          NetworkInterfaceId='string',
          PrivateIpAddresses=[
              'string',
          ],
          SecondaryPrivateIpAddressCount=123
      )
    :type AllowReassignment: boolean
    :param AllowReassignment: 

      Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: 

      One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.

       

      If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

      

    
      - *(string) --* 

      
  
    :type SecondaryPrivateIpAddressCount: integer
    :param SecondaryPrivateIpAddressCount: 

      The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.

      

    
    
    :returns: None

    **Examples** 

    This example assigns the specified secondary private IP address to the specified network interface.
    ::

      response = client.assign_private_ip_addresses(
          NetworkInterfaceId='eni-e5aa89a3',
          PrivateIpAddresses=[
              '10.0.0.82',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with.
    ::

      response = client.assign_private_ip_addresses(
          NetworkInterfaceId='eni-e5aa89a3',
          SecondaryPrivateIpAddressCount=2,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: associate_address(**kwargs)

    

    Associates an Elastic IP address with an instance or a network interface.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

     

    [VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

     

    .. warning::

       

      This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the *Elastic IP Addresses* section of `Amazon EC2 Pricing <http://aws.amazon.com/ec2/pricing/>`_ .

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress>`_    


    **Request Syntax** 
    ::

      response = client.associate_address(
          AllocationId='string',
          InstanceId='string',
          PublicIp='string',
          AllowReassociation=True|False,
          DryRun=True|False,
          NetworkInterfaceId='string',
          PrivateIpAddress='string'
      )
    :type AllocationId: string
    :param AllocationId: 

      [EC2-VPC] The allocation ID. This is required for EC2-VPC.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

      

    
    :type PublicIp: string
    :param PublicIp: 

      The Elastic IP address. This is required for EC2-Classic.

      

    
    :type AllowReassociation: boolean
    :param AllowReassociation: 

      [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

      

    
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AssociateAddress.

        
        

        - **AssociationId** *(string) --* 

          [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

          
    

    **Examples** 

    This example associates the specified Elastic IP address with the specified instance in a VPC.
    ::

      response = client.associate_address(
          AllocationId='eipalloc-64d5890a',
          InstanceId='i-0b263919b6498b123',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AssociationId': 'eipassoc-2bebb745',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example associates the specified Elastic IP address with the specified network interface.
    ::

      response = client.associate_address(
          AllocationId='eipalloc-64d5890a',
          NetworkInterfaceId='eni-1a2b3c4d',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AssociationId': 'eipassoc-2bebb745',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example associates an Elastic IP address with an instance in EC2-Classic.
    ::

      response = client.associate_address(
          InstanceId='i-07ffe74c7330ebf53',
          PublicIp='198.51.100.0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: associate_dhcp_options(**kwargs)

    

    Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

     

    After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

     

    For more information, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = client.associate_dhcp_options(
          DhcpOptionsId='string',
          VpcId='string',
          DryRun=True|False
      )
    :type DhcpOptionsId: string
    :param DhcpOptionsId: **[REQUIRED]** 

      The ID of the DHCP options set, or ``default`` to associate no DHCP options with the VPC.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example associates the specified DHCP options set with the specified VPC.
    ::

      response = client.associate_dhcp_options(
          DhcpOptionsId='dopt-d9070ebb',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example associates the default DHCP options set with the specified VPC.
    ::

      response = client.associate_dhcp_options(
          DhcpOptionsId='default',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: associate_iam_instance_profile(**kwargs)

    

    Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile>`_    


    **Request Syntax** 
    ::

      response = client.associate_iam_instance_profile(
          IamInstanceProfile={
              'Arn': 'string',
              'Name': 'string'
          },
          InstanceId='string'
      )
    :type IamInstanceProfile: dict
    :param IamInstanceProfile: **[REQUIRED]** 

      The IAM instance profile.

      

    
      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        

      
      - **Name** *(string) --* 

        The name of the instance profile.

        

      
    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'IamInstanceProfileAssociation': {
                'AssociationId': 'string',
                'InstanceId': 'string',
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Id': 'string'
                },
                'State': 'associating'|'associated'|'disassociating'|'disassociated',
                'Timestamp': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **IamInstanceProfileAssociation** *(dict) --* 

          Information about the IAM instance profile association.

          
          

          - **AssociationId** *(string) --* 

            The ID of the association.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **IamInstanceProfile** *(dict) --* 

            The IAM instance profile.

            
            

            - **Arn** *(string) --* 

              The Amazon Resource Name (ARN) of the instance profile.

              
            

            - **Id** *(string) --* 

              The ID of the instance profile.

              
        
          

          - **State** *(string) --* 

            The state of the association.

            
          

          - **Timestamp** *(datetime) --* 

            The time the IAM instance profile was associated with the instance.

            
      
    

  .. py:method:: associate_route_table(**kwargs)

    

    Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable>`_    


    **Request Syntax** 
    ::

      response = client.associate_route_table(
          DryRun=True|False,
          RouteTableId='string',
          SubnetId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AssociateRouteTable.

        
        

        - **AssociationId** *(string) --* 

          The route table association ID (needed to disassociate the route table).

          
    

    **Examples** 

    This example associates the specified route table with the specified subnet.
    ::

      response = client.associate_route_table(
          RouteTableId='rtb-22574640',
          SubnetId='subnet-9d4a7b6',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AssociationId': 'rtbassoc-781d0d1a',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: associate_subnet_cidr_block(**kwargs)

    

    Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock>`_    


    **Request Syntax** 
    ::

      response = client.associate_subnet_cidr_block(
          Ipv6CidrBlock='string',
          SubnetId='string'
      )
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: **[REQUIRED]** 

      The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of your subnet.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Ipv6CidrBlockAssociation': {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
            'SubnetId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Ipv6CidrBlockAssociation** *(dict) --* 

          Information about the IPv6 CIDR block association.

          
          

          - **AssociationId** *(string) --* 

            The association ID for the CIDR block.

            
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
          

          - **Ipv6CidrBlockState** *(dict) --* 

            Information about the state of the CIDR block.

            
            

            - **State** *(string) --* 

              The state of a CIDR block.

              
            

            - **StatusMessage** *(string) --* 

              A message about the status of the CIDR block, if applicable.

              
        
      
        

        - **SubnetId** *(string) --* 

          The ID of the subnet.

          
    

  .. py:method:: associate_vpc_cidr_block(**kwargs)

    

    Associates a CIDR block with your VPC. You can only associate a single Amazon-provided IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock>`_    


    **Request Syntax** 
    ::

      response = client.associate_vpc_cidr_block(
          AmazonProvidedIpv6CidrBlock=True|False,
          VpcId='string'
      )
    :type AmazonProvidedIpv6CidrBlock: boolean
    :param AmazonProvidedIpv6CidrBlock: 

      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Ipv6CidrBlockAssociation': {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
            'VpcId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Ipv6CidrBlockAssociation** *(dict) --* 

          Information about the IPv6 CIDR block association.

          
          

          - **AssociationId** *(string) --* 

            The association ID for the IPv6 CIDR block.

            
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
          

          - **Ipv6CidrBlockState** *(dict) --* 

            Information about the state of the CIDR block.

            
            

            - **State** *(string) --* 

              The state of the CIDR block.

              
            

            - **StatusMessage** *(string) --* 

              A message about the status of the CIDR block, if applicable.

              
        
      
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
    

  .. py:method:: attach_classic_link_vpc(**kwargs)

    

    Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the ``running`` state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

     

    After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

     

    Linking your instance to a VPC is sometimes referred to as *attaching* your instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = client.attach_classic_link_vpc(
          DryRun=True|False,
          Groups=[
              'string',
          ],
          InstanceId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: **[REQUIRED]** 

      The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

      

    
      - *(string) --* 

      
  
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of a ClassicLink-enabled VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: attach_internet_gateway(**kwargs)

    

    Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the `Amazon Virtual Private Cloud User Guide <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.attach_internet_gateway(
          DryRun=True|False,
          InternetGatewayId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayId: string
    :param InternetGatewayId: **[REQUIRED]** 

      The ID of the Internet gateway.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :returns: None

    **Examples** 

    This example attaches the specified Internet gateway to the specified VPC.
    ::

      response = client.attach_internet_gateway(
          InternetGatewayId='igw-c0a643a9',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: attach_network_interface(**kwargs)

    

    Attaches a network interface to an instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = client.attach_network_interface(
          DeviceIndex=123,
          DryRun=True|False,
          InstanceId='string',
          NetworkInterfaceId='string'
      )
    :type DeviceIndex: integer
    :param DeviceIndex: **[REQUIRED]** 

      The index of the device for the network interface attachment.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachmentId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachNetworkInterface.

        
        

        - **AttachmentId** *(string) --* 

          The ID of the network interface attachment.

          
    

    **Examples** 

    This example attaches the specified network interface to the specified instance.
    ::

      response = client.attach_network_interface(
          DeviceIndex=1,
          InstanceId='i-1234567890abcdef0',
          NetworkInterfaceId='eni-e5aa89a3',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AttachmentId': 'eni-attach-66c4350a',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: attach_volume(**kwargs)

    

    Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

     

    Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For a list of supported device names, see `Attaching an EBS Volume to an Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ . Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see `Amazon EC2 Instance Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    If a volume has an AWS Marketplace product code:

     

     
    * The volume can be attached only to a stopped instance. 
     
    * AWS Marketplace product codes are copied from the volume to the instance. 
     
    * You must be subscribed to the product. 
     
    * The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance. 
     

     

    For an overview of the AWS Marketplace, see `Introducing AWS Marketplace <https://aws.amazon.com/marketplace/help/200900000>`_ .

     

    For more information about EBS volumes, see `Attaching Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume>`_    


    **Request Syntax** 
    ::

      response = client.attach_volume(
          Device='string',
          InstanceId='string',
          VolumeId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: **[REQUIRED]** 

      The device name to expose to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

    **Examples** 

    This example attaches a volume (``vol-1234567890abcdef0``) to an instance (``i-01474ef662b89480``) as ``/dev/sdf``.
    ::

      response = client.attach_volume(
          Device='/dev/sdf',
          InstanceId='i-01474ef662b89480',
          VolumeId='vol-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AttachTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
          'Device': '/dev/sdf',
          'InstanceId': 'i-01474ef662b89480',
          'State': 'attaching',
          'VolumeId': 'vol-1234567890abcdef0',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: attach_vpn_gateway(**kwargs)

    

    Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.

     

    For more information, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway>`_    


    **Request Syntax** 
    ::

      response = client.attach_vpn_gateway(
          VpcId='string',
          VpnGatewayId='string',
          DryRun=True|False
      )
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type VpnGatewayId: string
    :param VpnGatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcAttachment': {
                'State': 'attaching'|'attached'|'detaching'|'detached',
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachVpnGateway.

        
        

        - **VpcAttachment** *(dict) --* 

          Information about the attachment.

          
          

          - **State** *(string) --* 

            The current state of the attachment.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC.

            
      
    

  .. py:method:: authorize_security_group_egress(**kwargs)

    

    [EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* . For more information about security group limits, see `Amazon VPC Limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html>`_ .

     

    Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

     

    Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress>`_    


    **Request Syntax** 
    ::

      response = client.authorize_security_group_egress(
          DryRun=True|False,
          GroupId='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          CidrIp='string',
          FromPort=123,
          IpProtocol='string',
          ToPort=123,
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupId: string
    :param GroupId: **[REQUIRED]** 

      The ID of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IPv4 address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    
    :returns: None

  .. py:method:: authorize_security_group_ingress(**kwargs)

    

    Adds one or more ingress rules to a security group.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

     

    [EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the *source groups* ) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.

     

    [EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the *source groups* ) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see `Amazon VPC Limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress>`_    


    **Request Syntax** 
    ::

      response = client.authorize_security_group_ingress(
          CidrIp='string',
          FromPort=123,
          GroupId='string',
          GroupName='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          IpProtocol='string',
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string',
          ToPort=123,
          DryRun=True|False
      )
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type number, use ``-1`` to specify all types.

      

    
    :type GroupId: string
    :param GroupId: 

      The ID of the security group. Required for a nondefault VPC.

      

    
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). (VPC only) Use ``-1`` to specify all protocols. If you specify ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For protocol ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      [EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code number, use ``-1`` to specify all codes.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: bundle_instance(**kwargs)

    

    Bundles an Amazon instance store-backed Windows instance.

     

    During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.

     

    .. note::

       

      This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.

       

     

    For more information, see `Creating an Instance Store-Backed Windows AMI <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance>`_    


    **Request Syntax** 
    ::

      response = client.bundle_instance(
          InstanceId='string',
          Storage={
              'S3': {
                  'AWSAccessKeyId': 'string',
                  'Bucket': 'string',
                  'Prefix': 'string',
                  'UploadPolicy': b'bytes',
                  'UploadPolicySignature': 'string'
              }
          },
          DryRun=True|False
      )
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance to bundle.

       

      Type: String

       

      Default: None

       

      Required: Yes

      

    
    :type Storage: dict
    :param Storage: **[REQUIRED]** 

      The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

      

    
      - **S3** *(dict) --* 

        An Amazon S3 storage location.

        

      
        - **AWSAccessKeyId** *(string) --* 

          The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in `Best Practices for Managing AWS Access Keys <http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html>`_ .

          

        
        - **Bucket** *(string) --* 

          The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

          

        
        - **Prefix** *(string) --* 

          The beginning of the file name of the AMI.

          

        
        - **UploadPolicy** *(bytes) --* 

          An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

          

        
        - **UploadPolicySignature** *(string) --* 

          The signature of the JSON document.

          

        
      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'BundleTask': {
                'BundleId': 'string',
                'BundleTaskError': {
                    'Code': 'string',
                    'Message': 'string'
                },
                'InstanceId': 'string',
                'Progress': 'string',
                'StartTime': datetime(2015, 1, 1),
                'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
                'Storage': {
                    'S3': {
                        'AWSAccessKeyId': 'string',
                        'Bucket': 'string',
                        'Prefix': 'string',
                        'UploadPolicy': b'bytes',
                        'UploadPolicySignature': 'string'
                    }
                },
                'UpdateTime': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of BundleInstance.

        
        

        - **BundleTask** *(dict) --* 

          Information about the bundle task.

          
          

          - **BundleId** *(string) --* 

            The ID of the bundle task.

            
          

          - **BundleTaskError** *(dict) --* 

            If the task fails, a description of the error.

            
            

            - **Code** *(string) --* 

              The error code.

              
            

            - **Message** *(string) --* 

              The error message.

              
        
          

          - **InstanceId** *(string) --* 

            The ID of the instance associated with this bundle task.

            
          

          - **Progress** *(string) --* 

            The level of task completion, as a percent (for example, 20%).

            
          

          - **StartTime** *(datetime) --* 

            The time this task started.

            
          

          - **State** *(string) --* 

            The state of the task.

            
          

          - **Storage** *(dict) --* 

            The Amazon S3 storage locations.

            
            

            - **S3** *(dict) --* 

              An Amazon S3 storage location.

              
              

              - **AWSAccessKeyId** *(string) --* 

                The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in `Best Practices for Managing AWS Access Keys <http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html>`_ .

                
              

              - **Bucket** *(string) --* 

                The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

                
              

              - **Prefix** *(string) --* 

                The beginning of the file name of the AMI.

                
              

              - **UploadPolicy** *(bytes) --* 

                An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

                
              

              - **UploadPolicySignature** *(string) --* 

                The signature of the JSON document.

                
          
        
          

          - **UpdateTime** *(datetime) --* 

            The time of the most recent update for the task.

            
      
    

  .. py:method:: can_paginate(operation_name)

        
    Check if an operation can be paginated.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :return: ``True`` if the operation can be paginated,
        ``False`` otherwise.


  .. py:method:: cancel_bundle_task(**kwargs)

    

    Cancels a bundling operation for an instance store-backed Windows instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask>`_    


    **Request Syntax** 
    ::

      response = client.cancel_bundle_task(
          BundleId='string',
          DryRun=True|False
      )
    :type BundleId: string
    :param BundleId: **[REQUIRED]** 

      The ID of the bundle task.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'BundleTask': {
                'BundleId': 'string',
                'BundleTaskError': {
                    'Code': 'string',
                    'Message': 'string'
                },
                'InstanceId': 'string',
                'Progress': 'string',
                'StartTime': datetime(2015, 1, 1),
                'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
                'Storage': {
                    'S3': {
                        'AWSAccessKeyId': 'string',
                        'Bucket': 'string',
                        'Prefix': 'string',
                        'UploadPolicy': b'bytes',
                        'UploadPolicySignature': 'string'
                    }
                },
                'UpdateTime': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CancelBundleTask.

        
        

        - **BundleTask** *(dict) --* 

          Information about the bundle task.

          
          

          - **BundleId** *(string) --* 

            The ID of the bundle task.

            
          

          - **BundleTaskError** *(dict) --* 

            If the task fails, a description of the error.

            
            

            - **Code** *(string) --* 

              The error code.

              
            

            - **Message** *(string) --* 

              The error message.

              
        
          

          - **InstanceId** *(string) --* 

            The ID of the instance associated with this bundle task.

            
          

          - **Progress** *(string) --* 

            The level of task completion, as a percent (for example, 20%).

            
          

          - **StartTime** *(datetime) --* 

            The time this task started.

            
          

          - **State** *(string) --* 

            The state of the task.

            
          

          - **Storage** *(dict) --* 

            The Amazon S3 storage locations.

            
            

            - **S3** *(dict) --* 

              An Amazon S3 storage location.

              
              

              - **AWSAccessKeyId** *(string) --* 

                The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in `Best Practices for Managing AWS Access Keys <http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html>`_ .

                
              

              - **Bucket** *(string) --* 

                The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

                
              

              - **Prefix** *(string) --* 

                The beginning of the file name of the AMI.

                
              

              - **UploadPolicy** *(bytes) --* 

                An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

                
              

              - **UploadPolicySignature** *(string) --* 

                The signature of the JSON document.

                
          
        
          

          - **UpdateTime** *(datetime) --* 

            The time of the most recent update for the task.

            
      
    

  .. py:method:: cancel_conversion_task(**kwargs)

    

    Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.

     

    For more information, see `Importing a Virtual Machine Using the Amazon EC2 CLI <http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask>`_    


    **Request Syntax** 
    ::

      response = client.cancel_conversion_task(
          ConversionTaskId='string',
          DryRun=True|False,
          ReasonMessage='string'
      )
    :type ConversionTaskId: string
    :param ConversionTaskId: **[REQUIRED]** 

      The ID of the conversion task.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type ReasonMessage: string
    :param ReasonMessage: 

      The reason for canceling the conversion task.

      

    
    
    :returns: None

  .. py:method:: cancel_export_task(**kwargs)

    

    Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask>`_    


    **Request Syntax** 
    ::

      response = client.cancel_export_task(
          ExportTaskId='string'
      )
    :type ExportTaskId: string
    :param ExportTaskId: **[REQUIRED]** 

      The ID of the export task. This is the ID returned by ``CreateInstanceExportTask`` .

      

    
    
    :returns: None

  .. py:method:: cancel_import_task(**kwargs)

    

    Cancels an in-process import virtual machine or import snapshot task.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask>`_    


    **Request Syntax** 
    ::

      response = client.cancel_import_task(
          CancelReason='string',
          DryRun=True|False,
          ImportTaskId='string'
      )
    :type CancelReason: string
    :param CancelReason: 

      The reason for canceling the task.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type ImportTaskId: string
    :param ImportTaskId: 

      The ID of the import image or import snapshot task to be canceled.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImportTaskId': 'string',
            'PreviousState': 'string',
            'State': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for CancelImportTask.

        
        

        - **ImportTaskId** *(string) --* 

          The ID of the task being canceled.

          
        

        - **PreviousState** *(string) --* 

          The current state of the task being canceled.

          
        

        - **State** *(string) --* 

          The current state of the task being canceled.

          
    

  .. py:method:: cancel_reserved_instances_listing(**kwargs)

    

    Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.

     

    For more information, see `Reserved Instance Marketplace <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing>`_    


    **Request Syntax** 
    ::

      response = client.cancel_reserved_instances_listing(
          ReservedInstancesListingId='string'
      )
    :type ReservedInstancesListingId: string
    :param ReservedInstancesListingId: **[REQUIRED]** 

      The ID of the Reserved Instance listing.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesListings': [
                {
                    'ClientToken': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'InstanceCounts': [
                        {
                            'InstanceCount': 123,
                            'State': 'available'|'sold'|'cancelled'|'pending'
                        },
                    ],
                    'PriceSchedules': [
                        {
                            'Active': True|False,
                            'CurrencyCode': 'USD',
                            'Price': 123.0,
                            'Term': 123
                        },
                    ],
                    'ReservedInstancesId': 'string',
                    'ReservedInstancesListingId': 'string',
                    'Status': 'active'|'pending'|'cancelled'|'closed',
                    'StatusMessage': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'UpdateDate': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CancelReservedInstancesListing.

        
        

        - **ReservedInstancesListings** *(list) --* 

          The Reserved Instance listing.

          
          

          - *(dict) --* 

            Describes a Reserved Instance listing.

            
            

            - **ClientToken** *(string) --* 

              A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

              
            

            - **CreateDate** *(datetime) --* 

              The time the listing was created.

              
            

            - **InstanceCounts** *(list) --* 

              The number of instances in this state.

              
              

              - *(dict) --* 

                Describes a Reserved Instance listing state.

                
                

                - **InstanceCount** *(integer) --* 

                  The number of listed Reserved Instances in the state specified by the ``state`` .

                  
                

                - **State** *(string) --* 

                  The states of the listed Reserved Instances.

                  
            
          
            

            - **PriceSchedules** *(list) --* 

              The price of the Reserved Instance listing.

              
              

              - *(dict) --* 

                Describes the price for a Reserved Instance.

                
                

                - **Active** *(boolean) --* 

                  The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

                   

                  A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

                  
                

                - **CurrencyCode** *(string) --* 

                  The currency for transacting the Reserved Instance resale. At this time, the only supported currency is ``USD`` .

                  
                

                - **Price** *(float) --* 

                  The fixed price for the term.

                  
                

                - **Term** *(integer) --* 

                  The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

                  
            
          
            

            - **ReservedInstancesId** *(string) --* 

              The ID of the Reserved Instance.

              
            

            - **ReservedInstancesListingId** *(string) --* 

              The ID of the Reserved Instance listing.

              
            

            - **Status** *(string) --* 

              The status of the Reserved Instance listing.

              
            

            - **StatusMessage** *(string) --* 

              The reason for the current status of the Reserved Instance listing. The response can be blank.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **UpdateDate** *(datetime) --* 

              The last modified timestamp of the listing.

              
        
      
    

  .. py:method:: cancel_spot_fleet_requests(**kwargs)

    

    Cancels the specified Spot fleet requests.

     

    After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the ``cancelled_terminating`` state. Otherwise, the Spot fleet request enters the ``cancelled_running`` state and the instances continue to run until they are interrupted or you terminate them manually.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests>`_    


    **Request Syntax** 
    ::

      response = client.cancel_spot_fleet_requests(
          DryRun=True|False,
          SpotFleetRequestIds=[
              'string',
          ],
          TerminateInstances=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotFleetRequestIds: list
    :param SpotFleetRequestIds: **[REQUIRED]** 

      The IDs of the Spot fleet requests.

      

    
      - *(string) --* 

      
  
    :type TerminateInstances: boolean
    :param TerminateInstances: **[REQUIRED]** 

      Indicates whether to terminate instances for a Spot fleet request if it is canceled successfully.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SuccessfulFleetRequests': [
                {
                    'CurrentSpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
                    'PreviousSpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
                    'SpotFleetRequestId': 'string'
                },
            ],
            'UnsuccessfulFleetRequests': [
                {
                    'Error': {
                        'Code': 'fleetRequestIdDoesNotExist'|'fleetRequestIdMalformed'|'fleetRequestNotInCancellableState'|'unexpectedError',
                        'Message': 'string'
                    },
                    'SpotFleetRequestId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CancelSpotFleetRequests.

        
        

        - **SuccessfulFleetRequests** *(list) --* 

          Information about the Spot fleet requests that are successfully canceled.

          
          

          - *(dict) --* 

            Describes a Spot fleet request that was successfully canceled.

            
            

            - **CurrentSpotFleetRequestState** *(string) --* 

              The current state of the Spot fleet request.

              
            

            - **PreviousSpotFleetRequestState** *(string) --* 

              The previous state of the Spot fleet request.

              
            

            - **SpotFleetRequestId** *(string) --* 

              The ID of the Spot fleet request.

              
        
      
        

        - **UnsuccessfulFleetRequests** *(list) --* 

          Information about the Spot fleet requests that are not successfully canceled.

          
          

          - *(dict) --* 

            Describes a Spot fleet request that was not successfully canceled.

            
            

            - **Error** *(dict) --* 

              The error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The description for the error code.

                
          
            

            - **SpotFleetRequestId** *(string) --* 

              The ID of the Spot fleet request.

              
        
      
    

    **Examples** 

    This example cancels the specified Spot fleet request and terminates its associated Spot Instances.
    ::

      response = client.cancel_spot_fleet_requests(
          SpotFleetRequestIds=[
              'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          ],
          TerminateInstances=True,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SuccessfulFleetRequests': [
              {
                  'CurrentSpotFleetRequestState': 'cancelled_running',
                  'PreviousSpotFleetRequestState': 'active',
                  'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example cancels the specified Spot fleet request without terminating its associated Spot Instances.
    ::

      response = client.cancel_spot_fleet_requests(
          SpotFleetRequestIds=[
              'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          ],
          TerminateInstances=False,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SuccessfulFleetRequests': [
              {
                  'CurrentSpotFleetRequestState': 'cancelled_terminating',
                  'PreviousSpotFleetRequestState': 'active',
                  'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: cancel_spot_instance_requests(**kwargs)

    

    Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see `Spot Instance Requests <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    .. warning::

       

      Canceling a Spot instance request does not terminate running Spot instances associated with the request.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests>`_    


    **Request Syntax** 
    ::

      response = client.cancel_spot_instance_requests(
          DryRun=True|False,
          SpotInstanceRequestIds=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotInstanceRequestIds: list
    :param SpotInstanceRequestIds: **[REQUIRED]** 

      One or more Spot instance request IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CancelledSpotInstanceRequests': [
                {
                    'SpotInstanceRequestId': 'string',
                    'State': 'active'|'open'|'closed'|'cancelled'|'completed'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CancelSpotInstanceRequests.

        
        

        - **CancelledSpotInstanceRequests** *(list) --* 

          One or more Spot instance requests.

          
          

          - *(dict) --* 

            Describes a request to cancel a Spot instance.

            
            

            - **SpotInstanceRequestId** *(string) --* 

              The ID of the Spot instance request.

              
            

            - **State** *(string) --* 

              The state of the Spot instance request.

              
        
      
    

    **Examples** 

    This example cancels a Spot Instance request.
    ::

      response = client.cancel_spot_instance_requests(
          SpotInstanceRequestIds=[
              'sir-08b93456',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'CancelledSpotInstanceRequests': [
              {
                  'SpotInstanceRequestId': 'sir-08b93456',
                  'State': 'cancelled',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: confirm_product_instance(**kwargs)

    

    Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance>`_    


    **Request Syntax** 
    ::

      response = client.confirm_product_instance(
          InstanceId='string',
          ProductCode='string',
          DryRun=True|False
      )
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type ProductCode: string
    :param ProductCode: **[REQUIRED]** 

      The product code. This must be a product code that you own.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'OwnerId': 'string',
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ConfirmProductInstance.

        
        

        - **OwnerId** *(string) --* 

          The AWS account ID of the instance owner. This is only present if the product code is attached to the instance.

          
        

        - **Return** *(boolean) --* 

          The return value of the request. Returns ``true`` if the specified product code is owned by the requester and associated with the specified instance.

          
    

    **Examples** 

    This example determines whether the specified product code is associated with the specified instance.
    ::

      response = client.confirm_product_instance(
          InstanceId='i-1234567890abcdef0',
          ProductCode='774F4FF8',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'OwnerId': '123456789012',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: copy_image(**kwargs)

    

    Initiates the copy of an AMI from the specified source region to the current region. You specify the destination region by using its endpoint when making the request.

     

    For more information about the prerequisites and limits when copying an AMI, see `Copying an AMI <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage>`_    


    **Request Syntax** 
    ::

      response = client.copy_image(
          ClientToken='string',
          Description='string',
          Encrypted=True|False,
          KmsKeyId='string',
          Name='string',
          SourceImageId='string',
          SourceRegion='string',
          DryRun=True|False
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type Description: string
    :param Description: 

      A description for the new AMI in the destination region.

      

    
    :type Encrypted: boolean
    :param Encrypted: 

      Specifies whether the destination snapshots of the copied image should be encrypted. The default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with ``KmsKeyId`` . For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type KmsKeyId: string
    :param KmsKeyId: 

      The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the ``arn:aws:kms`` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the ``key`` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1* :*012345678910* :key/*abcd1234-a123-456a-a12b-a123b4cd56ef* . The specified CMK must exist in the region that the snapshot is being copied to. If a ``KmsKeyId`` is specified, the ``Encrypted`` flag must also be set.

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the new AMI in the destination region.

      

    
    :type SourceImageId: string
    :param SourceImageId: **[REQUIRED]** 

      The ID of the AMI to copy.

      

    
    :type SourceRegion: string
    :param SourceRegion: **[REQUIRED]** 

      The name of the region that contains the AMI to copy.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImageId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CopyImage.

        
        

        - **ImageId** *(string) --* 

          The ID of the new AMI.

          
    

  .. py:method:: copy_snapshot(**kwargs)

    

    Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.

     

    Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the ``Encrypted`` flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the ``KmsKeyId`` parameter. 

     

    .. note::

       

      To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.

       

     

    .. note::

       

      Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

       

     

    For more information, see `Copying an Amazon EBS Snapshot <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot>`_    


    **Request Syntax** 
    ::

      response = client.copy_snapshot(
          Description='string',
          Encrypted=True|False,
          KmsKeyId='string',
          SourceRegion='string',
          SourceSnapshotId='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: 

      A description for the EBS snapshot.

      

    
    :type DestinationRegion: string
    :param DestinationRegion: 

      The destination region to use in the ``PresignedUrl`` parameter of a snapshot copy operation. This parameter is only valid for specifying the destination region in a ``PresignedUrl`` parameter, where it is required.

       

      .. note::

         

         ``CopySnapshot`` sends the snapshot copy to the regional endpoint that you send the HTTP request to, such as ``ec2.us-east-1.amazonaws.com`` (in the AWS CLI, this is specified with the ``--region`` parameter or the default region in your AWS configuration file).

         

            Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required



    
    :type Encrypted: boolean
    :param Encrypted: 

      Specifies whether the destination snapshot should be encrypted. You can encrypt a copy of an unencrypted snapshot using this flag, but you cannot use it to create an unencrypted copy from an encrypted snapshot. Your default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with ``KmsKeyId`` . For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type KmsKeyId: string
    :param KmsKeyId: 

      The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when creating the snapshot copy. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the ``arn:aws:kms`` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the ``key`` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1* :*012345678910* :key/*abcd1234-a123-456a-a12b-a123b4cd56ef* . The specified CMK must exist in the region that the snapshot is being copied to. If a ``KmsKeyId`` is specified, the ``Encrypted`` flag must also be set.

      

    
    :type PresignedUrl: string
    :param PresignedUrl: 

      The pre-signed URL that facilitates copying an encrypted snapshot. This parameter is only required when copying an encrypted snapshot with the Amazon EC2 Query API; it is available as an optional parameter in all other cases. The ``PresignedUrl`` should use the snapshot source endpoint, the ``CopySnapshot`` action, and include the ``SourceRegion`` , ``SourceSnapshotId`` , and ``DestinationRegion`` parameters. The ``PresignedUrl`` must be signed using AWS Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in `Authenticating Requests by Using Query Parameters (AWS Signature Version 4) <http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html>`_ in the *Amazon Simple Storage Service API Reference* . An invalid or improperly signed ``PresignedUrl`` will cause the copy operation to fail asynchronously, and the snapshot will move to an ``error`` state.

            Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required



    
    :type SourceRegion: string
    :param SourceRegion: **[REQUIRED]** 

      The ID of the region that contains the snapshot to be copied.

      

    
    :type SourceSnapshotId: string
    :param SourceSnapshotId: **[REQUIRED]** 

      The ID of the EBS snapshot to copy.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SnapshotId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CopySnapshot.

        
        

        - **SnapshotId** *(string) --* 

          The ID of the new snapshot.

          
    

    **Examples** 

    This example copies a snapshot with the snapshot ID of ``snap-066877671789bd71b`` from the ``us-west-2`` region to the ``us-east-1`` region and adds a short description to identify the snapshot.
    ::

      response = client.copy_snapshot(
          Description='This is my copied snapshot.',
          DestinationRegion='us-east-1',
          SourceRegion='us-west-2',
          SourceSnapshotId='snap-066877671789bd71b',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SnapshotId': 'snap-066877671789bd71b',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_customer_gateway(**kwargs)

    

    Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP address of the customer gateway's external interface. The IP address must be static and may be behind a device performing network address translation (NAT).

     

    For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).

     

    .. note::

       

      Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of 7224, which is reserved in the ``us-east-1`` region, and 9059, which is reserved in the ``eu-west-1`` region.

       

     

    For more information about VPN customer gateways, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    .. warning::

       

      You cannot create more than one customer gateway with the same VPN type, IP address, and BGP ASN parameter values. If you run an identical request more than one time, the first request creates the customer gateway, and subsequent requests return information about the existing customer gateway. The subsequent requests do not create new customer gateway resources.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway>`_    


    **Request Syntax** 
    ::

      response = client.create_customer_gateway(
          BgpAsn=123,
          PublicIp='string',
          Type='ipsec.1',
          DryRun=True|False
      )
    :type BgpAsn: integer
    :param BgpAsn: **[REQUIRED]** 

      For devices that support BGP, the customer gateway's BGP ASN.

       

      Default: 65000

      

    
    :type PublicIp: string
    :param PublicIp: **[REQUIRED]** 

      The Internet-routable IP address for the customer gateway's outside interface. The address must be static.

      

    
    :type Type: string
    :param Type: **[REQUIRED]** 

      The type of VPN connection that this customer gateway supports (``ipsec.1`` ).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CustomerGateway': {
                'BgpAsn': 'string',
                'CustomerGatewayId': 'string',
                'IpAddress': 'string',
                'State': 'string',
                'Type': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateCustomerGateway.

        
        

        - **CustomerGateway** *(dict) --* 

          Information about the customer gateway.

          
          

          - **BgpAsn** *(string) --* 

            The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

            
          

          - **CustomerGatewayId** *(string) --* 

            The ID of the customer gateway.

            
          

          - **IpAddress** *(string) --* 

            The Internet-routable IP address of the customer gateway's outside interface.

            
          

          - **State** *(string) --* 

            The current state of the customer gateway (``pending | available | deleting | deleted`` ).

            
          

          - **Type** *(string) --* 

            The type of VPN connection the customer gateway supports (``ipsec.1`` ).

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the customer gateway.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

    **Examples** 

    This example creates a customer gateway with the specified IP address for its outside interface.
    ::

      response = client.create_customer_gateway(
          BgpAsn=65534,
          PublicIp='12.1.2.3',
          Type='ipsec.1',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'CustomerGateway': {
              'BgpAsn': '65534',
              'CustomerGatewayId': 'cgw-0e11f167',
              'IpAddress': '12.1.2.3',
              'State': 'available',
              'Type': 'ipsec.1',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_default_vpc(**kwargs)

    

    Creates a default VPC with a size ``/16`` IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see `Default VPC and Default Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html>`_ in the *Amazon Virtual Private Cloud User Guide* . You cannot specify the components of the default VPC yourself.

     

    You can create a default VPC if you deleted your previous default VPC. You cannot have more than one default VPC per region. 

     

    If your account supports EC2-Classic, you cannot use this action to create a default VPC in a region that supports EC2-Classic. If you want a default VPC in a region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the `Default VPCs FAQ <http://aws.amazon.com/vpc/faqs/#Default_VPCs>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc>`_    


    **Request Syntax** 
    ::

      response = client.create_default_vpc(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Vpc': {
                'CidrBlock': 'string',
                'DhcpOptionsId': 'string',
                'State': 'pending'|'available',
                'VpcId': 'string',
                'InstanceTenancy': 'default'|'dedicated'|'host',
                'Ipv6CidrBlockAssociationSet': [
                    {
                        'AssociationId': 'string',
                        'Ipv6CidrBlock': 'string',
                        'Ipv6CidrBlockState': {
                            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                            'StatusMessage': 'string'
                        }
                    },
                ],
                'IsDefault': True|False,
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateDefaultVpc.

        
        

        - **Vpc** *(dict) --* 

          Information about the VPC.

          
          

          - **CidrBlock** *(string) --* 

            The IPv4 CIDR block for the VPC.

            
          

          - **DhcpOptionsId** *(string) --* 

            The ID of the set of DHCP options you've associated with the VPC (or ``default`` if the default options are associated with the VPC).

            
          

          - **State** *(string) --* 

            The current state of the VPC.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC.

            
          

          - **InstanceTenancy** *(string) --* 

            The allowed tenancy of instances launched into the VPC.

            
          

          - **Ipv6CidrBlockAssociationSet** *(list) --* 

            Information about the IPv6 CIDR blocks associated with the VPC.

            
            

            - *(dict) --* 

              Describes an IPv6 CIDR block associated with a VPC.

              
              

              - **AssociationId** *(string) --* 

                The association ID for the IPv6 CIDR block.

                
              

              - **Ipv6CidrBlock** *(string) --* 

                The IPv6 CIDR block.

                
              

              - **Ipv6CidrBlockState** *(dict) --* 

                Information about the state of the CIDR block.

                
                

                - **State** *(string) --* 

                  The state of the CIDR block.

                  
                

                - **StatusMessage** *(string) --* 

                  A message about the status of the CIDR block, if applicable.

                  
            
          
        
          

          - **IsDefault** *(boolean) --* 

            Indicates whether the VPC is the default VPC.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the VPC.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

  .. py:method:: create_dhcp_options(**kwargs)

    

    Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see `RFC 2132 <http://www.ietf.org/rfc/rfc2132.txt>`_ .

     

     
    * ``domain-name-servers`` - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified in ``domain-name`` , you must set ``domain-name-servers`` to a custom DNS server. 
     
    * ``domain-name`` - If you're using AmazonProvidedDNS in ``us-east-1`` , specify ``ec2.internal`` . If you're using AmazonProvidedDNS in another region, specify ``region.compute.internal`` (for example, ``ap-northeast-1.compute.internal`` ). Otherwise, specify a domain name (for example, ``MyCompany.com`` ). This value is used to complete unqualified DNS hostnames. **Important** : Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name. 
     
    * ``ntp-servers`` - The IP addresses of up to four Network Time Protocol (NTP) servers. 
     
    * ``netbios-name-servers`` - The IP addresses of up to four NetBIOS name servers. 
     
    * ``netbios-node-type`` - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see `RFC 2132 <http://www.ietf.org/rfc/rfc2132.txt>`_ . 
     

     

    Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the ``domain-name-servers`` option either to ``AmazonProvidedDNS`` or to a domain name server of your choice. For more information about DHCP options, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = client.create_dhcp_options(
          DhcpConfigurations=[
              {
                  'Key': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type DhcpConfigurations: list
    :param DhcpConfigurations: **[REQUIRED]** 

      A DHCP configuration option.

      

    
      - *(dict) --* 

      
        - **Key** *(string) --* 

        
        - **Values** *(list) --* 

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'DhcpOptions': {
                'DhcpConfigurations': [
                    {
                        'Key': 'string',
                        'Values': [
                            {
                                'Value': 'string'
                            },
                        ]
                    },
                ],
                'DhcpOptionsId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateDhcpOptions.

        
        

        - **DhcpOptions** *(dict) --* 

          A set of DHCP options.

          
          

          - **DhcpConfigurations** *(list) --* 

            One or more DHCP options in the set.

            
            

            - *(dict) --* 

              Describes a DHCP configuration option.

              
              

              - **Key** *(string) --* 

                The name of a DHCP option.

                
              

              - **Values** *(list) --* 

                One or more values for the DHCP option.

                
                

                - *(dict) --* 

                  Describes a value for a resource attribute that is a String.

                  
                  

                  - **Value** *(string) --* 

                    The attribute value. Note that the value is case-sensitive.

                    
              
            
          
        
          

          - **DhcpOptionsId** *(string) --* 

            The ID of the set of DHCP options.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the DHCP options set.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

    **Examples** 

    This example creates a DHCP options set.
    ::

      response = client.create_dhcp_options(
          DhcpConfigurations=[
              {
                  'Key': 'domain-name-servers',
                  'Values': [
                      '10.2.5.1',
                      '10.2.5.2',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'DhcpOptions': {
              'DhcpConfigurations': [
                  {
                      'Key': 'domain-name-servers',
                      'Values': [
                          {
                              'Value': '10.2.5.2',
                          },
                          {
                              'Value': '10.2.5.1',
                          },
                      ],
                  },
              ],
              'DhcpOptionsId': 'dopt-d9070ebb',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_egress_only_internet_gateway(**kwargs)

    

    [IPv6 only] Creates an egress-only Internet gateway for your VPC. An egress-only Internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the Internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.create_egress_only_internet_gateway(
          ClientToken='string',
          DryRun=True|False,
          VpcId='string'
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ .

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC for which to create the egress-only Internet gateway.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ClientToken': 'string',
            'EgressOnlyInternetGateway': {
                'Attachments': [
                    {
                        'State': 'attaching'|'attached'|'detaching'|'detached',
                        'VpcId': 'string'
                    },
                ],
                'EgressOnlyInternetGatewayId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **ClientToken** *(string) --* 

          Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

          
        

        - **EgressOnlyInternetGateway** *(dict) --* 

          Information about the egress-only Internet gateway.

          
          

          - **Attachments** *(list) --* 

            Information about the attachment of the egress-only Internet gateway.

            
            

            - *(dict) --* 

              Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.

              
              

              - **State** *(string) --* 

                The current state of the attachment.

                
              

              - **VpcId** *(string) --* 

                The ID of the VPC.

                
          
        
          

          - **EgressOnlyInternetGatewayId** *(string) --* 

            The ID of the egress-only Internet gateway.

            
      
    

  .. py:method:: create_flow_logs(**kwargs)

    

    Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.

     

    In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs>`_    


    **Request Syntax** 
    ::

      response = client.create_flow_logs(
          ClientToken='string',
          DeliverLogsPermissionArn='string',
          LogGroupName='string',
          ResourceIds=[
              'string',
          ],
          ResourceType='VPC'|'Subnet'|'NetworkInterface',
          TrafficType='ACCEPT'|'REJECT'|'ALL'
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ .

      

    
    :type DeliverLogsPermissionArn: string
    :param DeliverLogsPermissionArn: **[REQUIRED]** 

      The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group.

      

    
    :type LogGroupName: string
    :param LogGroupName: **[REQUIRED]** 

      The name of the CloudWatch log group.

      

    
    :type ResourceIds: list
    :param ResourceIds: **[REQUIRED]** 

      One or more subnet, network interface, or VPC IDs.

       

      Constraints: Maximum of 1000 resources

      

    
      - *(string) --* 

      
  
    :type ResourceType: string
    :param ResourceType: **[REQUIRED]** 

      The type of resource on which to create the flow log.

      

    
    :type TrafficType: string
    :param TrafficType: **[REQUIRED]** 

      The type of traffic to log.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ClientToken': 'string',
            'FlowLogIds': [
                'string',
            ],
            'Unsuccessful': [
                {
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'ResourceId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateFlowLogs.

        
        

        - **ClientToken** *(string) --* 

          Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

          
        

        - **FlowLogIds** *(list) --* 

          The IDs of the flow logs.

          
          

          - *(string) --* 
      
        

        - **Unsuccessful** *(list) --* 

          Information about the flow logs that could not be created successfully.

          
          

          - *(dict) --* 

            Information about items that were not successfully processed in a batch call.

            
            

            - **Error** *(dict) --* 

              Information about the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message accompanying the error code.

                
          
            

            - **ResourceId** *(string) --* 

              The ID of the resource.

              
        
      
    

  .. py:method:: create_fpga_image(**kwargs)

    

    Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).

     

    The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.

     

    An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on one or more FPGA-accelerated instances. For more information, see the `AWS FPGA Hardware Development Kit <https://github.com/aws/aws-fpga/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage>`_    


    **Request Syntax** 
    ::

      response = client.create_fpga_image(
          DryRun=True|False,
          InputStorageLocation={
              'Bucket': 'string',
              'Key': 'string'
          },
          LogsStorageLocation={
              'Bucket': 'string',
              'Key': 'string'
          },
          Description='string',
          Name='string',
          ClientToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InputStorageLocation: dict
    :param InputStorageLocation: **[REQUIRED]** 

      The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.

      

    
      - **Bucket** *(string) --* 

        The name of the S3 bucket.

        

      
      - **Key** *(string) --* 

        The key.

        

      
    
    :type LogsStorageLocation: dict
    :param LogsStorageLocation: 

      The location in Amazon S3 for the output logs.

      

    
      - **Bucket** *(string) --* 

        The name of the S3 bucket.

        

      
      - **Key** *(string) --* 

        The key.

        

      
    
    :type Description: string
    :param Description: 

      A description for the AFI.

      

    
    :type Name: string
    :param Name: 

      A name for the AFI.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'FpgaImageId': 'string',
            'FpgaImageGlobalId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **FpgaImageId** *(string) --* 

          The FPGA image identifier (AFI ID).

          
        

        - **FpgaImageGlobalId** *(string) --* 

          The global FPGA image identifier (AGFI ID).

          
    

  .. py:method:: create_image(**kwargs)

    

    Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

     

    If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

     

    For more information, see `Creating Amazon EBS-Backed Linux AMIs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage>`_    


    **Request Syntax** 
    ::

      response = client.create_image(
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          Description='string',
          DryRun=True|False,
          InstanceId='string',
          Name='string',
          NoReboot=True|False
      )
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      Information about one or more block device mappings.

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type Description: string
    :param Description: 

      A description for the new image.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      A name for the new image.

       

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

      

    
    :type NoReboot: boolean
    :param NoReboot: 

      By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImageId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateImage.

        
        

        - **ImageId** *(string) --* 

          The ID of the new AMI.

          
    

  .. py:method:: create_instance_export_task(**kwargs)

    

    Exports a running or stopped instance to an S3 bucket.

     

    For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see `Exporting an Instance as a VM Using VM Import/Export <http://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html>`_ in the *VM Import/Export User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask>`_    


    **Request Syntax** 
    ::

      response = client.create_instance_export_task(
          Description='string',
          ExportToS3Task={
              'ContainerFormat': 'ova',
              'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
              'S3Bucket': 'string',
              'S3Prefix': 'string'
          },
          InstanceId='string',
          TargetEnvironment='citrix'|'vmware'|'microsoft'
      )
    :type Description: string
    :param Description: 

      A description for the conversion task or the resource being exported. The maximum length is 255 bytes.

      

    
    :type ExportToS3Task: dict
    :param ExportToS3Task: 

      The format and location for an instance export task.

      

    
      - **ContainerFormat** *(string) --* 

        The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

        

      
      - **DiskImageFormat** *(string) --* 

        The format for the exported image.

        

      
      - **S3Bucket** *(string) --* 

        The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account ``vm-import-export@amazon.com`` .

        

      
      - **S3Prefix** *(string) --* 

        The image is written to a single object in the S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

        

      
    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type TargetEnvironment: string
    :param TargetEnvironment: 

      The target virtualization environment.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ExportTask': {
                'Description': 'string',
                'ExportTaskId': 'string',
                'ExportToS3Task': {
                    'ContainerFormat': 'ova',
                    'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
                    'S3Bucket': 'string',
                    'S3Key': 'string'
                },
                'InstanceExportDetails': {
                    'InstanceId': 'string',
                    'TargetEnvironment': 'citrix'|'vmware'|'microsoft'
                },
                'State': 'active'|'cancelling'|'cancelled'|'completed',
                'StatusMessage': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for CreateInstanceExportTask.

        
        

        - **ExportTask** *(dict) --* 

          Information about the instance export task.

          
          

          - **Description** *(string) --* 

            A description of the resource being exported.

            
          

          - **ExportTaskId** *(string) --* 

            The ID of the export task.

            
          

          - **ExportToS3Task** *(dict) --* 

            Information about the export task.

            
            

            - **ContainerFormat** *(string) --* 

              The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

              
            

            - **DiskImageFormat** *(string) --* 

              The format for the exported image.

              
            

            - **S3Bucket** *(string) --* 

              The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account ``vm-import-export@amazon.com`` .

              
            

            - **S3Key** *(string) --* 

              The encryption key for your S3 bucket.

              
        
          

          - **InstanceExportDetails** *(dict) --* 

            Information about the instance to export.

            
            

            - **InstanceId** *(string) --* 

              The ID of the resource being exported.

              
            

            - **TargetEnvironment** *(string) --* 

              The target virtualization environment.

              
        
          

          - **State** *(string) --* 

            The state of the export task.

            
          

          - **StatusMessage** *(string) --* 

            The status message related to the export task.

            
      
    

  .. py:method:: create_internet_gateway(**kwargs)

    

    Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using  AttachInternetGateway .

     

    For more information about your VPC and Internet gateway, see the `Amazon Virtual Private Cloud User Guide <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.create_internet_gateway(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InternetGateway': {
                'Attachments': [
                    {
                        'State': 'attaching'|'attached'|'detaching'|'detached',
                        'VpcId': 'string'
                    },
                ],
                'InternetGatewayId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateInternetGateway.

        
        

        - **InternetGateway** *(dict) --* 

          Information about the Internet gateway.

          
          

          - **Attachments** *(list) --* 

            Any VPCs attached to the Internet gateway.

            
            

            - *(dict) --* 

              Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.

              
              

              - **State** *(string) --* 

                The current state of the attachment.

                
              

              - **VpcId** *(string) --* 

                The ID of the VPC.

                
          
        
          

          - **InternetGatewayId** *(string) --* 

            The ID of the Internet gateway.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the Internet gateway.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

    **Examples** 

    This example creates an Internet gateway.
    ::

      response = client.create_internet_gateway(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'InternetGateway': {
              'Attachments': [
              ],
              'InternetGatewayId': 'igw-c0a643a9',
              'Tags': [
              ],
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_key_pair(**kwargs)

    

    Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

     

    You can have up to five thousand key pairs per region.

     

    The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use  ImportKeyPair .

     

    For more information about key pairs, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair>`_    


    **Request Syntax** 
    ::

      response = client.create_key_pair(
          KeyName='string',
          DryRun=True|False
      )
    :type KeyName: string
    :param KeyName: **[REQUIRED]** 

      A unique name for the key pair.

       

      Constraints: Up to 255 ASCII characters

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'KeyFingerprint': 'string',
            'KeyMaterial': 'string',
            'KeyName': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes a key pair.

        
        

        - **KeyFingerprint** *(string) --* 

          The SHA-1 digest of the DER encoded private key.

          
        

        - **KeyMaterial** *(string) --* 

          An unencrypted PEM encoded RSA private key.

          
        

        - **KeyName** *(string) --* 

          The name of the key pair.

          
    

    **Examples** 

    This example creates a key pair named my-key-pair.
    ::

      response = client.create_key_pair(
          KeyName='my-key-pair',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_nat_gateway(**kwargs)

    

    Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see `NAT Gateways <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway>`_    


    **Request Syntax** 
    ::

      response = client.create_nat_gateway(
          AllocationId='string',
          ClientToken='string',
          SubnetId='string'
      )
    :type AllocationId: string
    :param AllocationId: **[REQUIRED]** 

      The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

       

      Constraint: Maximum 64 ASCII characters.

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The subnet in which to create the NAT gateway.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ClientToken': 'string',
            'NatGateway': {
                'CreateTime': datetime(2015, 1, 1),
                'DeleteTime': datetime(2015, 1, 1),
                'FailureCode': 'string',
                'FailureMessage': 'string',
                'NatGatewayAddresses': [
                    {
                        'AllocationId': 'string',
                        'NetworkInterfaceId': 'string',
                        'PrivateIp': 'string',
                        'PublicIp': 'string'
                    },
                ],
                'NatGatewayId': 'string',
                'ProvisionedBandwidth': {
                    'ProvisionTime': datetime(2015, 1, 1),
                    'Provisioned': 'string',
                    'RequestTime': datetime(2015, 1, 1),
                    'Requested': 'string',
                    'Status': 'string'
                },
                'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
                'SubnetId': 'string',
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateNatGateway.

        
        

        - **ClientToken** *(string) --* 

          Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

          
        

        - **NatGateway** *(dict) --* 

          Information about the NAT gateway.

          
          

          - **CreateTime** *(datetime) --* 

            The date and time the NAT gateway was created.

            
          

          - **DeleteTime** *(datetime) --* 

            The date and time the NAT gateway was deleted, if applicable.

            
          

          - **FailureCode** *(string) --* 

            If the NAT gateway could not be created, specifies the error code for the failure. (``InsufficientFreeAddressesInSubnet`` | ``Gateway.NotAttached`` | ``InvalidAllocationID.NotFound`` | ``Resource.AlreadyAssociated`` | ``InternalError`` | ``InvalidSubnetID.NotFound`` )

            
          

          - **FailureMessage** *(string) --* 

            If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

             

             
            * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway" 
             
            * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached" 
             
            * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway" 
             
            * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated" 
             
            * For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again." 
             
            * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found." 
             

            
          

          - **NatGatewayAddresses** *(list) --* 

            Information about the IP addresses and network interface associated with the NAT gateway.

            
            

            - *(dict) --* 

              Describes the IP addresses and network interface associated with a NAT gateway.

              
              

              - **AllocationId** *(string) --* 

                The allocation ID of the Elastic IP address that's associated with the NAT gateway.

                
              

              - **NetworkInterfaceId** *(string) --* 

                The ID of the network interface associated with the NAT gateway.

                
              

              - **PrivateIp** *(string) --* 

                The private IP address associated with the Elastic IP address.

                
              

              - **PublicIp** *(string) --* 

                The Elastic IP address associated with the NAT gateway.

                
          
        
          

          - **NatGatewayId** *(string) --* 

            The ID of the NAT gateway.

            
          

          - **ProvisionedBandwidth** *(dict) --* 

            Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

            
            

            - **ProvisionTime** *(datetime) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
            

            - **Provisioned** *(string) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
            

            - **RequestTime** *(datetime) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
            

            - **Requested** *(string) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
            

            - **Status** *(string) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
        
          

          - **State** *(string) --* 

            The state of the NAT gateway.

             

             
            * ``pending`` : The NAT gateway is being created and is not ready to process traffic. 
             
            * ``failed`` : The NAT gateway could not be created. Check the ``failureCode`` and ``failureMessage`` fields for the reason. 
             
            * ``available`` : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway. 
             
            * ``deleting`` : The NAT gateway is in the process of being terminated and may still be processing traffic. 
             
            * ``deleted`` : The NAT gateway has been terminated and is no longer processing traffic. 
             

            
          

          - **SubnetId** *(string) --* 

            The ID of the subnet in which the NAT gateway is located.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC in which the NAT gateway is located.

            
      
    

    **Examples** 

    This example creates a NAT gateway in subnet subnet-1a2b3c4d and associates an Elastic IP address with the allocation ID eipalloc-37fc1a52 with the NAT gateway.
    ::

      response = client.create_nat_gateway(
          AllocationId='eipalloc-37fc1a52',
          SubnetId='subnet-1a2b3c4d',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NatGateway': {
              'CreateTime': datetime(2015, 12, 17, 12, 45, 26, 3, 351, 0),
              'NatGatewayAddresses': [
                  {
                      'AllocationId': 'eipalloc-37fc1a52',
                  },
              ],
              'NatGatewayId': 'nat-08d48af2a8e83edfd',
              'State': 'pending',
              'SubnetId': 'subnet-1a2b3c4d',
              'VpcId': 'vpc-1122aabb',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_network_acl(**kwargs)

    

    Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl>`_    


    **Request Syntax** 
    ::

      response = client.create_network_acl(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkAcl': {
                'Associations': [
                    {
                        'NetworkAclAssociationId': 'string',
                        'NetworkAclId': 'string',
                        'SubnetId': 'string'
                    },
                ],
                'Entries': [
                    {
                        'CidrBlock': 'string',
                        'Egress': True|False,
                        'IcmpTypeCode': {
                            'Code': 123,
                            'Type': 123
                        },
                        'Ipv6CidrBlock': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'allow'|'deny',
                        'RuleNumber': 123
                    },
                ],
                'IsDefault': True|False,
                'NetworkAclId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateNetworkAcl.

        
        

        - **NetworkAcl** *(dict) --* 

          Information about the network ACL.

          
          

          - **Associations** *(list) --* 

            Any associations between the network ACL and one or more subnets

            
            

            - *(dict) --* 

              Describes an association between a network ACL and a subnet.

              
              

              - **NetworkAclAssociationId** *(string) --* 

                The ID of the association between a network ACL and a subnet.

                
              

              - **NetworkAclId** *(string) --* 

                The ID of the network ACL.

                
              

              - **SubnetId** *(string) --* 

                The ID of the subnet.

                
          
        
          

          - **Entries** *(list) --* 

            One or more entries (rules) in the network ACL.

            
            

            - *(dict) --* 

              Describes an entry in a network ACL.

              
              

              - **CidrBlock** *(string) --* 

                The IPv4 network range to allow or deny, in CIDR notation.

                
              

              - **Egress** *(boolean) --* 

                Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

                
              

              - **IcmpTypeCode** *(dict) --* 

                ICMP protocol: The ICMP type and code.

                
                

                - **Code** *(integer) --* 

                  The ICMP code. A value of -1 means all codes for the specified ICMP type.

                  
                

                - **Type** *(integer) --* 

                  The ICMP type. A value of -1 means all types.

                  
            
              

              - **Ipv6CidrBlock** *(string) --* 

                The IPv6 network range to allow or deny, in CIDR notation.

                
              

              - **PortRange** *(dict) --* 

                TCP or UDP protocols: The range of ports the rule applies to.

                
                

                - **From** *(integer) --* 

                  The first port in the range.

                  
                

                - **To** *(integer) --* 

                  The last port in the range.

                  
            
              

              - **Protocol** *(string) --* 

                The protocol. A value of ``-1`` means all protocols.

                
              

              - **RuleAction** *(string) --* 

                Indicates whether to allow or deny the traffic that matches the rule.

                
              

              - **RuleNumber** *(integer) --* 

                The rule number for the entry. ACL entries are processed in ascending order by rule number.

                
          
        
          

          - **IsDefault** *(boolean) --* 

            Indicates whether this is the default network ACL for the VPC.

            
          

          - **NetworkAclId** *(string) --* 

            The ID of the network ACL.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the network ACL.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcId** *(string) --* 

            The ID of the VPC for the network ACL.

            
      
    

    **Examples** 

    This example creates a network ACL for the specified VPC.
    ::

      response = client.create_network_acl(
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NetworkAcl': {
              'Associations': [
              ],
              'Entries': [
                  {
                      'CidrBlock': '0.0.0.0/0',
                      'Egress': True,
                      'Protocol': '-1',
                      'RuleAction': 'deny',
                      'RuleNumber': 32767,
                  },
                  {
                      'CidrBlock': '0.0.0.0/0',
                      'Egress': False,
                      'Protocol': '-1',
                      'RuleAction': 'deny',
                      'RuleNumber': 32767,
                  },
              ],
              'IsDefault': False,
              'NetworkAclId': 'acl-5fb85d36',
              'Tags': [
              ],
              'VpcId': 'vpc-a01106c2',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_network_acl_entry(**kwargs)

    

    Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

     

    We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

     

    After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = client.create_network_acl_entry(
          CidrBlock='string',
          DryRun=True|False,
          Egress=True|False,
          IcmpTypeCode={
              'Code': 123,
              'Type': 123
          },
          Ipv6CidrBlock='string',
          NetworkAclId='string',
          PortRange={
              'From': 123,
              'To': 123
          },
          Protocol='string',
          RuleAction='allow'|'deny',
          RuleNumber=123
      )
    :type CidrBlock: string
    :param CidrBlock: 

      The IPv4 network range to allow or deny, in CIDR notation (for example ``172.16.0.0/24`` ).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

      

    
    :type IcmpTypeCode: dict
    :param IcmpTypeCode: 

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      

    
      - **Code** *(integer) --* 

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

        

      
      - **Type** *(integer) --* 

        The ICMP type. A value of -1 means all types.

        

      
    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range to allow or deny, in CIDR notation (for example ``2001:db8:1234:1a00::/64`` ).

      

    
    :type NetworkAclId: string
    :param NetworkAclId: **[REQUIRED]** 

      The ID of the network ACL.

      

    
    :type PortRange: dict
    :param PortRange: 

      TCP or UDP protocols: The range of ports the rule applies to.

      

    
      - **From** *(integer) --* 

        The first port in the range.

        

      
      - **To** *(integer) --* 

        The last port in the range.

        

      
    
    :type Protocol: string
    :param Protocol: **[REQUIRED]** 

      The protocol. A value of ``-1`` or ``all`` means all protocols. If you specify ``all`` , ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , or ``icmp`` , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

      

    
    :type RuleAction: string
    :param RuleAction: **[REQUIRED]** 

      Indicates whether to allow or deny the traffic that matches the rule.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

       

      Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

      

    
    
    :returns: None

    **Examples** 

    This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet.
    ::

      response = client.create_network_acl_entry(
          CidrBlock='0.0.0.0/0',
          Egress=False,
          NetworkAclId='acl-5fb85d36',
          PortRange={
              'From': 53,
              'To': 53,
          },
          Protocol='udp',
          RuleAction='allow',
          RuleNumber=100,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_network_interface(**kwargs)

    

    Creates a network interface in the specified subnet.

     

    For more information about network interfaces, see `Elastic Network Interfaces <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = client.create_network_interface(
          Description='string',
          DryRun=True|False,
          Groups=[
              'string',
          ],
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          PrivateIpAddress='string',
          PrivateIpAddresses=[
              {
                  'Primary': True|False,
                  'PrivateIpAddress': 'string'
              },
          ],
          SecondaryPrivateIpAddressCount=123,
          SubnetId='string'
      )
    :type Description: string
    :param Description: 

      A description for the network interface.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: 

      The IDs of one or more security groups.

      

    
      - *(string) --* 

      
  
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the ``AssignIpv6AddressOnCreation`` attribute set to ``true`` , you can specify ``0`` to override this setting.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in ``privateIpAddresses`` as primary (only one IP address can be designated as primary).

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: 

      One or more private IPv4 addresses.

      

    
      - *(dict) --* 

        Describes a secondary private IPv4 address for a network interface.

        

      
        - **Primary** *(boolean) --* 

          Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          

        
        - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

          The private IPv4 addresses.

          

        
      
  
    :type SecondaryPrivateIpAddressCount: integer
    :param SecondaryPrivateIpAddressCount: 

      The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using ``privateIpAddresses`` .

       

      The number of IP addresses you can assign to a network interface varies by instance type. For more information, see `IP Addresses Per ENI Per Instance Type <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet to associate with the network interface.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkInterface': {
                'Association': {
                    'AllocationId': 'string',
                    'AssociationId': 'string',
                    'IpOwnerId': 'string',
                    'PublicDnsName': 'string',
                    'PublicIp': 'string'
                },
                'Attachment': {
                    'AttachTime': datetime(2015, 1, 1),
                    'AttachmentId': 'string',
                    'DeleteOnTermination': True|False,
                    'DeviceIndex': 123,
                    'InstanceId': 'string',
                    'InstanceOwnerId': 'string',
                    'Status': 'attaching'|'attached'|'detaching'|'detached'
                },
                'AvailabilityZone': 'string',
                'Description': 'string',
                'Groups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'InterfaceType': 'interface'|'natGateway',
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'MacAddress': 'string',
                'NetworkInterfaceId': 'string',
                'OwnerId': 'string',
                'PrivateDnsName': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddresses': [
                    {
                        'Association': {
                            'AllocationId': 'string',
                            'AssociationId': 'string',
                            'IpOwnerId': 'string',
                            'PublicDnsName': 'string',
                            'PublicIp': 'string'
                        },
                        'Primary': True|False,
                        'PrivateDnsName': 'string',
                        'PrivateIpAddress': 'string'
                    },
                ],
                'RequesterId': 'string',
                'RequesterManaged': True|False,
                'SourceDestCheck': True|False,
                'Status': 'available'|'attaching'|'in-use'|'detaching',
                'SubnetId': 'string',
                'TagSet': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateNetworkInterface.

        
        

        - **NetworkInterface** *(dict) --* 

          Information about the network interface.

          
          

          - **Association** *(dict) --* 

            The association information for an Elastic IP address (IPv4) associated with the network interface.

            
            

            - **AllocationId** *(string) --* 

              The allocation ID.

              
            

            - **AssociationId** *(string) --* 

              The association ID.

              
            

            - **IpOwnerId** *(string) --* 

              The ID of the Elastic IP address owner.

              
            

            - **PublicDnsName** *(string) --* 

              The public DNS name.

              
            

            - **PublicIp** *(string) --* 

              The address of the Elastic IP address bound to the network interface.

              
        
          

          - **Attachment** *(dict) --* 

            The network interface attachment.

            
            

            - **AttachTime** *(datetime) --* 

              The timestamp indicating when the attachment initiated.

              
            

            - **AttachmentId** *(string) --* 

              The ID of the network interface attachment.

              
            

            - **DeleteOnTermination** *(boolean) --* 

              Indicates whether the network interface is deleted when the instance is terminated.

              
            

            - **DeviceIndex** *(integer) --* 

              The device index of the network interface attachment on the instance.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceOwnerId** *(string) --* 

              The AWS account ID of the owner of the instance.

              
            

            - **Status** *(string) --* 

              The attachment state.

              
        
          

          - **AvailabilityZone** *(string) --* 

            The Availability Zone.

            
          

          - **Description** *(string) --* 

            A description.

            
          

          - **Groups** *(list) --* 

            Any security groups for the network interface.

            
            

            - *(dict) --* 

              Describes a security group.

              
              

              - **GroupName** *(string) --* 

                The name of the security group.

                
              

              - **GroupId** *(string) --* 

                The ID of the security group.

                
          
        
          

          - **InterfaceType** *(string) --* 

            The type of interface.

            
          

          - **Ipv6Addresses** *(list) --* 

            The IPv6 addresses associated with the network interface.

            
            

            - *(dict) --* 

              Describes an IPv6 address associated with a network interface.

              
              

              - **Ipv6Address** *(string) --* 

                The IPv6 address.

                
          
        
          

          - **MacAddress** *(string) --* 

            The MAC address.

            
          

          - **NetworkInterfaceId** *(string) --* 

            The ID of the network interface.

            
          

          - **OwnerId** *(string) --* 

            The AWS account ID of the owner of the network interface.

            
          

          - **PrivateDnsName** *(string) --* 

            The private DNS name.

            
          

          - **PrivateIpAddress** *(string) --* 

            The IPv4 address of the network interface within the subnet.

            
          

          - **PrivateIpAddresses** *(list) --* 

            The private IPv4 addresses associated with the network interface.

            
            

            - *(dict) --* 

              Describes the private IPv4 address of a network interface.

              
              

              - **Association** *(dict) --* 

                The association information for an Elastic IP address (IPv4) associated with the network interface.

                
                

                - **AllocationId** *(string) --* 

                  The allocation ID.

                  
                

                - **AssociationId** *(string) --* 

                  The association ID.

                  
                

                - **IpOwnerId** *(string) --* 

                  The ID of the Elastic IP address owner.

                  
                

                - **PublicDnsName** *(string) --* 

                  The public DNS name.

                  
                

                - **PublicIp** *(string) --* 

                  The address of the Elastic IP address bound to the network interface.

                  
            
              

              - **Primary** *(boolean) --* 

                Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

                
              

              - **PrivateDnsName** *(string) --* 

                The private DNS name.

                
              

              - **PrivateIpAddress** *(string) --* 

                The private IPv4 address.

                
          
        
          

          - **RequesterId** *(string) --* 

            The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).

            
          

          - **RequesterManaged** *(boolean) --* 

            Indicates whether the network interface is being managed by AWS.

            
          

          - **SourceDestCheck** *(boolean) --* 

            Indicates whether traffic to or from the instance is validated.

            
          

          - **Status** *(string) --* 

            The status of the network interface.

            
          

          - **SubnetId** *(string) --* 

            The ID of the subnet.

            
          

          - **TagSet** *(list) --* 

            Any tags assigned to the network interface.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcId** *(string) --* 

            The ID of the VPC.

            
      
    

    **Examples** 

    This example creates a network interface for the specified subnet.
    ::

      response = client.create_network_interface(
          Description='my network interface',
          Groups=[
              'sg-903004f8',
          ],
          PrivateIpAddress='10.0.2.17',
          SubnetId='subnet-9d4a7b6c',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NetworkInterface': {
              'AvailabilityZone': 'us-east-1d',
              'Description': 'my network interface',
              'Groups': [
                  {
                      'GroupId': 'sg-903004f8',
                      'GroupName': 'default',
                  },
              ],
              'MacAddress': '02:1a:80:41:52:9c',
              'NetworkInterfaceId': 'eni-e5aa89a3',
              'OwnerId': '123456789012',
              'PrivateIpAddress': '10.0.2.17',
              'PrivateIpAddresses': [
                  {
                      'Primary': True,
                      'PrivateIpAddress': '10.0.2.17',
                  },
              ],
              'RequesterManaged': False,
              'SourceDestCheck': True,
              'Status': 'pending',
              'SubnetId': 'subnet-9d4a7b6c',
              'TagSet': [
              ],
              'VpcId': 'vpc-a01106c2',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_network_interface_permission(**kwargs)

    

    Grants an AWS authorized partner account permission to attach the specified network interface to an instance in their account.

     

    You can grant permission to a single AWS account only, and only one account at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission>`_    


    **Request Syntax** 
    ::

      response = client.create_network_interface_permission(
          NetworkInterfaceId='string',
          AwsAccountId='string',
          AwsService='string',
          Permission='INSTANCE-ATTACH'|'EIP-ASSOCIATE',
          DryRun=True|False
      )
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    :type AwsAccountId: string
    :param AwsAccountId: 

      The AWS account ID.

      

    
    :type AwsService: string
    :param AwsService: 

      The AWS service. Currently not supported.

      

    
    :type Permission: string
    :param Permission: **[REQUIRED]** 

      The type of permission to grant.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InterfacePermission': {
                'NetworkInterfacePermissionId': 'string',
                'NetworkInterfaceId': 'string',
                'AwsAccountId': 'string',
                'AwsService': 'string',
                'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
                'PermissionState': {
                    'State': 'pending'|'granted'|'revoking'|'revoked',
                    'StatusMessage': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateNetworkInterfacePermission.

        
        

        - **InterfacePermission** *(dict) --* 

          Information about the permission for the network interface.

          
          

          - **NetworkInterfacePermissionId** *(string) --* 

            The ID of the network interface permission.

            
          

          - **NetworkInterfaceId** *(string) --* 

            The ID of the network interface.

            
          

          - **AwsAccountId** *(string) --* 

            The AWS account ID.

            
          

          - **AwsService** *(string) --* 

            The AWS service.

            
          

          - **Permission** *(string) --* 

            The type of permission.

            
          

          - **PermissionState** *(dict) --* 

            Information about the state of the permission.

            
            

            - **State** *(string) --* 

              The state of the permission.

              
            

            - **StatusMessage** *(string) --* 

              A status message, if applicable.

              
        
      
    

  .. py:method:: create_placement_group(**kwargs)

    

    Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.

     

    For more information about placement groups and cluster instances, see `Cluster Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup>`_    


    **Request Syntax** 
    ::

      response = client.create_placement_group(
          DryRun=True|False,
          GroupName='string',
          Strategy='cluster'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      A name for the placement group.

       

      Constraints: Up to 255 ASCII characters

      

    
    :type Strategy: string
    :param Strategy: **[REQUIRED]** 

      The placement strategy.

      

    
    
    :returns: None

    **Examples** 

    This example creates a placement group with the specified name.
    ::

      response = client.create_placement_group(
          GroupName='my-cluster',
          Strategy='cluster',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_reserved_instances_listing(**kwargs)

    

    Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the  DescribeReservedInstances operation.

     

    .. note::

       

      Only Standard Reserved Instances with a capacity reservation can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances and Standard Reserved Instances with a regional benefit cannot be sold.

       

     

    The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

     

    To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the  DescribeReservedInstancesListings operation.

     

    For more information, see `Reserved Instance Marketplace <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing>`_    


    **Request Syntax** 
    ::

      response = client.create_reserved_instances_listing(
          ClientToken='string',
          InstanceCount=123,
          PriceSchedules=[
              {
                  'CurrencyCode': 'USD',
                  'Price': 123.0,
                  'Term': 123
              },
          ],
          ReservedInstancesId='string'
      )
    :type ClientToken: string
    :param ClientToken: **[REQUIRED]** 

      Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

      

    
    :type InstanceCount: integer
    :param InstanceCount: **[REQUIRED]** 

      The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.

      

    
    :type PriceSchedules: list
    :param PriceSchedules: **[REQUIRED]** 

      A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.

      

    
      - *(dict) --* 

        Describes the price for a Reserved Instance.

        

      
        - **CurrencyCode** *(string) --* 

          The currency for transacting the Reserved Instance resale. At this time, the only supported currency is ``USD`` .

          

        
        - **Price** *(float) --* 

          The fixed price for the term.

          

        
        - **Term** *(integer) --* 

          The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

          

        
      
  
    :type ReservedInstancesId: string
    :param ReservedInstancesId: **[REQUIRED]** 

      The ID of the active Standard Reserved Instance.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesListings': [
                {
                    'ClientToken': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'InstanceCounts': [
                        {
                            'InstanceCount': 123,
                            'State': 'available'|'sold'|'cancelled'|'pending'
                        },
                    ],
                    'PriceSchedules': [
                        {
                            'Active': True|False,
                            'CurrencyCode': 'USD',
                            'Price': 123.0,
                            'Term': 123
                        },
                    ],
                    'ReservedInstancesId': 'string',
                    'ReservedInstancesListingId': 'string',
                    'Status': 'active'|'pending'|'cancelled'|'closed',
                    'StatusMessage': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'UpdateDate': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateReservedInstancesListing.

        
        

        - **ReservedInstancesListings** *(list) --* 

          Information about the Standard Reserved Instance listing.

          
          

          - *(dict) --* 

            Describes a Reserved Instance listing.

            
            

            - **ClientToken** *(string) --* 

              A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

              
            

            - **CreateDate** *(datetime) --* 

              The time the listing was created.

              
            

            - **InstanceCounts** *(list) --* 

              The number of instances in this state.

              
              

              - *(dict) --* 

                Describes a Reserved Instance listing state.

                
                

                - **InstanceCount** *(integer) --* 

                  The number of listed Reserved Instances in the state specified by the ``state`` .

                  
                

                - **State** *(string) --* 

                  The states of the listed Reserved Instances.

                  
            
          
            

            - **PriceSchedules** *(list) --* 

              The price of the Reserved Instance listing.

              
              

              - *(dict) --* 

                Describes the price for a Reserved Instance.

                
                

                - **Active** *(boolean) --* 

                  The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

                   

                  A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

                  
                

                - **CurrencyCode** *(string) --* 

                  The currency for transacting the Reserved Instance resale. At this time, the only supported currency is ``USD`` .

                  
                

                - **Price** *(float) --* 

                  The fixed price for the term.

                  
                

                - **Term** *(integer) --* 

                  The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

                  
            
          
            

            - **ReservedInstancesId** *(string) --* 

              The ID of the Reserved Instance.

              
            

            - **ReservedInstancesListingId** *(string) --* 

              The ID of the Reserved Instance listing.

              
            

            - **Status** *(string) --* 

              The status of the Reserved Instance listing.

              
            

            - **StatusMessage** *(string) --* 

              The reason for the current status of the Reserved Instance listing. The response can be blank.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **UpdateDate** *(datetime) --* 

              The last modified timestamp of the listing.

              
        
      
    

  .. py:method:: create_route(**kwargs)

    

    Creates a route in a route table within a VPC.

     

    You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.

     

    When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address ``192.0.2.3`` , and the route table includes the following two IPv4 routes:

     

     
    * ``192.0.2.0/24`` (goes to some target A) 
     
    * ``192.0.2.0/28`` (goes to some target B) 
     

     

    Both routes apply to the traffic destined for ``192.0.2.3`` . However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute>`_    


    **Request Syntax** 
    ::

      response = client.create_route(
          DestinationCidrBlock='string',
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          EgressOnlyInternetGatewayId='string',
          GatewayId='string',
          InstanceId='string',
          NatGatewayId='string',
          NetworkInterfaceId='string',
          RouteTableId='string',
          VpcPeeringConnectionId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: 

      The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match.

      

    
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayId: string
    :param EgressOnlyInternetGatewayId: 

      [IPv6 traffic only] The ID of an egress-only Internet gateway.

      

    
    :type GatewayId: string
    :param GatewayId: 

      The ID of an Internet gateway or virtual private gateway attached to your VPC.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

      

    
    :type NatGatewayId: string
    :param NatGatewayId: 

      [IPv4 traffic only] The ID of a NAT gateway.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      The ID of a network interface.

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table for the route.

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: 

      The ID of a VPC peering connection.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateRoute.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

    **Examples** 

    This example creates a route for the specified route table. The route matches all traffic (0.0.0.0/0) and routes it to the specified Internet gateway.
    ::

      response = client.create_route(
          DestinationCidrBlock='0.0.0.0/0',
          GatewayId='igw-c0a643a9',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_route_table(**kwargs)

    

    Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable>`_    


    **Request Syntax** 
    ::

      response = client.create_route_table(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'RouteTable': {
                'Associations': [
                    {
                        'Main': True|False,
                        'RouteTableAssociationId': 'string',
                        'RouteTableId': 'string',
                        'SubnetId': 'string'
                    },
                ],
                'PropagatingVgws': [
                    {
                        'GatewayId': 'string'
                    },
                ],
                'RouteTableId': 'string',
                'Routes': [
                    {
                        'DestinationCidrBlock': 'string',
                        'DestinationIpv6CidrBlock': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'InstanceOwnerId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'CreateRouteTable'|'CreateRoute'|'EnableVgwRoutePropagation',
                        'State': 'active'|'blackhole',
                        'VpcPeeringConnectionId': 'string'
                    },
                ],
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateRouteTable.

        
        

        - **RouteTable** *(dict) --* 

          Information about the route table.

          
          

          - **Associations** *(list) --* 

            The associations between the route table and one or more subnets.

            
            

            - *(dict) --* 

              Describes an association between a route table and a subnet.

              
              

              - **Main** *(boolean) --* 

                Indicates whether this is the main route table.

                
              

              - **RouteTableAssociationId** *(string) --* 

                The ID of the association between a route table and a subnet.

                
              

              - **RouteTableId** *(string) --* 

                The ID of the route table.

                
              

              - **SubnetId** *(string) --* 

                The ID of the subnet. A subnet ID is not returned for an implicit association.

                
          
        
          

          - **PropagatingVgws** *(list) --* 

            Any virtual private gateway (VGW) propagating routes.

            
            

            - *(dict) --* 

              Describes a virtual private gateway propagating route.

              
              

              - **GatewayId** *(string) --* 

                The ID of the virtual private gateway (VGW).

                
          
        
          

          - **RouteTableId** *(string) --* 

            The ID of the route table.

            
          

          - **Routes** *(list) --* 

            The routes in the route table.

            
            

            - *(dict) --* 

              Describes a route in a route table.

              
              

              - **DestinationCidrBlock** *(string) --* 

                The IPv4 CIDR block used for the destination match.

                
              

              - **DestinationIpv6CidrBlock** *(string) --* 

                The IPv6 CIDR block used for the destination match.

                
              

              - **DestinationPrefixListId** *(string) --* 

                The prefix of the AWS service.

                
              

              - **EgressOnlyInternetGatewayId** *(string) --* 

                The ID of the egress-only Internet gateway.

                
              

              - **GatewayId** *(string) --* 

                The ID of a gateway attached to your VPC.

                
              

              - **InstanceId** *(string) --* 

                The ID of a NAT instance in your VPC.

                
              

              - **InstanceOwnerId** *(string) --* 

                The AWS account ID of the owner of the instance.

                
              

              - **NatGatewayId** *(string) --* 

                The ID of a NAT gateway.

                
              

              - **NetworkInterfaceId** *(string) --* 

                The ID of the network interface.

                
              

              - **Origin** *(string) --* 

                Describes how the route was created.

                 

                 
                * ``CreateRouteTable`` - The route was automatically created when the route table was created. 
                 
                * ``CreateRoute`` - The route was manually added to the route table. 
                 
                * ``EnableVgwRoutePropagation`` - The route was propagated by route propagation. 
                 

                
              

              - **State** *(string) --* 

                The state of the route. The ``blackhole`` state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

                
              

              - **VpcPeeringConnectionId** *(string) --* 

                The ID of the VPC peering connection.

                
          
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the route table.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcId** *(string) --* 

            The ID of the VPC.

            
      
    

    **Examples** 

    This example creates a route table for the specified VPC.
    ::

      response = client.create_route_table(
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'RouteTable': {
              'Associations': [
              ],
              'PropagatingVgws': [
              ],
              'RouteTableId': 'rtb-22574640',
              'Routes': [
                  {
                      'DestinationCidrBlock': '10.0.0.0/16',
                      'GatewayId': 'local',
                      'State': 'active',
                  },
              ],
              'Tags': [
              ],
              'VpcId': 'vpc-a01106c2',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_security_group(**kwargs)

    

    Creates a security group.

     

    A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see `Amazon EC2 Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ in the *Amazon Elastic Compute Cloud User Guide* and `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    .. warning::

       

      EC2-Classic: You can have up to 500 security groups.

       

      EC2-VPC: You can create up to 500 security groups per VPC.

       

     

    When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

     

    You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

     

    You can add or remove rules from your security groups using  AuthorizeSecurityGroupIngress ,  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupIngress , and  RevokeSecurityGroupEgress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup>`_    


    **Request Syntax** 
    ::

      response = client.create_security_group(
          Description='string',
          GroupName='string',
          VpcId='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: **[REQUIRED]** 

      A description for the security group. This is informational only.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      The name of the security group.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type VpcId: string
    :param VpcId: 

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'GroupId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateSecurityGroup.

        
        

        - **GroupId** *(string) --* 

          The ID of the security group.

          
    

  .. py:method:: create_snapshot(**kwargs)

    

    Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

     

    When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

     

    You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is ``pending`` .

     

    To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

     

    Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

     

    For more information, see `Amazon Elastic Block Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html>`_ and `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot>`_    


    **Request Syntax** 
    ::

      response = client.create_snapshot(
          Description='string',
          VolumeId='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: 

      A description for the snapshot.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the EBS volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'DataEncryptionKeyId': 'string',
            'Description': 'string',
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'OwnerId': 'string',
            'Progress': 'string',
            'SnapshotId': 'string',
            'StartTime': datetime(2015, 1, 1),
            'State': 'pending'|'completed'|'error',
            'StateMessage': 'string',
            'VolumeId': 'string',
            'VolumeSize': 123,
            'OwnerAlias': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes a snapshot.

        
        

        - **DataEncryptionKeyId** *(string) --* 

          The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the  DescribeSnapshots API operation.

          
        

        - **Description** *(string) --* 

          The description for the snapshot.

          
        

        - **Encrypted** *(boolean) --* 

          Indicates whether the snapshot is encrypted.

          
        

        - **KmsKeyId** *(string) --* 

          The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.

          
        

        - **OwnerId** *(string) --* 

          The AWS account ID of the EBS snapshot owner.

          
        

        - **Progress** *(string) --* 

          The progress of the snapshot, as a percentage.

          
        

        - **SnapshotId** *(string) --* 

          The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

          
        

        - **StartTime** *(datetime) --* 

          The time stamp when the snapshot was initiated.

          
        

        - **State** *(string) --* 

          The snapshot state.

          
        

        - **StateMessage** *(string) --* 

          Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the  DescribeSnapshots API operation.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume that was used to create the snapshot. Snapshots created by the  CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

          
        

        - **VolumeSize** *(integer) --* 

          The size of the volume, in GiB.

          
        

        - **OwnerAlias** *(string) --* 

          Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 

          
        

        - **Tags** *(list) --* 

          Any tags assigned to the snapshot.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              
            

            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              
        
      
    

    **Examples** 

    This example creates a snapshot of the volume with a volume ID of ``vol-1234567890abcdef0`` and a short description to identify the snapshot.
    ::

      response = client.create_snapshot(
          Description='This is my root volume snapshot.',
          VolumeId='vol-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Description': 'This is my root volume snapshot.',
          'OwnerId': '012345678910',
          'SnapshotId': 'snap-066877671789bd71b',
          'StartTime': datetime(2014, 2, 28, 21, 6, 1, 4, 59, 0),
          'State': 'pending',
          'Tags': [
          ],
          'VolumeId': 'vol-1234567890abcdef0',
          'VolumeSize': 8,
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_spot_datafeed_subscription(**kwargs)

    

    Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see `Spot Instance Data Feed <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription>`_    


    **Request Syntax** 
    ::

      response = client.create_spot_datafeed_subscription(
          Bucket='string',
          DryRun=True|False,
          Prefix='string'
      )
    :type Bucket: string
    :param Bucket: **[REQUIRED]** 

      The Amazon S3 bucket in which to store the Spot instance data feed.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Prefix: string
    :param Prefix: 

      A prefix for the data feed file names.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotDatafeedSubscription': {
                'Bucket': 'string',
                'Fault': {
                    'Code': 'string',
                    'Message': 'string'
                },
                'OwnerId': 'string',
                'Prefix': 'string',
                'State': 'Active'|'Inactive'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateSpotDatafeedSubscription.

        
        

        - **SpotDatafeedSubscription** *(dict) --* 

          The Spot instance data feed subscription.

          
          

          - **Bucket** *(string) --* 

            The Amazon S3 bucket where the Spot instance data feed is located.

            
          

          - **Fault** *(dict) --* 

            The fault codes for the Spot instance request, if any.

            
            

            - **Code** *(string) --* 

              The reason code for the Spot instance state change.

              
            

            - **Message** *(string) --* 

              The message for the Spot instance state change.

              
        
          

          - **OwnerId** *(string) --* 

            The AWS account ID of the account.

            
          

          - **Prefix** *(string) --* 

            The prefix that is prepended to data feed files.

            
          

          - **State** *(string) --* 

            The state of the Spot instance data feed subscription.

            
      
    

    **Examples** 

    This example creates a Spot Instance data feed for your AWS account.
    ::

      response = client.create_spot_datafeed_subscription(
          Bucket='my-s3-bucket',
          Prefix='spotdata',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotDatafeedSubscription': {
              'Bucket': 'my-s3-bucket',
              'OwnerId': '123456789012',
              'Prefix': 'spotdata',
              'State': 'Active',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_subnet(**kwargs)

    

    Creates a subnet in an existing VPC.

     

    When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).

     

    If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length. 

     

    .. warning::

       

      AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

       

     

    If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

     

    If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

     

    For more information about subnets, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet>`_    


    **Request Syntax** 
    ::

      response = client.create_subnet(
          AvailabilityZone='string',
          CidrBlock='string',
          Ipv6CidrBlock='string',
          VpcId='string',
          DryRun=True|False
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone for the subnet.

       

      Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.

      

    
    :type CidrBlock: string
    :param CidrBlock: **[REQUIRED]** 

      The IPv4 network range for the subnet, in CIDR notation. For example, ``10.0.0.0/24`` .

      

    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Subnet': {
                'AvailabilityZone': 'string',
                'AvailableIpAddressCount': 123,
                'CidrBlock': 'string',
                'DefaultForAz': True|False,
                'MapPublicIpOnLaunch': True|False,
                'State': 'pending'|'available',
                'SubnetId': 'string',
                'VpcId': 'string',
                'AssignIpv6AddressOnCreation': True|False,
                'Ipv6CidrBlockAssociationSet': [
                    {
                        'AssociationId': 'string',
                        'Ipv6CidrBlock': 'string',
                        'Ipv6CidrBlockState': {
                            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                            'StatusMessage': 'string'
                        }
                    },
                ],
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateSubnet.

        
        

        - **Subnet** *(dict) --* 

          Information about the subnet.

          
          

          - **AvailabilityZone** *(string) --* 

            The Availability Zone of the subnet.

            
          

          - **AvailableIpAddressCount** *(integer) --* 

            The number of unused private IPv4 addresses in the subnet. Note that the IPv4 addresses for any stopped instances are considered unavailable.

            
          

          - **CidrBlock** *(string) --* 

            The IPv4 CIDR block assigned to the subnet.

            
          

          - **DefaultForAz** *(boolean) --* 

            Indicates whether this is the default subnet for the Availability Zone.

            
          

          - **MapPublicIpOnLaunch** *(boolean) --* 

            Indicates whether instances launched in this subnet receive a public IPv4 address.

            
          

          - **State** *(string) --* 

            The current state of the subnet.

            
          

          - **SubnetId** *(string) --* 

            The ID of the subnet.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC the subnet is in.

            
          

          - **AssignIpv6AddressOnCreation** *(boolean) --* 

            Indicates whether a network interface created in this subnet (including a network interface created by  RunInstances ) receives an IPv6 address.

            
          

          - **Ipv6CidrBlockAssociationSet** *(list) --* 

            Information about the IPv6 CIDR blocks associated with the subnet.

            
            

            - *(dict) --* 

              Describes an IPv6 CIDR block associated with a subnet.

              
              

              - **AssociationId** *(string) --* 

                The association ID for the CIDR block.

                
              

              - **Ipv6CidrBlock** *(string) --* 

                The IPv6 CIDR block.

                
              

              - **Ipv6CidrBlockState** *(dict) --* 

                Information about the state of the CIDR block.

                
                

                - **State** *(string) --* 

                  The state of a CIDR block.

                  
                

                - **StatusMessage** *(string) --* 

                  A message about the status of the CIDR block, if applicable.

                  
            
          
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the subnet.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

    **Examples** 

    This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you.
    ::

      response = client.create_subnet(
          CidrBlock='10.0.1.0/24',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Subnet': {
              'AvailabilityZone': 'us-west-2c',
              'AvailableIpAddressCount': 251,
              'CidrBlock': '10.0.1.0/24',
              'State': 'pending',
              'SubnetId': 'subnet-9d4a7b6c',
              'VpcId': 'vpc-a01106c2',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      response = client.create_tags(
          DryRun=True|False,
          Resources=[
              'string',
          ],
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Resources: list
    :param Resources: **[REQUIRED]** 

      The IDs of one or more resources to tag. For example, ami-1a2b3c4d.

      

    
      - *(string) --* 

      
  
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :returns: None

    **Examples** 

    This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack.
    ::

      response = client.create_tags(
          Resources=[
              'ami-78a54011',
          ],
          Tags=[
              {
                  'Key': 'Stack',
                  'Value': 'production',
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_volume(**kwargs)

    

    Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see `Regions and Endpoints <http://docs.aws.amazon.com/general/latest/gr/rande.html>`_ .

     

    You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

     

    You can create encrypted volumes with the ``Encrypted`` parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    You can tag your volumes during creation. For more information, see `Tagging Your Amazon EC2 Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ .

     

    For more information, see `Creating an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume>`_    


    **Request Syntax** 
    ::

      response = client.create_volume(
          AvailabilityZone='string',
          Encrypted=True|False,
          Iops=123,
          KmsKeyId='string',
          Size=123,
          SnapshotId='string',
          VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
          DryRun=True|False,
          TagSpecifications=[
              {
                  'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ]
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: **[REQUIRED]** 

      The Availability Zone in which to create the volume. Use  DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

      

    
    :type Encrypted: boolean
    :param Encrypted: 

      Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type Iops: integer
    :param Iops: 

      Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB.

       

      Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes 

      

    
    :type KmsKeyId: string
    :param KmsKeyId: 

      The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the ``arn:aws:kms`` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the ``key`` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1* :*012345678910* :key/*abcd1234-a123-456a-a12b-a123b4cd56ef* . If a ``KmsKeyId`` is specified, the ``Encrypted`` flag must also be set.

      

    
    :type Size: integer
    :param Size: 

      The size of the volume, in GiBs.

       

      Constraints: 1-16384 for ``gp2`` , 4-16384 for ``io1`` , 500-16384 for ``st1`` , 500-16384 for ``sc1`` , and 1-1024 for ``standard`` . If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

       

      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

      

    
    :type SnapshotId: string
    :param SnapshotId: 

      The snapshot from which to create the volume.

      

    
    :type VolumeType: string
    :param VolumeType: 

      The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

       

      Default: ``standard``  

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type TagSpecifications: list
    :param TagSpecifications: 

      The tags to apply to the volume during creation.

      

    
      - *(dict) --* 

        The tags to apply to a resource when the resource is being created.

        

      
        - **ResourceType** *(string) --* 

          The type of resource to tag. Currently, the resource types that support tagging on creation are ``instance`` and ``volume`` . 

          

        
        - **Tags** *(list) --* 

          The tags to apply to the resource.

          

        
          - *(dict) --* 

            Describes a tag.

            

          
            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              

            
            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              

            
          
      
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Attachments': [
                {
                    'AttachTime': datetime(2015, 1, 1),
                    'Device': 'string',
                    'InstanceId': 'string',
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VolumeId': 'string',
                    'DeleteOnTermination': True|False
                },
            ],
            'AvailabilityZone': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'Size': 123,
            'SnapshotId': 'string',
            'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
            'VolumeId': 'string',
            'Iops': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes a volume.

        
        

        - **Attachments** *(list) --* 

          Information about the volume attachments.

          
          

          - *(dict) --* 

            Describes volume attachment details.

            
            

            - **AttachTime** *(datetime) --* 

              The time stamp when the attachment initiated.

              
            

            - **Device** *(string) --* 

              The device name.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **State** *(string) --* 

              The attachment state of the volume.

              
            

            - **VolumeId** *(string) --* 

              The ID of the volume.

              
            

            - **DeleteOnTermination** *(boolean) --* 

              Indicates whether the EBS volume is deleted on instance termination.

              
        
      
        

        - **AvailabilityZone** *(string) --* 

          The Availability Zone for the volume.

          
        

        - **CreateTime** *(datetime) --* 

          The time stamp when volume creation was initiated.

          
        

        - **Encrypted** *(boolean) --* 

          Indicates whether the volume will be encrypted.

          
        

        - **KmsKeyId** *(string) --* 

          The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

          
        

        - **Size** *(integer) --* 

          The size of the volume, in GiBs.

          
        

        - **SnapshotId** *(string) --* 

          The snapshot from which the volume was created, if applicable.

          
        

        - **State** *(string) --* 

          The volume state.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **Iops** *(integer) --* 

          The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

           

          Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for ``gp2`` volumes.

           

          Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

          
        

        - **Tags** *(list) --* 

          Any tags assigned to the volume.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              
            

            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              
        
      
        

        - **VolumeType** *(string) --* 

          The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

          
    

    **Examples** 

    This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone ``us-east-1a``.
    ::

      response = client.create_volume(
          AvailabilityZone='us-east-1a',
          Size=80,
          VolumeType='gp2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AvailabilityZone': 'us-east-1a',
          'CreateTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
          'Encrypted': False,
          'Iops': 240,
          'Size': 80,
          'SnapshotId': '',
          'State': 'creating',
          'VolumeId': 'vol-6b60b7c7',
          'VolumeType': 'gp2',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone ``us-east-1a``.
    ::

      response = client.create_volume(
          AvailabilityZone='us-east-1a',
          Iops=1000,
          SnapshotId='snap-066877671789bd71b',
          VolumeType='io1',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Attachments': [
          ],
          'AvailabilityZone': 'us-east-1a',
          'CreateTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
          'Iops': 1000,
          'Size': 500,
          'SnapshotId': 'snap-066877671789bd71b',
          'State': 'creating',
          'Tags': [
          ],
          'VolumeId': 'vol-1234567890abcdef0',
          'VolumeType': 'io1',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_vpc(**kwargs)

    

    Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.

     

    By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see `Dedicated Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc>`_    


    **Request Syntax** 
    ::

      response = client.create_vpc(
          CidrBlock='string',
          AmazonProvidedIpv6CidrBlock=True|False,
          DryRun=True|False,
          InstanceTenancy='default'|'dedicated'|'host'
      )
    :type CidrBlock: string
    :param CidrBlock: **[REQUIRED]** 

      The IPv4 network range for the VPC, in CIDR notation. For example, ``10.0.0.0/16`` .

      

    
    :type AmazonProvidedIpv6CidrBlock: boolean
    :param AmazonProvidedIpv6CidrBlock: 

      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceTenancy: string
    :param InstanceTenancy: 

      The tenancy options for instances launched into the VPC. For ``default`` , instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For ``dedicated`` , instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of ``dedicated`` or ``host`` into a dedicated tenancy VPC. 

       

       **Important:** The ``host`` value cannot be used with this parameter. Use the ``default`` or ``dedicated`` values only.

       

      Default: ``default``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Vpc': {
                'CidrBlock': 'string',
                'DhcpOptionsId': 'string',
                'State': 'pending'|'available',
                'VpcId': 'string',
                'InstanceTenancy': 'default'|'dedicated'|'host',
                'Ipv6CidrBlockAssociationSet': [
                    {
                        'AssociationId': 'string',
                        'Ipv6CidrBlock': 'string',
                        'Ipv6CidrBlockState': {
                            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                            'StatusMessage': 'string'
                        }
                    },
                ],
                'IsDefault': True|False,
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateVpc.

        
        

        - **Vpc** *(dict) --* 

          Information about the VPC.

          
          

          - **CidrBlock** *(string) --* 

            The IPv4 CIDR block for the VPC.

            
          

          - **DhcpOptionsId** *(string) --* 

            The ID of the set of DHCP options you've associated with the VPC (or ``default`` if the default options are associated with the VPC).

            
          

          - **State** *(string) --* 

            The current state of the VPC.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC.

            
          

          - **InstanceTenancy** *(string) --* 

            The allowed tenancy of instances launched into the VPC.

            
          

          - **Ipv6CidrBlockAssociationSet** *(list) --* 

            Information about the IPv6 CIDR blocks associated with the VPC.

            
            

            - *(dict) --* 

              Describes an IPv6 CIDR block associated with a VPC.

              
              

              - **AssociationId** *(string) --* 

                The association ID for the IPv6 CIDR block.

                
              

              - **Ipv6CidrBlock** *(string) --* 

                The IPv6 CIDR block.

                
              

              - **Ipv6CidrBlockState** *(dict) --* 

                Information about the state of the CIDR block.

                
                

                - **State** *(string) --* 

                  The state of the CIDR block.

                  
                

                - **StatusMessage** *(string) --* 

                  A message about the status of the CIDR block, if applicable.

                  
            
          
        
          

          - **IsDefault** *(boolean) --* 

            Indicates whether the VPC is the default VPC.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the VPC.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

    **Examples** 

    This example creates a VPC with the specified CIDR block.
    ::

      response = client.create_vpc(
          CidrBlock='10.0.0.0/16',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Vpc': {
              'CidrBlock': '10.0.0.0/16',
              'DhcpOptionsId': 'dopt-7a8b9c2d',
              'InstanceTenancy': 'default',
              'State': 'pending',
              'VpcId': 'vpc-a01106c2',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: create_vpc_endpoint(**kwargs)

    

    Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.

     

    Use  DescribeVpcEndpointServices to get a list of supported AWS services.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint>`_    


    **Request Syntax** 
    ::

      response = client.create_vpc_endpoint(
          ClientToken='string',
          DryRun=True|False,
          PolicyDocument='string',
          RouteTableIds=[
              'string',
          ],
          ServiceName='string',
          VpcId='string'
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PolicyDocument: string
    :param PolicyDocument: 

      A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.

      

    
    :type RouteTableIds: list
    :param RouteTableIds: 

      One or more route table IDs.

      

    
      - *(string) --* 

      
  
    :type ServiceName: string
    :param ServiceName: **[REQUIRED]** 

      The AWS service name, in the form ``com.amazonaws.*region* .*service* `` . To get a list of available services, use the  DescribeVpcEndpointServices request.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC in which the endpoint will be used.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ClientToken': 'string',
            'VpcEndpoint': {
                'CreationTimestamp': datetime(2015, 1, 1),
                'PolicyDocument': 'string',
                'RouteTableIds': [
                    'string',
                ],
                'ServiceName': 'string',
                'State': 'Pending'|'Available'|'Deleting'|'Deleted',
                'VpcEndpointId': 'string',
                'VpcId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateVpcEndpoint.

        
        

        - **ClientToken** *(string) --* 

          Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

          
        

        - **VpcEndpoint** *(dict) --* 

          Information about the endpoint.

          
          

          - **CreationTimestamp** *(datetime) --* 

            The date and time the VPC endpoint was created.

            
          

          - **PolicyDocument** *(string) --* 

            The policy document associated with the endpoint.

            
          

          - **RouteTableIds** *(list) --* 

            One or more route tables associated with the endpoint.

            
            

            - *(string) --* 
        
          

          - **ServiceName** *(string) --* 

            The name of the AWS service to which the endpoint is associated.

            
          

          - **State** *(string) --* 

            The state of the VPC endpoint.

            
          

          - **VpcEndpointId** *(string) --* 

            The ID of the VPC endpoint.

            
          

          - **VpcId** *(string) --* 

            The ID of the VPC to which the endpoint is associated.

            
      
    

  .. py:method:: create_vpc_peering_connection(**kwargs)

    

    Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.

     

    The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

     

    If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to ``failed`` .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = client.create_vpc_peering_connection(
          DryRun=True|False,
          PeerOwnerId='string',
          PeerVpcId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PeerOwnerId: string
    :param PeerOwnerId: 

      The AWS account ID of the owner of the peer VPC.

       

      Default: Your AWS account ID

      

    
    :type PeerVpcId: string
    :param PeerVpcId: 

      The ID of the VPC with which you are creating the VPC peering connection.

      

    
    :type VpcId: string
    :param VpcId: 

      The ID of the requester VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcPeeringConnection': {
                'AccepterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'ExpirationTime': datetime(2015, 1, 1),
                'RequesterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'Status': {
                    'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                    'Message': 'string'
                },
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcPeeringConnectionId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateVpcPeeringConnection.

        
        

        - **VpcPeeringConnection** *(dict) --* 

          Information about the VPC peering connection.

          
          

          - **AccepterVpcInfo** *(dict) --* 

            Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **ExpirationTime** *(datetime) --* 

            The time that an unaccepted VPC peering connection will expire.

            
          

          - **RequesterVpcInfo** *(dict) --* 

            Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **Status** *(dict) --* 

            The status of the VPC peering connection.

            
            

            - **Code** *(string) --* 

              The status of the VPC peering connection.

              
            

            - **Message** *(string) --* 

              A message that provides more information about the status, if applicable.

              
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the resource.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcPeeringConnectionId** *(string) --* 

            The ID of the VPC peering connection.

            
      
    

  .. py:method:: create_vpn_connection(**kwargs)

    

    Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ``ipsec.1`` .

     

    The response includes information that you need to give to your network administrator to configure your customer gateway.

     

    .. warning::

       

      We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.

       

     

    If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.

     

    This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

     

    For more information about VPN connections, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection>`_    


    **Request Syntax** 
    ::

      response = client.create_vpn_connection(
          CustomerGatewayId='string',
          Type='string',
          VpnGatewayId='string',
          DryRun=True|False,
          Options={
              'StaticRoutesOnly': True|False
          }
      )
    :type CustomerGatewayId: string
    :param CustomerGatewayId: **[REQUIRED]** 

      The ID of the customer gateway.

      

    
    :type Type: string
    :param Type: **[REQUIRED]** 

      The type of VPN connection (``ipsec.1`` ).

      

    
    :type VpnGatewayId: string
    :param VpnGatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Options: dict
    :param Options: 

      Indicates whether the VPN connection requires static routes. If you are creating a VPN connection for a device that does not support BGP, you must specify ``true`` .

       

      Default: ``false``  

      

    
      - **StaticRoutesOnly** *(boolean) --* 

        Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpnConnection': {
                'CustomerGatewayConfiguration': 'string',
                'CustomerGatewayId': 'string',
                'State': 'pending'|'available'|'deleting'|'deleted',
                'Type': 'ipsec.1',
                'VpnConnectionId': 'string',
                'VpnGatewayId': 'string',
                'Options': {
                    'StaticRoutesOnly': True|False
                },
                'Routes': [
                    {
                        'DestinationCidrBlock': 'string',
                        'Source': 'Static',
                        'State': 'pending'|'available'|'deleting'|'deleted'
                    },
                ],
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VgwTelemetry': [
                    {
                        'AcceptedRouteCount': 123,
                        'LastStatusChange': datetime(2015, 1, 1),
                        'OutsideIpAddress': 'string',
                        'Status': 'UP'|'DOWN',
                        'StatusMessage': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateVpnConnection.

        
        

        - **VpnConnection** *(dict) --* 

          Information about the VPN connection.

          
          

          - **CustomerGatewayConfiguration** *(string) --* 

            The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the  CreateVpnConnection response; however, it's present in the  DescribeVpnConnections response only if the VPN connection is in the ``pending`` or ``available`` state.

            
          

          - **CustomerGatewayId** *(string) --* 

            The ID of the customer gateway at your end of the VPN connection.

            
          

          - **State** *(string) --* 

            The current state of the VPN connection.

            
          

          - **Type** *(string) --* 

            The type of VPN connection.

            
          

          - **VpnConnectionId** *(string) --* 

            The ID of the VPN connection.

            
          

          - **VpnGatewayId** *(string) --* 

            The ID of the virtual private gateway at the AWS side of the VPN connection.

            
          

          - **Options** *(dict) --* 

            The VPN connection options.

            
            

            - **StaticRoutesOnly** *(boolean) --* 

              Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

              
        
          

          - **Routes** *(list) --* 

            The static routes associated with the VPN connection.

            
            

            - *(dict) --* 

              Describes a static route for a VPN connection.

              
              

              - **DestinationCidrBlock** *(string) --* 

                The CIDR block associated with the local subnet of the customer data center.

                
              

              - **Source** *(string) --* 

                Indicates how the routes were provided.

                
              

              - **State** *(string) --* 

                The current state of the static route.

                
          
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the VPN connection.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VgwTelemetry** *(list) --* 

            Information about the VPN tunnel.

            
            

            - *(dict) --* 

              Describes telemetry for a VPN tunnel.

              
              

              - **AcceptedRouteCount** *(integer) --* 

                The number of accepted routes.

                
              

              - **LastStatusChange** *(datetime) --* 

                The date and time of the last change in status.

                
              

              - **OutsideIpAddress** *(string) --* 

                The Internet-routable IP address of the virtual private gateway's outside interface.

                
              

              - **Status** *(string) --* 

                The status of the VPN tunnel.

                
              

              - **StatusMessage** *(string) --* 

                If an error occurs, a description of the error.

                
          
        
      
    

  .. py:method:: create_vpn_connection_route(**kwargs)

    

    Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

     

    For more information about VPN connections, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute>`_    


    **Request Syntax** 
    ::

      response = client.create_vpn_connection_route(
          DestinationCidrBlock='string',
          VpnConnectionId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: **[REQUIRED]** 

      The CIDR block associated with the local subnet of the customer network.

      

    
    :type VpnConnectionId: string
    :param VpnConnectionId: **[REQUIRED]** 

      The ID of the VPN connection.

      

    
    
    :returns: None

  .. py:method:: create_vpn_gateway(**kwargs)

    

    Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.

     

    For more information about virtual private gateways, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway>`_    


    **Request Syntax** 
    ::

      response = client.create_vpn_gateway(
          AvailabilityZone='string',
          Type='ipsec.1',
          DryRun=True|False
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone for the virtual private gateway.

      

    
    :type Type: string
    :param Type: **[REQUIRED]** 

      The type of VPN connection this virtual private gateway supports.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpnGateway': {
                'AvailabilityZone': 'string',
                'State': 'pending'|'available'|'deleting'|'deleted',
                'Type': 'ipsec.1',
                'VpcAttachments': [
                    {
                        'State': 'attaching'|'attached'|'detaching'|'detached',
                        'VpcId': 'string'
                    },
                ],
                'VpnGatewayId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CreateVpnGateway.

        
        

        - **VpnGateway** *(dict) --* 

          Information about the virtual private gateway.

          
          

          - **AvailabilityZone** *(string) --* 

            The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

            
          

          - **State** *(string) --* 

            The current state of the virtual private gateway.

            
          

          - **Type** *(string) --* 

            The type of VPN connection the virtual private gateway supports.

            
          

          - **VpcAttachments** *(list) --* 

            Any VPCs attached to the virtual private gateway.

            
            

            - *(dict) --* 

              Describes an attachment between a virtual private gateway and a VPC.

              
              

              - **State** *(string) --* 

                The current state of the attachment.

                
              

              - **VpcId** *(string) --* 

                The ID of the VPC.

                
          
        
          

          - **VpnGatewayId** *(string) --* 

            The ID of the virtual private gateway.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the virtual private gateway.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

  .. py:method:: delete_customer_gateway(**kwargs)

    

    Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway>`_    


    **Request Syntax** 
    ::

      response = client.delete_customer_gateway(
          CustomerGatewayId='string',
          DryRun=True|False
      )
    :type CustomerGatewayId: string
    :param CustomerGatewayId: **[REQUIRED]** 

      The ID of the customer gateway.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified customer gateway.
    ::

      response = client.delete_customer_gateway(
          CustomerGatewayId='cgw-0e11f167',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_dhcp_options(**kwargs)

    

    Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = client.delete_dhcp_options(
          DhcpOptionsId='string',
          DryRun=True|False
      )
    :type DhcpOptionsId: string
    :param DhcpOptionsId: **[REQUIRED]** 

      The ID of the DHCP options set.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified DHCP options set.
    ::

      response = client.delete_dhcp_options(
          DhcpOptionsId='dopt-d9070ebb',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_egress_only_internet_gateway(**kwargs)

    

    Deletes an egress-only Internet gateway.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.delete_egress_only_internet_gateway(
          DryRun=True|False,
          EgressOnlyInternetGatewayId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayId: string
    :param EgressOnlyInternetGatewayId: **[REQUIRED]** 

      The ID of the egress-only Internet gateway.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReturnCode': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **ReturnCode** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: delete_flow_logs(**kwargs)

    

    Deletes one or more flow logs.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs>`_    


    **Request Syntax** 
    ::

      response = client.delete_flow_logs(
          FlowLogIds=[
              'string',
          ]
      )
    :type FlowLogIds: list
    :param FlowLogIds: **[REQUIRED]** 

      One or more flow log IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Unsuccessful': [
                {
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'ResourceId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DeleteFlowLogs.

        
        

        - **Unsuccessful** *(list) --* 

          Information about the flow logs that could not be deleted successfully.

          
          

          - *(dict) --* 

            Information about items that were not successfully processed in a batch call.

            
            

            - **Error** *(dict) --* 

              Information about the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message accompanying the error code.

                
          
            

            - **ResourceId** *(string) --* 

              The ID of the resource.

              
        
      
    

  .. py:method:: delete_internet_gateway(**kwargs)

    

    Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.delete_internet_gateway(
          DryRun=True|False,
          InternetGatewayId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayId: string
    :param InternetGatewayId: **[REQUIRED]** 

      The ID of the Internet gateway.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified Internet gateway.
    ::

      response = client.delete_internet_gateway(
          InternetGatewayId='igw-c0a643a9',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_key_pair(**kwargs)

    

    Deletes the specified key pair, by removing the public key from Amazon EC2.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair>`_    


    **Request Syntax** 
    ::

      response = client.delete_key_pair(
          KeyName='string',
          DryRun=True|False
      )
    :type KeyName: string
    :param KeyName: **[REQUIRED]** 

      The name of the key pair.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified key pair.
    ::

      response = client.delete_key_pair(
          KeyName='my-key-pair',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_nat_gateway(**kwargs)

    

    Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway>`_    


    **Request Syntax** 
    ::

      response = client.delete_nat_gateway(
          NatGatewayId='string'
      )
    :type NatGatewayId: string
    :param NatGatewayId: **[REQUIRED]** 

      The ID of the NAT gateway.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NatGatewayId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DeleteNatGateway.

        
        

        - **NatGatewayId** *(string) --* 

          The ID of the NAT gateway.

          
    

    **Examples** 

    This example deletes the specified NAT gateway.
    ::

      response = client.delete_nat_gateway(
          NatGatewayId='nat-04ae55e711cec5680',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NatGatewayId': 'nat-04ae55e711cec5680',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_network_acl(**kwargs)

    

    Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl>`_    


    **Request Syntax** 
    ::

      response = client.delete_network_acl(
          DryRun=True|False,
          NetworkAclId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkAclId: string
    :param NetworkAclId: **[REQUIRED]** 

      The ID of the network ACL.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified network ACL.
    ::

      response = client.delete_network_acl(
          NetworkAclId='acl-5fb85d36',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_network_acl_entry(**kwargs)

    

    Deletes the specified ingress or egress entry (rule) from the specified network ACL.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = client.delete_network_acl_entry(
          DryRun=True|False,
          Egress=True|False,
          NetworkAclId='string',
          RuleNumber=123
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether the rule is an egress rule.

      

    
    :type NetworkAclId: string
    :param NetworkAclId: **[REQUIRED]** 

      The ID of the network ACL.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number of the entry to delete.

      

    
    
    :returns: None

    **Examples** 

    This example deletes ingress rule number 100 from the specified network ACL.
    ::

      response = client.delete_network_acl_entry(
          Egress=True,
          NetworkAclId='acl-5fb85d36',
          RuleNumber=100,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_network_interface(**kwargs)

    

    Deletes the specified network interface. You must detach the network interface before you can delete it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = client.delete_network_interface(
          DryRun=True|False,
          NetworkInterfaceId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified network interface.
    ::

      response = client.delete_network_interface(
          NetworkInterfaceId='eni-e5aa89a3',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_network_interface_permission(**kwargs)

    

    Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission>`_    


    **Request Syntax** 
    ::

      response = client.delete_network_interface_permission(
          NetworkInterfacePermissionId='string',
          Force=True|False,
          DryRun=True|False
      )
    :type NetworkInterfacePermissionId: string
    :param NetworkInterfacePermissionId: **[REQUIRED]** 

      The ID of the network interface permission.

      

    
    :type Force: boolean
    :param Force: 

      Specify ``true`` to remove the permission even if the network interface is attached to an instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DeleteNetworkInterfacePermission.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds, otherwise returns an error.

          
    

  .. py:method:: delete_placement_group(**kwargs)

    

    Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see `Cluster Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup>`_    


    **Request Syntax** 
    ::

      response = client.delete_placement_group(
          DryRun=True|False,
          GroupName='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      The name of the placement group.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified placement group.

    ::

      response = client.delete_placement_group(
          GroupName='my-cluster',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_route(**kwargs)

    

    Deletes the specified route from the specified route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute>`_    


    **Request Syntax** 
    ::

      response = client.delete_route(
          DestinationCidrBlock='string',
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          RouteTableId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: 

      The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

      

    
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified route from the specified route table.
    ::

      response = client.delete_route(
          DestinationCidrBlock='0.0.0.0/0',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_route_table(**kwargs)

    

    Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable>`_    


    **Request Syntax** 
    ::

      response = client.delete_route_table(
          DryRun=True|False,
          RouteTableId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified route table.
    ::

      response = client.delete_route_table(
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_security_group(**kwargs)

    

    Deletes a security group.

     

    If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with ``InvalidGroup.InUse`` in EC2-Classic or ``DependencyViolation`` in EC2-VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup>`_    


    **Request Syntax** 
    ::

      response = client.delete_security_group(
          GroupId='string',
          GroupName='string',
          DryRun=True|False
      )
    :type GroupId: string
    :param GroupId: 

      The ID of the security group. Required for a nondefault VPC.

      

    
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: delete_snapshot(**kwargs)

    

    Deletes the specified snapshot.

     

    When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

     

    You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

     

    For more information, see `Deleting an Amazon EBS Snapshot <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot>`_    


    **Request Syntax** 
    ::

      response = client.delete_snapshot(
          SnapshotId='string',
          DryRun=True|False
      )
    :type SnapshotId: string
    :param SnapshotId: **[REQUIRED]** 

      The ID of the EBS snapshot.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.
    ::

      response = client.delete_snapshot(
          SnapshotId='snap-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_spot_datafeed_subscription(**kwargs)

    

    Deletes the data feed for Spot instances.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription>`_    


    **Request Syntax** 
    ::

      response = client.delete_spot_datafeed_subscription(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes a Spot data feed subscription for the account.
    ::

      response = client.delete_spot_datafeed_subscription(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_subnet(**kwargs)

    

    Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet>`_    


    **Request Syntax** 
    ::

      response = client.delete_subnet(
          SubnetId='string',
          DryRun=True|False
      )
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified subnet.
    ::

      response = client.delete_subnet(
          SubnetId='subnet-9d4a7b6c',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_tags(**kwargs)

    

    Deletes the specified set of tags from the specified set of resources. This call is designed to follow a ``DescribeTags`` request.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags>`_    


    **Request Syntax** 
    ::

      response = client.delete_tags(
          DryRun=True|False,
          Resources=[
              'string',
          ],
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Resources: list
    :param Resources: **[REQUIRED]** 

      The ID of the resource. For example, ami-1a2b3c4d. You can specify more than one resource ID.

      

    
      - *(string) --* 

      
  
    :type Tags: list
    :param Tags: 

      One or more tags to delete. If you omit the ``value`` parameter, we delete the tag regardless of its value. If you specify this parameter with an empty string as the value, we delete the key only if its value is an empty string.

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :returns: None

    **Examples** 

    This example deletes the tag Stack=test from the specified image.
    ::

      response = client.delete_tags(
          Resources=[
              'ami-78a54011',
          ],
          Tags=[
              {
                  'Key': 'Stack',
                  'Value': 'test',
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_volume(**kwargs)

    

    Deletes the specified EBS volume. The volume must be in the ``available`` state (not attached to an instance).

     

    .. note::

       

      The volume may remain in the ``deleting`` state for several minutes.

       

     

    For more information, see `Deleting an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume>`_    


    **Request Syntax** 
    ::

      response = client.delete_volume(
          VolumeId='string',
          DryRun=True|False
      )
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes an available volume with the volume ID of ``vol-049df61146c4d7901``. If the command succeeds, no output is returned.
    ::

      response = client.delete_volume(
          VolumeId='vol-049df61146c4d7901',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_vpc(**kwargs)

    

    Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpc(
          VpcId='string',
          DryRun=True|False
      )
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example deletes the specified VPC.
    ::

      response = client.delete_vpc(
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: delete_vpc_endpoints(**kwargs)

    

    Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpc_endpoints(
          DryRun=True|False,
          VpcEndpointIds=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcEndpointIds: list
    :param VpcEndpointIds: **[REQUIRED]** 

      One or more endpoint IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Unsuccessful': [
                {
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'ResourceId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DeleteVpcEndpoints.

        
        

        - **Unsuccessful** *(list) --* 

          Information about the endpoints that were not successfully deleted.

          
          

          - *(dict) --* 

            Information about items that were not successfully processed in a batch call.

            
            

            - **Error** *(dict) --* 

              Information about the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message accompanying the error code.

                
          
            

            - **ResourceId** *(string) --* 

              The ID of the resource.

              
        
      
    

  .. py:method:: delete_vpc_peering_connection(**kwargs)

    

    Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the ``active`` state. The owner of the requester VPC can delete a VPC peering connection in the ``pending-acceptance`` state. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpc_peering_connection(
          DryRun=True|False,
          VpcPeeringConnectionId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: **[REQUIRED]** 

      The ID of the VPC peering connection.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DeleteVpcPeeringConnection.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: delete_vpn_connection(**kwargs)

    

    Deletes the specified VPN connection.

     

    If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpn_connection(
          VpnConnectionId='string',
          DryRun=True|False
      )
    :type VpnConnectionId: string
    :param VpnConnectionId: **[REQUIRED]** 

      The ID of the VPN connection.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: delete_vpn_connection_route(**kwargs)

    

    Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpn_connection_route(
          DestinationCidrBlock='string',
          VpnConnectionId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: **[REQUIRED]** 

      The CIDR block associated with the local subnet of the customer network.

      

    
    :type VpnConnectionId: string
    :param VpnConnectionId: **[REQUIRED]** 

      The ID of the VPN connection.

      

    
    
    :returns: None

  .. py:method:: delete_vpn_gateway(**kwargs)

    

    Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway>`_    


    **Request Syntax** 
    ::

      response = client.delete_vpn_gateway(
          VpnGatewayId='string',
          DryRun=True|False
      )
    :type VpnGatewayId: string
    :param VpnGatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: deregister_image(**kwargs)

    

    Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

     

    When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage>`_    


    **Request Syntax** 
    ::

      response = client.deregister_image(
          ImageId='string',
          DryRun=True|False
      )
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_account_attributes(**kwargs)

    

    Describes attributes of your AWS account. The following are the supported account attributes:

     

     
    * ``supported-platforms`` : Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC. 
     
    * ``default-vpc`` : The ID of the default VPC for your account, or ``none`` . 
     
    * ``max-instances`` : The maximum number of On-Demand instances that you can run. 
     
    * ``vpc-max-security-groups-per-interface`` : The maximum number of security groups that you can assign to a network interface. 
     
    * ``max-elastic-ips`` : The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.  
     
    * ``vpc-max-elastic-ips`` : The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC. 
     

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes>`_    


    **Request Syntax** 
    ::

      response = client.describe_account_attributes(
          AttributeNames=[
              'supported-platforms'|'default-vpc',
          ],
          DryRun=True|False
      )
    :type AttributeNames: list
    :param AttributeNames: 

      One or more account attribute names.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AccountAttributes': [
                {
                    'AttributeName': 'string',
                    'AttributeValues': [
                        {
                            'AttributeValue': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeAccountAttributes.

        
        

        - **AccountAttributes** *(list) --* 

          Information about one or more account attributes.

          
          

          - *(dict) --* 

            Describes an account attribute.

            
            

            - **AttributeName** *(string) --* 

              The name of the account attribute.

              
            

            - **AttributeValues** *(list) --* 

              One or more values for the account attribute.

              
              

              - *(dict) --* 

                Describes a value of an account attribute.

                
                

                - **AttributeValue** *(string) --* 

                  The value of the attribute.

                  
            
          
        
      
    

    **Examples** 

    This example describes the supported-platforms attribute for your AWS account.
    ::

      response = client.describe_account_attributes(
          AttributeNames=[
              'supported-platforms',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AccountAttributes': [
              {
                  'AttributeName': 'supported-platforms',
                  'AttributeValues': [
                      {
                          'AttributeValue': 'EC2',
                      },
                      {
                          'AttributeValue': 'VPC',
                      },
                  ],
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the attributes for your AWS account.
    ::

      response = client.describe_account_attributes(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AccountAttributes': [
              {
                  'AttributeName': 'supported-platforms',
                  'AttributeValues': [
                      {
                          'AttributeValue': 'EC2',
                      },
                      {
                          'AttributeValue': 'VPC',
                      },
                  ],
              },
              {
                  'AttributeName': 'vpc-max-security-groups-per-interface',
                  'AttributeValues': [
                      {
                          'AttributeValue': '5',
                      },
                  ],
              },
              {
                  'AttributeName': 'max-elastic-ips',
                  'AttributeValues': [
                      {
                          'AttributeValue': '5',
                      },
                  ],
              },
              {
                  'AttributeName': 'max-instances',
                  'AttributeValues': [
                      {
                          'AttributeValue': '20',
                      },
                  ],
              },
              {
                  'AttributeName': 'vpc-max-elastic-ips',
                  'AttributeValues': [
                      {
                          'AttributeValue': '5',
                      },
                  ],
              },
              {
                  'AttributeName': 'default-vpc',
                  'AttributeValues': [
                      {
                          'AttributeValue': 'none',
                      },
                  ],
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_addresses(**kwargs)

    

    Describes one or more of your Elastic IP addresses.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_    


    **Request Syntax** 
    ::

      response = client.describe_addresses(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          PublicIps=[
              'string',
          ],
          AllocationIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters. Filter names and values are case-sensitive.

       

       
      * ``allocation-id`` - [EC2-VPC] The allocation ID for the address. 
       
      * ``association-id`` - [EC2-VPC] The association ID for the address. 
       
      * ``domain`` - Indicates whether the address is for use in EC2-Classic (``standard`` ) or in a VPC (``vpc`` ). 
       
      * ``instance-id`` - The ID of the instance the address is associated with, if any. 
       
      * ``network-interface-id`` - [EC2-VPC] The ID of the network interface that the address is associated with, if any. 
       
      * ``network-interface-owner-id`` - The AWS account ID of the owner. 
       
      * ``private-ip-address`` - [EC2-VPC] The private IP address associated with the Elastic IP address. 
       
      * ``public-ip`` - The Elastic IP address. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type PublicIps: list
    :param PublicIps: 

      [EC2-Classic] One or more Elastic IP addresses.

       

      Default: Describes all your Elastic IP addresses.

      

    
      - *(string) --* 

      
  
    :type AllocationIds: list
    :param AllocationIds: 

      [EC2-VPC] One or more allocation IDs.

       

      Default: Describes all your Elastic IP addresses.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Addresses': [
                {
                    'InstanceId': 'string',
                    'PublicIp': 'string',
                    'AllocationId': 'string',
                    'AssociationId': 'string',
                    'Domain': 'vpc'|'standard',
                    'NetworkInterfaceId': 'string',
                    'NetworkInterfaceOwnerId': 'string',
                    'PrivateIpAddress': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeAddresses.

        
        

        - **Addresses** *(list) --* 

          Information about one or more Elastic IP addresses.

          
          

          - *(dict) --* 

            Describes an Elastic IP address.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance that the address is associated with (if any).

              
            

            - **PublicIp** *(string) --* 

              The Elastic IP address.

              
            

            - **AllocationId** *(string) --* 

              The ID representing the allocation of the address for use with EC2-VPC.

              
            

            - **AssociationId** *(string) --* 

              The ID representing the association of the address with an instance in a VPC.

              
            

            - **Domain** *(string) --* 

              Indicates whether this Elastic IP address is for use with instances in EC2-Classic (``standard`` ) or instances in a VPC (``vpc`` ).

              
            

            - **NetworkInterfaceId** *(string) --* 

              The ID of the network interface.

              
            

            - **NetworkInterfaceOwnerId** *(string) --* 

              The ID of the AWS account that owns the network interface.

              
            

            - **PrivateIpAddress** *(string) --* 

              The private IP address associated with the Elastic IP address.

              
        
      
    

    **Examples** 

    This example describes your Elastic IP addresses.
    ::

      response = client.describe_addresses(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Addresses': [
              {
                  'Domain': 'standard',
                  'InstanceId': 'i-1234567890abcdef0',
                  'PublicIp': '198.51.100.0',
              },
              {
                  'AllocationId': 'eipalloc-12345678',
                  'AssociationId': 'eipassoc-12345678',
                  'Domain': 'vpc',
                  'InstanceId': 'i-1234567890abcdef0',
                  'NetworkInterfaceId': 'eni-12345678',
                  'NetworkInterfaceOwnerId': '123456789012',
                  'PrivateIpAddress': '10.0.1.241',
                  'PublicIp': '203.0.113.0',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes your Elastic IP addresses for use with instances in a VPC.
    ::

      response = client.describe_addresses(
          Filters=[
              {
                  'Name': 'domain',
                  'Values': [
                      'vpc',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Addresses': [
              {
                  'AllocationId': 'eipalloc-12345678',
                  'AssociationId': 'eipassoc-12345678',
                  'Domain': 'vpc',
                  'InstanceId': 'i-1234567890abcdef0',
                  'NetworkInterfaceId': 'eni-12345678',
                  'NetworkInterfaceOwnerId': '123456789012',
                  'PrivateIpAddress': '10.0.1.241',
                  'PublicIp': '203.0.113.0',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes your Elastic IP addresses for use with instances in EC2-Classic.
    ::

      response = client.describe_addresses(
          Filters=[
              {
                  'Name': 'domain',
                  'Values': [
                      'standard',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Addresses': [
              {
                  'Domain': 'standard',
                  'InstanceId': 'i-1234567890abcdef0',
                  'PublicIp': '198.51.100.0',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_availability_zones(**kwargs)

    

    Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.

     

    For more information, see `Regions and Availability Zones <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones>`_    


    **Request Syntax** 
    ::

      response = client.describe_availability_zones(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ZoneNames=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``message`` - Information about the Availability Zone. 
       
      * ``region-name`` - The name of the region for the Availability Zone (for example, ``us-east-1`` ). 
       
      * ``state`` - The state of the Availability Zone (``available`` | ``information`` | ``impaired`` | ``unavailable`` ). 
       
      * ``zone-name`` - The name of the Availability Zone (for example, ``us-east-1a`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ZoneNames: list
    :param ZoneNames: 

      The names of one or more Availability Zones.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AvailabilityZones': [
                {
                    'State': 'available'|'information'|'impaired'|'unavailable',
                    'Messages': [
                        {
                            'Message': 'string'
                        },
                    ],
                    'RegionName': 'string',
                    'ZoneName': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeAvailabiltyZones.

        
        

        - **AvailabilityZones** *(list) --* 

          Information about one or more Availability Zones.

          
          

          - *(dict) --* 

            Describes an Availability Zone.

            
            

            - **State** *(string) --* 

              The state of the Availability Zone.

              
            

            - **Messages** *(list) --* 

              Any messages about the Availability Zone.

              
              

              - *(dict) --* 

                Describes a message about an Availability Zone.

                
                

                - **Message** *(string) --* 

                  The message about the Availability Zone.

                  
            
          
            

            - **RegionName** *(string) --* 

              The name of the region.

              
            

            - **ZoneName** *(string) --* 

              The name of the Availability Zone.

              
        
      
    

    **Examples** 

    This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.
    ::

      response = client.describe_availability_zones(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AvailabilityZones': [
              {
                  'Messages': [
                  ],
                  'RegionName': 'us-east-1',
                  'State': 'available',
                  'ZoneName': 'us-east-1b',
              },
              {
                  'Messages': [
                  ],
                  'RegionName': 'us-east-1',
                  'State': 'available',
                  'ZoneName': 'us-east-1c',
              },
              {
                  'Messages': [
                  ],
                  'RegionName': 'us-east-1',
                  'State': 'available',
                  'ZoneName': 'us-east-1d',
              },
              {
                  'Messages': [
                  ],
                  'RegionName': 'us-east-1',
                  'State': 'available',
                  'ZoneName': 'us-east-1e',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_bundle_tasks(**kwargs)

    

    Describes one or more of your bundling tasks.

     

    .. note::

       

      Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use ``RegisterImage`` with the Amazon S3 bucket name and image manifest name you provided to the bundle task.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks>`_    


    **Request Syntax** 
    ::

      response = client.describe_bundle_tasks(
          BundleIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type BundleIds: list
    :param BundleIds: 

      One or more bundle task IDs.

       

      Default: Describes all your bundle tasks.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``bundle-id`` - The ID of the bundle task. 
       
      * ``error-code`` - If the task failed, the error code returned. 
       
      * ``error-message`` - If the task failed, the error message returned. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``progress`` - The level of task completion, as a percentage (for example, 20%). 
       
      * ``s3-bucket`` - The Amazon S3 bucket to store the AMI. 
       
      * ``s3-prefix`` - The beginning of the AMI name. 
       
      * ``start-time`` - The time the task started (for example, 2013-09-15T17:15:20.000Z). 
       
      * ``state`` - The state of the task (``pending`` | ``waiting-for-shutdown`` | ``bundling`` | ``storing`` | ``cancelling`` | ``complete`` | ``failed`` ). 
       
      * ``update-time`` - The time of the most recent update for the task. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'BundleTasks': [
                {
                    'BundleId': 'string',
                    'BundleTaskError': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'InstanceId': 'string',
                    'Progress': 'string',
                    'StartTime': datetime(2015, 1, 1),
                    'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
                    'Storage': {
                        'S3': {
                            'AWSAccessKeyId': 'string',
                            'Bucket': 'string',
                            'Prefix': 'string',
                            'UploadPolicy': b'bytes',
                            'UploadPolicySignature': 'string'
                        }
                    },
                    'UpdateTime': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeBundleTasks.

        
        

        - **BundleTasks** *(list) --* 

          Information about one or more bundle tasks.

          
          

          - *(dict) --* 

            Describes a bundle task.

            
            

            - **BundleId** *(string) --* 

              The ID of the bundle task.

              
            

            - **BundleTaskError** *(dict) --* 

              If the task fails, a description of the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance associated with this bundle task.

              
            

            - **Progress** *(string) --* 

              The level of task completion, as a percent (for example, 20%).

              
            

            - **StartTime** *(datetime) --* 

              The time this task started.

              
            

            - **State** *(string) --* 

              The state of the task.

              
            

            - **Storage** *(dict) --* 

              The Amazon S3 storage locations.

              
              

              - **S3** *(dict) --* 

                An Amazon S3 storage location.

                
                

                - **AWSAccessKeyId** *(string) --* 

                  The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in `Best Practices for Managing AWS Access Keys <http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html>`_ .

                  
                

                - **Bucket** *(string) --* 

                  The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

                  
                

                - **Prefix** *(string) --* 

                  The beginning of the file name of the AMI.

                  
                

                - **UploadPolicy** *(bytes) --* 

                  An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

                  
                

                - **UploadPolicySignature** *(string) --* 

                  The signature of the JSON document.

                  
            
          
            

            - **UpdateTime** *(datetime) --* 

              The time of the most recent update for the task.

              
        
      
    

  .. py:method:: describe_classic_link_instances(**kwargs)

    

    Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances>`_    


    **Request Syntax** 
    ::

      response = client.describe_classic_link_instances(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          InstanceIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``group-id`` - The ID of a VPC security group that's associated with the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC that the instance is linked to. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs. Must be instances linked to a VPC through ClassicLink.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the instance IDs parameter in the same request.

       

      Constraint: If the value is greater than 1000, we return only 1000 items.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Instances': [
                {
                    'Groups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'InstanceId': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeClassicLinkInstances.

        
        

        - **Instances** *(list) --* 

          Information about one or more linked EC2-Classic instances.

          
          

          - *(dict) --* 

            Describes a linked EC2-Classic instance.

            
            

            - **Groups** *(list) --* 

              A list of security groups.

              
              

              - *(dict) --* 

                Describes a security group.

                
                

                - **GroupName** *(string) --* 

                  The name of the security group.

                  
                

                - **GroupId** *(string) --* 

                  The ID of the security group.

                  
            
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the instance.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_conversion_tasks(**kwargs)

    

    Describes one or more of your conversion tasks. For more information, see the `VM Import/Export User Guide <http://docs.aws.amazon.com/vm-import/latest/userguide/>`_ .

     

    For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks>`_    


    **Request Syntax** 
    ::

      response = client.describe_conversion_tasks(
          ConversionTaskIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type ConversionTaskIds: list
    :param ConversionTaskIds: 

      One or more conversion task IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ConversionTasks': [
                {
                    'ConversionTaskId': 'string',
                    'ExpirationTime': 'string',
                    'ImportInstance': {
                        'Description': 'string',
                        'InstanceId': 'string',
                        'Platform': 'Windows',
                        'Volumes': [
                            {
                                'AvailabilityZone': 'string',
                                'BytesConverted': 123,
                                'Description': 'string',
                                'Image': {
                                    'Checksum': 'string',
                                    'Format': 'VMDK'|'RAW'|'VHD',
                                    'ImportManifestUrl': 'string',
                                    'Size': 123
                                },
                                'Status': 'string',
                                'StatusMessage': 'string',
                                'Volume': {
                                    'Id': 'string',
                                    'Size': 123
                                }
                            },
                        ]
                    },
                    'ImportVolume': {
                        'AvailabilityZone': 'string',
                        'BytesConverted': 123,
                        'Description': 'string',
                        'Image': {
                            'Checksum': 'string',
                            'Format': 'VMDK'|'RAW'|'VHD',
                            'ImportManifestUrl': 'string',
                            'Size': 123
                        },
                        'Volume': {
                            'Id': 'string',
                            'Size': 123
                        }
                    },
                    'State': 'active'|'cancelling'|'cancelled'|'completed',
                    'StatusMessage': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeConversionTasks.

        
        

        - **ConversionTasks** *(list) --* 

          Information about the conversion tasks.

          
          

          - *(dict) --* 

            Describes a conversion task.

            
            

            - **ConversionTaskId** *(string) --* 

              The ID of the conversion task.

              
            

            - **ExpirationTime** *(string) --* 

              The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.

              
            

            - **ImportInstance** *(dict) --* 

              If the task is for importing an instance, this contains information about the import instance task.

              
              

              - **Description** *(string) --* 

                A description of the task.

                
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Platform** *(string) --* 

                The instance operating system.

                
              

              - **Volumes** *(list) --* 

                One or more volumes.

                
                

                - *(dict) --* 

                  Describes an import volume task.

                  
                  

                  - **AvailabilityZone** *(string) --* 

                    The Availability Zone where the resulting instance will reside.

                    
                  

                  - **BytesConverted** *(integer) --* 

                    The number of bytes converted so far.

                    
                  

                  - **Description** *(string) --* 

                    A description of the task.

                    
                  

                  - **Image** *(dict) --* 

                    The image.

                    
                    

                    - **Checksum** *(string) --* 

                      The checksum computed for the disk image.

                      
                    

                    - **Format** *(string) --* 

                      The disk image format.

                      
                    

                    - **ImportManifestUrl** *(string) --* 

                      A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                       

                      For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                      
                    

                    - **Size** *(integer) --* 

                      The size of the disk image, in GiB.

                      
                
                  

                  - **Status** *(string) --* 

                    The status of the import of this particular disk image.

                    
                  

                  - **StatusMessage** *(string) --* 

                    The status information or errors related to the disk image.

                    
                  

                  - **Volume** *(dict) --* 

                    The volume.

                    
                    

                    - **Id** *(string) --* 

                      The volume identifier.

                      
                    

                    - **Size** *(integer) --* 

                      The size of the volume, in GiB.

                      
                
              
            
          
            

            - **ImportVolume** *(dict) --* 

              If the task is for importing a volume, this contains information about the import volume task.

              
              

              - **AvailabilityZone** *(string) --* 

                The Availability Zone where the resulting volume will reside.

                
              

              - **BytesConverted** *(integer) --* 

                The number of bytes converted so far.

                
              

              - **Description** *(string) --* 

                The description you provided when starting the import volume task.

                
              

              - **Image** *(dict) --* 

                The image.

                
                

                - **Checksum** *(string) --* 

                  The checksum computed for the disk image.

                  
                

                - **Format** *(string) --* 

                  The disk image format.

                  
                

                - **ImportManifestUrl** *(string) --* 

                  A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                   

                  For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                  
                

                - **Size** *(integer) --* 

                  The size of the disk image, in GiB.

                  
            
              

              - **Volume** *(dict) --* 

                The volume.

                
                

                - **Id** *(string) --* 

                  The volume identifier.

                  
                

                - **Size** *(integer) --* 

                  The size of the volume, in GiB.

                  
            
          
            

            - **State** *(string) --* 

              The state of the conversion task.

              
            

            - **StatusMessage** *(string) --* 

              The status message related to the conversion task.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the task.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

  .. py:method:: describe_customer_gateways(**kwargs)

    

    Describes one or more of your VPN customer gateways.

     

    For more information about VPN customer gateways, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways>`_    


    **Request Syntax** 
    ::

      response = client.describe_customer_gateways(
          CustomerGatewayIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type CustomerGatewayIds: list
    :param CustomerGatewayIds: 

      One or more customer gateway IDs.

       

      Default: Describes all your customer gateways.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``bgp-asn`` - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). 
       
      * ``customer-gateway-id`` - The ID of the customer gateway. 
       
      * ``ip-address`` - The IP address of the customer gateway's Internet-routable external interface. 
       
      * ``state`` - The state of the customer gateway (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``type`` - The type of customer gateway. Currently, the only supported type is ``ipsec.1`` . 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CustomerGateways': [
                {
                    'BgpAsn': 'string',
                    'CustomerGatewayId': 'string',
                    'IpAddress': 'string',
                    'State': 'string',
                    'Type': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeCustomerGateways.

        
        

        - **CustomerGateways** *(list) --* 

          Information about one or more customer gateways.

          
          

          - *(dict) --* 

            Describes a customer gateway.

            
            

            - **BgpAsn** *(string) --* 

              The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

              
            

            - **CustomerGatewayId** *(string) --* 

              The ID of the customer gateway.

              
            

            - **IpAddress** *(string) --* 

              The Internet-routable IP address of the customer gateway's outside interface.

              
            

            - **State** *(string) --* 

              The current state of the customer gateway (``pending | available | deleting | deleted`` ).

              
            

            - **Type** *(string) --* 

              The type of VPN connection the customer gateway supports (``ipsec.1`` ).

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the customer gateway.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

    **Examples** 

    This example describes the specified customer gateway.
    ::

      response = client.describe_customer_gateways(
          CustomerGatewayIds=[
              'cgw-0e11f167',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'CustomerGateways': [
              {
                  'BgpAsn': '65534',
                  'CustomerGatewayId': 'cgw-0e11f167',
                  'IpAddress': '12.1.2.3',
                  'State': 'available',
                  'Type': 'ipsec.1',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_dhcp_options(**kwargs)

    

    Describes one or more of your DHCP options sets.

     

    For more information about DHCP options sets, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = client.describe_dhcp_options(
          DhcpOptionsIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type DhcpOptionsIds: list
    :param DhcpOptionsIds: 

      The IDs of one or more DHCP options sets.

       

      Default: Describes all your DHCP options sets.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``key`` - The key for one of the options (for example, ``domain-name`` ). 
       
      * ``value`` - The value for one of the options. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'DhcpOptions': [
                {
                    'DhcpConfigurations': [
                        {
                            'Key': 'string',
                            'Values': [
                                {
                                    'Value': 'string'
                                },
                            ]
                        },
                    ],
                    'DhcpOptionsId': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeDhcpOptions.

        
        

        - **DhcpOptions** *(list) --* 

          Information about one or more DHCP options sets.

          
          

          - *(dict) --* 

            Describes a set of DHCP options.

            
            

            - **DhcpConfigurations** *(list) --* 

              One or more DHCP options in the set.

              
              

              - *(dict) --* 

                Describes a DHCP configuration option.

                
                

                - **Key** *(string) --* 

                  The name of a DHCP option.

                  
                

                - **Values** *(list) --* 

                  One or more values for the DHCP option.

                  
                  

                  - *(dict) --* 

                    Describes a value for a resource attribute that is a String.

                    
                    

                    - **Value** *(string) --* 

                      The attribute value. Note that the value is case-sensitive.

                      
                
              
            
          
            

            - **DhcpOptionsId** *(string) --* 

              The ID of the set of DHCP options.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the DHCP options set.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

    **Examples** 

    This example describes the specified DHCP options set.
    ::

      response = client.describe_dhcp_options(
          DhcpOptionsIds=[
              'dopt-d9070ebb',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'DhcpOptions': [
              {
                  'DhcpConfigurations': [
                      {
                          'Key': 'domain-name-servers',
                          'Values': [
                              {
                                  'Value': '10.2.5.2',
                              },
                              {
                                  'Value': '10.2.5.1',
                              },
                          ],
                      },
                  ],
                  'DhcpOptionsId': 'dopt-d9070ebb',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_egress_only_internet_gateways(**kwargs)

    

    Describes one or more of your egress-only Internet gateways.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways>`_    


    **Request Syntax** 
    ::

      response = client.describe_egress_only_internet_gateways(
          DryRun=True|False,
          EgressOnlyInternetGatewayIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayIds: list
    :param EgressOnlyInternetGatewayIds: 

      One or more egress-only Internet gateway IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'EgressOnlyInternetGateways': [
                {
                    'Attachments': [
                        {
                            'State': 'attaching'|'attached'|'detaching'|'detached',
                            'VpcId': 'string'
                        },
                    ],
                    'EgressOnlyInternetGatewayId': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **EgressOnlyInternetGateways** *(list) --* 

          Information about the egress-only Internet gateways.

          
          

          - *(dict) --* 

            Describes an egress-only Internet gateway.

            
            

            - **Attachments** *(list) --* 

              Information about the attachment of the egress-only Internet gateway.

              
              

              - *(dict) --* 

                Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.

                
                

                - **State** *(string) --* 

                  The current state of the attachment.

                  
                

                - **VpcId** *(string) --* 

                  The ID of the VPC.

                  
            
          
            

            - **EgressOnlyInternetGatewayId** *(string) --* 

              The ID of the egress-only Internet gateway.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results.

          
    

  .. py:method:: describe_elastic_gpus(**kwargs)

    

    Describes the Elastic GPUs associated with your instances. For more information about Elastic GPUs, see `Amazon EC2 Elastic GPUs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus>`_    


    **Request Syntax** 
    ::

      response = client.describe_elastic_gpus(
          ElasticGpuIds=[
              'string',
          ],
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type ElasticGpuIds: list
    :param ElasticGpuIds: 

      One or more Elastic GPU IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone in which the Elastic GPU resides. 
       
      * ``elastic-gpu-health`` - The status of the Elastic GPU (``OK`` | ``IMPAIRED`` ). 
       
      * ``elastic-gpu-state`` - The state of the Elastic GPU (``ATTACHED`` ). 
       
      * ``elastic-gpu-type`` - The type of Elastic GPU; for example, ``eg1.medium`` . 
       
      * ``instance-id`` - The ID of the instance to which the Elastic GPU is associated. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ElasticGpuSet': [
                {
                    'ElasticGpuId': 'string',
                    'AvailabilityZone': 'string',
                    'ElasticGpuType': 'string',
                    'ElasticGpuHealth': {
                        'Status': 'OK'|'IMPAIRED'
                    },
                    'ElasticGpuState': 'ATTACHED',
                    'InstanceId': 'string'
                },
            ],
            'MaxResults': 123,
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **ElasticGpuSet** *(list) --* 

          Information about the Elastic GPUs.

          
          

          - *(dict) --* 

            Describes an Elastic GPU.

            
            

            - **ElasticGpuId** *(string) --* 

              The ID of the Elastic GPU.

              
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone in the which the Elastic GPU resides.

              
            

            - **ElasticGpuType** *(string) --* 

              The type of Elastic GPU.

              
            

            - **ElasticGpuHealth** *(dict) --* 

              The status of the Elastic GPU.

              
              

              - **Status** *(string) --* 

                The health status.

                
          
            

            - **ElasticGpuState** *(string) --* 

              The state of the Elastic GPU.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance to which the Elastic GPU is attached.

              
        
      
        

        - **MaxResults** *(integer) --* 

          The total number of items to return. If the total number of items available is more than the value specified in max-items then a Next-Token will be provided in the output that you can use to resume pagination.

          
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_export_tasks(**kwargs)

    

    Describes one or more of your export tasks.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks>`_    


    **Request Syntax** 
    ::

      response = client.describe_export_tasks(
          ExportTaskIds=[
              'string',
          ]
      )
    :type ExportTaskIds: list
    :param ExportTaskIds: 

      One or more export task IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ExportTasks': [
                {
                    'Description': 'string',
                    'ExportTaskId': 'string',
                    'ExportToS3Task': {
                        'ContainerFormat': 'ova',
                        'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
                        'S3Bucket': 'string',
                        'S3Key': 'string'
                    },
                    'InstanceExportDetails': {
                        'InstanceId': 'string',
                        'TargetEnvironment': 'citrix'|'vmware'|'microsoft'
                    },
                    'State': 'active'|'cancelling'|'cancelled'|'completed',
                    'StatusMessage': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeExportTasks.

        
        

        - **ExportTasks** *(list) --* 

          Information about the export tasks.

          
          

          - *(dict) --* 

            Describes an instance export task.

            
            

            - **Description** *(string) --* 

              A description of the resource being exported.

              
            

            - **ExportTaskId** *(string) --* 

              The ID of the export task.

              
            

            - **ExportToS3Task** *(dict) --* 

              Information about the export task.

              
              

              - **ContainerFormat** *(string) --* 

                The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

                
              

              - **DiskImageFormat** *(string) --* 

                The format for the exported image.

                
              

              - **S3Bucket** *(string) --* 

                The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account ``vm-import-export@amazon.com`` .

                
              

              - **S3Key** *(string) --* 

                The encryption key for your S3 bucket.

                
          
            

            - **InstanceExportDetails** *(dict) --* 

              Information about the instance to export.

              
              

              - **InstanceId** *(string) --* 

                The ID of the resource being exported.

                
              

              - **TargetEnvironment** *(string) --* 

                The target virtualization environment.

                
          
            

            - **State** *(string) --* 

              The state of the export task.

              
            

            - **StatusMessage** *(string) --* 

              The status message related to the export task.

              
        
      
    

  .. py:method:: describe_flow_logs(**kwargs)

    

    Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs>`_    


    **Request Syntax** 
    ::

      response = client.describe_flow_logs(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          FlowLogIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``deliver-log-status`` - The status of the logs delivery (``SUCCESS`` | ``FAILED`` ). 
       
      * ``flow-log-id`` - The ID of the flow log. 
       
      * ``log-group-name`` - The name of the log group. 
       
      * ``resource-id`` - The ID of the VPC, subnet, or network interface. 
       
      * ``traffic-type`` - The type of traffic (``ACCEPT`` | ``REJECT`` | ``ALL`` ) 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type FlowLogIds: list
    :param FlowLogIds: 

      One or more flow log IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the flow log IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'FlowLogs': [
                {
                    'CreationTime': datetime(2015, 1, 1),
                    'DeliverLogsErrorMessage': 'string',
                    'DeliverLogsPermissionArn': 'string',
                    'DeliverLogsStatus': 'string',
                    'FlowLogId': 'string',
                    'FlowLogStatus': 'string',
                    'LogGroupName': 'string',
                    'ResourceId': 'string',
                    'TrafficType': 'ACCEPT'|'REJECT'|'ALL'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeFlowLogs.

        
        

        - **FlowLogs** *(list) --* 

          Information about the flow logs.

          
          

          - *(dict) --* 

            Describes a flow log.

            
            

            - **CreationTime** *(datetime) --* 

              The date and time the flow log was created.

              
            

            - **DeliverLogsErrorMessage** *(string) --* 

              Information about the error that occurred. ``Rate limited`` indicates that CloudWatch logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of CloudWatch Logs log groups that you can create. ``Access error`` indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. ``Unknown error`` indicates an internal error.

              
            

            - **DeliverLogsPermissionArn** *(string) --* 

              The ARN of the IAM role that posts logs to CloudWatch Logs.

              
            

            - **DeliverLogsStatus** *(string) --* 

              The status of the logs delivery (``SUCCESS`` | ``FAILED`` ).

              
            

            - **FlowLogId** *(string) --* 

              The flow log ID.

              
            

            - **FlowLogStatus** *(string) --* 

              The status of the flow log (``ACTIVE`` ).

              
            

            - **LogGroupName** *(string) --* 

              The name of the flow log group.

              
            

            - **ResourceId** *(string) --* 

              The ID of the resource on which the flow log was created.

              
            

            - **TrafficType** *(string) --* 

              The type of traffic captured for the flow log.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_fpga_images(**kwargs)

    

    Describes one or more available Amazon FPGA Images (AFIs). These include public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages>`_    


    **Request Syntax** 
    ::

      response = client.describe_fpga_images(
          DryRun=True|False,
          FpgaImageIds=[
              'string',
          ],
          Owners=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          NextToken='string',
          MaxResults=123
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type FpgaImageIds: list
    :param FpgaImageIds: 

      One or more AFI IDs.

      

    
      - *(string) --* 

      
  
    :type Owners: list
    :param Owners: 

      Filters the AFI by owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` ).

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``create-time`` - The creation time of the AFI. 
       
      * ``fpga-image-id`` - The FPGA image identifier (AFI ID). 
       
      * ``fpga-image-global-id`` - The global FPGA image identifier (AGFI ID). 
       
      * ``name`` - The name of the AFI. 
       
      * ``owner-id`` - The AWS account ID of the AFI owner. 
       
      * ``product-code`` - The product code. 
       
      * ``shell-version`` - The version of the AWS Shell that was used to create the bitstream. 
       
      * ``state`` - The state of the AFI (``pending`` | ``failed`` | ``available`` | ``unavailable`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``update-time`` - The time of the most recent update. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'FpgaImages': [
                {
                    'FpgaImageId': 'string',
                    'FpgaImageGlobalId': 'string',
                    'Name': 'string',
                    'Description': 'string',
                    'ShellVersion': 'string',
                    'PciId': {
                        'DeviceId': 'string',
                        'VendorId': 'string',
                        'SubsystemId': 'string',
                        'SubsystemVendorId': 'string'
                    },
                    'State': {
                        'Code': 'pending'|'failed'|'available'|'unavailable',
                        'Message': 'string'
                    },
                    'CreateTime': datetime(2015, 1, 1),
                    'UpdateTime': datetime(2015, 1, 1),
                    'OwnerId': 'string',
                    'OwnerAlias': 'string',
                    'ProductCodes': [
                        {
                            'ProductCodeId': 'string',
                            'ProductCodeType': 'devpay'|'marketplace'
                        },
                    ],
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **FpgaImages** *(list) --* 

          Information about one or more FPGA images.

          
          

          - *(dict) --* 

            Describes an Amazon FPGA image (AFI).

            
            

            - **FpgaImageId** *(string) --* 

              The FPGA image identifier (AFI ID).

              
            

            - **FpgaImageGlobalId** *(string) --* 

              The global FPGA image identifier (AGFI ID).

              
            

            - **Name** *(string) --* 

              The name of the AFI.

              
            

            - **Description** *(string) --* 

              The description of the AFI.

              
            

            - **ShellVersion** *(string) --* 

              The version of the AWS Shell that was used to create the bitstream.

              
            

            - **PciId** *(dict) --* 

              Information about the PCI bus.

              
              

              - **DeviceId** *(string) --* 

                The ID of the device.

                
              

              - **VendorId** *(string) --* 

                The ID of the vendor.

                
              

              - **SubsystemId** *(string) --* 

                The ID of the subsystem.

                
              

              - **SubsystemVendorId** *(string) --* 

                The ID of the vendor for the subsystem.

                
          
            

            - **State** *(dict) --* 

              Information about the state of the AFI.

              
              

              - **Code** *(string) --* 

                The state. The following are the possible values:

                 

                 
                * ``pending`` - AFI bitstream generation is in progress. 
                 
                * ``available`` - The AFI is available for use. 
                 
                * ``failed`` - AFI bitstream generation failed. 
                 
                * ``unavailable`` - The AFI is no longer available for use. 
                 

                
              

              - **Message** *(string) --* 

                If the state is ``failed`` , this is the error message.

                
          
            

            - **CreateTime** *(datetime) --* 

              The date and time the AFI was created.

              
            

            - **UpdateTime** *(datetime) --* 

              The time of the most recent update to the AFI.

              
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the AFI owner.

              
            

            - **OwnerAlias** *(string) --* 

              The alias of the AFI owner. Possible values include ``self`` , ``amazon`` , and ``aws-marketplace`` .

              
            

            - **ProductCodes** *(list) --* 

              The product codes for the AFI.

              
              

              - *(dict) --* 

                Describes a product code.

                
                

                - **ProductCodeId** *(string) --* 

                  The product code.

                  
                

                - **ProductCodeType** *(string) --* 

                  The type of product code.

                  
            
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the AFI.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_host_reservation_offerings(**kwargs)

    

    Describes the Dedicated Host Reservations that are available to purchase.

     

    The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the offering matches that of the Dedicated Host/s it will be associated with. For an overview of supported instance types, see `Dedicated Hosts Overview <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings>`_    


    **Request Syntax** 
    ::

      response = client.describe_host_reservation_offerings(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxDuration=123,
          MaxResults=123,
          MinDuration=123,
          NextToken='string',
          OfferingId='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``instance-family`` - The instance family of the offering (e.g., ``m4`` ). 
       
      * ``payment-option`` - The payment option (``NoUpfront`` | ``PartialUpfront`` | ``AllUpfront`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxDuration: integer
    :param MaxDuration: 

      This is the maximum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned ``nextToken`` value. This value can be between 5 and 500; if ``maxResults`` is given a larger value than 500, you will receive an error.

      

    
    :type MinDuration: integer
    :param MinDuration: 

      This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to use to retrieve the next page of results.

      

    
    :type OfferingId: string
    :param OfferingId: 

      The ID of the reservation offering.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'OfferingSet': [
                {
                    'CurrencyCode': 'USD',
                    'Duration': 123,
                    'HourlyPrice': 'string',
                    'InstanceFamily': 'string',
                    'OfferingId': 'string',
                    'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
                    'UpfrontPrice': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
        

        - **OfferingSet** *(list) --* 

          Information about the offerings.

          
          

          - *(dict) --* 

            Details about the Dedicated Host Reservation offering.

            
            

            - **CurrencyCode** *(string) --* 

              The currency of the offering.

              
            

            - **Duration** *(integer) --* 

              The duration of the offering (in seconds).

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price of the offering.

              
            

            - **InstanceFamily** *(string) --* 

              The instance family of the offering.

              
            

            - **OfferingId** *(string) --* 

              The ID of the offering.

              
            

            - **PaymentOption** *(string) --* 

              The available payment option.

              
            

            - **UpfrontPrice** *(string) --* 

              The upfront price of the offering. Does not apply to No Upfront offerings.

              
        
      
    

  .. py:method:: describe_host_reservations(**kwargs)

    

    Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations>`_    


    **Request Syntax** 
    ::

      response = client.describe_host_reservations(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          HostReservationIdSet=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``instance-family`` - The instance family (e.g., ``m4`` ). 
       
      * ``payment-option`` - The payment option (``NoUpfront`` | ``PartialUpfront`` | ``AllUpfront`` ). 
       
      * ``state`` - The state of the reservation (``payment-pending`` | ``payment-failed`` | ``active`` | ``retired`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type HostReservationIdSet: list
    :param HostReservationIdSet: 

      One or more host reservation IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned ``nextToken`` value. This value can be between 5 and 500; if ``maxResults`` is given a larger value than 500, you will receive an error.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to use to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'HostReservationSet': [
                {
                    'Count': 123,
                    'CurrencyCode': 'USD',
                    'Duration': 123,
                    'End': datetime(2015, 1, 1),
                    'HostIdSet': [
                        'string',
                    ],
                    'HostReservationId': 'string',
                    'HourlyPrice': 'string',
                    'InstanceFamily': 'string',
                    'OfferingId': 'string',
                    'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
                    'Start': datetime(2015, 1, 1),
                    'State': 'payment-pending'|'payment-failed'|'active'|'retired',
                    'UpfrontPrice': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **HostReservationSet** *(list) --* 

          Details about the reservation's configuration.

          
          

          - *(dict) --* 

            Details about the Dedicated Host Reservation and associated Dedicated Hosts.

            
            

            - **Count** *(integer) --* 

              The number of Dedicated Hosts the reservation is associated with.

              
            

            - **CurrencyCode** *(string) --* 

              The currency in which the ``upfrontPrice`` and ``hourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

              
            

            - **Duration** *(integer) --* 

              The length of the reservation's term, specified in seconds. Can be ``31536000 (1 year)`` | ``94608000 (3 years)`` .

              
            

            - **End** *(datetime) --* 

              The date and time that the reservation ends.

              
            

            - **HostIdSet** *(list) --* 

              The IDs of the Dedicated Hosts associated with the reservation.

              
              

              - *(string) --* 
          
            

            - **HostReservationId** *(string) --* 

              The ID of the reservation that specifies the associated Dedicated Hosts.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price of the reservation.

              
            

            - **InstanceFamily** *(string) --* 

              The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

              
            

            - **OfferingId** *(string) --* 

              The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

              
            

            - **PaymentOption** *(string) --* 

              The payment option selected for this reservation.

              
            

            - **Start** *(datetime) --* 

              The date and time that the reservation started.

              
            

            - **State** *(string) --* 

              The state of the reservation.

              
            

            - **UpfrontPrice** *(string) --* 

              The upfront price of the reservation.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_hosts(**kwargs)

    

    Describes one or more of your Dedicated Hosts.

     

    The results describe only the Dedicated Hosts in the region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released will be listed with the state ``released`` .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts>`_    


    **Request Syntax** 
    ::

      response = client.describe_hosts(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          HostIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``instance-type`` - The instance type size that the Dedicated Host is configured to support. 
       
      * ``auto-placement`` - Whether auto-placement is enabled or disabled (``on`` | ``off`` ). 
       
      * ``host-reservation-id`` - The ID of the reservation assigned to this host. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance 
       
      * ``state`` - The allocation state of the Dedicated Host (``available`` | ``under-assessment`` | ``permanent-failure`` | ``released`` | ``released-permanent-failure`` ). 
       
      * ``availability-zone`` - The Availability Zone of the host. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type HostIds: list
    :param HostIds: 

      The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned ``nextToken`` value. This value can be between 5 and 500; if ``maxResults`` is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Hosts': [
                {
                    'AutoPlacement': 'on'|'off',
                    'AvailabilityZone': 'string',
                    'AvailableCapacity': {
                        'AvailableInstanceCapacity': [
                            {
                                'AvailableCapacity': 123,
                                'InstanceType': 'string',
                                'TotalCapacity': 123
                            },
                        ],
                        'AvailableVCpus': 123
                    },
                    'ClientToken': 'string',
                    'HostId': 'string',
                    'HostProperties': {
                        'Cores': 123,
                        'InstanceType': 'string',
                        'Sockets': 123,
                        'TotalVCpus': 123
                    },
                    'HostReservationId': 'string',
                    'Instances': [
                        {
                            'InstanceId': 'string',
                            'InstanceType': 'string'
                        },
                    ],
                    'State': 'available'|'under-assessment'|'permanent-failure'|'released'|'released-permanent-failure'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeHosts.

        
        

        - **Hosts** *(list) --* 

          Information about the Dedicated Hosts.

          
          

          - *(dict) --* 

            Describes the properties of the Dedicated Host.

            
            

            - **AutoPlacement** *(string) --* 

              Whether auto-placement is on or off.

              
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the Dedicated Host.

              
            

            - **AvailableCapacity** *(dict) --* 

              The number of new instances that can be launched onto the Dedicated Host.

              
              

              - **AvailableInstanceCapacity** *(list) --* 

                The total number of instances that the Dedicated Host supports.

                
                

                - *(dict) --* 

                  Information about the instance type that the Dedicated Host supports.

                  
                  

                  - **AvailableCapacity** *(integer) --* 

                    The number of instances that can still be launched onto the Dedicated Host.

                    
                  

                  - **InstanceType** *(string) --* 

                    The instance type size supported by the Dedicated Host.

                    
                  

                  - **TotalCapacity** *(integer) --* 

                    The total number of instances that can be launched onto the Dedicated Host.

                    
              
            
              

              - **AvailableVCpus** *(integer) --* 

                The number of vCPUs available on the Dedicated Host.

                
          
            

            - **ClientToken** *(string) --* 

              Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

              
            

            - **HostId** *(string) --* 

              The ID of the Dedicated Host.

              
            

            - **HostProperties** *(dict) --* 

              The hardware specifications of the Dedicated Host.

              
              

              - **Cores** *(integer) --* 

                The number of cores on the Dedicated Host.

                
              

              - **InstanceType** *(string) --* 

                The instance type size that the Dedicated Host supports (for example, ``m3.medium`` ).

                
              

              - **Sockets** *(integer) --* 

                The number of sockets on the Dedicated Host.

                
              

              - **TotalVCpus** *(integer) --* 

                The number of vCPUs on the Dedicated Host.

                
          
            

            - **HostReservationId** *(string) --* 

              The reservation ID of the Dedicated Host. This returns a ``null`` response if the Dedicated Host doesn't have an associated reservation.

              
            

            - **Instances** *(list) --* 

              The IDs and instance type that are currently running on the Dedicated Host.

              
              

              - *(dict) --* 

                Describes an instance running on a Dedicated Host.

                
                

                - **InstanceId** *(string) --* 

                  the IDs of instances that are running on the Dedicated Host.

                  
                

                - **InstanceType** *(string) --* 

                  The instance type size (for example, ``m3.medium`` ) of the running instance.

                  
            
          
            

            - **State** *(string) --* 

              The Dedicated Host's state.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_iam_instance_profile_associations(**kwargs)

    

    Describes your IAM instance profile associations.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations>`_    


    **Request Syntax** 
    ::

      response = client.describe_iam_instance_profile_associations(
          AssociationIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type AssociationIds: list
    :param AssociationIds: 

      One or more IAM instance profile associations.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``instance-id`` - The ID of the instance. 
       
      * ``state`` - The state of the association (``associating`` | ``associated`` | ``disassociating`` | ``disassociated`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'IamInstanceProfileAssociations': [
                {
                    'AssociationId': 'string',
                    'InstanceId': 'string',
                    'IamInstanceProfile': {
                        'Arn': 'string',
                        'Id': 'string'
                    },
                    'State': 'associating'|'associated'|'disassociating'|'disassociated',
                    'Timestamp': datetime(2015, 1, 1)
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **IamInstanceProfileAssociations** *(list) --* 

          Information about one or more IAM instance profile associations.

          
          

          - *(dict) --* 

            Describes an association between an IAM instance profile and an instance.

            
            

            - **AssociationId** *(string) --* 

              The ID of the association.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **IamInstanceProfile** *(dict) --* 

              The IAM instance profile.

              
              

              - **Arn** *(string) --* 

                The Amazon Resource Name (ARN) of the instance profile.

                
              

              - **Id** *(string) --* 

                The ID of the instance profile.

                
          
            

            - **State** *(string) --* 

              The state of the association.

              
            

            - **Timestamp** *(datetime) --* 

              The time the IAM instance profile was associated with the instance.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_id_format(**kwargs)

    

    Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.

     

    The following resource types support longer IDs: ``instance`` | ``reservation`` | ``snapshot`` | ``volume`` . 

     

    These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the  ModifyIdFormat command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant ``Describe`` command for the resource type.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat>`_    


    **Request Syntax** 
    ::

      response = client.describe_id_format(
          Resource='string'
      )
    :type Resource: string
    :param Resource: 

      The type of resource: ``instance`` | ``reservation`` | ``snapshot`` | ``volume``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Statuses': [
                {
                    'Deadline': datetime(2015, 1, 1),
                    'Resource': 'string',
                    'UseLongIds': True|False
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeIdFormat.

        
        

        - **Statuses** *(list) --* 

          Information about the ID format for the resource.

          
          

          - *(dict) --* 

            Describes the ID format for a resource.

            
            

            - **Deadline** *(datetime) --* 

              The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

              
            

            - **Resource** *(string) --* 

              The type of resource.

              
            

            - **UseLongIds** *(boolean) --* 

              Indicates whether longer IDs (17-character IDs) are enabled for the resource.

              
        
      
    

  .. py:method:: describe_identity_id_format(**kwargs)

    

    Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see `Resource IDs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

     

    The following resource types support longer IDs: ``instance`` | ``reservation`` | ``snapshot`` | ``volume`` . 

     

    These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat>`_    


    **Request Syntax** 
    ::

      response = client.describe_identity_id_format(
          PrincipalArn='string',
          Resource='string'
      )
    :type PrincipalArn: string
    :param PrincipalArn: **[REQUIRED]** 

      The ARN of the principal, which can be an IAM role, IAM user, or the root user.

      

    
    :type Resource: string
    :param Resource: 

      The type of resource: ``instance`` | ``reservation`` | ``snapshot`` | ``volume``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Statuses': [
                {
                    'Deadline': datetime(2015, 1, 1),
                    'Resource': 'string',
                    'UseLongIds': True|False
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeIdentityIdFormat.

        
        

        - **Statuses** *(list) --* 

          Information about the ID format for the resources.

          
          

          - *(dict) --* 

            Describes the ID format for a resource.

            
            

            - **Deadline** *(datetime) --* 

              The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

              
            

            - **Resource** *(string) --* 

              The type of resource.

              
            

            - **UseLongIds** *(boolean) --* 

              Indicates whether longer IDs (17-character IDs) are enabled for the resource.

              
        
      
    

  .. py:method:: describe_image_attribute(**kwargs)

    

    Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_image_attribute(
          Attribute='description'|'kernel'|'ramdisk'|'launchPermission'|'productCodes'|'blockDeviceMapping'|'sriovNetSupport',
          ImageId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The AMI attribute.

       

       **Note** : Depending on your account privileges, the ``blockDeviceMapping`` attribute may return a ``Client.AuthFailure`` error. If this happens, use  DescribeImages to get information about the block device mapping for the AMI.

      

    
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'VirtualName': 'string',
                    'Ebs': {
                        'Encrypted': True|False,
                        'DeleteOnTermination': True|False,
                        'Iops': 123,
                        'SnapshotId': 'string',
                        'VolumeSize': 123,
                        'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                    },
                    'NoDevice': 'string'
                },
            ],
            'ImageId': 'string',
            'LaunchPermissions': [
                {
                    'Group': 'all',
                    'UserId': 'string'
                },
            ],
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'Description': {
                'Value': 'string'
            },
            'KernelId': {
                'Value': 'string'
            },
            'RamdiskId': {
                'Value': 'string'
            },
            'SriovNetSupport': {
                'Value': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes an image attribute.

        
        

        - **BlockDeviceMappings** *(list) --* 

          One or more block device mapping entries.

          
          

          - *(dict) --* 

            Describes a block device mapping.

            
            

            - **DeviceName** *(string) --* 

              The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

              
            

            - **VirtualName** *(string) --* 

              The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

               

              Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

              
            

            - **Ebs** *(dict) --* 

              Parameters used to automatically set up EBS volumes when the instance is launched.

              
              

              - **Encrypted** *(boolean) --* 

                Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                
              

              - **DeleteOnTermination** *(boolean) --* 

                Indicates whether the EBS volume is deleted on instance termination.

                
              

              - **Iops** *(integer) --* 

                The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                 

                Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                 

                Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                
              

              - **SnapshotId** *(string) --* 

                The ID of the snapshot.

                
              

              - **VolumeSize** *(integer) --* 

                The size of the volume, in GiB.

                 

                Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                 

                Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                
              

              - **VolumeType** *(string) --* 

                The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                 

                Default: ``standard``  

                
          
            

            - **NoDevice** *(string) --* 

              Suppresses the specified device included in the block device mapping of the AMI.

              
        
      
        

        - **ImageId** *(string) --* 

          The ID of the AMI.

          
        

        - **LaunchPermissions** *(list) --* 

          One or more launch permissions.

          
          

          - *(dict) --* 

            Describes a launch permission.

            
            

            - **Group** *(string) --* 

              The name of the group.

              
            

            - **UserId** *(string) --* 

              The AWS account ID.

              
        
      
        

        - **ProductCodes** *(list) --* 

          One or more product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **Description** *(dict) --* 

          A description for the AMI.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **KernelId** *(dict) --* 

          The kernel ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **RamdiskId** *(dict) --* 

          The RAM disk ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **SriovNetSupport** *(dict) --* 

          Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
    

  .. py:method:: describe_images(**kwargs)

    

    Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.

     

    .. note::

       

      Deregistered images are included in the returned results for an unspecified interval after deregistration.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_    


    **Request Syntax** 
    ::

      response = client.describe_images(
          ExecutableUsers=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ImageIds=[
              'string',
          ],
          Owners=[
              'string',
          ],
          DryRun=True|False
      )
    :type ExecutableUsers: list
    :param ExecutableUsers: 

      Scopes the images by users with explicit launch permissions. Specify an AWS account ID, ``self`` (the sender of the request), or ``all`` (public AMIs).

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``architecture`` - The image architecture (``i386`` | ``x86_64`` ). 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``block-device-mapping.snapshot-id`` - The ID of the snapshot used for the EBS volume. 
       
      * ``block-device-mapping.volume-size`` - The volume size of the EBS volume, in GiB. 
       
      * ``block-device-mapping.volume-type`` - The volume type of the EBS volume (``gp2`` | ``io1`` | ``st1`` | ``sc1`` | ``standard`` ). 
       
      * ``description`` - The description of the image (provided during image creation). 
       
      * ``ena-support`` - A Boolean that indicates whether enhanced networking with ENA is enabled. 
       
      * ``hypervisor`` - The hypervisor type (``ovm`` | ``xen`` ). 
       
      * ``image-id`` - The ID of the image. 
       
      * ``image-type`` - The image type (``machine`` | ``kernel`` | ``ramdisk`` ). 
       
      * ``is-public`` - A Boolean that indicates whether the image is public. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``manifest-location`` - The location of the image manifest. 
       
      * ``name`` - The name of the AMI (provided during image creation). 
       
      * ``owner-alias`` - String value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The AWS account ID of the image owner. 
       
      * ``platform`` - The platform. To only list Windows-based AMIs, use ``windows`` . 
       
      * ``product-code`` - The product code. 
       
      * ``product-code.type`` - The type of the product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``root-device-name`` - The name of the root device volume (for example, ``/dev/sda1`` ). 
       
      * ``root-device-type`` - The type of the root device volume (``ebs`` | ``instance-store`` ). 
       
      * ``state`` - The state of the image (``available`` | ``pending`` | ``failed`` ). 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - The message for the state change. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``virtualization-type`` - The virtualization type (``paravirtual`` | ``hvm`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ImageIds: list
    :param ImageIds: 

      One or more image IDs.

       

      Default: Describes all images available to you.

      

    
      - *(string) --* 

      
  
    :type Owners: list
    :param Owners: 

      Filters the images by the owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` | ``microsoft`` ). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Images': [
                {
                    'Architecture': 'i386'|'x86_64',
                    'CreationDate': 'string',
                    'ImageId': 'string',
                    'ImageLocation': 'string',
                    'ImageType': 'machine'|'kernel'|'ramdisk',
                    'Public': True|False,
                    'KernelId': 'string',
                    'OwnerId': 'string',
                    'Platform': 'Windows',
                    'ProductCodes': [
                        {
                            'ProductCodeId': 'string',
                            'ProductCodeType': 'devpay'|'marketplace'
                        },
                    ],
                    'RamdiskId': 'string',
                    'State': 'pending'|'available'|'invalid'|'deregistered'|'transient'|'failed'|'error',
                    'BlockDeviceMappings': [
                        {
                            'DeviceName': 'string',
                            'VirtualName': 'string',
                            'Ebs': {
                                'Encrypted': True|False,
                                'DeleteOnTermination': True|False,
                                'Iops': 123,
                                'SnapshotId': 'string',
                                'VolumeSize': 123,
                                'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                            },
                            'NoDevice': 'string'
                        },
                    ],
                    'Description': 'string',
                    'EnaSupport': True|False,
                    'Hypervisor': 'ovm'|'xen',
                    'ImageOwnerAlias': 'string',
                    'Name': 'string',
                    'RootDeviceName': 'string',
                    'RootDeviceType': 'ebs'|'instance-store',
                    'SriovNetSupport': 'string',
                    'StateReason': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VirtualizationType': 'hvm'|'paravirtual'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeImages.

        
        

        - **Images** *(list) --* 

          Information about one or more images.

          
          

          - *(dict) --* 

            Describes an image.

            
            

            - **Architecture** *(string) --* 

              The architecture of the image.

              
            

            - **CreationDate** *(string) --* 

              The date and time the image was created.

              
            

            - **ImageId** *(string) --* 

              The ID of the AMI.

              
            

            - **ImageLocation** *(string) --* 

              The location of the AMI.

              
            

            - **ImageType** *(string) --* 

              The type of image.

              
            

            - **Public** *(boolean) --* 

              Indicates whether the image has public launch permissions. The value is ``true`` if this image has public launch permissions or ``false`` if it has only implicit and explicit launch permissions.

              
            

            - **KernelId** *(string) --* 

              The kernel associated with the image, if any. Only applicable for machine images.

              
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the image owner.

              
            

            - **Platform** *(string) --* 

              The value is ``Windows`` for Windows AMIs; otherwise blank.

              
            

            - **ProductCodes** *(list) --* 

              Any product codes associated with the AMI.

              
              

              - *(dict) --* 

                Describes a product code.

                
                

                - **ProductCodeId** *(string) --* 

                  The product code.

                  
                

                - **ProductCodeType** *(string) --* 

                  The type of product code.

                  
            
          
            

            - **RamdiskId** *(string) --* 

              The RAM disk associated with the image, if any. Only applicable for machine images.

              
            

            - **State** *(string) --* 

              The current state of the AMI. If the state is ``available`` , the image is successfully registered and can be used to launch an instance.

              
            

            - **BlockDeviceMappings** *(list) --* 

              Any block device mapping entries.

              
              

              - *(dict) --* 

                Describes a block device mapping.

                
                

                - **DeviceName** *(string) --* 

                  The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                  
                

                - **VirtualName** *(string) --* 

                  The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                   

                  Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                  
                

                - **Ebs** *(dict) --* 

                  Parameters used to automatically set up EBS volumes when the instance is launched.

                  
                  

                  - **Encrypted** *(boolean) --* 

                    Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                    
                  

                  - **DeleteOnTermination** *(boolean) --* 

                    Indicates whether the EBS volume is deleted on instance termination.

                    
                  

                  - **Iops** *(integer) --* 

                    The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                     

                    Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                     

                    Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                    
                  

                  - **SnapshotId** *(string) --* 

                    The ID of the snapshot.

                    
                  

                  - **VolumeSize** *(integer) --* 

                    The size of the volume, in GiB.

                     

                    Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                     

                    Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                    
                  

                  - **VolumeType** *(string) --* 

                    The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                     

                    Default: ``standard``  

                    
              
                

                - **NoDevice** *(string) --* 

                  Suppresses the specified device included in the block device mapping of the AMI.

                  
            
          
            

            - **Description** *(string) --* 

              The description of the AMI that was provided during image creation.

              
            

            - **EnaSupport** *(boolean) --* 

              Specifies whether enhanced networking with ENA is enabled.

              
            

            - **Hypervisor** *(string) --* 

              The hypervisor type of the image.

              
            

            - **ImageOwnerAlias** *(string) --* 

              The AWS account alias (for example, ``amazon`` , ``self`` ) or the AWS account ID of the AMI owner.

              
            

            - **Name** *(string) --* 

              The name of the AMI that was provided during image creation.

              
            

            - **RootDeviceName** *(string) --* 

              The device name of the root device (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

              
            

            - **RootDeviceType** *(string) --* 

              The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.

              
            

            - **SriovNetSupport** *(string) --* 

              Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

              
            

            - **StateReason** *(dict) --* 

              The reason for the state change.

              
              

              - **Code** *(string) --* 

                The reason code for the state change.

                
              

              - **Message** *(string) --* 

                The message for the state change.

                 

                 
                * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
                 
                * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
                 
                * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
                 
                * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
                 
                * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
                 
                * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
                 
                * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
                 
                * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
                 
                * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
                 

                
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the image.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VirtualizationType** *(string) --* 

              The type of virtualization of the AMI.

              
        
      
    

  .. py:method:: describe_import_image_tasks(**kwargs)

    

    Displays details about an import virtual machine or import snapshot tasks that are already created.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks>`_    


    **Request Syntax** 
    ::

      response = client.describe_import_image_tasks(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ImportTaskIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      Filter tasks using the ``task-state`` filter and one of the following values: active, completed, deleting, deleted.

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ImportTaskIds: list
    :param ImportTaskIds: 

      A list of import image task IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      A token that indicates the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImportImageTasks': [
                {
                    'Architecture': 'string',
                    'Description': 'string',
                    'Hypervisor': 'string',
                    'ImageId': 'string',
                    'ImportTaskId': 'string',
                    'LicenseType': 'string',
                    'Platform': 'string',
                    'Progress': 'string',
                    'SnapshotDetails': [
                        {
                            'Description': 'string',
                            'DeviceName': 'string',
                            'DiskImageSize': 123.0,
                            'Format': 'string',
                            'Progress': 'string',
                            'SnapshotId': 'string',
                            'Status': 'string',
                            'StatusMessage': 'string',
                            'Url': 'string',
                            'UserBucket': {
                                'S3Bucket': 'string',
                                'S3Key': 'string'
                            }
                        },
                    ],
                    'Status': 'string',
                    'StatusMessage': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeImportImageTasks.

        
        

        - **ImportImageTasks** *(list) --* 

          A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.

          
          

          - *(dict) --* 

            Describes an import image task.

            
            

            - **Architecture** *(string) --* 

              The architecture of the virtual machine.

               

              Valid values: ``i386`` | ``x86_64``  

              
            

            - **Description** *(string) --* 

              A description of the import task.

              
            

            - **Hypervisor** *(string) --* 

              The target hypervisor for the import task.

               

              Valid values: ``xen``  

              
            

            - **ImageId** *(string) --* 

              The ID of the Amazon Machine Image (AMI) of the imported virtual machine.

              
            

            - **ImportTaskId** *(string) --* 

              The ID of the import image task.

              
            

            - **LicenseType** *(string) --* 

              The license type of the virtual machine.

              
            

            - **Platform** *(string) --* 

              The description string for the import image task.

              
            

            - **Progress** *(string) --* 

              The percentage of progress of the import image task.

              
            

            - **SnapshotDetails** *(list) --* 

              Information about the snapshots.

              
              

              - *(dict) --* 

                Describes the snapshot created from the imported disk.

                
                

                - **Description** *(string) --* 

                  A description for the snapshot.

                  
                

                - **DeviceName** *(string) --* 

                  The block device mapping for the snapshot.

                  
                

                - **DiskImageSize** *(float) --* 

                  The size of the disk in the snapshot, in GiB.

                  
                

                - **Format** *(string) --* 

                  The format of the disk image from which the snapshot is created.

                  
                

                - **Progress** *(string) --* 

                  The percentage of progress for the task.

                  
                

                - **SnapshotId** *(string) --* 

                  The snapshot ID of the disk being imported.

                  
                

                - **Status** *(string) --* 

                  A brief status of the snapshot creation.

                  
                

                - **StatusMessage** *(string) --* 

                  A detailed status message for the snapshot creation.

                  
                

                - **Url** *(string) --* 

                  The URL used to access the disk image.

                  
                

                - **UserBucket** *(dict) --* 

                  The S3 bucket for the disk image.

                  
                  

                  - **S3Bucket** *(string) --* 

                    The S3 bucket from which the disk image was created.

                    
                  

                  - **S3Key** *(string) --* 

                    The file name of the disk image.

                    
              
            
          
            

            - **Status** *(string) --* 

              A brief status for the import image task.

              
            

            - **StatusMessage** *(string) --* 

              A descriptive status message for the import image task.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to get the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_import_snapshot_tasks(**kwargs)

    

    Describes your import snapshot tasks.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks>`_    


    **Request Syntax** 
    ::

      response = client.describe_import_snapshot_tasks(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ImportTaskIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ImportTaskIds: list
    :param ImportTaskIds: 

      A list of import snapshot task IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      A token that indicates the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImportSnapshotTasks': [
                {
                    'Description': 'string',
                    'ImportTaskId': 'string',
                    'SnapshotTaskDetail': {
                        'Description': 'string',
                        'DiskImageSize': 123.0,
                        'Format': 'string',
                        'Progress': 'string',
                        'SnapshotId': 'string',
                        'Status': 'string',
                        'StatusMessage': 'string',
                        'Url': 'string',
                        'UserBucket': {
                            'S3Bucket': 'string',
                            'S3Key': 'string'
                        }
                    }
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeImportSnapshotTasks.

        
        

        - **ImportSnapshotTasks** *(list) --* 

          A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.

          
          

          - *(dict) --* 

            Describes an import snapshot task.

            
            

            - **Description** *(string) --* 

              A description of the import snapshot task.

              
            

            - **ImportTaskId** *(string) --* 

              The ID of the import snapshot task.

              
            

            - **SnapshotTaskDetail** *(dict) --* 

              Describes an import snapshot task.

              
              

              - **Description** *(string) --* 

                The description of the snapshot.

                
              

              - **DiskImageSize** *(float) --* 

                The size of the disk in the snapshot, in GiB.

                
              

              - **Format** *(string) --* 

                The format of the disk image from which the snapshot is created.

                
              

              - **Progress** *(string) --* 

                The percentage of completion for the import snapshot task.

                
              

              - **SnapshotId** *(string) --* 

                The snapshot ID of the disk being imported.

                
              

              - **Status** *(string) --* 

                A brief status for the import snapshot task.

                
              

              - **StatusMessage** *(string) --* 

                A detailed status message for the import snapshot task.

                
              

              - **Url** *(string) --* 

                The URL of the disk image from which the snapshot is created.

                
              

              - **UserBucket** *(dict) --* 

                The S3 bucket for the disk image.

                
                

                - **S3Bucket** *(string) --* 

                  The S3 bucket from which the disk image was created.

                  
                

                - **S3Key** *(string) --* 

                  The file name of the disk image.

                  
            
          
        
      
        

        - **NextToken** *(string) --* 

          The token to use to get the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_instance_attribute(**kwargs)

    

    Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: ``instanceType`` | ``kernel`` | ``ramdisk`` | ``userData`` | ``disableApiTermination`` | ``instanceInitiatedShutdownBehavior`` | ``rootDeviceName`` | ``blockDeviceMapping`` | ``productCodes`` | ``sourceDestCheck`` | ``groupSet`` | ``ebsOptimized`` | ``sriovNetSupport``  

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_instance_attribute(
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          DryRun=True|False,
          InstanceId='string'
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The instance attribute.

       

      Note: The ``enaSupport`` attribute is not supported at this time.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'Ebs': {
                        'AttachTime': datetime(2015, 1, 1),
                        'DeleteOnTermination': True|False,
                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                        'VolumeId': 'string'
                    }
                },
            ],
            'DisableApiTermination': {
                'Value': True|False
            },
            'EnaSupport': {
                'Value': True|False
            },
            'EbsOptimized': {
                'Value': True|False
            },
            'InstanceId': 'string',
            'InstanceInitiatedShutdownBehavior': {
                'Value': 'string'
            },
            'InstanceType': {
                'Value': 'string'
            },
            'KernelId': {
                'Value': 'string'
            },
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'RamdiskId': {
                'Value': 'string'
            },
            'RootDeviceName': {
                'Value': 'string'
            },
            'SourceDestCheck': {
                'Value': True|False
            },
            'SriovNetSupport': {
                'Value': 'string'
            },
            'UserData': {
                'Value': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes an instance attribute.

        
        

        - **Groups** *(list) --* 

          The security groups associated with the instance.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **BlockDeviceMappings** *(list) --* 

          The block device mapping of the instance.

          
          

          - *(dict) --* 

            Describes a block device mapping.

            
            

            - **DeviceName** *(string) --* 

              The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

              
            

            - **Ebs** *(dict) --* 

              Parameters used to automatically set up EBS volumes when the instance is launched.

              
              

              - **AttachTime** *(datetime) --* 

                The time stamp when the attachment initiated.

                
              

              - **DeleteOnTermination** *(boolean) --* 

                Indicates whether the volume is deleted on instance termination.

                
              

              - **Status** *(string) --* 

                The attachment state.

                
              

              - **VolumeId** *(string) --* 

                The ID of the EBS volume.

                
          
        
      
        

        - **DisableApiTermination** *(dict) --* 

          If the value is ``true`` , you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EnaSupport** *(dict) --* 

          Indicates whether enhanced networking with ENA is enabled.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EbsOptimized** *(dict) --* 

          Indicates whether the instance is optimized for EBS I/O.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **InstanceInitiatedShutdownBehavior** *(dict) --* 

          Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **InstanceType** *(dict) --* 

          The instance type.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **KernelId** *(dict) --* 

          The kernel ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **RamdiskId** *(dict) --* 

          The RAM disk ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **RootDeviceName** *(dict) --* 

          The name of the root device (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **SourceDestCheck** *(dict) --* 

          Indicates whether source/destination checking is enabled. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **SriovNetSupport** *(dict) --* 

          Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **UserData** *(dict) --* 

          The user data.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
    

    **Examples** 

    This example describes the instance type of the specified instance.

    ::

      response = client.describe_instance_attribute(
          Attribute='instanceType',
          InstanceId='i-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'InstanceId': 'i-1234567890abcdef0',
          'InstanceType': {
              'Value': 't1.micro',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the ``disableApiTermination`` attribute of the specified instance.

    ::

      response = client.describe_instance_attribute(
          Attribute='disableApiTermination',
          InstanceId='i-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'DisableApiTermination': {
              'Value': 'false',
          },
          'InstanceId': 'i-1234567890abcdef0',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the ``blockDeviceMapping`` attribute of the specified instance.

    ::

      response = client.describe_instance_attribute(
          Attribute='blockDeviceMapping',
          InstanceId='i-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'BlockDeviceMappings': [
              {
                  'DeviceName': '/dev/sda1',
                  'Ebs': {
                      'AttachTime': datetime(2013, 5, 17, 22, 42, 34, 4, 137, 0),
                      'DeleteOnTermination': True,
                      'Status': 'attached',
                      'VolumeId': 'vol-049df61146c4d7901',
                  },
              },
              {
                  'DeviceName': '/dev/sdf',
                  'Ebs': {
                      'AttachTime': datetime(2013, 9, 10, 23, 7, 0, 1, 253, 0),
                      'DeleteOnTermination': False,
                      'Status': 'attached',
                      'VolumeId': 'vol-049df61146c4d7901',
                  },
              },
          ],
          'InstanceId': 'i-1234567890abcdef0',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_instance_status(**kwargs)

    

    Describes the status of one or more instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

     

    Instance status includes the following components:

     

     
    * **Status checks** - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see `Status Checks for Your Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html>`_ and `Troubleshooting Instances with Failed Status Checks <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 
     
    * **Scheduled events** - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see `Scheduled Events for Your Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 
     
    * **Instance state** - You can manage your instances from the moment you launch them through their termination. For more information, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 
     

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus>`_    


    **Request Syntax** 
    ::

      response = client.describe_instance_status(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string',
          DryRun=True|False,
          IncludeAllInstances=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.code`` - The code for the scheduled event (``instance-reboot`` | ``system-reboot`` | ``system-maintenance`` | ``instance-retirement`` | ``instance-stop`` ). 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.not-after`` - The latest end time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``event.not-before`` - The earliest start time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``instance-state-code`` - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-status.reachability`` - Filters on instance status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``instance-status.status`` - The status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       
      * ``system-status.reachability`` - Filters on system status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``system-status.status`` - The system status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

       

      Constraints: Maximum 100 explicitly specified instance IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IncludeAllInstances: boolean
    :param IncludeAllInstances: 

      When ``true`` , includes the health status for all instances. When ``false`` , includes the health status for running instances only.

       

      Default: ``false``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceStatuses': [
                {
                    'AvailabilityZone': 'string',
                    'Events': [
                        {
                            'Code': 'instance-reboot'|'system-reboot'|'system-maintenance'|'instance-retirement'|'instance-stop',
                            'Description': 'string',
                            'NotAfter': datetime(2015, 1, 1),
                            'NotBefore': datetime(2015, 1, 1)
                        },
                    ],
                    'InstanceId': 'string',
                    'InstanceState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceStatus': {
                        'Details': [
                            {
                                'ImpairedSince': datetime(2015, 1, 1),
                                'Name': 'reachability',
                                'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
                    },
                    'SystemStatus': {
                        'Details': [
                            {
                                'ImpairedSince': datetime(2015, 1, 1),
                                'Name': 'reachability',
                                'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
                    }
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeInstanceStatus.

        
        

        - **InstanceStatuses** *(list) --* 

          One or more instance status descriptions.

          
          

          - *(dict) --* 

            Describes the status of an instance.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the instance.

              
            

            - **Events** *(list) --* 

              Any scheduled events associated with the instance.

              
              

              - *(dict) --* 

                Describes a scheduled event for an instance.

                
                

                - **Code** *(string) --* 

                  The event code.

                  
                

                - **Description** *(string) --* 

                  A description of the event.

                   

                  After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

                  
                

                - **NotAfter** *(datetime) --* 

                  The latest scheduled end time for the event.

                  
                

                - **NotBefore** *(datetime) --* 

                  The earliest scheduled start time for the event.

                  
            
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceState** *(dict) --* 

              The intended state of the instance.  DescribeInstanceStatus requires that an instance be in the ``running`` state.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceStatus** *(dict) --* 

              Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

              
              

              - **Details** *(list) --* 

                The system instance health or application instance health.

                
                

                - *(dict) --* 

                  Describes the instance status.

                  
                  

                  - **ImpairedSince** *(datetime) --* 

                    The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

                    
                  

                  - **Name** *(string) --* 

                    The type of instance status.

                    
                  

                  - **Status** *(string) --* 

                    The status.

                    
              
            
              

              - **Status** *(string) --* 

                The status.

                
          
            

            - **SystemStatus** *(dict) --* 

              Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

              
              

              - **Details** *(list) --* 

                The system instance health or application instance health.

                
                

                - *(dict) --* 

                  Describes the instance status.

                  
                  

                  - **ImpairedSince** *(datetime) --* 

                    The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

                    
                  

                  - **Name** *(string) --* 

                    The type of instance status.

                    
                  

                  - **Status** *(string) --* 

                    The status.

                    
              
            
              

              - **Status** *(string) --* 

                The status.

                
          
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_instances(**kwargs)

    

    Describes one or more of your instances.

     

    If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.

     

    Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

     

    If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      response = client.describe_instances(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Reservations': [
                {
                    'Groups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'Instances': [
                        {
                            'AmiLaunchIndex': 123,
                            'ImageId': 'string',
                            'InstanceId': 'string',
                            'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                            'KernelId': 'string',
                            'KeyName': 'string',
                            'LaunchTime': datetime(2015, 1, 1),
                            'Monitoring': {
                                'State': 'disabled'|'disabling'|'enabled'|'pending'
                            },
                            'Placement': {
                                'AvailabilityZone': 'string',
                                'Affinity': 'string',
                                'GroupName': 'string',
                                'HostId': 'string',
                                'Tenancy': 'default'|'dedicated'|'host',
                                'SpreadDomain': 'string'
                            },
                            'Platform': 'Windows',
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string',
                            'ProductCodes': [
                                {
                                    'ProductCodeId': 'string',
                                    'ProductCodeType': 'devpay'|'marketplace'
                                },
                            ],
                            'PublicDnsName': 'string',
                            'PublicIpAddress': 'string',
                            'RamdiskId': 'string',
                            'State': {
                                'Code': 123,
                                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                            },
                            'StateTransitionReason': 'string',
                            'SubnetId': 'string',
                            'VpcId': 'string',
                            'Architecture': 'i386'|'x86_64',
                            'BlockDeviceMappings': [
                                {
                                    'DeviceName': 'string',
                                    'Ebs': {
                                        'AttachTime': datetime(2015, 1, 1),
                                        'DeleteOnTermination': True|False,
                                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                                        'VolumeId': 'string'
                                    }
                                },
                            ],
                            'ClientToken': 'string',
                            'EbsOptimized': True|False,
                            'EnaSupport': True|False,
                            'Hypervisor': 'ovm'|'xen',
                            'IamInstanceProfile': {
                                'Arn': 'string',
                                'Id': 'string'
                            },
                            'InstanceLifecycle': 'spot'|'scheduled',
                            'ElasticGpuAssociations': [
                                {
                                    'ElasticGpuId': 'string',
                                    'ElasticGpuAssociationId': 'string',
                                    'ElasticGpuAssociationState': 'string',
                                    'ElasticGpuAssociationTime': 'string'
                                },
                            ],
                            'NetworkInterfaces': [
                                {
                                    'Association': {
                                        'IpOwnerId': 'string',
                                        'PublicDnsName': 'string',
                                        'PublicIp': 'string'
                                    },
                                    'Attachment': {
                                        'AttachTime': datetime(2015, 1, 1),
                                        'AttachmentId': 'string',
                                        'DeleteOnTermination': True|False,
                                        'DeviceIndex': 123,
                                        'Status': 'attaching'|'attached'|'detaching'|'detached'
                                    },
                                    'Description': 'string',
                                    'Groups': [
                                        {
                                            'GroupName': 'string',
                                            'GroupId': 'string'
                                        },
                                    ],
                                    'Ipv6Addresses': [
                                        {
                                            'Ipv6Address': 'string'
                                        },
                                    ],
                                    'MacAddress': 'string',
                                    'NetworkInterfaceId': 'string',
                                    'OwnerId': 'string',
                                    'PrivateDnsName': 'string',
                                    'PrivateIpAddress': 'string',
                                    'PrivateIpAddresses': [
                                        {
                                            'Association': {
                                                'IpOwnerId': 'string',
                                                'PublicDnsName': 'string',
                                                'PublicIp': 'string'
                                            },
                                            'Primary': True|False,
                                            'PrivateDnsName': 'string',
                                            'PrivateIpAddress': 'string'
                                        },
                                    ],
                                    'SourceDestCheck': True|False,
                                    'Status': 'available'|'attaching'|'in-use'|'detaching',
                                    'SubnetId': 'string',
                                    'VpcId': 'string'
                                },
                            ],
                            'RootDeviceName': 'string',
                            'RootDeviceType': 'ebs'|'instance-store',
                            'SecurityGroups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'SourceDestCheck': True|False,
                            'SpotInstanceRequestId': 'string',
                            'SriovNetSupport': 'string',
                            'StateReason': {
                                'Code': 'string',
                                'Message': 'string'
                            },
                            'Tags': [
                                {
                                    'Key': 'string',
                                    'Value': 'string'
                                },
                            ],
                            'VirtualizationType': 'hvm'|'paravirtual'
                        },
                    ],
                    'OwnerId': 'string',
                    'RequesterId': 'string',
                    'ReservationId': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeInstances.

        
        

        - **Reservations** *(list) --* 

          Zero or more reservations.

          
          

          - *(dict) --* 

            Describes a reservation.

            
            

            - **Groups** *(list) --* 

              [EC2-Classic only] One or more security groups.

              
              

              - *(dict) --* 

                Describes a security group.

                
                

                - **GroupName** *(string) --* 

                  The name of the security group.

                  
                

                - **GroupId** *(string) --* 

                  The ID of the security group.

                  
            
          
            

            - **Instances** *(list) --* 

              One or more instances.

              
              

              - *(dict) --* 

                Describes an instance.

                
                

                - **AmiLaunchIndex** *(integer) --* 

                  The AMI launch index, which can be used to find this instance in the launch group.

                  
                

                - **ImageId** *(string) --* 

                  The ID of the AMI used to launch the instance.

                  
                

                - **InstanceId** *(string) --* 

                  The ID of the instance.

                  
                

                - **InstanceType** *(string) --* 

                  The instance type.

                  
                

                - **KernelId** *(string) --* 

                  The kernel associated with this instance, if applicable.

                  
                

                - **KeyName** *(string) --* 

                  The name of the key pair, if this instance was launched with an associated key pair.

                  
                

                - **LaunchTime** *(datetime) --* 

                  The time the instance was launched.

                  
                

                - **Monitoring** *(dict) --* 

                  The monitoring for the instance.

                  
                  

                  - **State** *(string) --* 

                    Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                    
              
                

                - **Placement** *(dict) --* 

                  The location where the instance launched, if applicable.

                  
                  

                  - **AvailabilityZone** *(string) --* 

                    The Availability Zone of the instance.

                    
                  

                  - **Affinity** *(string) --* 

                    The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

                    
                  

                  - **GroupName** *(string) --* 

                    The name of the placement group the instance is in (for cluster compute instances).

                    
                  

                  - **HostId** *(string) --* 

                    The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

                    
                  

                  - **Tenancy** *(string) --* 

                    The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

                    
                  

                  - **SpreadDomain** *(string) --* 

                    Reserved for future use.

                    
              
                

                - **Platform** *(string) --* 

                  The value is ``Windows`` for Windows instances; otherwise blank.

                  
                

                - **PrivateDnsName** *(string) --* 

                  (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the ``running`` state. 

                   

                  [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

                  
                

                - **PrivateIpAddress** *(string) --* 

                  The private IPv4 address assigned to the instance.

                  
                

                - **ProductCodes** *(list) --* 

                  The product codes attached to this instance, if applicable.

                  
                  

                  - *(dict) --* 

                    Describes a product code.

                    
                    

                    - **ProductCodeId** *(string) --* 

                      The product code.

                      
                    

                    - **ProductCodeType** *(string) --* 

                      The type of product code.

                      
                
              
                

                - **PublicDnsName** *(string) --* 

                  (IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the ``running`` state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

                  
                

                - **PublicIpAddress** *(string) --* 

                  The public IPv4 address assigned to the instance, if applicable.

                  
                

                - **RamdiskId** *(string) --* 

                  The RAM disk associated with this instance, if applicable.

                  
                

                - **State** *(dict) --* 

                  The current state of the instance.

                  
                  

                  - **Code** *(integer) --* 

                    The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                     

                     
                    * ``0`` : ``pending``   
                     
                    * ``16`` : ``running``   
                     
                    * ``32`` : ``shutting-down``   
                     
                    * ``48`` : ``terminated``   
                     
                    * ``64`` : ``stopping``   
                     
                    * ``80`` : ``stopped``   
                     

                    
                  

                  - **Name** *(string) --* 

                    The current state of the instance.

                    
              
                

                - **StateTransitionReason** *(string) --* 

                  The reason for the most recent state transition. This might be an empty string.

                  
                

                - **SubnetId** *(string) --* 

                  [EC2-VPC] The ID of the subnet in which the instance is running.

                  
                

                - **VpcId** *(string) --* 

                  [EC2-VPC] The ID of the VPC in which the instance is running.

                  
                

                - **Architecture** *(string) --* 

                  The architecture of the image.

                  
                

                - **BlockDeviceMappings** *(list) --* 

                  Any block device mapping entries for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a block device mapping.

                    
                    

                    - **DeviceName** *(string) --* 

                      The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                      
                    

                    - **Ebs** *(dict) --* 

                      Parameters used to automatically set up EBS volumes when the instance is launched.

                      
                      

                      - **AttachTime** *(datetime) --* 

                        The time stamp when the attachment initiated.

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        Indicates whether the volume is deleted on instance termination.

                        
                      

                      - **Status** *(string) --* 

                        The attachment state.

                        
                      

                      - **VolumeId** *(string) --* 

                        The ID of the EBS volume.

                        
                  
                
              
                

                - **ClientToken** *(string) --* 

                  The idempotency token you provided when you launched the instance, if applicable.

                  
                

                - **EbsOptimized** *(boolean) --* 

                  Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                  
                

                - **EnaSupport** *(boolean) --* 

                  Specifies whether enhanced networking with ENA is enabled.

                  
                

                - **Hypervisor** *(string) --* 

                  The hypervisor type of the instance.

                  
                

                - **IamInstanceProfile** *(dict) --* 

                  The IAM instance profile associated with the instance, if applicable.

                  
                  

                  - **Arn** *(string) --* 

                    The Amazon Resource Name (ARN) of the instance profile.

                    
                  

                  - **Id** *(string) --* 

                    The ID of the instance profile.

                    
              
                

                - **InstanceLifecycle** *(string) --* 

                  Indicates whether this is a Spot instance or a Scheduled Instance.

                  
                

                - **ElasticGpuAssociations** *(list) --* 

                  The Elastic GPU associated with the instance.

                  
                  

                  - *(dict) --* 

                    Describes the association between an instance and an Elastic GPU.

                    
                    

                    - **ElasticGpuId** *(string) --* 

                      The ID of the Elastic GPU.

                      
                    

                    - **ElasticGpuAssociationId** *(string) --* 

                      The ID of the association.

                      
                    

                    - **ElasticGpuAssociationState** *(string) --* 

                      The state of the association between the instance and the Elastic GPU.

                      
                    

                    - **ElasticGpuAssociationTime** *(string) --* 

                      The time the Elastic GPU was associated with the instance.

                      
                
              
                

                - **NetworkInterfaces** *(list) --* 

                  [EC2-VPC] One or more network interfaces for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a network interface.

                    
                    

                    - **Association** *(dict) --* 

                      The association information for an Elastic IPv4 associated with the network interface.

                      
                      

                      - **IpOwnerId** *(string) --* 

                        The ID of the owner of the Elastic IP address.

                        
                      

                      - **PublicDnsName** *(string) --* 

                        The public DNS name.

                        
                      

                      - **PublicIp** *(string) --* 

                        The public IP address or Elastic IP address bound to the network interface.

                        
                  
                    

                    - **Attachment** *(dict) --* 

                      The network interface attachment.

                      
                      

                      - **AttachTime** *(datetime) --* 

                        The time stamp when the attachment initiated.

                        
                      

                      - **AttachmentId** *(string) --* 

                        The ID of the network interface attachment.

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        Indicates whether the network interface is deleted when the instance is terminated.

                        
                      

                      - **DeviceIndex** *(integer) --* 

                        The index of the device on the instance for the network interface attachment.

                        
                      

                      - **Status** *(string) --* 

                        The attachment state.

                        
                  
                    

                    - **Description** *(string) --* 

                      The description.

                      
                    

                    - **Groups** *(list) --* 

                      One or more security groups.

                      
                      

                      - *(dict) --* 

                        Describes a security group.

                        
                        

                        - **GroupName** *(string) --* 

                          The name of the security group.

                          
                        

                        - **GroupId** *(string) --* 

                          The ID of the security group.

                          
                    
                  
                    

                    - **Ipv6Addresses** *(list) --* 

                      One or more IPv6 addresses associated with the network interface.

                      
                      

                      - *(dict) --* 

                        Describes an IPv6 address.

                        
                        

                        - **Ipv6Address** *(string) --* 

                          The IPv6 address.

                          
                    
                  
                    

                    - **MacAddress** *(string) --* 

                      The MAC address.

                      
                    

                    - **NetworkInterfaceId** *(string) --* 

                      The ID of the network interface.

                      
                    

                    - **OwnerId** *(string) --* 

                      The ID of the AWS account that created the network interface.

                      
                    

                    - **PrivateDnsName** *(string) --* 

                      The private DNS name.

                      
                    

                    - **PrivateIpAddress** *(string) --* 

                      The IPv4 address of the network interface within the subnet.

                      
                    

                    - **PrivateIpAddresses** *(list) --* 

                      One or more private IPv4 addresses associated with the network interface.

                      
                      

                      - *(dict) --* 

                        Describes a private IPv4 address.

                        
                        

                        - **Association** *(dict) --* 

                          The association information for an Elastic IP address for the network interface.

                          
                          

                          - **IpOwnerId** *(string) --* 

                            The ID of the owner of the Elastic IP address.

                            
                          

                          - **PublicDnsName** *(string) --* 

                            The public DNS name.

                            
                          

                          - **PublicIp** *(string) --* 

                            The public IP address or Elastic IP address bound to the network interface.

                            
                      
                        

                        - **Primary** *(boolean) --* 

                          Indicates whether this IPv4 address is the primary private IP address of the network interface.

                          
                        

                        - **PrivateDnsName** *(string) --* 

                          The private IPv4 DNS name.

                          
                        

                        - **PrivateIpAddress** *(string) --* 

                          The private IPv4 address of the network interface.

                          
                    
                  
                    

                    - **SourceDestCheck** *(boolean) --* 

                      Indicates whether to validate network traffic to or from this network interface.

                      
                    

                    - **Status** *(string) --* 

                      The status of the network interface.

                      
                    

                    - **SubnetId** *(string) --* 

                      The ID of the subnet.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC.

                      
                
              
                

                - **RootDeviceName** *(string) --* 

                  The root device name (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

                  
                

                - **RootDeviceType** *(string) --* 

                  The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

                  
                

                - **SecurityGroups** *(list) --* 

                  One or more security groups for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a security group.

                    
                    

                    - **GroupName** *(string) --* 

                      The name of the security group.

                      
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                
              
                

                - **SourceDestCheck** *(boolean) --* 

                  Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

                  
                

                - **SpotInstanceRequestId** *(string) --* 

                  If the request is a Spot instance request, the ID of the request.

                  
                

                - **SriovNetSupport** *(string) --* 

                  Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

                  
                

                - **StateReason** *(dict) --* 

                  The reason for the most recent state transition.

                  
                  

                  - **Code** *(string) --* 

                    The reason code for the state change.

                    
                  

                  - **Message** *(string) --* 

                    The message for the state change.

                     

                     
                    * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
                     
                    * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
                     
                    * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
                     
                    * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
                     
                    * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
                     
                    * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
                     
                    * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
                     
                    * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
                     
                    * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
                     

                    
              
                

                - **Tags** *(list) --* 

                  Any tags assigned to the instance.

                  
                  

                  - *(dict) --* 

                    Describes a tag.

                    
                    

                    - **Key** *(string) --* 

                      The key of the tag.

                       

                      Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                      
                    

                    - **Value** *(string) --* 

                      The value of the tag.

                       

                      Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                      
                
              
                

                - **VirtualizationType** *(string) --* 

                  The virtualization type of the instance.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The ID of the AWS account that owns the reservation.

              
            

            - **RequesterId** *(string) --* 

              The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).

              
            

            - **ReservationId** *(string) --* 

              The ID of the reservation.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_internet_gateways(**kwargs)

    

    Describes one or more of your Internet gateways.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_    


    **Request Syntax** 
    ::

      response = client.describe_internet_gateways(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          InternetGatewayIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.state`` - The current state of the attachment between the gateway and the VPC (``available`` ). Present only if a VPC is attached. 
       
      * ``attachment.vpc-id`` - The ID of an attached VPC. 
       
      * ``internet-gateway-id`` - The ID of the Internet gateway. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayIds: list
    :param InternetGatewayIds: 

      One or more Internet gateway IDs.

       

      Default: Describes all your Internet gateways.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InternetGateways': [
                {
                    'Attachments': [
                        {
                            'State': 'attaching'|'attached'|'detaching'|'detached',
                            'VpcId': 'string'
                        },
                    ],
                    'InternetGatewayId': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeInternetGateways.

        
        

        - **InternetGateways** *(list) --* 

          Information about one or more Internet gateways.

          
          

          - *(dict) --* 

            Describes an Internet gateway.

            
            

            - **Attachments** *(list) --* 

              Any VPCs attached to the Internet gateway.

              
              

              - *(dict) --* 

                Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.

                
                

                - **State** *(string) --* 

                  The current state of the attachment.

                  
                

                - **VpcId** *(string) --* 

                  The ID of the VPC.

                  
            
          
            

            - **InternetGatewayId** *(string) --* 

              The ID of the Internet gateway.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the Internet gateway.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

    **Examples** 

    This example describes the Internet gateway for the specified VPC.
    ::

      response = client.describe_internet_gateways(
          Filters=[
              {
                  'Name': 'attachment.vpc-id',
                  'Values': [
                      'vpc-a01106c2',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'InternetGateways': [
              {
                  'Attachments': [
                      {
                          'State': 'available',
                          'VpcId': 'vpc-a01106c2',
                      },
                  ],
                  'InternetGatewayId': 'igw-c0a643a9',
                  'Tags': [
                  ],
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_key_pairs(**kwargs)

    

    Describes one or more of your key pairs.

     

    For more information about key pairs, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_    


    **Request Syntax** 
    ::

      response = client.describe_key_pairs(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          KeyNames=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``fingerprint`` - The fingerprint of the key pair. 
       
      * ``key-name`` - The name of the key pair. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type KeyNames: list
    :param KeyNames: 

      One or more key pair names.

       

      Default: Describes all your key pairs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'KeyPairs': [
                {
                    'KeyFingerprint': 'string',
                    'KeyName': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeKeyPairs.

        
        

        - **KeyPairs** *(list) --* 

          Information about one or more key pairs.

          
          

          - *(dict) --* 

            Describes a key pair.

            
            

            - **KeyFingerprint** *(string) --* 

              If you used  CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used  ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.

              
            

            - **KeyName** *(string) --* 

              The name of the key pair.

              
        
      
    

    **Examples** 

    This example displays the fingerprint for the specified key.
    ::

      response = client.describe_key_pairs(
          KeyNames=[
              'my-key-pair',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'KeyPairs': [
              {
                  'KeyFingerprint': '1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f',
                  'KeyName': 'my-key-pair',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_moving_addresses(**kwargs)

    

    Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses>`_    


    **Request Syntax** 
    ::

      response = client.describe_moving_addresses(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string',
          PublicIps=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``moving-status`` - The status of the Elastic IP address (``MovingToVpc`` | ``RestoringToClassic`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value outside of this range, an error is returned.

       

      Default: If no value is provided, the default is 1000.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to use to retrieve the next page of results.

      

    
    :type PublicIps: list
    :param PublicIps: 

      One or more Elastic IP addresses.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'MovingAddressStatuses': [
                {
                    'MoveStatus': 'movingToVpc'|'restoringToClassic',
                    'PublicIp': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeMovingAddresses.

        
        

        - **MovingAddressStatuses** *(list) --* 

          The status for each Elastic IP address.

          
          

          - *(dict) --* 

            Describes the status of a moving Elastic IP address.

            
            

            - **MoveStatus** *(string) --* 

              The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.

              
            

            - **PublicIp** *(string) --* 

              The Elastic IP address.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

    **Examples** 

    This example describes all of your moving Elastic IP addresses.
    ::

      response = client.describe_moving_addresses(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'MovingAddressStatuses': [
              {
                  'MoveStatus': 'MovingToVpc',
                  'PublicIp': '198.51.100.0',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_nat_gateways(**kwargs)

    

    Describes one or more of the your NAT gateways.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways>`_    


    **Request Syntax** 
    ::

      response = client.describe_nat_gateways(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NatGatewayIds=[
              'string',
          ],
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``nat-gateway-id`` - The ID of the NAT gateway. 
       
      * ``state`` - The state of the NAT gateway (``pending`` | ``failed`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``subnet-id`` - The ID of the subnet in which the NAT gateway resides. 
       
      * ``vpc-id`` - The ID of the VPC in which the NAT gateway resides. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

       

      Constraint: If the value specified is greater than 1000, we return only 1000 items.

      

    
    :type NatGatewayIds: list
    :param NatGatewayIds: 

      One or more NAT gateway IDs.

      

    
      - *(string) --* 

      
  
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NatGateways': [
                {
                    'CreateTime': datetime(2015, 1, 1),
                    'DeleteTime': datetime(2015, 1, 1),
                    'FailureCode': 'string',
                    'FailureMessage': 'string',
                    'NatGatewayAddresses': [
                        {
                            'AllocationId': 'string',
                            'NetworkInterfaceId': 'string',
                            'PrivateIp': 'string',
                            'PublicIp': 'string'
                        },
                    ],
                    'NatGatewayId': 'string',
                    'ProvisionedBandwidth': {
                        'ProvisionTime': datetime(2015, 1, 1),
                        'Provisioned': 'string',
                        'RequestTime': datetime(2015, 1, 1),
                        'Requested': 'string',
                        'Status': 'string'
                    },
                    'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
                    'SubnetId': 'string',
                    'VpcId': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNatGateways.

        
        

        - **NatGateways** *(list) --* 

          Information about the NAT gateways.

          
          

          - *(dict) --* 

            Describes a NAT gateway.

            
            

            - **CreateTime** *(datetime) --* 

              The date and time the NAT gateway was created.

              
            

            - **DeleteTime** *(datetime) --* 

              The date and time the NAT gateway was deleted, if applicable.

              
            

            - **FailureCode** *(string) --* 

              If the NAT gateway could not be created, specifies the error code for the failure. (``InsufficientFreeAddressesInSubnet`` | ``Gateway.NotAttached`` | ``InvalidAllocationID.NotFound`` | ``Resource.AlreadyAssociated`` | ``InternalError`` | ``InvalidSubnetID.NotFound`` )

              
            

            - **FailureMessage** *(string) --* 

              If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

               

               
              * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway" 
               
              * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached" 
               
              * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway" 
               
              * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated" 
               
              * For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again." 
               
              * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found." 
               

              
            

            - **NatGatewayAddresses** *(list) --* 

              Information about the IP addresses and network interface associated with the NAT gateway.

              
              

              - *(dict) --* 

                Describes the IP addresses and network interface associated with a NAT gateway.

                
                

                - **AllocationId** *(string) --* 

                  The allocation ID of the Elastic IP address that's associated with the NAT gateway.

                  
                

                - **NetworkInterfaceId** *(string) --* 

                  The ID of the network interface associated with the NAT gateway.

                  
                

                - **PrivateIp** *(string) --* 

                  The private IP address associated with the Elastic IP address.

                  
                

                - **PublicIp** *(string) --* 

                  The Elastic IP address associated with the NAT gateway.

                  
            
          
            

            - **NatGatewayId** *(string) --* 

              The ID of the NAT gateway.

              
            

            - **ProvisionedBandwidth** *(dict) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
              

              - **ProvisionTime** *(datetime) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Provisioned** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **RequestTime** *(datetime) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Requested** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Status** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
          
            

            - **State** *(string) --* 

              The state of the NAT gateway.

               

               
              * ``pending`` : The NAT gateway is being created and is not ready to process traffic. 
               
              * ``failed`` : The NAT gateway could not be created. Check the ``failureCode`` and ``failureMessage`` fields for the reason. 
               
              * ``available`` : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway. 
               
              * ``deleting`` : The NAT gateway is in the process of being terminated and may still be processing traffic. 
               
              * ``deleted`` : The NAT gateway has been terminated and is no longer processing traffic. 
               

              
            

            - **SubnetId** *(string) --* 

              The ID of the subnet in which the NAT gateway is located.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC in which the NAT gateway is located.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

    **Examples** 

    This example describes the NAT gateway for the specified VPC.
    ::

      response = client.describe_nat_gateways(
          Filter=[
              {
                  'Name': 'vpc-id',
                  'Values': [
                      'vpc-1a2b3c4d',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NatGateways': [
              {
                  'CreateTime': datetime(2015, 12, 1, 12, 26, 55, 1, 335, 0),
                  'NatGatewayAddresses': [
                      {
                          'AllocationId': 'eipalloc-89c620ec',
                          'NetworkInterfaceId': 'eni-9dec76cd',
                          'PrivateIp': '10.0.0.149',
                          'PublicIp': '198.11.222.333',
                      },
                  ],
                  'NatGatewayId': 'nat-05dba92075d71c408',
                  'State': 'available',
                  'SubnetId': 'subnet-847e4dc2',
                  'VpcId': 'vpc-1a2b3c4d',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_network_acls(**kwargs)

    

    Describes one or more of your network ACLs.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_    


    **Request Syntax** 
    ::

      response = client.describe_network_acls(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          NetworkAclIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``association.association-id`` - The ID of an association ID for the ACL. 
       
      * ``association.network-acl-id`` - The ID of the network ACL involved in the association. 
       
      * ``association.subnet-id`` - The ID of the subnet involved in the association. 
       
      * ``default`` - Indicates whether the ACL is the default network ACL for the VPC. 
       
      * ``entry.cidr`` - The IPv4 CIDR range specified in the entry. 
       
      * ``entry.egress`` - Indicates whether the entry applies to egress traffic. 
       
      * ``entry.icmp.code`` - The ICMP code specified in the entry, if any. 
       
      * ``entry.icmp.type`` - The ICMP type specified in the entry, if any. 
       
      * ``entry.ipv6-cidr`` - The IPv6 CIDR range specified in the entry. 
       
      * ``entry.port-range.from`` - The start of the port range specified in the entry.  
       
      * ``entry.port-range.to`` - The end of the port range specified in the entry.  
       
      * ``entry.protocol`` - The protocol specified in the entry (``tcp`` | ``udp`` | ``icmp`` or a protocol number). 
       
      * ``entry.rule-action`` - Allows or denies the matching traffic (``allow`` | ``deny`` ). 
       
      * ``entry.rule-number`` - The number of an entry (in other words, rule) in the ACL's set of entries. 
       
      * ``network-acl-id`` - The ID of the network ACL. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the network ACL. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkAclIds: list
    :param NetworkAclIds: 

      One or more network ACL IDs.

       

      Default: Describes all your network ACLs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkAcls': [
                {
                    'Associations': [
                        {
                            'NetworkAclAssociationId': 'string',
                            'NetworkAclId': 'string',
                            'SubnetId': 'string'
                        },
                    ],
                    'Entries': [
                        {
                            'CidrBlock': 'string',
                            'Egress': True|False,
                            'IcmpTypeCode': {
                                'Code': 123,
                                'Type': 123
                            },
                            'Ipv6CidrBlock': 'string',
                            'PortRange': {
                                'From': 123,
                                'To': 123
                            },
                            'Protocol': 'string',
                            'RuleAction': 'allow'|'deny',
                            'RuleNumber': 123
                        },
                    ],
                    'IsDefault': True|False,
                    'NetworkAclId': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNetworkAcls.

        
        

        - **NetworkAcls** *(list) --* 

          Information about one or more network ACLs.

          
          

          - *(dict) --* 

            Describes a network ACL.

            
            

            - **Associations** *(list) --* 

              Any associations between the network ACL and one or more subnets

              
              

              - *(dict) --* 

                Describes an association between a network ACL and a subnet.

                
                

                - **NetworkAclAssociationId** *(string) --* 

                  The ID of the association between a network ACL and a subnet.

                  
                

                - **NetworkAclId** *(string) --* 

                  The ID of the network ACL.

                  
                

                - **SubnetId** *(string) --* 

                  The ID of the subnet.

                  
            
          
            

            - **Entries** *(list) --* 

              One or more entries (rules) in the network ACL.

              
              

              - *(dict) --* 

                Describes an entry in a network ACL.

                
                

                - **CidrBlock** *(string) --* 

                  The IPv4 network range to allow or deny, in CIDR notation.

                  
                

                - **Egress** *(boolean) --* 

                  Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

                  
                

                - **IcmpTypeCode** *(dict) --* 

                  ICMP protocol: The ICMP type and code.

                  
                  

                  - **Code** *(integer) --* 

                    The ICMP code. A value of -1 means all codes for the specified ICMP type.

                    
                  

                  - **Type** *(integer) --* 

                    The ICMP type. A value of -1 means all types.

                    
              
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 network range to allow or deny, in CIDR notation.

                  
                

                - **PortRange** *(dict) --* 

                  TCP or UDP protocols: The range of ports the rule applies to.

                  
                  

                  - **From** *(integer) --* 

                    The first port in the range.

                    
                  

                  - **To** *(integer) --* 

                    The last port in the range.

                    
              
                

                - **Protocol** *(string) --* 

                  The protocol. A value of ``-1`` means all protocols.

                  
                

                - **RuleAction** *(string) --* 

                  Indicates whether to allow or deny the traffic that matches the rule.

                  
                

                - **RuleNumber** *(integer) --* 

                  The rule number for the entry. ACL entries are processed in ascending order by rule number.

                  
            
          
            

            - **IsDefault** *(boolean) --* 

              Indicates whether this is the default network ACL for the VPC.

              
            

            - **NetworkAclId** *(string) --* 

              The ID of the network ACL.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the network ACL.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC for the network ACL.

              
        
      
    

    **Examples** 

    This example describes the specified network ACL.
    ::

      response = client.describe_network_acls(
          NetworkAclIds=[
              'acl-5fb85d36',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NetworkAcls': [
              {
                  'Associations': [
                      {
                          'NetworkAclAssociationId': 'aclassoc-66ea5f0b',
                          'NetworkAclId': 'acl-9aeb5ef7',
                          'SubnetId': 'subnet-65ea5f08',
                      },
                  ],
                  'Entries': [
                      {
                          'CidrBlock': '0.0.0.0/0',
                          'Egress': True,
                          'Protocol': '-1',
                          'RuleAction': 'deny',
                          'RuleNumber': 32767,
                      },
                      {
                          'CidrBlock': '0.0.0.0/0',
                          'Egress': False,
                          'Protocol': '-1',
                          'RuleAction': 'deny',
                          'RuleNumber': 32767,
                      },
                  ],
                  'IsDefault': False,
                  'NetworkAclId': 'acl-5fb85d36',
                  'Tags': [
                  ],
                  'VpcId': 'vpc-a01106c2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_network_interface_attribute(**kwargs)

    

    Describes a network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_network_interface_attribute(
          Attribute='description'|'groupSet'|'sourceDestCheck'|'attachment',
          DryRun=True|False,
          NetworkInterfaceId='string'
      )
    :type Attribute: string
    :param Attribute: 

      The attribute of the network interface. This parameter is required.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Attachment': {
                'AttachTime': datetime(2015, 1, 1),
                'AttachmentId': 'string',
                'DeleteOnTermination': True|False,
                'DeviceIndex': 123,
                'InstanceId': 'string',
                'InstanceOwnerId': 'string',
                'Status': 'attaching'|'attached'|'detaching'|'detached'
            },
            'Description': {
                'Value': 'string'
            },
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'NetworkInterfaceId': 'string',
            'SourceDestCheck': {
                'Value': True|False
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNetworkInterfaceAttribute.

        
        

        - **Attachment** *(dict) --* 

          The attachment (if any) of the network interface.

          
          

          - **AttachTime** *(datetime) --* 

            The timestamp indicating when the attachment initiated.

            
          

          - **AttachmentId** *(string) --* 

            The ID of the network interface attachment.

            
          

          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the network interface is deleted when the instance is terminated.

            
          

          - **DeviceIndex** *(integer) --* 

            The device index of the network interface attachment on the instance.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **InstanceOwnerId** *(string) --* 

            The AWS account ID of the owner of the instance.

            
          

          - **Status** *(string) --* 

            The attachment state.

            
      
        

        - **Description** *(dict) --* 

          The description of the network interface.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **Groups** *(list) --* 

          The security groups associated with the network interface.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
        

        - **SourceDestCheck** *(dict) --* 

          Indicates whether source/destination checking is enabled.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
    

    **Examples** 

    This example describes the attachment attribute of the specified network interface.
    ::

      response = client.describe_network_interface_attribute(
          Attribute='attachment',
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Attachment': {
              'AttachTime': datetime(2015, 5, 21, 20, 2, 20, 3, 141, 0),
              'AttachmentId': 'eni-attach-43348162',
              'DeleteOnTermination': True,
              'DeviceIndex': 0,
              'InstanceId': 'i-1234567890abcdef0',
              'InstanceOwnerId': '123456789012',
              'Status': 'attached',
          },
          'NetworkInterfaceId': 'eni-686ea200',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the description attribute of the specified network interface.
    ::

      response = client.describe_network_interface_attribute(
          Attribute='description',
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Description': {
              'Value': 'My description',
          },
          'NetworkInterfaceId': 'eni-686ea200',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the groupSet attribute of the specified network interface.
    ::

      response = client.describe_network_interface_attribute(
          Attribute='groupSet',
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Groups': [
              {
                  'GroupId': 'sg-903004f8',
                  'GroupName': 'my-security-group',
              },
          ],
          'NetworkInterfaceId': 'eni-686ea200',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the sourceDestCheck attribute of the specified network interface.
    ::

      response = client.describe_network_interface_attribute(
          Attribute='sourceDestCheck',
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NetworkInterfaceId': 'eni-686ea200',
          'SourceDestCheck': {
              'Value': True,
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_network_interface_permissions(**kwargs)

    

    Describes the permissions for your network interfaces. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions>`_    


    **Request Syntax** 
    ::

      response = client.describe_network_interface_permissions(
          NetworkInterfacePermissionIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          NextToken='string',
          MaxResults=123
      )
    :type NetworkInterfacePermissionIds: list
    :param NetworkInterfacePermissionIds: 

      One or more network interface permission IDs.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``network-interface-permission.network-interface-permission-id`` - The ID of the permission. 
       
      * ``network-interface-permission.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface-permission.aws-account-id`` - The AWS account ID. 
       
      * ``network-interface-permission.aws-service`` - The AWS service. 
       
      * ``network-interface-permission.permission`` - The type of permission (``INSTANCE-ATTACH`` | ``EIP-ASSOCIATE`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. If this parameter is not specified, up to 50 results are returned by default.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkInterfacePermissions': [
                {
                    'NetworkInterfacePermissionId': 'string',
                    'NetworkInterfaceId': 'string',
                    'AwsAccountId': 'string',
                    'AwsService': 'string',
                    'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
                    'PermissionState': {
                        'State': 'pending'|'granted'|'revoking'|'revoked',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeNetworkInterfacePermissions.

        
        

        - **NetworkInterfacePermissions** *(list) --* 

          The network interface permissions.

          
          

          - *(dict) --* 

            Describes a permission for a network interface.

            
            

            - **NetworkInterfacePermissionId** *(string) --* 

              The ID of the network interface permission.

              
            

            - **NetworkInterfaceId** *(string) --* 

              The ID of the network interface.

              
            

            - **AwsAccountId** *(string) --* 

              The AWS account ID.

              
            

            - **AwsService** *(string) --* 

              The AWS service.

              
            

            - **Permission** *(string) --* 

              The type of permission.

              
            

            - **PermissionState** *(dict) --* 

              Information about the state of the permission.

              
              

              - **State** *(string) --* 

                The state of the permission.

                
              

              - **StatusMessage** *(string) --* 

                A status message, if applicable.

                
          
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results.

          
    

  .. py:method:: describe_network_interfaces(**kwargs)

    

    Describes one or more of your network interfaces.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_    


    **Request Syntax** 
    ::

      response = client.describe_network_interfaces(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          NetworkInterfaceIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``addresses.private-ip-address`` - The private IPv4 addresses associated with the network interface. 
       
      * ``addresses.primary`` - Whether the private IPv4 address is the primary IP address associated with the network interface.  
       
      * ``addresses.association.public-ip`` - The association ID returned when the network interface was associated with the Elastic IP address (IPv4). 
       
      * ``addresses.association.owner-id`` - The owner ID of the addresses associated with the network interface. 
       
      * ``association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``association.public-dns-name`` - The public DNS name for the network interface (IPv4). 
       
      * ``attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``attachment.attach.time`` - The time that the network interface was attached to an instance. 
       
      * ``attachment.delete-on-termination`` - Indicates whether the attachment is deleted when an instance is terminated. 
       
      * ``attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``attachment.nat-gateway-id`` - The ID of the NAT gateway to which the network interface is attached. 
       
      * ``attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone of the network interface. 
       
      * ``description`` - The description of the network interface. 
       
      * ``group-id`` - The ID of a security group associated with the network interface. 
       
      * ``group-name`` - The name of a security group associated with the network interface. 
       
      * ``ipv6-addresses.ipv6-address`` - An IPv6 address associated with the network interface. 
       
      * ``mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface-id`` - The ID of the network interface. 
       
      * ``owner-id`` - The AWS account ID of the network interface owner. 
       
      * ``private-ip-address`` - The private IPv4 address or addresses of the network interface. 
       
      * ``private-dns-name`` - The private DNS name of the network interface (IPv4). 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``requester-managed`` - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``source-desk-check`` - Indicates whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC.  
       
      * ``status`` - The status of the network interface. If the network interface is not attached to an instance, the status is ``available`` ; if a network interface is attached to an instance the status is ``in-use`` . 
       
      * ``subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the network interface. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceIds: list
    :param NetworkInterfaceIds: 

      One or more network interface IDs.

       

      Default: Describes all your network interfaces.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkInterfaces': [
                {
                    'Association': {
                        'AllocationId': 'string',
                        'AssociationId': 'string',
                        'IpOwnerId': 'string',
                        'PublicDnsName': 'string',
                        'PublicIp': 'string'
                    },
                    'Attachment': {
                        'AttachTime': datetime(2015, 1, 1),
                        'AttachmentId': 'string',
                        'DeleteOnTermination': True|False,
                        'DeviceIndex': 123,
                        'InstanceId': 'string',
                        'InstanceOwnerId': 'string',
                        'Status': 'attaching'|'attached'|'detaching'|'detached'
                    },
                    'AvailabilityZone': 'string',
                    'Description': 'string',
                    'Groups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'InterfaceType': 'interface'|'natGateway',
                    'Ipv6Addresses': [
                        {
                            'Ipv6Address': 'string'
                        },
                    ],
                    'MacAddress': 'string',
                    'NetworkInterfaceId': 'string',
                    'OwnerId': 'string',
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string',
                    'PrivateIpAddresses': [
                        {
                            'Association': {
                                'AllocationId': 'string',
                                'AssociationId': 'string',
                                'IpOwnerId': 'string',
                                'PublicDnsName': 'string',
                                'PublicIp': 'string'
                            },
                            'Primary': True|False,
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string'
                        },
                    ],
                    'RequesterId': 'string',
                    'RequesterManaged': True|False,
                    'SourceDestCheck': True|False,
                    'Status': 'available'|'attaching'|'in-use'|'detaching',
                    'SubnetId': 'string',
                    'TagSet': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNetworkInterfaces.

        
        

        - **NetworkInterfaces** *(list) --* 

          Information about one or more network interfaces.

          
          

          - *(dict) --* 

            Describes a network interface.

            
            

            - **Association** *(dict) --* 

              The association information for an Elastic IP address (IPv4) associated with the network interface.

              
              

              - **AllocationId** *(string) --* 

                The allocation ID.

                
              

              - **AssociationId** *(string) --* 

                The association ID.

                
              

              - **IpOwnerId** *(string) --* 

                The ID of the Elastic IP address owner.

                
              

              - **PublicDnsName** *(string) --* 

                The public DNS name.

                
              

              - **PublicIp** *(string) --* 

                The address of the Elastic IP address bound to the network interface.

                
          
            

            - **Attachment** *(dict) --* 

              The network interface attachment.

              
              

              - **AttachTime** *(datetime) --* 

                The timestamp indicating when the attachment initiated.

                
              

              - **AttachmentId** *(string) --* 

                The ID of the network interface attachment.

                
              

              - **DeleteOnTermination** *(boolean) --* 

                Indicates whether the network interface is deleted when the instance is terminated.

                
              

              - **DeviceIndex** *(integer) --* 

                The device index of the network interface attachment on the instance.

                
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **InstanceOwnerId** *(string) --* 

                The AWS account ID of the owner of the instance.

                
              

              - **Status** *(string) --* 

                The attachment state.

                
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **Description** *(string) --* 

              A description.

              
            

            - **Groups** *(list) --* 

              Any security groups for the network interface.

              
              

              - *(dict) --* 

                Describes a security group.

                
                

                - **GroupName** *(string) --* 

                  The name of the security group.

                  
                

                - **GroupId** *(string) --* 

                  The ID of the security group.

                  
            
          
            

            - **InterfaceType** *(string) --* 

              The type of interface.

              
            

            - **Ipv6Addresses** *(list) --* 

              The IPv6 addresses associated with the network interface.

              
              

              - *(dict) --* 

                Describes an IPv6 address associated with a network interface.

                
                

                - **Ipv6Address** *(string) --* 

                  The IPv6 address.

                  
            
          
            

            - **MacAddress** *(string) --* 

              The MAC address.

              
            

            - **NetworkInterfaceId** *(string) --* 

              The ID of the network interface.

              
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the owner of the network interface.

              
            

            - **PrivateDnsName** *(string) --* 

              The private DNS name.

              
            

            - **PrivateIpAddress** *(string) --* 

              The IPv4 address of the network interface within the subnet.

              
            

            - **PrivateIpAddresses** *(list) --* 

              The private IPv4 addresses associated with the network interface.

              
              

              - *(dict) --* 

                Describes the private IPv4 address of a network interface.

                
                

                - **Association** *(dict) --* 

                  The association information for an Elastic IP address (IPv4) associated with the network interface.

                  
                  

                  - **AllocationId** *(string) --* 

                    The allocation ID.

                    
                  

                  - **AssociationId** *(string) --* 

                    The association ID.

                    
                  

                  - **IpOwnerId** *(string) --* 

                    The ID of the Elastic IP address owner.

                    
                  

                  - **PublicDnsName** *(string) --* 

                    The public DNS name.

                    
                  

                  - **PublicIp** *(string) --* 

                    The address of the Elastic IP address bound to the network interface.

                    
              
                

                - **Primary** *(boolean) --* 

                  Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

                  
                

                - **PrivateDnsName** *(string) --* 

                  The private DNS name.

                  
                

                - **PrivateIpAddress** *(string) --* 

                  The private IPv4 address.

                  
            
          
            

            - **RequesterId** *(string) --* 

              The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).

              
            

            - **RequesterManaged** *(boolean) --* 

              Indicates whether the network interface is being managed by AWS.

              
            

            - **SourceDestCheck** *(boolean) --* 

              Indicates whether traffic to or from the instance is validated.

              
            

            - **Status** *(string) --* 

              The status of the network interface.

              
            

            - **SubnetId** *(string) --* 

              The ID of the subnet.

              
            

            - **TagSet** *(list) --* 

              Any tags assigned to the network interface.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
      
    

    **Examples** 

    
    ::

      response = client.describe_network_interfaces(
          NetworkInterfaceIds=[
              'eni-e5aa89a3',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NetworkInterfaces': [
              {
                  'Association': {
                      'AssociationId': 'eipassoc-0fbb766a',
                      'IpOwnerId': '123456789012',
                      'PublicDnsName': 'ec2-203-0-113-12.compute-1.amazonaws.com',
                      'PublicIp': '203.0.113.12',
                  },
                  'Attachment': {
                      'AttachTime': datetime(2013, 11, 30, 23, 36, 42, 5, 334, 0),
                      'AttachmentId': 'eni-attach-66c4350a',
                      'DeleteOnTermination': False,
                      'DeviceIndex': 1,
                      'InstanceId': 'i-1234567890abcdef0',
                      'InstanceOwnerId': '123456789012',
                      'Status': 'attached',
                  },
                  'AvailabilityZone': 'us-east-1d',
                  'Description': 'my network interface',
                  'Groups': [
                      {
                          'GroupId': 'sg-8637d3e3',
                          'GroupName': 'default',
                      },
                  ],
                  'MacAddress': '02:2f:8f:b0:cf:75',
                  'NetworkInterfaceId': 'eni-e5aa89a3',
                  'OwnerId': '123456789012',
                  'PrivateDnsName': 'ip-10-0-1-17.ec2.internal',
                  'PrivateIpAddress': '10.0.1.17',
                  'PrivateIpAddresses': [
                      {
                          'Association': {
                              'AssociationId': 'eipassoc-0fbb766a',
                              'IpOwnerId': '123456789012',
                              'PublicDnsName': 'ec2-203-0-113-12.compute-1.amazonaws.com',
                              'PublicIp': '203.0.113.12',
                          },
                          'Primary': True,
                          'PrivateDnsName': 'ip-10-0-1-17.ec2.internal',
                          'PrivateIpAddress': '10.0.1.17',
                      },
                  ],
                  'RequesterManaged': False,
                  'SourceDestCheck': True,
                  'Status': 'in-use',
                  'SubnetId': 'subnet-b61f49f0',
                  'TagSet': [
                  ],
                  'VpcId': 'vpc-a01106c2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_placement_groups(**kwargs)

    

    Describes one or more of your placement groups. For more information about placement groups and cluster instances, see `Cluster Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups>`_    


    **Request Syntax** 
    ::

      response = client.describe_placement_groups(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          GroupNames=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``group-name`` - The name of the placement group. 
       
      * ``state`` - The state of the placement group (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``strategy`` - The strategy of the placement group (``cluster`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupNames: list
    :param GroupNames: 

      One or more placement group names.

       

      Default: Describes all your placement groups, or only those otherwise specified.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'PlacementGroups': [
                {
                    'GroupName': 'string',
                    'State': 'pending'|'available'|'deleting'|'deleted',
                    'Strategy': 'cluster'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribePlacementGroups.

        
        

        - **PlacementGroups** *(list) --* 

          One or more placement groups.

          
          

          - *(dict) --* 

            Describes a placement group.

            
            

            - **GroupName** *(string) --* 

              The name of the placement group.

              
            

            - **State** *(string) --* 

              The state of the placement group.

              
            

            - **Strategy** *(string) --* 

              The placement strategy.

              
        
      
    

  .. py:method:: describe_prefix_lists(**kwargs)

    

    Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service. A prefix list ID is required for creating an outbound security group rule that allows traffic from a VPC to access an AWS service through a VPC endpoint.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists>`_    


    **Request Syntax** 
    ::

      response = client.describe_prefix_lists(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          PrefixListIds=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``prefix-list-id`` : The ID of a prefix list. 
       
      * ``prefix-list-name`` : The name of a prefix list. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

       

      Constraint: If the value specified is greater than 1000, we return only 1000 items.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of items to return. (You received this token from a prior call.)

      

    
    :type PrefixListIds: list
    :param PrefixListIds: 

      One or more prefix list IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'PrefixLists': [
                {
                    'Cidrs': [
                        'string',
                    ],
                    'PrefixListId': 'string',
                    'PrefixListName': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribePrefixLists.

        
        

        - **NextToken** *(string) --* 

          The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

          
        

        - **PrefixLists** *(list) --* 

          All available prefix lists.

          
          

          - *(dict) --* 

            Describes prefixes for AWS services.

            
            

            - **Cidrs** *(list) --* 

              The IP address range of the AWS service.

              
              

              - *(string) --* 
          
            

            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              
            

            - **PrefixListName** *(string) --* 

              The name of the prefix.

              
        
      
    

  .. py:method:: describe_regions(**kwargs)

    

    Describes one or more regions that are currently available to you.

     

    For a list of the regions supported by Amazon EC2, see `Regions and Endpoints <http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions>`_    


    **Request Syntax** 
    ::

      response = client.describe_regions(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          RegionNames=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``endpoint`` - The endpoint of the region (for example, ``ec2.us-east-1.amazonaws.com`` ). 
       
      * ``region-name`` - The name of the region (for example, ``us-east-1`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type RegionNames: list
    :param RegionNames: 

      The names of one or more regions.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Regions': [
                {
                    'Endpoint': 'string',
                    'RegionName': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeRegions.

        
        

        - **Regions** *(list) --* 

          Information about one or more regions.

          
          

          - *(dict) --* 

            Describes a region.

            
            

            - **Endpoint** *(string) --* 

              The region service endpoint.

              
            

            - **RegionName** *(string) --* 

              The name of the region.

              
        
      
    

    **Examples** 

    This example describes all the regions that are available to you.
    ::

      response = client.describe_regions(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Regions': [
              {
                  'Endpoint': 'ec2.ap-south-1.amazonaws.com',
                  'RegionName': 'ap-south-1',
              },
              {
                  'Endpoint': 'ec2.eu-west-1.amazonaws.com',
                  'RegionName': 'eu-west-1',
              },
              {
                  'Endpoint': 'ec2.ap-southeast-1.amazonaws.com',
                  'RegionName': 'ap-southeast-1',
              },
              {
                  'Endpoint': 'ec2.ap-southeast-2.amazonaws.com',
                  'RegionName': 'ap-southeast-2',
              },
              {
                  'Endpoint': 'ec2.eu-central-1.amazonaws.com',
                  'RegionName': 'eu-central-1',
              },
              {
                  'Endpoint': 'ec2.ap-northeast-2.amazonaws.com',
                  'RegionName': 'ap-northeast-2',
              },
              {
                  'Endpoint': 'ec2.ap-northeast-1.amazonaws.com',
                  'RegionName': 'ap-northeast-1',
              },
              {
                  'Endpoint': 'ec2.us-east-1.amazonaws.com',
                  'RegionName': 'us-east-1',
              },
              {
                  'Endpoint': 'ec2.sa-east-1.amazonaws.com',
                  'RegionName': 'sa-east-1',
              },
              {
                  'Endpoint': 'ec2.us-west-1.amazonaws.com',
                  'RegionName': 'us-west-1',
              },
              {
                  'Endpoint': 'ec2.us-west-2.amazonaws.com',
                  'RegionName': 'us-west-2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_reserved_instances(**kwargs)

    

    Describes one or more of the Reserved Instances that you purchased.

     

    For more information about Reserved Instances, see `Reserved Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances>`_    


    **Request Syntax** 
    ::

      response = client.describe_reserved_instances(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          OfferingClass='standard'|'convertible',
          ReservedInstancesIds=[
              'string',
          ],
          DryRun=True|False,
          OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone where the Reserved Instance can be used. 
       
      * ``duration`` - The duration of the Reserved Instance (one year or three years), in seconds (``31536000`` | ``94608000`` ). 
       
      * ``end`` - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). 
       
      * ``fixed-price`` - The purchase price of the Reserved Instance (for example, 9800.0). 
       
      * ``instance-type`` - The instance type that is covered by the reservation. 
       
      * ``scope`` - The scope of the Reserved Instance (``Region`` or ``Availability Zone`` ). 
       
      * ``product-description`` - The Reserved Instance product platform description. Instances that include ``(Amazon VPC)`` in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC (``Linux/UNIX`` | ``Linux/UNIX (Amazon VPC)`` | ``SUSE Linux`` | ``SUSE Linux (Amazon VPC)`` | ``Red Hat Enterprise Linux`` | ``Red Hat Enterprise Linux (Amazon VPC)`` | ``Windows`` | ``Windows (Amazon VPC)`` | ``Windows with SQL Server Standard`` | ``Windows with SQL Server Standard (Amazon VPC)`` | ``Windows with SQL Server Web`` | ``Windows with SQL Server Web (Amazon VPC)`` | ``Windows with SQL Server Enterprise`` | ``Windows with SQL Server Enterprise (Amazon VPC)`` ). 
       
      * ``reserved-instances-id`` - The ID of the Reserved Instance. 
       
      * ``start`` - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z). 
       
      * ``state`` - The state of the Reserved Instance (``payment-pending`` | ``active`` | ``payment-failed`` | ``retired`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``usage-price`` - The usage price of the Reserved Instance, per hour (for example, 0.84). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type OfferingClass: string
    :param OfferingClass: 

      Describes whether the Reserved Instance is Standard or Convertible.

      

    
    :type ReservedInstancesIds: list
    :param ReservedInstancesIds: 

      One or more Reserved Instance IDs.

       

      Default: Describes all your Reserved Instances, or only those otherwise specified.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type OfferingType: string
    :param OfferingType: 

      The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the ``Medium Utilization`` Reserved Instance offering type.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstances': [
                {
                    'AvailabilityZone': 'string',
                    'Duration': 123,
                    'End': datetime(2015, 1, 1),
                    'FixedPrice': ...,
                    'InstanceCount': 123,
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'ReservedInstancesId': 'string',
                    'Start': datetime(2015, 1, 1),
                    'State': 'payment-pending'|'active'|'payment-failed'|'retired',
                    'UsagePrice': ...,
                    'CurrencyCode': 'USD',
                    'InstanceTenancy': 'default'|'dedicated'|'host',
                    'OfferingClass': 'standard'|'convertible',
                    'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
                    'RecurringCharges': [
                        {
                            'Amount': 123.0,
                            'Frequency': 'Hourly'
                        },
                    ],
                    'Scope': 'Availability Zone'|'Region',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for DescribeReservedInstances.

        
        

        - **ReservedInstances** *(list) --* 

          A list of Reserved Instances.

          
          

          - *(dict) --* 

            Describes a Reserved Instance.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone in which the Reserved Instance can be used.

              
            

            - **Duration** *(integer) --* 

              The duration of the Reserved Instance, in seconds.

              
            

            - **End** *(datetime) --* 

              The time when the Reserved Instance expires.

              
            

            - **FixedPrice** *(float) --* 

              The purchase price of the Reserved Instance.

              
            

            - **InstanceCount** *(integer) --* 

              The number of reservations purchased.

              
            

            - **InstanceType** *(string) --* 

              The instance type on which the Reserved Instance can be used.

              
            

            - **ProductDescription** *(string) --* 

              The Reserved Instance product platform description.

              
            

            - **ReservedInstancesId** *(string) --* 

              The ID of the Reserved Instance.

              
            

            - **Start** *(datetime) --* 

              The date and time the Reserved Instance started.

              
            

            - **State** *(string) --* 

              The state of the Reserved Instance purchase.

              
            

            - **UsagePrice** *(float) --* 

              The usage price of the Reserved Instance, per hour.

              
            

            - **CurrencyCode** *(string) --* 

              The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is ``USD`` .

              
            

            - **InstanceTenancy** *(string) --* 

              The tenancy of the instance.

              
            

            - **OfferingClass** *(string) --* 

              The offering class of the Reserved Instance.

              
            

            - **OfferingType** *(string) --* 

              The Reserved Instance offering type.

              
            

            - **RecurringCharges** *(list) --* 

              The recurring charge tag assigned to the resource.

              
              

              - *(dict) --* 

                Describes a recurring charge.

                
                

                - **Amount** *(float) --* 

                  The amount of the recurring charge.

                  
                

                - **Frequency** *(string) --* 

                  The frequency of the recurring charge.

                  
            
          
            

            - **Scope** *(string) --* 

              The scope of the Reserved Instance.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

  .. py:method:: describe_reserved_instances_listings(**kwargs)

    

    Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

     

    The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

     

    As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

     

    As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

     

    For more information, see `Reserved Instance Marketplace <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings>`_    


    **Request Syntax** 
    ::

      response = client.describe_reserved_instances_listings(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ReservedInstancesId='string',
          ReservedInstancesListingId='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``reserved-instances-id`` - The ID of the Reserved Instances. 
       
      * ``reserved-instances-listing-id`` - The ID of the Reserved Instances listing. 
       
      * ``status`` - The status of the Reserved Instance listing (``pending`` | ``active`` | ``cancelled`` | ``closed`` ). 
       
      * ``status-message`` - The reason for the status. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ReservedInstancesId: string
    :param ReservedInstancesId: 

      One or more Reserved Instance IDs.

      

    
    :type ReservedInstancesListingId: string
    :param ReservedInstancesListingId: 

      One or more Reserved Instance listing IDs.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesListings': [
                {
                    'ClientToken': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'InstanceCounts': [
                        {
                            'InstanceCount': 123,
                            'State': 'available'|'sold'|'cancelled'|'pending'
                        },
                    ],
                    'PriceSchedules': [
                        {
                            'Active': True|False,
                            'CurrencyCode': 'USD',
                            'Price': 123.0,
                            'Term': 123
                        },
                    ],
                    'ReservedInstancesId': 'string',
                    'ReservedInstancesListingId': 'string',
                    'Status': 'active'|'pending'|'cancelled'|'closed',
                    'StatusMessage': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'UpdateDate': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeReservedInstancesListings.

        
        

        - **ReservedInstancesListings** *(list) --* 

          Information about the Reserved Instance listing.

          
          

          - *(dict) --* 

            Describes a Reserved Instance listing.

            
            

            - **ClientToken** *(string) --* 

              A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

              
            

            - **CreateDate** *(datetime) --* 

              The time the listing was created.

              
            

            - **InstanceCounts** *(list) --* 

              The number of instances in this state.

              
              

              - *(dict) --* 

                Describes a Reserved Instance listing state.

                
                

                - **InstanceCount** *(integer) --* 

                  The number of listed Reserved Instances in the state specified by the ``state`` .

                  
                

                - **State** *(string) --* 

                  The states of the listed Reserved Instances.

                  
            
          
            

            - **PriceSchedules** *(list) --* 

              The price of the Reserved Instance listing.

              
              

              - *(dict) --* 

                Describes the price for a Reserved Instance.

                
                

                - **Active** *(boolean) --* 

                  The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

                   

                  A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

                  
                

                - **CurrencyCode** *(string) --* 

                  The currency for transacting the Reserved Instance resale. At this time, the only supported currency is ``USD`` .

                  
                

                - **Price** *(float) --* 

                  The fixed price for the term.

                  
                

                - **Term** *(integer) --* 

                  The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

                  
            
          
            

            - **ReservedInstancesId** *(string) --* 

              The ID of the Reserved Instance.

              
            

            - **ReservedInstancesListingId** *(string) --* 

              The ID of the Reserved Instance listing.

              
            

            - **Status** *(string) --* 

              The status of the Reserved Instance listing.

              
            

            - **StatusMessage** *(string) --* 

              The reason for the current status of the Reserved Instance listing. The response can be blank.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **UpdateDate** *(datetime) --* 

              The last modified timestamp of the listing.

              
        
      
    

  .. py:method:: describe_reserved_instances_modifications(**kwargs)

    

    Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.

     

    For more information, see `Modifying Reserved Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html>`_ in the Amazon Elastic Compute Cloud User Guide.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications>`_    


    **Request Syntax** 
    ::

      response = client.describe_reserved_instances_modifications(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ReservedInstancesModificationIds=[
              'string',
          ],
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``client-token`` - The idempotency token for the modification request. 
       
      * ``create-date`` - The time when the modification request was created. 
       
      * ``effective-date`` - The time when the modification becomes effective. 
       
      * ``modification-result.reserved-instances-id`` - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is ``fulfilled`` . 
       
      * ``modification-result.target-configuration.availability-zone`` - The Availability Zone for the new Reserved Instances. 
       
      * ``modification-result.target-configuration.instance-count`` - The number of new Reserved Instances. 
       
      * ``modification-result.target-configuration.instance-type`` - The instance type of the new Reserved Instances. 
       
      * ``modification-result.target-configuration.platform`` - The network platform of the new Reserved Instances (``EC2-Classic`` | ``EC2-VPC`` ). 
       
      * ``reserved-instances-id`` - The ID of the Reserved Instances modified. 
       
      * ``reserved-instances-modification-id`` - The ID of the modification request. 
       
      * ``status`` - The status of the Reserved Instances modification request (``processing`` | ``fulfilled`` | ``failed`` ). 
       
      * ``status-message`` - The reason for the status. 
       
      * ``update-date`` - The time when the modification request was last updated. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ReservedInstancesModificationIds: list
    :param ReservedInstancesModificationIds: 

      IDs for the submitted modification request.

      

    
      - *(string) --* 

      
  
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'ReservedInstancesModifications': [
                {
                    'ClientToken': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'EffectiveDate': datetime(2015, 1, 1),
                    'ModificationResults': [
                        {
                            'ReservedInstancesId': 'string',
                            'TargetConfiguration': {
                                'AvailabilityZone': 'string',
                                'InstanceCount': 123,
                                'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                                'Platform': 'string',
                                'Scope': 'Availability Zone'|'Region'
                            }
                        },
                    ],
                    'ReservedInstancesIds': [
                        {
                            'ReservedInstancesId': 'string'
                        },
                    ],
                    'ReservedInstancesModificationId': 'string',
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'UpdateDate': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeReservedInstancesModifications.

        
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
        

        - **ReservedInstancesModifications** *(list) --* 

          The Reserved Instance modification information.

          
          

          - *(dict) --* 

            Describes a Reserved Instance modification.

            
            

            - **ClientToken** *(string) --* 

              A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

              
            

            - **CreateDate** *(datetime) --* 

              The time when the modification request was created.

              
            

            - **EffectiveDate** *(datetime) --* 

              The time for the modification to become effective.

              
            

            - **ModificationResults** *(list) --* 

              Contains target configurations along with their corresponding new Reserved Instance IDs.

              
              

              - *(dict) --* 

                Describes the modification request/s.

                
                

                - **ReservedInstancesId** *(string) --* 

                  The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.

                  
                

                - **TargetConfiguration** *(dict) --* 

                  The target Reserved Instances configurations supplied as part of the modification request.

                  
                  

                  - **AvailabilityZone** *(string) --* 

                    The Availability Zone for the modified Reserved Instances.

                    
                  

                  - **InstanceCount** *(integer) --* 

                    The number of modified Reserved Instances.

                    
                  

                  - **InstanceType** *(string) --* 

                    The instance type for the modified Reserved Instances.

                    
                  

                  - **Platform** *(string) --* 

                    The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

                    
                  

                  - **Scope** *(string) --* 

                    Whether the Reserved Instance is applied to instances in a region or instances in a specific Availability Zone.

                    
              
            
          
            

            - **ReservedInstancesIds** *(list) --* 

              The IDs of one or more Reserved Instances.

              
              

              - *(dict) --* 

                Describes the ID of a Reserved Instance.

                
                

                - **ReservedInstancesId** *(string) --* 

                  The ID of the Reserved Instance.

                  
            
          
            

            - **ReservedInstancesModificationId** *(string) --* 

              A unique ID for the Reserved Instance modification.

              
            

            - **Status** *(string) --* 

              The status of the Reserved Instances modification request.

              
            

            - **StatusMessage** *(string) --* 

              The reason for the status.

              
            

            - **UpdateDate** *(datetime) --* 

              The time when the modification request was last updated.

              
        
      
    

  .. py:method:: describe_reserved_instances_offerings(**kwargs)

    

    Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.

     

    If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.

     

    For more information, see `Reserved Instance Marketplace <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings>`_    


    **Request Syntax** 
    ::

      response = client.describe_reserved_instances_offerings(
          AvailabilityZone='string',
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          IncludeMarketplace=True|False,
          InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          MaxDuration=123,
          MaxInstanceCount=123,
          MinDuration=123,
          OfferingClass='standard'|'convertible',
          ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
          ReservedInstancesOfferingIds=[
              'string',
          ],
          DryRun=True|False,
          InstanceTenancy='default'|'dedicated'|'host',
          MaxResults=123,
          NextToken='string',
          OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone in which the Reserved Instance can be used.

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone where the Reserved Instance can be used. 
       
      * ``duration`` - The duration of the Reserved Instance (for example, one year or three years), in seconds (``31536000`` | ``94608000`` ). 
       
      * ``fixed-price`` - The purchase price of the Reserved Instance (for example, 9800.0). 
       
      * ``instance-type`` - The instance type that is covered by the reservation. 
       
      * ``marketplace`` - Set to ``true`` to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed. 
       
      * ``product-description`` - The Reserved Instance product platform description. Instances that include ``(Amazon VPC)`` in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (``Linux/UNIX`` | ``Linux/UNIX (Amazon VPC)`` | ``SUSE Linux`` | ``SUSE Linux (Amazon VPC)`` | ``Red Hat Enterprise Linux`` | ``Red Hat Enterprise Linux (Amazon VPC)`` | ``Windows`` | ``Windows (Amazon VPC)`` | ``Windows with SQL Server Standard`` | ``Windows with SQL Server Standard (Amazon VPC)`` | ``Windows with SQL Server Web`` | ``Windows with SQL Server Web (Amazon VPC)`` | ``Windows with SQL Server Enterprise`` | ``Windows with SQL Server Enterprise (Amazon VPC)`` )  
       
      * ``reserved-instances-offering-id`` - The Reserved Instances offering ID. 
       
      * ``scope`` - The scope of the Reserved Instance (``Availability Zone`` or ``Region`` ). 
       
      * ``usage-price`` - The usage price of the Reserved Instance, per hour (for example, 0.84). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type IncludeMarketplace: boolean
    :param IncludeMarketplace: 

      Include Reserved Instance Marketplace offerings in the response.

      

    
    :type InstanceType: string
    :param InstanceType: 

      The instance type that the reservation will cover (for example, ``m1.small`` ). For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type MaxDuration: integer
    :param MaxDuration: 

      The maximum duration (in seconds) to filter when searching for offerings.

       

      Default: 94608000 (3 years)

      

    
    :type MaxInstanceCount: integer
    :param MaxInstanceCount: 

      The maximum number of instances to filter when searching for offerings.

       

      Default: 20

      

    
    :type MinDuration: integer
    :param MinDuration: 

      The minimum duration (in seconds) to filter when searching for offerings.

       

      Default: 2592000 (1 month)

      

    
    :type OfferingClass: string
    :param OfferingClass: 

      The offering class of the Reserved Instance. Can be ``standard`` or ``convertible`` .

      

    
    :type ProductDescription: string
    :param ProductDescription: 

      The Reserved Instance product platform description. Instances that include ``(Amazon VPC)`` in the description are for use with Amazon VPC.

      

    
    :type ReservedInstancesOfferingIds: list
    :param ReservedInstancesOfferingIds: 

      One or more Reserved Instances offering IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceTenancy: string
    :param InstanceTenancy: 

      The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of ``dedicated`` is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).

       

       **Important:** The ``host`` value cannot be used with this parameter. Use the ``default`` or ``dedicated`` values only.

       

      Default: ``default``  

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned ``NextToken`` value. The maximum is 100.

       

      Default: 100

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    :type OfferingType: string
    :param OfferingType: 

      The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the ``Medium Utilization`` Reserved Instance offering type. 

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesOfferings': [
                {
                    'AvailabilityZone': 'string',
                    'Duration': 123,
                    'FixedPrice': ...,
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'ReservedInstancesOfferingId': 'string',
                    'UsagePrice': ...,
                    'CurrencyCode': 'USD',
                    'InstanceTenancy': 'default'|'dedicated'|'host',
                    'Marketplace': True|False,
                    'OfferingClass': 'standard'|'convertible',
                    'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
                    'PricingDetails': [
                        {
                            'Count': 123,
                            'Price': 123.0
                        },
                    ],
                    'RecurringCharges': [
                        {
                            'Amount': 123.0,
                            'Frequency': 'Hourly'
                        },
                    ],
                    'Scope': 'Availability Zone'|'Region'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeReservedInstancesOfferings.

        
        

        - **ReservedInstancesOfferings** *(list) --* 

          A list of Reserved Instances offerings.

          
          

          - *(dict) --* 

            Describes a Reserved Instance offering.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone in which the Reserved Instance can be used.

              
            

            - **Duration** *(integer) --* 

              The duration of the Reserved Instance, in seconds.

              
            

            - **FixedPrice** *(float) --* 

              The purchase price of the Reserved Instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type on which the Reserved Instance can be used.

              
            

            - **ProductDescription** *(string) --* 

              The Reserved Instance product platform description.

              
            

            - **ReservedInstancesOfferingId** *(string) --* 

              The ID of the Reserved Instance offering. This is the offering ID used in  GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

              
            

            - **UsagePrice** *(float) --* 

              The usage price of the Reserved Instance, per hour.

              
            

            - **CurrencyCode** *(string) --* 

              The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is ``USD`` .

              
            

            - **InstanceTenancy** *(string) --* 

              The tenancy of the instance.

              
            

            - **Marketplace** *(boolean) --* 

              Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is ``true`` .

              
            

            - **OfferingClass** *(string) --* 

              If ``convertible`` it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If ``standard`` , it is not possible to perform an exchange.

              
            

            - **OfferingType** *(string) --* 

              The Reserved Instance offering type.

              
            

            - **PricingDetails** *(list) --* 

              The pricing details of the Reserved Instance offering.

              
              

              - *(dict) --* 

                Describes a Reserved Instance offering.

                
                

                - **Count** *(integer) --* 

                  The number of reservations available for the price.

                  
                

                - **Price** *(float) --* 

                  The price per instance.

                  
            
          
            

            - **RecurringCharges** *(list) --* 

              The recurring charge tag assigned to the resource.

              
              

              - *(dict) --* 

                Describes a recurring charge.

                
                

                - **Amount** *(float) --* 

                  The amount of the recurring charge.

                  
                

                - **Frequency** *(string) --* 

                  The frequency of the recurring charge.

                  
            
          
            

            - **Scope** *(string) --* 

              Whether the Reserved Instance is applied to instances in a region or an Availability Zone.

              
        
      
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

  .. py:method:: describe_route_tables(**kwargs)

    

    Describes one or more of your route tables.

     

    Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_    


    **Request Syntax** 
    ::

      response = client.describe_route_tables(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          RouteTableIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``association.route-table-association-id`` - The ID of an association ID for the route table. 
       
      * ``association.route-table-id`` - The ID of the route table involved in the association. 
       
      * ``association.subnet-id`` - The ID of the subnet involved in the association. 
       
      * ``association.main`` - Indicates whether the route table is the main route table for the VPC (``true`` | ``false`` ). Route tables that do not have an association ID are not returned in the response. 
       
      * ``route-table-id`` - The ID of the route table. 
       
      * ``route.destination-cidr-block`` - The IPv4 CIDR range specified in a route in the table. 
       
      * ``route.destination-ipv6-cidr-block`` - The IPv6 CIDR range specified in a route in the route table. 
       
      * ``route.destination-prefix-list-id`` - The ID (prefix) of the AWS service specified in a route in the table. 
       
      * ``route.egress-only-internet-gateway-id`` - The ID of an egress-only Internet gateway specified in a route in the route table. 
       
      * ``route.gateway-id`` - The ID of a gateway specified in a route in the table. 
       
      * ``route.instance-id`` - The ID of an instance specified in a route in the table. 
       
      * ``route.nat-gateway-id`` - The ID of a NAT gateway. 
       
      * ``route.origin`` - Describes how the route was created. ``CreateRouteTable`` indicates that the route was automatically created when the route table was created; ``CreateRoute`` indicates that the route was manually added to the route table; ``EnableVgwRoutePropagation`` indicates that the route was propagated by route propagation. 
       
      * ``route.state`` - The state of a route in the route table (``active`` | ``blackhole`` ). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on). 
       
      * ``route.vpc-peering-connection-id`` - The ID of a VPC peering connection specified in a route in the table. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the route table. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableIds: list
    :param RouteTableIds: 

      One or more route table IDs.

       

      Default: Describes all your route tables.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'RouteTables': [
                {
                    'Associations': [
                        {
                            'Main': True|False,
                            'RouteTableAssociationId': 'string',
                            'RouteTableId': 'string',
                            'SubnetId': 'string'
                        },
                    ],
                    'PropagatingVgws': [
                        {
                            'GatewayId': 'string'
                        },
                    ],
                    'RouteTableId': 'string',
                    'Routes': [
                        {
                            'DestinationCidrBlock': 'string',
                            'DestinationIpv6CidrBlock': 'string',
                            'DestinationPrefixListId': 'string',
                            'EgressOnlyInternetGatewayId': 'string',
                            'GatewayId': 'string',
                            'InstanceId': 'string',
                            'InstanceOwnerId': 'string',
                            'NatGatewayId': 'string',
                            'NetworkInterfaceId': 'string',
                            'Origin': 'CreateRouteTable'|'CreateRoute'|'EnableVgwRoutePropagation',
                            'State': 'active'|'blackhole',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ],
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeRouteTables.

        
        

        - **RouteTables** *(list) --* 

          Information about one or more route tables.

          
          

          - *(dict) --* 

            Describes a route table.

            
            

            - **Associations** *(list) --* 

              The associations between the route table and one or more subnets.

              
              

              - *(dict) --* 

                Describes an association between a route table and a subnet.

                
                

                - **Main** *(boolean) --* 

                  Indicates whether this is the main route table.

                  
                

                - **RouteTableAssociationId** *(string) --* 

                  The ID of the association between a route table and a subnet.

                  
                

                - **RouteTableId** *(string) --* 

                  The ID of the route table.

                  
                

                - **SubnetId** *(string) --* 

                  The ID of the subnet. A subnet ID is not returned for an implicit association.

                  
            
          
            

            - **PropagatingVgws** *(list) --* 

              Any virtual private gateway (VGW) propagating routes.

              
              

              - *(dict) --* 

                Describes a virtual private gateway propagating route.

                
                

                - **GatewayId** *(string) --* 

                  The ID of the virtual private gateway (VGW).

                  
            
          
            

            - **RouteTableId** *(string) --* 

              The ID of the route table.

              
            

            - **Routes** *(list) --* 

              The routes in the route table.

              
              

              - *(dict) --* 

                Describes a route in a route table.

                
                

                - **DestinationCidrBlock** *(string) --* 

                  The IPv4 CIDR block used for the destination match.

                  
                

                - **DestinationIpv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block used for the destination match.

                  
                

                - **DestinationPrefixListId** *(string) --* 

                  The prefix of the AWS service.

                  
                

                - **EgressOnlyInternetGatewayId** *(string) --* 

                  The ID of the egress-only Internet gateway.

                  
                

                - **GatewayId** *(string) --* 

                  The ID of a gateway attached to your VPC.

                  
                

                - **InstanceId** *(string) --* 

                  The ID of a NAT instance in your VPC.

                  
                

                - **InstanceOwnerId** *(string) --* 

                  The AWS account ID of the owner of the instance.

                  
                

                - **NatGatewayId** *(string) --* 

                  The ID of a NAT gateway.

                  
                

                - **NetworkInterfaceId** *(string) --* 

                  The ID of the network interface.

                  
                

                - **Origin** *(string) --* 

                  Describes how the route was created.

                   

                   
                  * ``CreateRouteTable`` - The route was automatically created when the route table was created. 
                   
                  * ``CreateRoute`` - The route was manually added to the route table. 
                   
                  * ``EnableVgwRoutePropagation`` - The route was propagated by route propagation. 
                   

                  
                

                - **State** *(string) --* 

                  The state of the route. The ``blackhole`` state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

                  
                

                - **VpcPeeringConnectionId** *(string) --* 

                  The ID of the VPC peering connection.

                  
            
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the route table.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
      
    

    **Examples** 

    This example describes the specified route table.
    ::

      response = client.describe_route_tables(
          RouteTableIds=[
              'rtb-1f382e7d',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'RouteTables': [
              {
                  'Associations': [
                      {
                          'Main': True,
                          'RouteTableAssociationId': 'rtbassoc-d8ccddba',
                          'RouteTableId': 'rtb-1f382e7d',
                      },
                  ],
                  'PropagatingVgws': [
                  ],
                  'RouteTableId': 'rtb-1f382e7d',
                  'Routes': [
                      {
                          'DestinationCidrBlock': '10.0.0.0/16',
                          'GatewayId': 'local',
                          'State': 'active',
                      },
                  ],
                  'Tags': [
                  ],
                  'VpcId': 'vpc-a01106c2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_scheduled_instance_availability(**kwargs)

    

    Finds available schedules that meet the specified criteria.

     

    You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

     

    After you find a schedule that meets your needs, call  PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability>`_    


    **Request Syntax** 
    ::

      response = client.describe_scheduled_instance_availability(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          FirstSlotStartTimeRange={
              'EarliestTime': datetime(2015, 1, 1),
              'LatestTime': datetime(2015, 1, 1)
          },
          MaxResults=123,
          MaxSlotDurationInHours=123,
          MinSlotDurationInHours=123,
          NextToken='string',
          Recurrence={
              'Frequency': 'string',
              'Interval': 123,
              'OccurrenceDays': [
                  123,
              ],
              'OccurrenceRelativeToEnd': True|False,
              'OccurrenceUnit': 'string'
          }
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone (for example, ``us-west-2a`` ). 
       
      * ``instance-type`` - The instance type (for example, ``c4.large`` ). 
       
      * ``network-platform`` - The network platform (``EC2-Classic`` or ``EC2-VPC`` ). 
       
      * ``platform`` - The platform (``Linux/UNIX`` or ``Windows`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type FirstSlotStartTimeRange: dict
    :param FirstSlotStartTimeRange: **[REQUIRED]** 

      The time period for the first schedule to start.

      

    
      - **EarliestTime** *(datetime) --* **[REQUIRED]** 

        The earliest date and time, in UTC, for the Scheduled Instance to start.

        

      
      - **LatestTime** *(datetime) --* **[REQUIRED]** 

        The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.

        

      
    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type MaxSlotDurationInHours: integer
    :param MaxSlotDurationInHours: 

      The maximum available duration, in hours. This value must be greater than ``MinSlotDurationInHours`` and less than 1,720.

      

    
    :type MinSlotDurationInHours: integer
    :param MinSlotDurationInHours: 

      The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type Recurrence: dict
    :param Recurrence: **[REQUIRED]** 

      The schedule recurrence.

      

    
      - **Frequency** *(string) --* 

        The frequency (``Daily`` , ``Weekly`` , or ``Monthly`` ).

        

      
      - **Interval** *(integer) --* 

        The interval quantity. The interval unit depends on the value of ``Frequency`` . For example, every 2 weeks or every 2 months.

        

      
      - **OccurrenceDays** *(list) --* 

        The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.

        

      
        - *(integer) --* 

        
    
      - **OccurrenceRelativeToEnd** *(boolean) --* 

        Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.

        

      
      - **OccurrenceUnit** *(string) --* 

        The unit for ``OccurrenceDays`` (``DayOfWeek`` or ``DayOfMonth`` ). This value is required for a monthly schedule. You can't specify ``DayOfWeek`` with a weekly schedule. You can't specify this value with a daily schedule.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'ScheduledInstanceAvailabilitySet': [
                {
                    'AvailabilityZone': 'string',
                    'AvailableInstanceCount': 123,
                    'FirstSlotStartTime': datetime(2015, 1, 1),
                    'HourlyPrice': 'string',
                    'InstanceType': 'string',
                    'MaxTermDurationInDays': 123,
                    'MinTermDurationInDays': 123,
                    'NetworkPlatform': 'string',
                    'Platform': 'string',
                    'PurchaseToken': 'string',
                    'Recurrence': {
                        'Frequency': 'string',
                        'Interval': 123,
                        'OccurrenceDaySet': [
                            123,
                        ],
                        'OccurrenceRelativeToEnd': True|False,
                        'OccurrenceUnit': 'string'
                    },
                    'SlotDurationInHours': 123,
                    'TotalScheduledInstanceHours': 123
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeScheduledInstanceAvailability.

        
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **ScheduledInstanceAvailabilitySet** *(list) --* 

          Information about the available Scheduled Instances.

          
          

          - *(dict) --* 

            Describes a schedule that is available for your Scheduled Instances.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **AvailableInstanceCount** *(integer) --* 

              The number of available instances.

              
            

            - **FirstSlotStartTime** *(datetime) --* 

              The time period for the first schedule to start.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price for a single instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

              
            

            - **MaxTermDurationInDays** *(integer) --* 

              The maximum term. The only possible value is 365 days.

              
            

            - **MinTermDurationInDays** *(integer) --* 

              The minimum term. The only possible value is 365 days.

              
            

            - **NetworkPlatform** *(string) --* 

              The network platform (``EC2-Classic`` or ``EC2-VPC`` ).

              
            

            - **Platform** *(string) --* 

              The platform (``Linux/UNIX`` or ``Windows`` ).

              
            

            - **PurchaseToken** *(string) --* 

              The purchase token. This token expires in two hours.

              
            

            - **Recurrence** *(dict) --* 

              The schedule recurrence.

              
              

              - **Frequency** *(string) --* 

                The frequency (``Daily`` , ``Weekly`` , or ``Monthly`` ).

                
              

              - **Interval** *(integer) --* 

                The interval quantity. The interval unit depends on the value of ``frequency`` . For example, every 2 weeks or every 2 months.

                
              

              - **OccurrenceDaySet** *(list) --* 

                The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

                
                

                - *(integer) --* 
            
              

              - **OccurrenceRelativeToEnd** *(boolean) --* 

                Indicates whether the occurrence is relative to the end of the specified week or month.

                
              

              - **OccurrenceUnit** *(string) --* 

                The unit for ``occurrenceDaySet`` (``DayOfWeek`` or ``DayOfMonth`` ).

                
          
            

            - **SlotDurationInHours** *(integer) --* 

              The number of hours in the schedule.

              
            

            - **TotalScheduledInstanceHours** *(integer) --* 

              The total number of hours for a single instance for the entire term.

              
        
      
    

    **Examples** 

    This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example.
    ::

      response = client.describe_scheduled_instance_availability(
          FirstSlotStartTimeRange={
              'EarliestTime': datetime(2016, 1, 31, 0, 0, 0, 6, 31, 0),
              'LatestTime': datetime(2016, 1, 31, 4, 0, 0, 6, 31, 0),
          },
          Recurrence={
              'Frequency': 'Weekly',
              'Interval': 1,
              'OccurrenceDays': [
                  1,
              ],
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ScheduledInstanceAvailabilitySet': [
              {
                  'AvailabilityZone': 'us-west-2b',
                  'AvailableInstanceCount': 20,
                  'FirstSlotStartTime': datetime(2016, 1, 31, 0, 0, 0, 6, 31, 0),
                  'HourlyPrice': '0.095',
                  'InstanceType': 'c4.large',
                  'MaxTermDurationInDays': 366,
                  'MinTermDurationInDays': 366,
                  'NetworkPlatform': 'EC2-VPC',
                  'Platform': 'Linux/UNIX',
                  'PurchaseToken': 'eyJ2IjoiMSIsInMiOjEsImMiOi...',
                  'Recurrence': {
                      'Frequency': 'Weekly',
                      'Interval': 1,
                      'OccurrenceDaySet': [
                          1,
                      ],
                      'OccurrenceRelativeToEnd': False,
                  },
                  'SlotDurationInHours': 23,
                  'TotalScheduledInstanceHours': 1219,
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_scheduled_instances(**kwargs)

    

    Describes one or more of your Scheduled Instances.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances>`_    


    **Request Syntax** 
    ::

      response = client.describe_scheduled_instances(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          ScheduledInstanceIds=[
              'string',
          ],
          SlotStartTimeRange={
              'EarliestTime': datetime(2015, 1, 1),
              'LatestTime': datetime(2015, 1, 1)
          }
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone (for example, ``us-west-2a`` ). 
       
      * ``instance-type`` - The instance type (for example, ``c4.large`` ). 
       
      * ``network-platform`` - The network platform (``EC2-Classic`` or ``EC2-VPC`` ). 
       
      * ``platform`` - The platform (``Linux/UNIX`` or ``Windows`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type ScheduledInstanceIds: list
    :param ScheduledInstanceIds: 

      One or more Scheduled Instance IDs.

      

    
      - *(string) --* 

      
  
    :type SlotStartTimeRange: dict
    :param SlotStartTimeRange: 

      The time period for the first schedule to start.

      

    
      - **EarliestTime** *(datetime) --* 

        The earliest date and time, in UTC, for the Scheduled Instance to start.

        

      
      - **LatestTime** *(datetime) --* 

        The latest date and time, in UTC, for the Scheduled Instance to start.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'ScheduledInstanceSet': [
                {
                    'AvailabilityZone': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'HourlyPrice': 'string',
                    'InstanceCount': 123,
                    'InstanceType': 'string',
                    'NetworkPlatform': 'string',
                    'NextSlotStartTime': datetime(2015, 1, 1),
                    'Platform': 'string',
                    'PreviousSlotEndTime': datetime(2015, 1, 1),
                    'Recurrence': {
                        'Frequency': 'string',
                        'Interval': 123,
                        'OccurrenceDaySet': [
                            123,
                        ],
                        'OccurrenceRelativeToEnd': True|False,
                        'OccurrenceUnit': 'string'
                    },
                    'ScheduledInstanceId': 'string',
                    'SlotDurationInHours': 123,
                    'TermEndDate': datetime(2015, 1, 1),
                    'TermStartDate': datetime(2015, 1, 1),
                    'TotalScheduledInstanceHours': 123
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeScheduledInstances.

        
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **ScheduledInstanceSet** *(list) --* 

          Information about the Scheduled Instances.

          
          

          - *(dict) --* 

            Describes a Scheduled Instance.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **CreateDate** *(datetime) --* 

              The date when the Scheduled Instance was purchased.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price for a single instance.

              
            

            - **InstanceCount** *(integer) --* 

              The number of instances.

              
            

            - **InstanceType** *(string) --* 

              The instance type.

              
            

            - **NetworkPlatform** *(string) --* 

              The network platform (``EC2-Classic`` or ``EC2-VPC`` ).

              
            

            - **NextSlotStartTime** *(datetime) --* 

              The time for the next schedule to start.

              
            

            - **Platform** *(string) --* 

              The platform (``Linux/UNIX`` or ``Windows`` ).

              
            

            - **PreviousSlotEndTime** *(datetime) --* 

              The time that the previous schedule ended or will end.

              
            

            - **Recurrence** *(dict) --* 

              The schedule recurrence.

              
              

              - **Frequency** *(string) --* 

                The frequency (``Daily`` , ``Weekly`` , or ``Monthly`` ).

                
              

              - **Interval** *(integer) --* 

                The interval quantity. The interval unit depends on the value of ``frequency`` . For example, every 2 weeks or every 2 months.

                
              

              - **OccurrenceDaySet** *(list) --* 

                The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

                
                

                - *(integer) --* 
            
              

              - **OccurrenceRelativeToEnd** *(boolean) --* 

                Indicates whether the occurrence is relative to the end of the specified week or month.

                
              

              - **OccurrenceUnit** *(string) --* 

                The unit for ``occurrenceDaySet`` (``DayOfWeek`` or ``DayOfMonth`` ).

                
          
            

            - **ScheduledInstanceId** *(string) --* 

              The Scheduled Instance ID.

              
            

            - **SlotDurationInHours** *(integer) --* 

              The number of hours in the schedule.

              
            

            - **TermEndDate** *(datetime) --* 

              The end date for the Scheduled Instance.

              
            

            - **TermStartDate** *(datetime) --* 

              The start date for the Scheduled Instance.

              
            

            - **TotalScheduledInstanceHours** *(integer) --* 

              The total number of hours for a single instance for the entire term.

              
        
      
    

    **Examples** 

    This example describes the specified Scheduled Instance.
    ::

      response = client.describe_scheduled_instances(
          ScheduledInstanceIds=[
              'sci-1234-1234-1234-1234-123456789012',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ScheduledInstanceSet': [
              {
                  'AvailabilityZone': 'us-west-2b',
                  'CreateDate': datetime(2016, 1, 25, 21, 43, 38, 0, 25, 0),
                  'HourlyPrice': '0.095',
                  'InstanceCount': 1,
                  'InstanceType': 'c4.large',
                  'NetworkPlatform': 'EC2-VPC',
                  'NextSlotStartTime': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
                  'Platform': 'Linux/UNIX',
                  'Recurrence': {
                      'Frequency': 'Weekly',
                      'Interval': 1,
                      'OccurrenceDaySet': [
                          1,
                      ],
                      'OccurrenceRelativeToEnd': False,
                      'OccurrenceUnit': '',
                  },
                  'ScheduledInstanceId': 'sci-1234-1234-1234-1234-123456789012',
                  'SlotDurationInHours': 32,
                  'TermEndDate': datetime(2017, 1, 31, 9, 0, 0, 1, 31, 0),
                  'TermStartDate': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
                  'TotalScheduledInstanceHours': 1696,
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_security_group_references(**kwargs)

    

    [EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences>`_    


    **Request Syntax** 
    ::

      response = client.describe_security_group_references(
          DryRun=True|False,
          GroupId=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

      

    
    :type GroupId: list
    :param GroupId: **[REQUIRED]** 

      One or more security group IDs in your account.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SecurityGroupReferenceSet': [
                {
                    'GroupId': 'string',
                    'ReferencingVpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **SecurityGroupReferenceSet** *(list) --* 

          Information about the VPCs with the referencing security groups.

          
          

          - *(dict) --* 

            Describes a VPC with a security group that references your security group.

            
            

            - **GroupId** *(string) --* 

              The ID of your security group.

              
            

            - **ReferencingVpcId** *(string) --* 

              The ID of the VPC with the referencing security group.

              
            

            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection.

              
        
      
    

  .. py:method:: describe_security_groups(**kwargs)

    

    Describes one or more of your security groups.

     

    A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see `Amazon EC2 Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ in the *Amazon Elastic Compute Cloud User Guide* and `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_    


    **Request Syntax** 
    ::

      response = client.describe_security_groups(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          GroupIds=[
              'string',
          ],
          GroupNames=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

       

       
      * ``description`` - The description of the security group. 
       
      * ``egress.ip-permission.prefix-list-id`` - The ID (prefix) of the AWS service to which the security group allows access. 
       
      * ``group-id`` - The ID of the security group.  
       
      * ``group-name`` - The name of the security group. 
       
      * ``ip-permission.cidr`` - An IPv4 CIDR range that has been granted permission in a security group rule. 
       
      * ``ip-permission.from-port`` - The start of port range for the TCP and UDP protocols, or an ICMP type number. 
       
      * ``ip-permission.group-id`` - The ID of a security group that has been granted permission. 
       
      * ``ip-permission.group-name`` - The name of a security group that has been granted permission. 
       
      * ``ip-permission.ipv6-cidr`` - An IPv6 CIDR range that has been granted permission in a security group rule. 
       
      * ``ip-permission.protocol`` - The IP protocol for the permission (``tcp`` | ``udp`` | ``icmp`` or a protocol number). 
       
      * ``ip-permission.to-port`` - The end of port range for the TCP and UDP protocols, or an ICMP code. 
       
      * ``ip-permission.user-id`` - The ID of an AWS account that has been granted permission. 
       
      * ``owner-id`` - The AWS account ID of the owner of the security group. 
       
      * ``tag-key`` - The key of a tag assigned to the security group. 
       
      * ``tag-value`` - The value of a tag assigned to the security group. 
       
      * ``vpc-id`` - The ID of the VPC specified when the security group was created. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type GroupIds: list
    :param GroupIds: 

      One or more security group IDs. Required for security groups in a nondefault VPC.

       

      Default: Describes all your security groups.

      

    
      - *(string) --* 

      
  
    :type GroupNames: list
    :param GroupNames: 

      [EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the ``group-name`` filter to describe security groups by name.

       

      Default: Describes all your security groups.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SecurityGroups': [
                {
                    'Description': 'string',
                    'GroupName': 'string',
                    'IpPermissions': [
                        {
                            'FromPort': 123,
                            'IpProtocol': 'string',
                            'IpRanges': [
                                {
                                    'CidrIp': 'string'
                                },
                            ],
                            'Ipv6Ranges': [
                                {
                                    'CidrIpv6': 'string'
                                },
                            ],
                            'PrefixListIds': [
                                {
                                    'PrefixListId': 'string'
                                },
                            ],
                            'ToPort': 123,
                            'UserIdGroupPairs': [
                                {
                                    'GroupId': 'string',
                                    'GroupName': 'string',
                                    'PeeringStatus': 'string',
                                    'UserId': 'string',
                                    'VpcId': 'string',
                                    'VpcPeeringConnectionId': 'string'
                                },
                            ]
                        },
                    ],
                    'OwnerId': 'string',
                    'GroupId': 'string',
                    'IpPermissionsEgress': [
                        {
                            'FromPort': 123,
                            'IpProtocol': 'string',
                            'IpRanges': [
                                {
                                    'CidrIp': 'string'
                                },
                            ],
                            'Ipv6Ranges': [
                                {
                                    'CidrIpv6': 'string'
                                },
                            ],
                            'PrefixListIds': [
                                {
                                    'PrefixListId': 'string'
                                },
                            ],
                            'ToPort': 123,
                            'UserIdGroupPairs': [
                                {
                                    'GroupId': 'string',
                                    'GroupName': 'string',
                                    'PeeringStatus': 'string',
                                    'UserId': 'string',
                                    'VpcId': 'string',
                                    'VpcPeeringConnectionId': 'string'
                                },
                            ]
                        },
                    ],
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSecurityGroups.

        
        

        - **SecurityGroups** *(list) --* 

          Information about one or more security groups.

          
          

          - *(dict) --* 

            Describes a security group

            
            

            - **Description** *(string) --* 

              A description of the security group.

              
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **IpPermissions** *(list) --* 

              One or more inbound rules associated with the security group.

              
              

              - *(dict) --* 

                Describes a security group rule.

                
                

                - **FromPort** *(integer) --* 

                  The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

                  
                

                - **IpProtocol** *(string) --* 

                  The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

                   

                  [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

                  
                

                - **IpRanges** *(list) --* 

                  One or more IPv4 ranges.

                  
                  

                  - *(dict) --* 

                    Describes an IPv4 range.

                    
                    

                    - **CidrIp** *(string) --* 

                      The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

                      
                
              
                

                - **Ipv6Ranges** *(list) --* 

                  [EC2-VPC only] One or more IPv6 ranges.

                  
                  

                  - *(dict) --* 

                    [EC2-VPC only] Describes an IPv6 range.

                    
                    

                    - **CidrIpv6** *(string) --* 

                      The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

                      
                
              
                

                - **PrefixListIds** *(list) --* 

                  (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

                  
                  

                  - *(dict) --* 

                    The ID of the prefix.

                    
                    

                    - **PrefixListId** *(string) --* 

                      The ID of the prefix.

                      
                
              
                

                - **ToPort** *(integer) --* 

                  The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

                  
                

                - **UserIdGroupPairs** *(list) --* 

                  One or more security group and AWS account ID pairs.

                  
                  

                  - *(dict) --* 

                    Describes a security group and AWS account ID pair.

                    
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

                      
                    

                    - **PeeringStatus** *(string) --* 

                      The status of a VPC peering connection, if applicable.

                      
                    

                    - **UserId** *(string) --* 

                      The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

                       

                      [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC for the referenced security group, if applicable.

                      
                    

                    - **VpcPeeringConnectionId** *(string) --* 

                      The ID of the VPC peering connection, if applicable.

                      
                
              
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the owner of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
            

            - **IpPermissionsEgress** *(list) --* 

              [EC2-VPC] One or more outbound rules associated with the security group.

              
              

              - *(dict) --* 

                Describes a security group rule.

                
                

                - **FromPort** *(integer) --* 

                  The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

                  
                

                - **IpProtocol** *(string) --* 

                  The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

                   

                  [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

                  
                

                - **IpRanges** *(list) --* 

                  One or more IPv4 ranges.

                  
                  

                  - *(dict) --* 

                    Describes an IPv4 range.

                    
                    

                    - **CidrIp** *(string) --* 

                      The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

                      
                
              
                

                - **Ipv6Ranges** *(list) --* 

                  [EC2-VPC only] One or more IPv6 ranges.

                  
                  

                  - *(dict) --* 

                    [EC2-VPC only] Describes an IPv6 range.

                    
                    

                    - **CidrIpv6** *(string) --* 

                      The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

                      
                
              
                

                - **PrefixListIds** *(list) --* 

                  (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

                  
                  

                  - *(dict) --* 

                    The ID of the prefix.

                    
                    

                    - **PrefixListId** *(string) --* 

                      The ID of the prefix.

                      
                
              
                

                - **ToPort** *(integer) --* 

                  The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

                  
                

                - **UserIdGroupPairs** *(list) --* 

                  One or more security group and AWS account ID pairs.

                  
                  

                  - *(dict) --* 

                    Describes a security group and AWS account ID pair.

                    
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

                      
                    

                    - **PeeringStatus** *(string) --* 

                      The status of a VPC peering connection, if applicable.

                      
                    

                    - **UserId** *(string) --* 

                      The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

                       

                      [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC for the referenced security group, if applicable.

                      
                    

                    - **VpcPeeringConnectionId** *(string) --* 

                      The ID of the VPC peering connection, if applicable.

                      
                
              
            
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the security group.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              [EC2-VPC] The ID of the VPC for the security group.

              
        
      
    

  .. py:method:: describe_snapshot_attribute(**kwargs)

    

    Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

     

    For more information about EBS snapshots, see `Amazon EBS Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_snapshot_attribute(
          Attribute='productCodes'|'createVolumePermission',
          SnapshotId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The snapshot attribute you would like to view.

      

    
    :type SnapshotId: string
    :param SnapshotId: **[REQUIRED]** 

      The ID of the EBS snapshot.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CreateVolumePermissions': [
                {
                    'Group': 'all',
                    'UserId': 'string'
                },
            ],
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'SnapshotId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSnapshotAttribute.

        
        

        - **CreateVolumePermissions** *(list) --* 

          A list of permissions for creating volumes from the snapshot.

          
          

          - *(dict) --* 

            Describes the user or group to be added or removed from the permissions for a volume.

            
            

            - **Group** *(string) --* 

              The specific group that is to be added or removed from a volume's list of create volume permissions.

              
            

            - **UserId** *(string) --* 

              The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

              
        
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **SnapshotId** *(string) --* 

          The ID of the EBS snapshot.

          
    

    **Examples** 

    This example describes the ``createVolumePermission`` attribute on a snapshot with the snapshot ID of ``snap-066877671789bd71b``.
    ::

      response = client.describe_snapshot_attribute(
          Attribute='createVolumePermission',
          SnapshotId='snap-066877671789bd71b',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'CreateVolumePermissions': [
          ],
          'SnapshotId': 'snap-066877671789bd71b',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_snapshots(**kwargs)

    

    Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.

     

    The create volume permissions fall into the following categories:

     

     
    * *public* : The owner of the snapshot granted create volume permissions for the snapshot to the ``all`` group. All AWS accounts have create volume permissions for these snapshots. 
     
    * *explicit* : The owner of the snapshot granted create volume permissions to a specific AWS account. 
     
    * *implicit* : An AWS account has implicit create volume permissions for all snapshots it owns. 
     

     

    The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.

     

    If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.

     

    If you specify one or more snapshot owners using the ``OwnerIds`` option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, ``amazon`` for snapshots owned by Amazon, or ``self`` for snapshots that you own.

     

    If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), ``self`` for snapshots for which you own or have explicit permissions, or ``all`` for public snapshots.

     

    If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The ``MaxResults`` parameter sets the maximum number of results returned in a single page. If the list of results exceeds your ``MaxResults`` value, then that number of results is returned along with a ``NextToken`` value that can be passed to a subsequent ``DescribeSnapshots`` request to retrieve the remaining results.

     

    For more information about EBS snapshots, see `Amazon EBS Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_    


    **Request Syntax** 
    ::

      response = client.describe_snapshots(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          OwnerIds=[
              'string',
          ],
          RestorableByUserIds=[
              'string',
          ],
          SnapshotIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``description`` - A description of the snapshot. 
       
      * ``owner-alias`` - Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The ID of the AWS account that owns the snapshot. 
       
      * ``progress`` - The progress of the snapshot, as a percentage (for example, 80%). 
       
      * ``snapshot-id`` - The snapshot ID. 
       
      * ``start-time`` - The time stamp when the snapshot was initiated. 
       
      * ``status`` - The status of the snapshot (``pending`` | ``completed`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The ID of the volume the snapshot is for. 
       
      * ``volume-size`` - The size of the volume, in GiB. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of snapshot results returned by ``DescribeSnapshots`` in paginated output. When this parameter is used, ``DescribeSnapshots`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeSnapshots`` request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeSnapshots`` returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeSnapshots`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    :type OwnerIds: list
    :param OwnerIds: 

      Returns the snapshots owned by the specified owner. Multiple owners can be specified.

      

    
      - *(string) --* 

      
  
    :type RestorableByUserIds: list
    :param RestorableByUserIds: 

      One or more AWS accounts IDs that can create volumes from the snapshot.

      

    
      - *(string) --* 

      
  
    :type SnapshotIds: list
    :param SnapshotIds: 

      One or more snapshot IDs.

       

      Default: Describes snapshots for which you have launch permissions.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Snapshots': [
                {
                    'DataEncryptionKeyId': 'string',
                    'Description': 'string',
                    'Encrypted': True|False,
                    'KmsKeyId': 'string',
                    'OwnerId': 'string',
                    'Progress': 'string',
                    'SnapshotId': 'string',
                    'StartTime': datetime(2015, 1, 1),
                    'State': 'pending'|'completed'|'error',
                    'StateMessage': 'string',
                    'VolumeId': 'string',
                    'VolumeSize': 123,
                    'OwnerAlias': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSnapshots.

        
        

        - **Snapshots** *(list) --* 

          Information about the snapshots.

          
          

          - *(dict) --* 

            Describes a snapshot.

            
            

            - **DataEncryptionKeyId** *(string) --* 

              The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the  DescribeSnapshots API operation.

              
            

            - **Description** *(string) --* 

              The description for the snapshot.

              
            

            - **Encrypted** *(boolean) --* 

              Indicates whether the snapshot is encrypted.

              
            

            - **KmsKeyId** *(string) --* 

              The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.

              
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the EBS snapshot owner.

              
            

            - **Progress** *(string) --* 

              The progress of the snapshot, as a percentage.

              
            

            - **SnapshotId** *(string) --* 

              The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

              
            

            - **StartTime** *(datetime) --* 

              The time stamp when the snapshot was initiated.

              
            

            - **State** *(string) --* 

              The snapshot state.

              
            

            - **StateMessage** *(string) --* 

              Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the  DescribeSnapshots API operation.

              
            

            - **VolumeId** *(string) --* 

              The ID of the volume that was used to create the snapshot. Snapshots created by the  CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

              
            

            - **VolumeSize** *(integer) --* 

              The size of the volume, in GiB.

              
            

            - **OwnerAlias** *(string) --* 

              Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the snapshot.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
        

        - **NextToken** *(string) --* 

          The ``NextToken`` value to include in a future ``DescribeSnapshots`` request. When the results of a ``DescribeSnapshots`` request exceed ``MaxResults`` , this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

    **Examples** 

    This example describes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``.
    ::

      response = client.describe_snapshots(
          SnapshotIds=[
              'snap-1234567890abcdef0',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NextToken': '',
          'Snapshots': [
              {
                  'Description': 'This is my snapshot.',
                  'OwnerId': '012345678910',
                  'Progress': '100%',
                  'SnapshotId': 'snap-1234567890abcdef0',
                  'StartTime': datetime(2014, 2, 28, 21, 28, 32, 4, 59, 0),
                  'State': 'completed',
                  'VolumeId': 'vol-049df61146c4d7901',
                  'VolumeSize': 8,
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes all snapshots owned by the ID 012345678910 that are in the ``pending`` status.
    ::

      response = client.describe_snapshots(
          Filters=[
              {
                  'Name': 'status',
                  'Values': [
                      'pending',
                  ],
              },
          ],
          OwnerIds=[
              '012345678910',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NextToken': '',
          'Snapshots': [
              {
                  'Description': 'This is my copied snapshot.',
                  'OwnerId': '012345678910',
                  'Progress': '87%',
                  'SnapshotId': 'snap-066877671789bd71b',
                  'StartTime': datetime(2014, 2, 28, 21, 37, 27, 4, 59, 0),
                  'State': 'pending',
                  'VolumeId': 'vol-1234567890abcdef0',
                  'VolumeSize': 8,
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_datafeed_subscription(**kwargs)

    

    Describes the data feed for Spot instances. For more information, see `Spot Instance Data Feed <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_datafeed_subscription(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotDatafeedSubscription': {
                'Bucket': 'string',
                'Fault': {
                    'Code': 'string',
                    'Message': 'string'
                },
                'OwnerId': 'string',
                'Prefix': 'string',
                'State': 'Active'|'Inactive'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotDatafeedSubscription.

        
        

        - **SpotDatafeedSubscription** *(dict) --* 

          The Spot instance data feed subscription.

          
          

          - **Bucket** *(string) --* 

            The Amazon S3 bucket where the Spot instance data feed is located.

            
          

          - **Fault** *(dict) --* 

            The fault codes for the Spot instance request, if any.

            
            

            - **Code** *(string) --* 

              The reason code for the Spot instance state change.

              
            

            - **Message** *(string) --* 

              The message for the Spot instance state change.

              
        
          

          - **OwnerId** *(string) --* 

            The AWS account ID of the account.

            
          

          - **Prefix** *(string) --* 

            The prefix that is prepended to data feed files.

            
          

          - **State** *(string) --* 

            The state of the Spot instance data feed subscription.

            
      
    

    **Examples** 

    This example describes the Spot Instance datafeed subscription for your AWS account.
    ::

      response = client.describe_spot_datafeed_subscription(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotDatafeedSubscription': {
              'Bucket': 'my-s3-bucket',
              'OwnerId': '123456789012',
              'Prefix': 'spotdata',
              'State': 'Active',
          },
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_fleet_instances(**kwargs)

    

    Describes the running instances for the specified Spot fleet.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_fleet_instances(
          DryRun=True|False,
          MaxResults=123,
          NextToken='string',
          SpotFleetRequestId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type SpotFleetRequestId: string
    :param SpotFleetRequestId: **[REQUIRED]** 

      The ID of the Spot fleet request.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ActiveInstances': [
                {
                    'InstanceId': 'string',
                    'InstanceType': 'string',
                    'SpotInstanceRequestId': 'string',
                    'InstanceHealth': 'healthy'|'unhealthy'
                },
            ],
            'NextToken': 'string',
            'SpotFleetRequestId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotFleetInstances.

        
        

        - **ActiveInstances** *(list) --* 

          The running instances. Note that this list is refreshed periodically and might be out of date.

          
          

          - *(dict) --* 

            Describes a running instance in a Spot fleet.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type.

              
            

            - **SpotInstanceRequestId** *(string) --* 

              The ID of the Spot instance request.

              
            

            - **InstanceHealth** *(string) --* 

              The health status of the instance. If the status of either the instance status check or the system status check is ``impaired`` , the health status of the instance is ``unhealthy`` . Otherwise, the health status is ``healthy`` .

              
        
      
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **SpotFleetRequestId** *(string) --* 

          The ID of the Spot fleet request.

          
    

    **Examples** 

    This example lists the Spot Instances associated with the specified Spot fleet.
    ::

      response = client.describe_spot_fleet_instances(
          SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ActiveInstances': [
              {
                  'InstanceId': 'i-1234567890abcdef0',
                  'InstanceType': 'm3.medium',
                  'SpotInstanceRequestId': 'sir-08b93456',
              },
          ],
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_fleet_request_history(**kwargs)

    

    Describes the events for the specified Spot fleet request during the specified time.

     

    Spot fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_fleet_request_history(
          DryRun=True|False,
          EventType='instanceChange'|'fleetRequestChange'|'error',
          MaxResults=123,
          NextToken='string',
          SpotFleetRequestId='string',
          StartTime=datetime(2015, 1, 1)
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EventType: string
    :param EventType: 

      The type of events to describe. By default, all events are described.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type SpotFleetRequestId: string
    :param SpotFleetRequestId: **[REQUIRED]** 

      The ID of the Spot fleet request.

      

    
    :type StartTime: datetime
    :param StartTime: **[REQUIRED]** 

      The starting date and time for the events, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'HistoryRecords': [
                {
                    'EventInformation': {
                        'EventDescription': 'string',
                        'EventSubType': 'string',
                        'InstanceId': 'string'
                    },
                    'EventType': 'instanceChange'|'fleetRequestChange'|'error',
                    'Timestamp': datetime(2015, 1, 1)
                },
            ],
            'LastEvaluatedTime': datetime(2015, 1, 1),
            'NextToken': 'string',
            'SpotFleetRequestId': 'string',
            'StartTime': datetime(2015, 1, 1)
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotFleetRequestHistory.

        
        

        - **HistoryRecords** *(list) --* 

          Information about the events in the history of the Spot fleet request.

          
          

          - *(dict) --* 

            Describes an event in the history of the Spot fleet request.

            
            

            - **EventInformation** *(dict) --* 

              Information about the event.

              
              

              - **EventDescription** *(string) --* 

                The description of the event.

                
              

              - **EventSubType** *(string) --* 

                The event.

                 

                The following are the ``error`` events.

                 

                 
                * ``iamFleetRoleInvalid`` - The Spot fleet did not have the required permissions either to launch or terminate an instance. 
                 
                * ``launchSpecTemporarilyBlacklisted`` - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event. 
                 
                * ``spotFleetRequestConfigurationInvalid`` - The configuration is not valid. For more information, see the description of the event. 
                 
                * ``spotInstanceCountLimitExceeded`` - You've reached the limit on the number of Spot instances that you can launch. 
                 

                 

                The following are the ``fleetRequestChange`` events.

                 

                 
                * ``active`` - The Spot fleet has been validated and Amazon EC2 is attempting to maintain the target number of running Spot instances. 
                 
                * ``cancelled`` - The Spot fleet is canceled and has no running Spot instances. The Spot fleet will be deleted two days after its instances were terminated. 
                 
                * ``cancelled_running`` - The Spot fleet is canceled and will not launch additional Spot instances, but its existing Spot instances continue to run until they are interrupted or terminated. 
                 
                * ``cancelled_terminating`` - The Spot fleet is canceled and its Spot instances are terminating. 
                 
                * ``expired`` - The Spot fleet request has expired. A subsequent event indicates that the instances were terminated, if the request was created with ``TerminateInstancesWithExpiration`` set. 
                 
                * ``modify_in_progress`` - A request to modify the Spot fleet request was accepted and is in progress. 
                 
                * ``modify_successful`` - The Spot fleet request was modified. 
                 
                * ``price_update`` - The bid price for a launch configuration was adjusted because it was too high. This change is permanent. 
                 
                * ``submitted`` - The Spot fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of Spot instances. 
                 

                 

                The following are the ``instanceChange`` events.

                 

                 
                * ``launched`` - A bid was fulfilled and a new instance was launched. 
                 
                * ``terminated`` - An instance was terminated by the user. 
                 

                
              

              - **InstanceId** *(string) --* 

                The ID of the instance. This information is available only for ``instanceChange`` events.

                
          
            

            - **EventType** *(string) --* 

              The event type.

               

               
              * ``error`` - Indicates an error with the Spot fleet request. 
               
              * ``fleetRequestChange`` - Indicates a change in the status or configuration of the Spot fleet request. 
               
              * ``instanceChange`` - Indicates that an instance was launched or terminated. 
               

              
            

            - **Timestamp** *(datetime) --* 

              The date and time of the event, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

              
        
      
        

        - **LastEvaluatedTime** *(datetime) --* 

          The last date and time for the events, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). All records up to this time were retrieved.

           

          If ``nextToken`` indicates that there are more results, this value is not present.

          
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **SpotFleetRequestId** *(string) --* 

          The ID of the Spot fleet request.

          
        

        - **StartTime** *(datetime) --* 

          The starting date and time for the events, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

          
    

    **Examples** 

    This example returns the history for the specified Spot fleet starting at the specified time.
    ::

      response = client.describe_spot_fleet_request_history(
          SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          StartTime=datetime(2015, 5, 26, 0, 0, 0, 1, 146, 0),
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'HistoryRecords': [
              {
                  'EventInformation': {
                      'EventSubType': 'submitted',
                  },
                  'EventType': 'fleetRequestChange',
                  'Timestamp': datetime(2015, 5, 26, 23, 17, 20, 1, 146, 0),
              },
              {
                  'EventInformation': {
                      'EventSubType': 'active',
                  },
                  'EventType': 'fleetRequestChange',
                  'Timestamp': datetime(2015, 5, 26, 23, 17, 20, 1, 146, 0),
              },
              {
                  'EventInformation': {
                      'EventSubType': 'launched',
                      'InstanceId': 'i-1234567890abcdef0',
                  },
                  'EventType': 'instanceChange',
                  'Timestamp': datetime(2015, 5, 26, 23, 21, 21, 1, 146, 0),
              },
              {
                  'EventInformation': {
                      'EventSubType': 'launched',
                      'InstanceId': 'i-1234567890abcdef1',
                  },
                  'EventType': 'instanceChange',
                  'Timestamp': datetime(2015, 5, 26, 23, 21, 21, 1, 146, 0),
              },
          ],
          'NextToken': 'CpHNsscimcV5oH7bSbub03CI2Qms5+ypNpNm+53MNlR0YcXAkp0xFlfKf91yVxSExmbtma3awYxMFzNA663ZskT0AHtJ6TCb2Z8bQC2EnZgyELbymtWPfpZ1ZbauVg+P+TfGlWxWWB/Vr5dk5d4LfdgA/DRAHUrYgxzrEXAMPLE=',
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'StartTime': datetime(2015, 5, 26, 0, 0, 0, 1, 146, 0),
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_fleet_requests(**kwargs)

    

    Describes your Spot fleet requests.

     

    Spot fleet requests are deleted 48 hours after they are canceled and their instances are terminated.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_fleet_requests(
          DryRun=True|False,
          MaxResults=123,
          NextToken='string',
          SpotFleetRequestIds=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type SpotFleetRequestIds: list
    :param SpotFleetRequestIds: 

      The IDs of the Spot fleet requests.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'SpotFleetRequestConfigs': [
                {
                    'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
                    'CreateTime': datetime(2015, 1, 1),
                    'SpotFleetRequestConfig': {
                        'AllocationStrategy': 'lowestPrice'|'diversified',
                        'ClientToken': 'string',
                        'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
                        'FulfilledCapacity': 123.0,
                        'IamFleetRole': 'string',
                        'LaunchSpecifications': [
                            {
                                'SecurityGroups': [
                                    {
                                        'GroupName': 'string',
                                        'GroupId': 'string'
                                    },
                                ],
                                'AddressingType': 'string',
                                'BlockDeviceMappings': [
                                    {
                                        'DeviceName': 'string',
                                        'VirtualName': 'string',
                                        'Ebs': {
                                            'Encrypted': True|False,
                                            'DeleteOnTermination': True|False,
                                            'Iops': 123,
                                            'SnapshotId': 'string',
                                            'VolumeSize': 123,
                                            'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                                        },
                                        'NoDevice': 'string'
                                    },
                                ],
                                'EbsOptimized': True|False,
                                'IamInstanceProfile': {
                                    'Arn': 'string',
                                    'Name': 'string'
                                },
                                'ImageId': 'string',
                                'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                                'KernelId': 'string',
                                'KeyName': 'string',
                                'Monitoring': {
                                    'Enabled': True|False
                                },
                                'NetworkInterfaces': [
                                    {
                                        'AssociatePublicIpAddress': True|False,
                                        'DeleteOnTermination': True|False,
                                        'Description': 'string',
                                        'DeviceIndex': 123,
                                        'Groups': [
                                            'string',
                                        ],
                                        'Ipv6AddressCount': 123,
                                        'Ipv6Addresses': [
                                            {
                                                'Ipv6Address': 'string'
                                            },
                                        ],
                                        'NetworkInterfaceId': 'string',
                                        'PrivateIpAddress': 'string',
                                        'PrivateIpAddresses': [
                                            {
                                                'Primary': True|False,
                                                'PrivateIpAddress': 'string'
                                            },
                                        ],
                                        'SecondaryPrivateIpAddressCount': 123,
                                        'SubnetId': 'string'
                                    },
                                ],
                                'Placement': {
                                    'AvailabilityZone': 'string',
                                    'GroupName': 'string',
                                    'Tenancy': 'default'|'dedicated'|'host'
                                },
                                'RamdiskId': 'string',
                                'SpotPrice': 'string',
                                'SubnetId': 'string',
                                'UserData': 'string',
                                'WeightedCapacity': 123.0,
                                'TagSpecifications': [
                                    {
                                        'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                                        'Tags': [
                                            {
                                                'Key': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    },
                                ]
                            },
                        ],
                        'SpotPrice': 'string',
                        'TargetCapacity': 123,
                        'TerminateInstancesWithExpiration': True|False,
                        'Type': 'request'|'maintain',
                        'ValidFrom': datetime(2015, 1, 1),
                        'ValidUntil': datetime(2015, 1, 1),
                        'ReplaceUnhealthyInstances': True|False
                    },
                    'SpotFleetRequestId': 'string',
                    'SpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotFleetRequests.

        
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **SpotFleetRequestConfigs** *(list) --* 

          Information about the configuration of your Spot fleet.

          
          

          - *(dict) --* 

            Describes a Spot fleet request.

            
            

            - **ActivityStatus** *(string) --* 

              The progress of the Spot fleet request. If there is an error, the status is ``error`` . After all bids are placed, the status is ``pending_fulfillment`` . If the size of the fleet is equal to or greater than its target capacity, the status is ``fulfilled`` . If the size of the fleet is decreased, the status is ``pending_termination`` while Spot instances are terminating.

              
            

            - **CreateTime** *(datetime) --* 

              The creation date and time of the request.

              
            

            - **SpotFleetRequestConfig** *(dict) --* 

              Information about the configuration of the Spot fleet request.

              
              

              - **AllocationStrategy** *(string) --* 

                Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is ``lowestPrice`` .

                
              

              - **ClientToken** *(string) --* 

                A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

                
              

              - **ExcessCapacityTerminationPolicy** *(string) --* 

                Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

                
              

              - **FulfilledCapacity** *(float) --* 

                The number of units fulfilled by this request compared to the set target capacity.

                
              

              - **IamFleetRole** *(string) --* 

                Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using  CancelSpotFleetRequests or when the Spot fleet request expires, if you set ``terminateInstancesWithExpiration`` .

                
              

              - **LaunchSpecifications** *(list) --* 

                Information about the launch specifications for the Spot fleet request.

                
                

                - *(dict) --* 

                  Describes the launch specification for one or more Spot instances.

                  
                  

                  - **SecurityGroups** *(list) --* 

                    One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

                    
                    

                    - *(dict) --* 

                      Describes a security group.

                      
                      

                      - **GroupName** *(string) --* 

                        The name of the security group.

                        
                      

                      - **GroupId** *(string) --* 

                        The ID of the security group.

                        
                  
                
                  

                  - **AddressingType** *(string) --* 

                    Deprecated.

                    
                  

                  - **BlockDeviceMappings** *(list) --* 

                    One or more block device mapping entries.

                    
                    

                    - *(dict) --* 

                      Describes a block device mapping.

                      
                      

                      - **DeviceName** *(string) --* 

                        The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                        
                      

                      - **VirtualName** *(string) --* 

                        The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                         

                        Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                        
                      

                      - **Ebs** *(dict) --* 

                        Parameters used to automatically set up EBS volumes when the instance is launched.

                        
                        

                        - **Encrypted** *(boolean) --* 

                          Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                          
                        

                        - **DeleteOnTermination** *(boolean) --* 

                          Indicates whether the EBS volume is deleted on instance termination.

                          
                        

                        - **Iops** *(integer) --* 

                          The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                           

                          Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                           

                          Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                          
                        

                        - **SnapshotId** *(string) --* 

                          The ID of the snapshot.

                          
                        

                        - **VolumeSize** *(integer) --* 

                          The size of the volume, in GiB.

                           

                          Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                           

                          Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                          
                        

                        - **VolumeType** *(string) --* 

                          The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                           

                          Default: ``standard``  

                          
                    
                      

                      - **NoDevice** *(string) --* 

                        Suppresses the specified device included in the block device mapping of the AMI.

                        
                  
                
                  

                  - **EbsOptimized** *(boolean) --* 

                    Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                     

                    Default: ``false``  

                    
                  

                  - **IamInstanceProfile** *(dict) --* 

                    The IAM instance profile.

                    
                    

                    - **Arn** *(string) --* 

                      The Amazon Resource Name (ARN) of the instance profile.

                      
                    

                    - **Name** *(string) --* 

                      The name of the instance profile.

                      
                
                  

                  - **ImageId** *(string) --* 

                    The ID of the AMI.

                    
                  

                  - **InstanceType** *(string) --* 

                    The instance type. Note that T2 and HS1 instance types are not supported.

                    
                  

                  - **KernelId** *(string) --* 

                    The ID of the kernel.

                    
                  

                  - **KeyName** *(string) --* 

                    The name of the key pair.

                    
                  

                  - **Monitoring** *(dict) --* 

                    Enable or disable monitoring for the instances.

                    
                    

                    - **Enabled** *(boolean) --* 

                      Enables monitoring for the instance.

                       

                      Default: ``false``  

                      
                
                  

                  - **NetworkInterfaces** *(list) --* 

                    One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                    
                    

                    - *(dict) --* 

                      Describes a network interface.

                      
                      

                      - **AssociatePublicIpAddress** *(boolean) --* 

                        Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

                        
                      

                      - **Description** *(string) --* 

                        The description of the network interface. Applies only if creating a network interface when launching an instance.

                        
                      

                      - **DeviceIndex** *(integer) --* 

                        The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

                        
                      

                      - **Groups** *(list) --* 

                        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                        
                        

                        - *(string) --* 
                    
                      

                      - **Ipv6AddressCount** *(integer) --* 

                        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                        
                      

                      - **Ipv6Addresses** *(list) --* 

                        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                        
                        

                        - *(dict) --* 

                          Describes an IPv6 address.

                          
                          

                          - **Ipv6Address** *(string) --* 

                            The IPv6 address.

                            
                      
                    
                      

                      - **NetworkInterfaceId** *(string) --* 

                        The ID of the network interface.

                        
                      

                      - **PrivateIpAddress** *(string) --* 

                        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                      

                      - **PrivateIpAddresses** *(list) --* 

                        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                        

                        - *(dict) --* 

                          Describes a secondary private IPv4 address for a network interface.

                          
                          

                          - **Primary** *(boolean) --* 

                            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                            
                          

                          - **PrivateIpAddress** *(string) --* 

                            The private IPv4 addresses.

                            
                      
                    
                      

                      - **SecondaryPrivateIpAddressCount** *(integer) --* 

                        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                      

                      - **SubnetId** *(string) --* 

                        The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

                        
                  
                
                  

                  - **Placement** *(dict) --* 

                    The placement information.

                    
                    

                    - **AvailabilityZone** *(string) --* 

                      The Availability Zone.

                       

                      [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the placement group (for cluster instances).

                      
                    

                    - **Tenancy** *(string) --* 

                      The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

                      
                
                  

                  - **RamdiskId** *(string) --* 

                    The ID of the RAM disk.

                    
                  

                  - **SpotPrice** *(string) --* 

                    The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of ``WeightedCapacity`` .

                    
                  

                  - **SubnetId** *(string) --* 

                    The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".

                    
                  

                  - **UserData** *(string) --* 

                    The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

                    
                  

                  - **WeightedCapacity** *(float) --* 

                    The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).

                     

                    If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.

                    
                  

                  - **TagSpecifications** *(list) --* 

                    The tags to apply during creation.

                    
                    

                    - *(dict) --* 

                      The tags for a Spot fleet resource.

                      
                      

                      - **ResourceType** *(string) --* 

                        The type of resource. Currently, the only resource type that is supported is ``instance`` .

                        
                      

                      - **Tags** *(list) --* 

                        The tags.

                        
                        

                        - *(dict) --* 

                          Describes a tag.

                          
                          

                          - **Key** *(string) --* 

                            The key of the tag.

                             

                            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                            
                          

                          - **Value** *(string) --* 

                            The value of the tag.

                             

                            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                            
                      
                    
                  
                
              
            
              

              - **SpotPrice** *(string) --* 

                The bid price per unit hour.

                
              

              - **TargetCapacity** *(integer) --* 

                The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.

                
              

              - **TerminateInstancesWithExpiration** *(boolean) --* 

                Indicates whether running Spot instances should be terminated when the Spot fleet request expires.

                
              

              - **Type** *(string) --* 

                The type of request. Indicates whether the fleet will only ``request`` the target capacity or also attempt to ``maintain`` it. When you ``request`` a certain target capacity, the fleet will only place the required bids. It will not attempt to replenish Spot instances if capacity is diminished, nor will it submit bids in alternative Spot pools if capacity is not available. When you want to ``maintain`` a certain target capacity, fleet will place the required bids to meet this target capacity. It will also automatically replenish any interrupted instances. Default: ``maintain`` .

                
              

              - **ValidFrom** *(datetime) --* 

                The start date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). The default is to start fulfilling the request immediately.

                
              

              - **ValidUntil** *(datetime) --* 

                The end date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.

                
              

              - **ReplaceUnhealthyInstances** *(boolean) --* 

                Indicates whether Spot fleet should replace unhealthy instances.

                
          
            

            - **SpotFleetRequestId** *(string) --* 

              The ID of the Spot fleet request.

              
            

            - **SpotFleetRequestState** *(string) --* 

              The state of the Spot fleet request.

              
        
      
    

    **Examples** 

    This example describes the specified Spot fleet request.
    ::

      response = client.describe_spot_fleet_requests(
          SpotFleetRequestIds=[
              'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotFleetRequestConfigs': [
              {
                  'SpotFleetRequestConfig': {
                      'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
                      'LaunchSpecifications': [
                          {
                              'EbsOptimized': False,
                              'ImageId': 'ami-1a2b3c4d',
                              'InstanceType': 'cc2.8xlarge',
                              'NetworkInterfaces': [
                                  {
                                      'AssociatePublicIpAddress': True,
                                      'DeleteOnTermination': False,
                                      'DeviceIndex': 0,
                                      'SecondaryPrivateIpAddressCount': 0,
                                      'SubnetId': 'subnet-a61dafcf',
                                  },
                              ],
                          },
                          {
                              'EbsOptimized': False,
                              'ImageId': 'ami-1a2b3c4d',
                              'InstanceType': 'r3.8xlarge',
                              'NetworkInterfaces': [
                                  {
                                      'AssociatePublicIpAddress': True,
                                      'DeleteOnTermination': False,
                                      'DeviceIndex': 0,
                                      'SecondaryPrivateIpAddressCount': 0,
                                      'SubnetId': 'subnet-a61dafcf',
                                  },
                              ],
                          },
                      ],
                      'SpotPrice': '0.05',
                      'TargetCapacity': 20,
                  },
                  'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
                  'SpotFleetRequestState': 'active',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_instance_requests(**kwargs)

    

    Describes the Spot instance requests that belong to your account. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see `Spot Instance Requests <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    You can use ``DescribeSpotInstanceRequests`` to find a running Spot instance by examining the response. If the status of the Spot instance is ``fulfilled`` , the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use  DescribeInstances with a filter to look for instances where the instance lifecycle is ``spot`` .

     

    Spot instance requests are deleted 4 hours after they are canceled and their instances are terminated.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_instance_requests(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          SpotInstanceRequestIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone-group`` - The Availability Zone group. 
       
      * ``create-time`` - The time stamp when the Spot instance request was created. 
       
      * ``fault-code`` - The fault code related to the request. 
       
      * ``fault-message`` - The fault message related to the request. 
       
      * ``instance-id`` - The ID of the instance that fulfilled the request. 
       
      * ``launch-group`` - The Spot instance launch group. 
       
      * ``launch.block-device-mapping.delete-on-termination`` - Indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``launch.block-device-mapping.device-name`` - The device name for the Amazon EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``launch.block-device-mapping.snapshot-id`` - The ID of the snapshot used for the Amazon EBS volume. 
       
      * ``launch.block-device-mapping.volume-size`` - The size of the Amazon EBS volume, in GiB. 
       
      * ``launch.block-device-mapping.volume-type`` - The type of the Amazon EBS volume: ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic. 
       
      * ``launch.group-id`` - The security group for the instance. 
       
      * ``launch.image-id`` - The ID of the AMI. 
       
      * ``launch.instance-type`` - The type of instance (for example, ``m3.medium`` ). 
       
      * ``launch.kernel-id`` - The kernel ID. 
       
      * ``launch.key-name`` - The name of the key pair the instance launched with. 
       
      * ``launch.monitoring-enabled`` - Whether monitoring is enabled for the Spot instance. 
       
      * ``launch.ramdisk-id`` - The RAM disk ID. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.device-index`` - The index of the device for the network interface attachment on the instance. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the instance. 
       
      * ``network-interface.description`` - A description of the network interface. 
       
      * ``network-interface.private-ip-address`` - The primary private IP address of the network interface. 
       
      * ``network-interface.delete-on-termination`` - Indicates whether the network interface is deleted when the instance is terminated. 
       
      * ``network-interface.group-id`` - The ID of the security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of the security group associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Indicates whether the IP address is the primary private IP address. 
       
      * ``product-description`` - The product description associated with the instance (``Linux/UNIX`` | ``Windows`` ). 
       
      * ``spot-instance-request-id`` - The Spot instance request ID. 
       
      * ``spot-price`` - The maximum hourly price for any Spot instance launched to fulfill the request. 
       
      * ``state`` - The state of the Spot instance request (``open`` | ``active`` | ``closed`` | ``cancelled`` | ``failed`` ). Spot bid status information can help you track your Amazon EC2 Spot instance requests. For more information, see `Spot Bid Status <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html>`_ in the Amazon Elastic Compute Cloud User Guide. 
       
      * ``status-code`` - The short code describing the most recent evaluation of your Spot instance request. 
       
      * ``status-message`` - The message explaining the status of the Spot instance request. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of Spot instance request (``one-time`` | ``persistent`` ). 
       
      * ``launched-availability-zone`` - The Availability Zone in which the bid is launched. 
       
      * ``valid-from`` - The start date of the request. 
       
      * ``valid-until`` - The end date of the request. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotInstanceRequestIds: list
    :param SpotInstanceRequestIds: 

      One or more Spot instance request IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotInstanceRequests': [
                {
                    'ActualBlockHourlyPrice': 'string',
                    'AvailabilityZoneGroup': 'string',
                    'BlockDurationMinutes': 123,
                    'CreateTime': datetime(2015, 1, 1),
                    'Fault': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'InstanceId': 'string',
                    'LaunchGroup': 'string',
                    'LaunchSpecification': {
                        'UserData': 'string',
                        'SecurityGroups': [
                            {
                                'GroupName': 'string',
                                'GroupId': 'string'
                            },
                        ],
                        'AddressingType': 'string',
                        'BlockDeviceMappings': [
                            {
                                'DeviceName': 'string',
                                'VirtualName': 'string',
                                'Ebs': {
                                    'Encrypted': True|False,
                                    'DeleteOnTermination': True|False,
                                    'Iops': 123,
                                    'SnapshotId': 'string',
                                    'VolumeSize': 123,
                                    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                                },
                                'NoDevice': 'string'
                            },
                        ],
                        'EbsOptimized': True|False,
                        'IamInstanceProfile': {
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'ImageId': 'string',
                        'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                        'KernelId': 'string',
                        'KeyName': 'string',
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True|False,
                                'DeleteOnTermination': True|False,
                                'Description': 'string',
                                'DeviceIndex': 123,
                                'Groups': [
                                    'string',
                                ],
                                'Ipv6AddressCount': 123,
                                'Ipv6Addresses': [
                                    {
                                        'Ipv6Address': 'string'
                                    },
                                ],
                                'NetworkInterfaceId': 'string',
                                'PrivateIpAddress': 'string',
                                'PrivateIpAddresses': [
                                    {
                                        'Primary': True|False,
                                        'PrivateIpAddress': 'string'
                                    },
                                ],
                                'SecondaryPrivateIpAddressCount': 123,
                                'SubnetId': 'string'
                            },
                        ],
                        'Placement': {
                            'AvailabilityZone': 'string',
                            'GroupName': 'string',
                            'Tenancy': 'default'|'dedicated'|'host'
                        },
                        'RamdiskId': 'string',
                        'SubnetId': 'string',
                        'Monitoring': {
                            'Enabled': True|False
                        }
                    },
                    'LaunchedAvailabilityZone': 'string',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'SpotInstanceRequestId': 'string',
                    'SpotPrice': 'string',
                    'State': 'open'|'active'|'closed'|'cancelled'|'failed',
                    'Status': {
                        'Code': 'string',
                        'Message': 'string',
                        'UpdateTime': datetime(2015, 1, 1)
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'Type': 'one-time'|'persistent',
                    'ValidFrom': datetime(2015, 1, 1),
                    'ValidUntil': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotInstanceRequests.

        
        

        - **SpotInstanceRequests** *(list) --* 

          One or more Spot instance requests.

          
          

          - *(dict) --* 

            Describes a Spot instance request.

            
            

            - **ActualBlockHourlyPrice** *(string) --* 

              If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

              
            

            - **AvailabilityZoneGroup** *(string) --* 

              The Availability Zone group. If you specify the same Availability Zone group for all Spot instance requests, all Spot instances are launched in the same Availability Zone.

              
            

            - **BlockDurationMinutes** *(integer) --* 

              The duration for the Spot instance, in minutes.

              
            

            - **CreateTime** *(datetime) --* 

              The date and time when the Spot instance request was created, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

              
            

            - **Fault** *(dict) --* 

              The fault codes for the Spot instance request, if any.

              
              

              - **Code** *(string) --* 

                The reason code for the Spot instance state change.

                
              

              - **Message** *(string) --* 

                The message for the Spot instance state change.

                
          
            

            - **InstanceId** *(string) --* 

              The instance ID, if an instance has been launched to fulfill the Spot instance request.

              
            

            - **LaunchGroup** *(string) --* 

              The instance launch group. Launch groups are Spot instances that launch together and terminate together.

              
            

            - **LaunchSpecification** *(dict) --* 

              Additional information for launching instances.

              
              

              - **UserData** *(string) --* 

                The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

                
              

              - **SecurityGroups** *(list) --* 

                One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

                
                

                - *(dict) --* 

                  Describes a security group.

                  
                  

                  - **GroupName** *(string) --* 

                    The name of the security group.

                    
                  

                  - **GroupId** *(string) --* 

                    The ID of the security group.

                    
              
            
              

              - **AddressingType** *(string) --* 

                Deprecated.

                
              

              - **BlockDeviceMappings** *(list) --* 

                One or more block device mapping entries.

                 

                Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.

                
                

                - *(dict) --* 

                  Describes a block device mapping.

                  
                  

                  - **DeviceName** *(string) --* 

                    The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                    
                  

                  - **VirtualName** *(string) --* 

                    The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                     

                    Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                    
                  

                  - **Ebs** *(dict) --* 

                    Parameters used to automatically set up EBS volumes when the instance is launched.

                    
                    

                    - **Encrypted** *(boolean) --* 

                      Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                      
                    

                    - **DeleteOnTermination** *(boolean) --* 

                      Indicates whether the EBS volume is deleted on instance termination.

                      
                    

                    - **Iops** *(integer) --* 

                      The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                       

                      Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                       

                      Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                      
                    

                    - **SnapshotId** *(string) --* 

                      The ID of the snapshot.

                      
                    

                    - **VolumeSize** *(integer) --* 

                      The size of the volume, in GiB.

                       

                      Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                       

                      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                      
                    

                    - **VolumeType** *(string) --* 

                      The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                       

                      Default: ``standard``  

                      
                
                  

                  - **NoDevice** *(string) --* 

                    Suppresses the specified device included in the block device mapping of the AMI.

                    
              
            
              

              - **EbsOptimized** *(boolean) --* 

                Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                 

                Default: ``false``  

                
              

              - **IamInstanceProfile** *(dict) --* 

                The IAM instance profile.

                
                

                - **Arn** *(string) --* 

                  The Amazon Resource Name (ARN) of the instance profile.

                  
                

                - **Name** *(string) --* 

                  The name of the instance profile.

                  
            
              

              - **ImageId** *(string) --* 

                The ID of the AMI.

                
              

              - **InstanceType** *(string) --* 

                The instance type.

                
              

              - **KernelId** *(string) --* 

                The ID of the kernel.

                
              

              - **KeyName** *(string) --* 

                The name of the key pair.

                
              

              - **NetworkInterfaces** *(list) --* 

                One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                
                

                - *(dict) --* 

                  Describes a network interface.

                  
                  

                  - **AssociatePublicIpAddress** *(boolean) --* 

                    Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

                    
                  

                  - **DeleteOnTermination** *(boolean) --* 

                    If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

                    
                  

                  - **Description** *(string) --* 

                    The description of the network interface. Applies only if creating a network interface when launching an instance.

                    
                  

                  - **DeviceIndex** *(integer) --* 

                    The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

                    
                  

                  - **Groups** *(list) --* 

                    The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                    
                    

                    - *(string) --* 
                
                  

                  - **Ipv6AddressCount** *(integer) --* 

                    A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                    
                  

                  - **Ipv6Addresses** *(list) --* 

                    One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                    
                    

                    - *(dict) --* 

                      Describes an IPv6 address.

                      
                      

                      - **Ipv6Address** *(string) --* 

                        The IPv6 address.

                        
                  
                
                  

                  - **NetworkInterfaceId** *(string) --* 

                    The ID of the network interface.

                    
                  

                  - **PrivateIpAddress** *(string) --* 

                    The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                  

                  - **PrivateIpAddresses** *(list) --* 

                    One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                    

                    - *(dict) --* 

                      Describes a secondary private IPv4 address for a network interface.

                      
                      

                      - **Primary** *(boolean) --* 

                        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                        
                      

                      - **PrivateIpAddress** *(string) --* 

                        The private IPv4 addresses.

                        
                  
                
                  

                  - **SecondaryPrivateIpAddressCount** *(integer) --* 

                    The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                  

                  - **SubnetId** *(string) --* 

                    The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

                    
              
            
              

              - **Placement** *(dict) --* 

                The placement information for the instance.

                
                

                - **AvailabilityZone** *(string) --* 

                  The Availability Zone.

                   

                  [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

                  
                

                - **GroupName** *(string) --* 

                  The name of the placement group (for cluster instances).

                  
                

                - **Tenancy** *(string) --* 

                  The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

                  
            
              

              - **RamdiskId** *(string) --* 

                The ID of the RAM disk.

                
              

              - **SubnetId** *(string) --* 

                The ID of the subnet in which to launch the instance.

                
              

              - **Monitoring** *(dict) --* 

                Describes the monitoring of an instance.

                
                

                - **Enabled** *(boolean) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
            

            - **LaunchedAvailabilityZone** *(string) --* 

              The Availability Zone in which the bid is launched.

              
            

            - **ProductDescription** *(string) --* 

              The product description associated with the Spot instance.

              
            

            - **SpotInstanceRequestId** *(string) --* 

              The ID of the Spot instance request.

              
            

            - **SpotPrice** *(string) --* 

              The maximum hourly price (bid) for the Spot instance launched to fulfill the request.

              
            

            - **State** *(string) --* 

              The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see `Spot Bid Status <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

              
            

            - **Status** *(dict) --* 

              The status code and status message describing the Spot instance request.

              
              

              - **Code** *(string) --* 

                The status code. For a list of status codes, see `Spot Bid Status Codes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                
              

              - **Message** *(string) --* 

                The description for the status code.

                
              

              - **UpdateTime** *(datetime) --* 

                The date and time of the most recent status update, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

                
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **Type** *(string) --* 

              The Spot instance request type.

              
            

            - **ValidFrom** *(datetime) --* 

              The start date of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). The request becomes active at this date and time.

              
            

            - **ValidUntil** *(datetime) --* 

              The end date of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

              
        
      
    

    **Examples** 

    This example describes the specified Spot Instance request.
    ::

      response = client.describe_spot_instance_requests(
          SpotInstanceRequestIds=[
              'sir-08b93456',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotInstanceRequests': [
              {
                  'CreateTime': datetime(2014, 4, 30, 18, 14, 55, 2, 120, 0),
                  'InstanceId': 'i-1234567890abcdef0',
                  'LaunchSpecification': {
                      'BlockDeviceMappings': [
                          {
                              'DeviceName': '/dev/sda1',
                              'Ebs': {
                                  'DeleteOnTermination': True,
                                  'VolumeSize': 8,
                                  'VolumeType': 'standard',
                              },
                          },
                      ],
                      'EbsOptimized': False,
                      'ImageId': 'ami-7aba833f',
                      'InstanceType': 'm1.small',
                      'KeyName': 'my-key-pair',
                      'SecurityGroups': [
                          {
                              'GroupId': 'sg-e38f24a7',
                              'GroupName': 'my-security-group',
                          },
                      ],
                  },
                  'LaunchedAvailabilityZone': 'us-west-1b',
                  'ProductDescription': 'Linux/UNIX',
                  'SpotInstanceRequestId': 'sir-08b93456',
                  'SpotPrice': '0.010000',
                  'State': 'active',
                  'Status': {
                      'Code': 'fulfilled',
                      'Message': 'Your Spot request is fulfilled.',
                      'UpdateTime': datetime(2014, 4, 30, 18, 16, 21, 2, 120, 0),
                  },
                  'Type': 'one-time',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_spot_price_history(**kwargs)

    

    Describes the Spot price history. For more information, see `Spot Instance Pricing History <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory>`_    


    **Request Syntax** 
    ::

      response = client.describe_spot_price_history(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          AvailabilityZone='string',
          DryRun=True|False,
          EndTime=datetime(2015, 1, 1),
          InstanceTypes=[
              't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          ],
          MaxResults=123,
          NextToken='string',
          ProductDescriptions=[
              'string',
          ],
          StartTime=datetime(2015, 1, 1)
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone for which prices should be returned. 
       
      * ``instance-type`` - The type of instance (for example, ``m3.medium`` ). 
       
      * ``product-description`` - The product description for the Spot price (``Linux/UNIX`` | ``SUSE Linux`` | ``Windows`` | ``Linux/UNIX (Amazon VPC)`` | ``SUSE Linux (Amazon VPC)`` | ``Windows (Amazon VPC)`` ). 
       
      * ``spot-price`` - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported). 
       
      * ``timestamp`` - The timestamp of the Spot price history, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      Filters the results by the specified Availability Zone.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EndTime: datetime
    :param EndTime: 

      The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

      

    
    :type InstanceTypes: list
    :param InstanceTypes: 

      Filters the results by the specified instance types. Note that T2 and HS1 instance types are not supported.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of results.

      

    
    :type ProductDescriptions: list
    :param ProductDescriptions: 

      Filters the results by the specified basic product descriptions.

      

    
      - *(string) --* 

      
  
    :type StartTime: datetime
    :param StartTime: 

      The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'SpotPriceHistory': [
                {
                    'AvailabilityZone': 'string',
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'SpotPrice': 'string',
                    'Timestamp': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotPriceHistory.

        
        

        - **NextToken** *(string) --* 

          The token required to retrieve the next set of results. This value is ``null`` when there are no more results to return.

          
        

        - **SpotPriceHistory** *(list) --* 

          The historical Spot prices.

          
          

          - *(dict) --* 

            Describes the maximum hourly price (bid) for any Spot instance launched to fulfill the request.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **InstanceType** *(string) --* 

              The instance type. Note that T2 and HS1 instance types are not supported.

              
            

            - **ProductDescription** *(string) --* 

              A general description of the AMI.

              
            

            - **SpotPrice** *(string) --* 

              The maximum price (bid) that you are willing to pay for a Spot instance.

              
            

            - **Timestamp** *(datetime) --* 

              The date and time the request was created, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

              
        
      
    

    **Examples** 

    This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
    ::

      response = client.describe_spot_price_history(
          EndTime=datetime(2014, 1, 6, 8, 9, 10, 0, 6, -1),
          InstanceTypes=[
              'm1.xlarge',
          ],
          ProductDescriptions=[
              'Linux/UNIX (Amazon VPC)',
          ],
          StartTime=datetime(2014, 1, 6, 7, 8, 9, 0, 6, -1),
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotPriceHistory': [
              {
                  'AvailabilityZone': 'us-west-1a',
                  'InstanceType': 'm1.xlarge',
                  'ProductDescription': 'Linux/UNIX (Amazon VPC)',
                  'SpotPrice': '0.080000',
                  'Timestamp': datetime(2014, 1, 6, 4, 32, 53, 0, 6, 0),
              },
              {
                  'AvailabilityZone': 'us-west-1c',
                  'InstanceType': 'm1.xlarge',
                  'ProductDescription': 'Linux/UNIX (Amazon VPC)',
                  'SpotPrice': '0.080000',
                  'Timestamp': datetime(2014, 1, 5, 11, 28, 26, 6, 5, 0),
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_stale_security_groups(**kwargs)

    

    [EC2-VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups>`_    


    **Request Syntax** 
    ::

      response = client.describe_stale_security_groups(
          DryRun=True|False,
          MaxResults=123,
          NextToken='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of items to return. (You received this token from a prior call.)

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'StaleSecurityGroupSet': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'StaleIpPermissions': [
                        {
                            'FromPort': 123,
                            'IpProtocol': 'string',
                            'IpRanges': [
                                'string',
                            ],
                            'PrefixListIds': [
                                'string',
                            ],
                            'ToPort': 123,
                            'UserIdGroupPairs': [
                                {
                                    'GroupId': 'string',
                                    'GroupName': 'string',
                                    'PeeringStatus': 'string',
                                    'UserId': 'string',
                                    'VpcId': 'string',
                                    'VpcPeeringConnectionId': 'string'
                                },
                            ]
                        },
                    ],
                    'StaleIpPermissionsEgress': [
                        {
                            'FromPort': 123,
                            'IpProtocol': 'string',
                            'IpRanges': [
                                'string',
                            ],
                            'PrefixListIds': [
                                'string',
                            ],
                            'ToPort': 123,
                            'UserIdGroupPairs': [
                                {
                                    'GroupId': 'string',
                                    'GroupName': 'string',
                                    'PeeringStatus': 'string',
                                    'UserId': 'string',
                                    'VpcId': 'string',
                                    'VpcPeeringConnectionId': 'string'
                                },
                            ]
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **NextToken** *(string) --* 

          The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

          
        

        - **StaleSecurityGroupSet** *(list) --* 

          Information about the stale security groups.

          
          

          - *(dict) --* 

            Describes a stale security group (a security group that contains stale rules).

            
            

            - **Description** *(string) --* 

              The description of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **StaleIpPermissions** *(list) --* 

              Information about the stale inbound rules in the security group.

              
              

              - *(dict) --* 

                Describes a stale rule in a security group.

                
                

                - **FromPort** *(integer) --* 

                  The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of ``-1`` indicates all ICMP types. 

                  
                

                - **IpProtocol** *(string) --* 

                  The IP protocol name (for ``tcp`` , ``udp`` , and ``icmp`` ) or number (see `Protocol Numbers) <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ .

                  
                

                - **IpRanges** *(list) --* 

                  One or more IP ranges. Not applicable for stale security group rules.

                  
                  

                  - *(string) --* 
              
                

                - **PrefixListIds** *(list) --* 

                  One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.

                  
                  

                  - *(string) --* 
              
                

                - **ToPort** *(integer) --* 

                  The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of ``-1`` indicates all ICMP types. 

                  
                

                - **UserIdGroupPairs** *(list) --* 

                  One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

                  
                  

                  - *(dict) --* 

                    Describes a security group and AWS account ID pair.

                    
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

                      
                    

                    - **PeeringStatus** *(string) --* 

                      The status of a VPC peering connection, if applicable.

                      
                    

                    - **UserId** *(string) --* 

                      The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

                       

                      [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC for the referenced security group, if applicable.

                      
                    

                    - **VpcPeeringConnectionId** *(string) --* 

                      The ID of the VPC peering connection, if applicable.

                      
                
              
            
          
            

            - **StaleIpPermissionsEgress** *(list) --* 

              Information about the stale outbound rules in the security group.

              
              

              - *(dict) --* 

                Describes a stale rule in a security group.

                
                

                - **FromPort** *(integer) --* 

                  The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of ``-1`` indicates all ICMP types. 

                  
                

                - **IpProtocol** *(string) --* 

                  The IP protocol name (for ``tcp`` , ``udp`` , and ``icmp`` ) or number (see `Protocol Numbers) <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ .

                  
                

                - **IpRanges** *(list) --* 

                  One or more IP ranges. Not applicable for stale security group rules.

                  
                  

                  - *(string) --* 
              
                

                - **PrefixListIds** *(list) --* 

                  One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.

                  
                  

                  - *(string) --* 
              
                

                - **ToPort** *(integer) --* 

                  The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of ``-1`` indicates all ICMP types. 

                  
                

                - **UserIdGroupPairs** *(list) --* 

                  One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

                  
                  

                  - *(dict) --* 

                    Describes a security group and AWS account ID pair.

                    
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

                      
                    

                    - **PeeringStatus** *(string) --* 

                      The status of a VPC peering connection, if applicable.

                      
                    

                    - **UserId** *(string) --* 

                      The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

                       

                      [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC for the referenced security group, if applicable.

                      
                    

                    - **VpcPeeringConnectionId** *(string) --* 

                      The ID of the VPC peering connection, if applicable.

                      
                
              
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC for the security group.

              
        
      
    

  .. py:method:: describe_subnets(**kwargs)

    

    Describes one or more of your subnets.

     

    For more information about subnets, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_    


    **Request Syntax** 
    ::

      response = client.describe_subnets(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          SubnetIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availabilityZone`` - The Availability Zone for the subnet. You can also use ``availability-zone`` as the filter name. 
       
      * ``available-ip-address-count`` - The number of IPv4 addresses in the subnet that are available. 
       
      * ``cidrBlock`` - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use ``cidr`` or ``cidr-block`` as the filter names. 
       
      * ``defaultForAz`` - Indicates whether this is the default subnet for the Availability Zone. You can also use ``default-for-az`` as the filter name. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the subnet. 
       
      * ``ipv6-cidr-block-association.association-id`` - An association ID for an IPv6 CIDR block associated with the subnet. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the subnet. 
       
      * ``state`` - The state of the subnet (``pending`` | ``available`` ). 
       
      * ``subnet-id`` - The ID of the subnet. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the subnet. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type SubnetIds: list
    :param SubnetIds: 

      One or more subnet IDs.

       

      Default: Describes all your subnets.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Subnets': [
                {
                    'AvailabilityZone': 'string',
                    'AvailableIpAddressCount': 123,
                    'CidrBlock': 'string',
                    'DefaultForAz': True|False,
                    'MapPublicIpOnLaunch': True|False,
                    'State': 'pending'|'available',
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'AssignIpv6AddressOnCreation': True|False,
                    'Ipv6CidrBlockAssociationSet': [
                        {
                            'AssociationId': 'string',
                            'Ipv6CidrBlock': 'string',
                            'Ipv6CidrBlockState': {
                                'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                                'StatusMessage': 'string'
                            }
                        },
                    ],
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSubnets.

        
        

        - **Subnets** *(list) --* 

          Information about one or more subnets.

          
          

          - *(dict) --* 

            Describes a subnet.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the subnet.

              
            

            - **AvailableIpAddressCount** *(integer) --* 

              The number of unused private IPv4 addresses in the subnet. Note that the IPv4 addresses for any stopped instances are considered unavailable.

              
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block assigned to the subnet.

              
            

            - **DefaultForAz** *(boolean) --* 

              Indicates whether this is the default subnet for the Availability Zone.

              
            

            - **MapPublicIpOnLaunch** *(boolean) --* 

              Indicates whether instances launched in this subnet receive a public IPv4 address.

              
            

            - **State** *(string) --* 

              The current state of the subnet.

              
            

            - **SubnetId** *(string) --* 

              The ID of the subnet.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC the subnet is in.

              
            

            - **AssignIpv6AddressOnCreation** *(boolean) --* 

              Indicates whether a network interface created in this subnet (including a network interface created by  RunInstances ) receives an IPv6 address.

              
            

            - **Ipv6CidrBlockAssociationSet** *(list) --* 

              Information about the IPv6 CIDR blocks associated with the subnet.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block associated with a subnet.

                
                

                - **AssociationId** *(string) --* 

                  The association ID for the CIDR block.

                  
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
                

                - **Ipv6CidrBlockState** *(dict) --* 

                  Information about the state of the CIDR block.

                  
                  

                  - **State** *(string) --* 

                    The state of a CIDR block.

                    
                  

                  - **StatusMessage** *(string) --* 

                    A message about the status of the CIDR block, if applicable.

                    
              
            
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the subnet.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

    **Examples** 

    This example describes the subnets for the specified VPC.
    ::

      response = client.describe_subnets(
          Filters=[
              {
                  'Name': 'vpc-id',
                  'Values': [
                      'vpc-a01106c2',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Subnets': [
              {
                  'AvailabilityZone': 'us-east-1c',
                  'AvailableIpAddressCount': 251,
                  'CidrBlock': '10.0.1.0/24',
                  'DefaultForAz': False,
                  'MapPublicIpOnLaunch': False,
                  'State': 'available',
                  'SubnetId': 'subnet-9d4a7b6c',
                  'VpcId': 'vpc-a01106c2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_tags(**kwargs)

    

    Describes one or more of the tags for your EC2 resources.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags>`_    


    **Request Syntax** 
    ::

      response = client.describe_tags(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``key`` - The tag key. 
       
      * ``resource-id`` - The resource ID. 
       
      * ``resource-type`` - The resource type (``customer-gateway`` | ``dhcp-options`` | ``image`` | ``instance`` | ``internet-gateway`` | ``network-acl`` | ``network-interface`` | ``reserved-instances`` | ``route-table`` | ``security-group`` | ``snapshot`` | ``spot-instances-request`` | ``subnet`` | ``volume`` | ``vpc`` | ``vpn-connection`` | ``vpn-gateway`` ). 
       
      * ``value`` - The tag value. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned ``NextToken`` value.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'ResourceId': 'string',
                    'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                    'Value': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeTags.

        
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return..

          
        

        - **Tags** *(list) --* 

          A list of tags.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

            - **Key** *(string) --* 

              The tag key.

              
            

            - **ResourceId** *(string) --* 

              The ID of the resource. For example, ``ami-1a2b3c4d`` .

              
            

            - **ResourceType** *(string) --* 

              The resource type.

              
            

            - **Value** *(string) --* 

              The tag value.

              
        
      
    

    **Examples** 

    This example describes the tags for the specified instance.
    ::

      response = client.describe_tags(
          Filters=[
              {
                  'Name': 'resource-id',
                  'Values': [
                      'i-1234567890abcdef8',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Tags': [
              {
                  'Key': 'Stack',
                  'ResourceId': 'i-1234567890abcdef8',
                  'ResourceType': 'instance',
                  'Value': 'test',
              },
              {
                  'Key': 'Name',
                  'ResourceId': 'i-1234567890abcdef8',
                  'ResourceType': 'instance',
                  'Value': 'Beta Server',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_volume_attribute(**kwargs)

    

    Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

     

    For more information about EBS volumes, see `Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_volume_attribute(
          Attribute='autoEnableIO'|'productCodes',
          VolumeId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The attribute of the volume. This parameter is required.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AutoEnableIO': {
                'Value': True|False
            },
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'VolumeId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumeAttribute.

        
        

        - **AutoEnableIO** *(dict) --* 

          The state of ``autoEnableIO`` attribute.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
    

    **Examples** 

    This example describes the ``autoEnableIo`` attribute of the volume with the ID ``vol-049df61146c4d7901``.
    ::

      response = client.describe_volume_attribute(
          Attribute='autoEnableIO',
          VolumeId='vol-049df61146c4d7901',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AutoEnableIO': {
              'Value': False,
          },
          'VolumeId': 'vol-049df61146c4d7901',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_volume_status(**kwargs)

    

    Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

     

    The ``DescribeVolumeStatus`` operation provides the following information about the specified volumes:

     

     *Status* : Reflects the current status of the volume. The possible values are ``ok`` , ``impaired`` , ``warning`` , or ``insufficient-data`` . If all checks pass, the overall status of the volume is ``ok`` . If the check fails, the overall status is ``impaired`` . If the status is ``insufficient-data`` , then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information on volume status, see `Monitoring the Status of Your Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html>`_ .

     

     *Events* : Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an ``impaired`` status, then the volume event might be ``potential-data-inconsistency`` . This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.

     

     *Actions* : Reflect the actions you may have to take in response to an event. For example, if the status of the volume is ``impaired`` and the volume event shows ``potential-data-inconsistency`` , then the action shows ``enable-volume-io`` . This means that you may want to enable the I/O operations for the volume by calling the  EnableVolumeIO action and then check the volume for data consistency.

     

    .. note::

       

      Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the ``error`` state (for example, when a volume is incapable of accepting I/O.)

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus>`_    


    **Request Syntax** 
    ::

      response = client.describe_volume_status(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          VolumeIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``action.code`` - The action code for the event (for example, ``enable-volume-io`` ). 
       
      * ``action.description`` - A description of the action. 
       
      * ``action.event-id`` - The event ID associated with the action. 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.event-id`` - The event ID. 
       
      * ``event.event-type`` - The event type (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``io-performance:degraded`` | ``io-performance:severely-degraded`` | ``io-performance:stalled`` ). 
       
      * ``event.not-after`` - The latest end time for the event. 
       
      * ``event.not-before`` - The earliest start time for the event. 
       
      * ``volume-status.details-name`` - The cause for ``volume-status.status`` (``io-enabled`` | ``io-performance`` ). 
       
      * ``volume-status.details-status`` - The status of ``volume-status.details-name`` (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``normal`` | ``degraded`` | ``severely-degraded`` | ``stalled`` ). 
       
      * ``volume-status.status`` - The status of the volume (``ok`` | ``impaired`` | ``warning`` | ``insufficient-data`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumeStatus`` in paginated output. When this parameter is used, the request only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeVolumeStatus`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value to include in a future ``DescribeVolumeStatus`` request. When the results of the request exceed ``MaxResults`` , this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

      

    
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

       

      Default: Describes all your volumes.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'VolumeStatuses': [
                {
                    'Actions': [
                        {
                            'Code': 'string',
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string'
                        },
                    ],
                    'AvailabilityZone': 'string',
                    'Events': [
                        {
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string',
                            'NotAfter': datetime(2015, 1, 1),
                            'NotBefore': datetime(2015, 1, 1)
                        },
                    ],
                    'VolumeId': 'string',
                    'VolumeStatus': {
                        'Details': [
                            {
                                'Name': 'io-enabled'|'io-performance',
                                'Status': 'string'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumeStatus.

        
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
        

        - **VolumeStatuses** *(list) --* 

          A list of volumes.

          
          

          - *(dict) --* 

            Describes the volume status.

            
            

            - **Actions** *(list) --* 

              The details of the operation.

              
              

              - *(dict) --* 

                Describes a volume status operation code.

                
                

                - **Code** *(string) --* 

                  The code identifying the operation, for example, ``enable-volume-io`` .

                  
                

                - **Description** *(string) --* 

                  A description of the operation.

                  
                

                - **EventId** *(string) --* 

                  The ID of the event associated with this operation.

                  
                

                - **EventType** *(string) --* 

                  The event type associated with this operation.

                  
            
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the volume.

              
            

            - **Events** *(list) --* 

              A list of events associated with the volume.

              
              

              - *(dict) --* 

                Describes a volume status event.

                
                

                - **Description** *(string) --* 

                  A description of the event.

                  
                

                - **EventId** *(string) --* 

                  The ID of this event.

                  
                

                - **EventType** *(string) --* 

                  The type of this event.

                  
                

                - **NotAfter** *(datetime) --* 

                  The latest end time of the event.

                  
                

                - **NotBefore** *(datetime) --* 

                  The earliest start time of the event.

                  
            
          
            

            - **VolumeId** *(string) --* 

              The volume ID.

              
            

            - **VolumeStatus** *(dict) --* 

              The volume status.

              
              

              - **Details** *(list) --* 

                The details of the volume status.

                
                

                - *(dict) --* 

                  Describes a volume status.

                  
                  

                  - **Name** *(string) --* 

                    The name of the volume status.

                    
                  

                  - **Status** *(string) --* 

                    The intended status of the volume status.

                    
              
            
              

              - **Status** *(string) --* 

                The status of the volume.

                
          
        
      
    

    **Examples** 

    This example describes the status for the volume ``vol-1234567890abcdef0``.
    ::

      response = client.describe_volume_status(
          VolumeIds=[
              'vol-1234567890abcdef0',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'VolumeStatuses': [
              {
                  'Actions': [
                  ],
                  'AvailabilityZone': 'us-east-1a',
                  'Events': [
                  ],
                  'VolumeId': 'vol-1234567890abcdef0',
                  'VolumeStatus': {
                      'Details': [
                          {
                              'Name': 'io-enabled',
                              'Status': 'passed',
                          },
                          {
                              'Name': 'io-performance',
                              'Status': 'not-applicable',
                          },
                      ],
                      'Status': 'ok',
                  },
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the status for all volumes that are impaired. In this example output, there are no impaired volumes.
    ::

      response = client.describe_volume_status(
          Filters=[
              {
                  'Name': 'volume-status.status',
                  'Values': [
                      'impaired',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'VolumeStatuses': [
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_volumes(**kwargs)

    

    Describes the specified EBS volumes.

     

    If you are describing a long list of volumes, you can paginate the output to make the list more manageable. The ``MaxResults`` parameter sets the maximum number of results returned in a single page. If the list of results exceeds your ``MaxResults`` value, then that number of results is returned along with a ``NextToken`` value that can be passed to a subsequent ``DescribeVolumes`` request to retrieve the remaining results.

     

    For more information about EBS volumes, see `Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_    


    **Request Syntax** 
    ::

      response = client.describe_volumes(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
       
      * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
       
      * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
       
      * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
       
      * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone in which the volume was created. 
       
      * ``create-time`` - The time stamp when the volume was created. 
       
      * ``encrypted`` - The encryption status of the volume. 
       
      * ``size`` - The size of the volume, in GiB. 
       
      * ``snapshot-id`` - The snapshot from which the volume was created. 
       
      * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The volume ID. 
       
      * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Volumes': [
                {
                    'Attachments': [
                        {
                            'AttachTime': datetime(2015, 1, 1),
                            'Device': 'string',
                            'InstanceId': 'string',
                            'State': 'attaching'|'attached'|'detaching'|'detached',
                            'VolumeId': 'string',
                            'DeleteOnTermination': True|False
                        },
                    ],
                    'AvailabilityZone': 'string',
                    'CreateTime': datetime(2015, 1, 1),
                    'Encrypted': True|False,
                    'KmsKeyId': 'string',
                    'Size': 123,
                    'SnapshotId': 'string',
                    'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
                    'VolumeId': 'string',
                    'Iops': 123,
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumes.

        
        

        - **Volumes** *(list) --* 

          Information about the volumes.

          
          

          - *(dict) --* 

            Describes a volume.

            
            

            - **Attachments** *(list) --* 

              Information about the volume attachments.

              
              

              - *(dict) --* 

                Describes volume attachment details.

                
                

                - **AttachTime** *(datetime) --* 

                  The time stamp when the attachment initiated.

                  
                

                - **Device** *(string) --* 

                  The device name.

                  
                

                - **InstanceId** *(string) --* 

                  The ID of the instance.

                  
                

                - **State** *(string) --* 

                  The attachment state of the volume.

                  
                

                - **VolumeId** *(string) --* 

                  The ID of the volume.

                  
                

                - **DeleteOnTermination** *(boolean) --* 

                  Indicates whether the EBS volume is deleted on instance termination.

                  
            
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone for the volume.

              
            

            - **CreateTime** *(datetime) --* 

              The time stamp when volume creation was initiated.

              
            

            - **Encrypted** *(boolean) --* 

              Indicates whether the volume will be encrypted.

              
            

            - **KmsKeyId** *(string) --* 

              The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

              
            

            - **Size** *(integer) --* 

              The size of the volume, in GiBs.

              
            

            - **SnapshotId** *(string) --* 

              The snapshot from which the volume was created, if applicable.

              
            

            - **State** *(string) --* 

              The volume state.

              
            

            - **VolumeId** *(string) --* 

              The ID of the volume.

              
            

            - **Iops** *(integer) --* 

              The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

               

              Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for ``gp2`` volumes.

               

              Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the volume.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VolumeType** *(string) --* 

              The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

              
        
      
        

        - **NextToken** *(string) --* 

          The ``NextToken`` value to include in a future ``DescribeVolumes`` request. When the results of a ``DescribeVolumes`` request exceed ``MaxResults`` , this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
    

    **Examples** 

    This example describes all of your volumes in the default region.
    ::

      response = client.describe_volumes(
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NextToken': '',
          'Volumes': [
              {
                  'Attachments': [
                      {
                          'AttachTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                          'DeleteOnTermination': True,
                          'Device': '/dev/sda1',
                          'InstanceId': 'i-1234567890abcdef0',
                          'State': 'attached',
                          'VolumeId': 'vol-049df61146c4d7901',
                      },
                  ],
                  'AvailabilityZone': 'us-east-1a',
                  'CreateTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                  'Size': 8,
                  'SnapshotId': 'snap-1234567890abcdef0',
                  'State': 'in-use',
                  'VolumeId': 'vol-049df61146c4d7901',
                  'VolumeType': 'standard',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates.
    ::

      response = client.describe_volumes(
          Filters=[
              {
                  'Name': 'attachment.instance-id',
                  'Values': [
                      'i-1234567890abcdef0',
                  ],
              },
              {
                  'Name': 'attachment.delete-on-termination',
                  'Values': [
                      'true',
                  ],
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Volumes': [
              {
                  'Attachments': [
                      {
                          'AttachTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                          'DeleteOnTermination': True,
                          'Device': '/dev/sda1',
                          'InstanceId': 'i-1234567890abcdef0',
                          'State': 'attached',
                          'VolumeId': 'vol-049df61146c4d7901',
                      },
                  ],
                  'AvailabilityZone': 'us-east-1a',
                  'CreateTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                  'Size': 8,
                  'SnapshotId': 'snap-1234567890abcdef0',
                  'State': 'in-use',
                  'VolumeId': 'vol-049df61146c4d7901',
                  'VolumeType': 'standard',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_volumes_modifications(**kwargs)

    

    Reports the current modification status of EBS volumes.

     

    Current-generation EBS volumes support modification of attributes including type, size, and (for ``io1`` volumes) IOPS provisioning while either attached to or detached from an instance. Following an action from the API or the console to modify a volume, the status of the modification may be ``modifying`` , ``optimizing`` , ``completed`` , or ``failed`` . If a volume has never been modified, then certain elements of the returned ``VolumeModification`` objects are null. 

     

    You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the `Amazon CloudWatch Events User Guide <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/>`_ . For more information, see `Monitoring Volume Modifications" <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods>`_ . 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications>`_    


    **Request Syntax** 
    ::

      response = client.describe_volumes_modifications(
          DryRun=True|False,
          VolumeIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          NextToken='string',
          MaxResults=123
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs for which in-progress modifications will be described.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters. Supported filters: ``volume-id`` , ``modification-state`` , ``target-size`` , ``target-iops`` , ``target-volume-type`` , ``original-size`` , ``original-iops`` , ``original-volume-type`` , ``start-time`` . 

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type NextToken: string
    :param NextToken: 

      The ``nextToken`` value returned by a previous paginated request.

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results (up to a limit of 500) to be returned in a paginated request.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VolumesModifications': [
                {
                    'VolumeId': 'string',
                    'ModificationState': 'modifying'|'optimizing'|'completed'|'failed',
                    'StatusMessage': 'string',
                    'TargetSize': 123,
                    'TargetIops': 123,
                    'TargetVolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
                    'OriginalSize': 123,
                    'OriginalIops': 123,
                    'OriginalVolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
                    'Progress': 123,
                    'StartTime': datetime(2015, 1, 1),
                    'EndTime': datetime(2015, 1, 1)
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **VolumesModifications** *(list) --* 

          A list of returned  VolumeModification objects.

          
          

          - *(dict) --* 

            Describes the modification status of an EBS volume.

             

            If the volume has never been modified, some element values will be null.

            
            

            - **VolumeId** *(string) --* 

              ID of the volume being modified.

              
            

            - **ModificationState** *(string) --* 

              Current state of modification. Modification state is null for unmodified volumes. 

              
            

            - **StatusMessage** *(string) --* 

              Generic status message on modification progress or failure.

              
            

            - **TargetSize** *(integer) --* 

              Target size of the volume being modified.

              
            

            - **TargetIops** *(integer) --* 

              Target IOPS rate of the volume being modified.

              
            

            - **TargetVolumeType** *(string) --* 

              Target EBS volume type of the volume being modified.

              
            

            - **OriginalSize** *(integer) --* 

              Original size of the volume being modified.

              
            

            - **OriginalIops** *(integer) --* 

              Original IOPS rate of the volume being modified.

              
            

            - **OriginalVolumeType** *(string) --* 

              Original EBS volume type of the volume being modified.

              
            

            - **Progress** *(integer) --* 

              Modification progress from 0 to 100%.

              
            

            - **StartTime** *(datetime) --* 

              Modification start time 

              
            

            - **EndTime** *(datetime) --* 

              Modification completion or failure time.

              
        
      
        

        - **NextToken** *(string) --* 

          Token for pagination, null if there are no more results 

          
    

  .. py:method:: describe_vpc_attribute(**kwargs)

    

    Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_attribute(
          Attribute='enableDnsSupport'|'enableDnsHostnames',
          VpcId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The VPC attribute.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcId': 'string',
            'EnableDnsHostnames': {
                'Value': True|False
            },
            'EnableDnsSupport': {
                'Value': True|False
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcAttribute.

        
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
        

        - **EnableDnsHostnames** *(dict) --* 

          Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is ``true`` , instances in the VPC get DNS hostnames; otherwise, they do not.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EnableDnsSupport** *(dict) --* 

          Indicates whether DNS resolution is enabled for the VPC. If this attribute is ``true`` , the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
    

    **Examples** 

    This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.
    ::

      response = client.describe_vpc_attribute(
          Attribute='enableDnsSupport',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'EnableDnsSupport': {
              'Value': True,
          },
          'VpcId': 'vpc-a01106c2',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.
    ::

      response = client.describe_vpc_attribute(
          Attribute='enableDnsHostnames',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'EnableDnsHostnames': {
              'Value': True,
          },
          'VpcId': 'vpc-a01106c2',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_vpc_classic_link(**kwargs)

    

    Describes the ClassicLink status of one or more VPCs.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_classic_link(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          VpcIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``is-classic-link-enabled`` - Whether the VPC is enabled for ClassicLink (``true`` | ``false`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcIds: list
    :param VpcIds: 

      One or more VPCs for which you want to describe the ClassicLink status.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Vpcs': [
                {
                    'ClassicLinkEnabled': True|False,
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcClassicLink.

        
        

        - **Vpcs** *(list) --* 

          The ClassicLink status of one or more VPCs.

          
          

          - *(dict) --* 

            Describes whether a VPC is enabled for ClassicLink.

            
            

            - **ClassicLinkEnabled** *(boolean) --* 

              Indicates whether the VPC is enabled for ClassicLink.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the VPC.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
      
    

  .. py:method:: describe_vpc_classic_link_dns_support(**kwargs)

    

    Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see `ClassicLink <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_classic_link_dns_support(
          MaxResults=123,
          NextToken='string',
          VpcIds=[
              'string',
          ]
      )
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of items to return. (You received this token from a prior call.)

      

    
    :type VpcIds: list
    :param VpcIds: 

      One or more VPC IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'Vpcs': [
                {
                    'ClassicLinkDnsSupported': True|False,
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcClassicLinkDnsSupport.

        
        

        - **NextToken** *(string) --* 

          The token to use when requesting the next set of items.

          
        

        - **Vpcs** *(list) --* 

          Information about the ClassicLink DNS support status of the VPCs.

          
          

          - *(dict) --* 

            Describes the ClassicLink DNS support status of a VPC.

            
            

            - **ClassicLinkDnsSupported** *(boolean) --* 

              Indicates whether ClassicLink DNS support is enabled for the VPC.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
      
    

  .. py:method:: describe_vpc_endpoint_services(**kwargs)

    

    Describes all supported AWS services that can be specified when creating a VPC endpoint.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_endpoint_services(
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

       

      Constraint: If the value is greater than 1000, we return only 1000 items.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of items to return. (You received this token from a prior call.)

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'ServiceNames': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcEndpointServices.

        
        

        - **NextToken** *(string) --* 

          The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

          
        

        - **ServiceNames** *(list) --* 

          A list of supported AWS services.

          
          

          - *(string) --* 
      
    

  .. py:method:: describe_vpc_endpoints(**kwargs)

    

    Describes one or more of your VPC endpoints.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_endpoints(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          VpcEndpointIds=[
              'string',
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``service-name`` : The name of the AWS service. 
       
      * ``vpc-id`` : The ID of the VPC in which the endpoint resides. 
       
      * ``vpc-endpoint-id`` : The ID of the endpoint. 
       
      * ``vpc-endpoint-state`` : The state of the endpoint. (``pending`` | ``available`` | ``deleting`` | ``deleted`` ) 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

       

      Constraint: If the value is greater than 1000, we return only 1000 items.

      

    
    :type NextToken: string
    :param NextToken: 

      The token for the next set of items to return. (You received this token from a prior call.)

      

    
    :type VpcEndpointIds: list
    :param VpcEndpointIds: 

      One or more endpoint IDs.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'VpcEndpoints': [
                {
                    'CreationTimestamp': datetime(2015, 1, 1),
                    'PolicyDocument': 'string',
                    'RouteTableIds': [
                        'string',
                    ],
                    'ServiceName': 'string',
                    'State': 'Pending'|'Available'|'Deleting'|'Deleted',
                    'VpcEndpointId': 'string',
                    'VpcId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcEndpoints.

        
        

        - **NextToken** *(string) --* 

          The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

          
        

        - **VpcEndpoints** *(list) --* 

          Information about the endpoints.

          
          

          - *(dict) --* 

            Describes a VPC endpoint.

            
            

            - **CreationTimestamp** *(datetime) --* 

              The date and time the VPC endpoint was created.

              
            

            - **PolicyDocument** *(string) --* 

              The policy document associated with the endpoint.

              
            

            - **RouteTableIds** *(list) --* 

              One or more route tables associated with the endpoint.

              
              

              - *(string) --* 
          
            

            - **ServiceName** *(string) --* 

              The name of the AWS service to which the endpoint is associated.

              
            

            - **State** *(string) --* 

              The state of the VPC endpoint.

              
            

            - **VpcEndpointId** *(string) --* 

              The ID of the VPC endpoint.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC to which the endpoint is associated.

              
        
      
    

  .. py:method:: describe_vpc_peering_connections(**kwargs)

    

    Describes one or more of your VPC peering connections.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpc_peering_connections(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          VpcPeeringConnectionIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``accepter-vpc-info.cidr-block`` - The IPv4 CIDR block of the peer VPC. 
       
      * ``accepter-vpc-info.owner-id`` - The AWS account ID of the owner of the peer VPC. 
       
      * ``accepter-vpc-info.vpc-id`` - The ID of the peer VPC. 
       
      * ``expiration-time`` - The expiration date and time for the VPC peering connection. 
       
      * ``requester-vpc-info.cidr-block`` - The IPv4 CIDR block of the requester's VPC. 
       
      * ``requester-vpc-info.owner-id`` - The AWS account ID of the owner of the requester VPC. 
       
      * ``requester-vpc-info.vpc-id`` - The ID of the requester VPC. 
       
      * ``status-code`` - The status of the VPC peering connection (``pending-acceptance`` | ``failed`` | ``expired`` | ``provisioning`` | ``active`` | ``deleted`` | ``rejected`` ). 
       
      * ``status-message`` - A message that provides more information about the status of the VPC peering connection, if applicable. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-peering-connection-id`` - The ID of the VPC peering connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcPeeringConnectionIds: list
    :param VpcPeeringConnectionIds: 

      One or more VPC peering connection IDs.

       

      Default: Describes all your VPC peering connections.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcPeeringConnections': [
                {
                    'AccepterVpcInfo': {
                        'CidrBlock': 'string',
                        'Ipv6CidrBlockSet': [
                            {
                                'Ipv6CidrBlock': 'string'
                            },
                        ],
                        'OwnerId': 'string',
                        'PeeringOptions': {
                            'AllowDnsResolutionFromRemoteVpc': True|False,
                            'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                            'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                        },
                        'VpcId': 'string'
                    },
                    'ExpirationTime': datetime(2015, 1, 1),
                    'RequesterVpcInfo': {
                        'CidrBlock': 'string',
                        'Ipv6CidrBlockSet': [
                            {
                                'Ipv6CidrBlock': 'string'
                            },
                        ],
                        'OwnerId': 'string',
                        'PeeringOptions': {
                            'AllowDnsResolutionFromRemoteVpc': True|False,
                            'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                            'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                        },
                        'VpcId': 'string'
                    },
                    'Status': {
                        'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                        'Message': 'string'
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcPeeringConnections.

        
        

        - **VpcPeeringConnections** *(list) --* 

          Information about the VPC peering connections.

          
          

          - *(dict) --* 

            Describes a VPC peering connection.

            
            

            - **AccepterVpcInfo** *(dict) --* 

              Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

              
              

              - **CidrBlock** *(string) --* 

                The IPv4 CIDR block for the VPC.

                
              

              - **Ipv6CidrBlockSet** *(list) --* 

                The IPv6 CIDR block for the VPC.

                
                

                - *(dict) --* 

                  Describes an IPv6 CIDR block.

                  
                  

                  - **Ipv6CidrBlock** *(string) --* 

                    The IPv6 CIDR block.

                    
              
            
              

              - **OwnerId** *(string) --* 

                The AWS account ID of the VPC owner.

                
              

              - **PeeringOptions** *(dict) --* 

                Information about the VPC peering connection options for the accepter or requester VPC.

                
                

                - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                  Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                  
                

                - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                  Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                  
                

                - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                  Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                  
            
              

              - **VpcId** *(string) --* 

                The ID of the VPC.

                
          
            

            - **ExpirationTime** *(datetime) --* 

              The time that an unaccepted VPC peering connection will expire.

              
            

            - **RequesterVpcInfo** *(dict) --* 

              Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

              
              

              - **CidrBlock** *(string) --* 

                The IPv4 CIDR block for the VPC.

                
              

              - **Ipv6CidrBlockSet** *(list) --* 

                The IPv6 CIDR block for the VPC.

                
                

                - *(dict) --* 

                  Describes an IPv6 CIDR block.

                  
                  

                  - **Ipv6CidrBlock** *(string) --* 

                    The IPv6 CIDR block.

                    
              
            
              

              - **OwnerId** *(string) --* 

                The AWS account ID of the VPC owner.

                
              

              - **PeeringOptions** *(dict) --* 

                Information about the VPC peering connection options for the accepter or requester VPC.

                
                

                - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                  Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                  
                

                - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                  Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                  
                

                - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                  Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                  
            
              

              - **VpcId** *(string) --* 

                The ID of the VPC.

                
          
            

            - **Status** *(dict) --* 

              The status of the VPC peering connection.

              
              

              - **Code** *(string) --* 

                The status of the VPC peering connection.

                
              

              - **Message** *(string) --* 

                A message that provides more information about the status, if applicable.

                
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection.

              
        
      
    

  .. py:method:: describe_vpcs(**kwargs)

    

    Describes one or more of your VPCs.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpcs(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpcIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
       
      * ``isDefault`` - Indicates whether the VPC is the default VPC. 
       
      * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpcIds: list
    :param VpcIds: 

      One or more VPC IDs.

       

      Default: Describes all your VPCs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Vpcs': [
                {
                    'CidrBlock': 'string',
                    'DhcpOptionsId': 'string',
                    'State': 'pending'|'available',
                    'VpcId': 'string',
                    'InstanceTenancy': 'default'|'dedicated'|'host',
                    'Ipv6CidrBlockAssociationSet': [
                        {
                            'AssociationId': 'string',
                            'Ipv6CidrBlock': 'string',
                            'Ipv6CidrBlockState': {
                                'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                                'StatusMessage': 'string'
                            }
                        },
                    ],
                    'IsDefault': True|False,
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcs.

        
        

        - **Vpcs** *(list) --* 

          Information about one or more VPCs.

          
          

          - *(dict) --* 

            Describes a VPC.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **DhcpOptionsId** *(string) --* 

              The ID of the set of DHCP options you've associated with the VPC (or ``default`` if the default options are associated with the VPC).

              
            

            - **State** *(string) --* 

              The current state of the VPC.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
            

            - **InstanceTenancy** *(string) --* 

              The allowed tenancy of instances launched into the VPC.

              
            

            - **Ipv6CidrBlockAssociationSet** *(list) --* 

              Information about the IPv6 CIDR blocks associated with the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block associated with a VPC.

                
                

                - **AssociationId** *(string) --* 

                  The association ID for the IPv6 CIDR block.

                  
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
                

                - **Ipv6CidrBlockState** *(dict) --* 

                  Information about the state of the CIDR block.

                  
                  

                  - **State** *(string) --* 

                    The state of the CIDR block.

                    
                  

                  - **StatusMessage** *(string) --* 

                    A message about the status of the CIDR block, if applicable.

                    
              
            
          
            

            - **IsDefault** *(boolean) --* 

              Indicates whether the VPC is the default VPC.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the VPC.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

    **Examples** 

    This example describes the specified VPC.
    ::

      response = client.describe_vpcs(
          VpcIds=[
              'vpc-a01106c2',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Vpcs': [
              {
                  'CidrBlock': '10.0.0.0/16',
                  'DhcpOptionsId': 'dopt-7a8b9c2d',
                  'InstanceTenancy': 'default',
                  'IsDefault': False,
                  'State': 'available',
                  'Tags': [
                      {
                          'Key': 'Name',
                          'Value': 'MyVPC',
                      },
                  ],
                  'VpcId': 'vpc-a01106c2',
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: describe_vpn_connections(**kwargs)

    

    Describes one or more of your VPN connections.

     

    For more information about VPN connections, see `Adding a Hardware Virtual Private Gateway to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpn_connections(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpnConnectionIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``customer-gateway-configuration`` - The configuration information for the customer gateway. 
       
      * ``customer-gateway-id`` - The ID of a customer gateway associated with the VPN connection. 
       
      * ``state`` - The state of the VPN connection (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``option.static-routes-only`` - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP). 
       
      * ``route.destination-cidr-block`` - The destination CIDR block. This corresponds to the subnet used in a customer data center. 
       
      * ``bgp-asn`` - The BGP Autonomous System Number (ASN) associated with a BGP device. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of VPN connection. Currently the only supported type is ``ipsec.1`` . 
       
      * ``vpn-connection-id`` - The ID of the VPN connection. 
       
      * ``vpn-gateway-id`` - The ID of a virtual private gateway associated with the VPN connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpnConnectionIds: list
    :param VpnConnectionIds: 

      One or more VPN connection IDs.

       

      Default: Describes your VPN connections.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpnConnections': [
                {
                    'CustomerGatewayConfiguration': 'string',
                    'CustomerGatewayId': 'string',
                    'State': 'pending'|'available'|'deleting'|'deleted',
                    'Type': 'ipsec.1',
                    'VpnConnectionId': 'string',
                    'VpnGatewayId': 'string',
                    'Options': {
                        'StaticRoutesOnly': True|False
                    },
                    'Routes': [
                        {
                            'DestinationCidrBlock': 'string',
                            'Source': 'Static',
                            'State': 'pending'|'available'|'deleting'|'deleted'
                        },
                    ],
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VgwTelemetry': [
                        {
                            'AcceptedRouteCount': 123,
                            'LastStatusChange': datetime(2015, 1, 1),
                            'OutsideIpAddress': 'string',
                            'Status': 'UP'|'DOWN',
                            'StatusMessage': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpnConnections.

        
        

        - **VpnConnections** *(list) --* 

          Information about one or more VPN connections.

          
          

          - *(dict) --* 

            Describes a VPN connection.

            
            

            - **CustomerGatewayConfiguration** *(string) --* 

              The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the  CreateVpnConnection response; however, it's present in the  DescribeVpnConnections response only if the VPN connection is in the ``pending`` or ``available`` state.

              
            

            - **CustomerGatewayId** *(string) --* 

              The ID of the customer gateway at your end of the VPN connection.

              
            

            - **State** *(string) --* 

              The current state of the VPN connection.

              
            

            - **Type** *(string) --* 

              The type of VPN connection.

              
            

            - **VpnConnectionId** *(string) --* 

              The ID of the VPN connection.

              
            

            - **VpnGatewayId** *(string) --* 

              The ID of the virtual private gateway at the AWS side of the VPN connection.

              
            

            - **Options** *(dict) --* 

              The VPN connection options.

              
              

              - **StaticRoutesOnly** *(boolean) --* 

                Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

                
          
            

            - **Routes** *(list) --* 

              The static routes associated with the VPN connection.

              
              

              - *(dict) --* 

                Describes a static route for a VPN connection.

                
                

                - **DestinationCidrBlock** *(string) --* 

                  The CIDR block associated with the local subnet of the customer data center.

                  
                

                - **Source** *(string) --* 

                  Indicates how the routes were provided.

                  
                

                - **State** *(string) --* 

                  The current state of the static route.

                  
            
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the VPN connection.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VgwTelemetry** *(list) --* 

              Information about the VPN tunnel.

              
              

              - *(dict) --* 

                Describes telemetry for a VPN tunnel.

                
                

                - **AcceptedRouteCount** *(integer) --* 

                  The number of accepted routes.

                  
                

                - **LastStatusChange** *(datetime) --* 

                  The date and time of the last change in status.

                  
                

                - **OutsideIpAddress** *(string) --* 

                  The Internet-routable IP address of the virtual private gateway's outside interface.

                  
                

                - **Status** *(string) --* 

                  The status of the VPN tunnel.

                  
                

                - **StatusMessage** *(string) --* 

                  If an error occurs, a description of the error.

                  
            
          
        
      
    

  .. py:method:: describe_vpn_gateways(**kwargs)

    

    Describes one or more of your virtual private gateways.

     

    For more information about virtual private gateways, see `Adding an IPsec Hardware VPN to Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways>`_    


    **Request Syntax** 
    ::

      response = client.describe_vpn_gateways(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpnGatewayIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.state`` - The current state of the attachment between the gateway and the VPC (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``attachment.vpc-id`` - The ID of an attached VPC. 
       
      * ``availability-zone`` - The Availability Zone for the virtual private gateway (if applicable). 
       
      * ``state`` - The state of the virtual private gateway (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of virtual private gateway. Currently the only supported type is ``ipsec.1`` . 
       
      * ``vpn-gateway-id`` - The ID of the virtual private gateway. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpnGatewayIds: list
    :param VpnGatewayIds: 

      One or more virtual private gateway IDs.

       

      Default: Describes all your virtual private gateways.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpnGateways': [
                {
                    'AvailabilityZone': 'string',
                    'State': 'pending'|'available'|'deleting'|'deleted',
                    'Type': 'ipsec.1',
                    'VpcAttachments': [
                        {
                            'State': 'attaching'|'attached'|'detaching'|'detached',
                            'VpcId': 'string'
                        },
                    ],
                    'VpnGatewayId': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpnGateways.

        
        

        - **VpnGateways** *(list) --* 

          Information about one or more virtual private gateways.

          
          

          - *(dict) --* 

            Describes a virtual private gateway.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

              
            

            - **State** *(string) --* 

              The current state of the virtual private gateway.

              
            

            - **Type** *(string) --* 

              The type of VPN connection the virtual private gateway supports.

              
            

            - **VpcAttachments** *(list) --* 

              Any VPCs attached to the virtual private gateway.

              
              

              - *(dict) --* 

                Describes an attachment between a virtual private gateway and a VPC.

                
                

                - **State** *(string) --* 

                  The current state of the attachment.

                  
                

                - **VpcId** *(string) --* 

                  The ID of the VPC.

                  
            
          
            

            - **VpnGatewayId** *(string) --* 

              The ID of the virtual private gateway.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the virtual private gateway.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

  .. py:method:: detach_classic_link_vpc(**kwargs)

    

    Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = client.detach_classic_link_vpc(
          DryRun=True|False,
          InstanceId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance to unlink from the VPC.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC to which the instance is linked.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DetachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: detach_internet_gateway(**kwargs)

    

    Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = client.detach_internet_gateway(
          DryRun=True|False,
          InternetGatewayId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayId: string
    :param InternetGatewayId: **[REQUIRED]** 

      The ID of the Internet gateway.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :returns: None

    **Examples** 

    This example detaches the specified Internet gateway from the specified VPC.
    ::

      response = client.detach_internet_gateway(
          InternetGatewayId='igw-c0a643a9',
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: detach_network_interface(**kwargs)

    

    Detaches a network interface from an instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = client.detach_network_interface(
          AttachmentId='string',
          DryRun=True|False,
          Force=True|False
      )
    :type AttachmentId: string
    :param AttachmentId: **[REQUIRED]** 

      The ID of the attachment.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Force: boolean
    :param Force: 

      Specifies whether to force a detachment.

      

    
    
    :returns: None

    **Examples** 

    This example detaches the specified network interface from its attached instance.
    ::

      response = client.detach_network_interface(
          AttachmentId='eni-attach-66c4350a',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: detach_volume(**kwargs)

    

    Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the ``busy`` state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

     

    When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

     

    For more information, see `Detaching an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume>`_    


    **Request Syntax** 
    ::

      response = client.detach_volume(
          Device='string',
          Force=True|False,
          InstanceId='string',
          VolumeId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: 

      The device name.

      

    
    :type Force: boolean
    :param Force: 

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of the instance.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

    **Examples** 

    This example detaches the volume (``vol-049df61146c4d7901``) from the instance it is attached to.
    ::

      response = client.detach_volume(
          VolumeId='vol-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'AttachTime': datetime(2014, 2, 27, 19, 23, 6, 3, 58, 0),
          'Device': '/dev/sdb',
          'InstanceId': 'i-1234567890abcdef0',
          'State': 'detaching',
          'VolumeId': 'vol-049df61146c4d7901',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: detach_vpn_gateway(**kwargs)

    

    Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).

     

    You must wait for the attachment's state to switch to ``detached`` before you can delete the VPC or attach a different VPC to the virtual private gateway.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway>`_    


    **Request Syntax** 
    ::

      response = client.detach_vpn_gateway(
          VpcId='string',
          VpnGatewayId='string',
          DryRun=True|False
      )
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type VpnGatewayId: string
    :param VpnGatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: disable_vgw_route_propagation(**kwargs)

    

    Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation>`_    


    **Request Syntax** 
    ::

      response = client.disable_vgw_route_propagation(
          GatewayId='string',
          RouteTableId='string'
      )
    :type GatewayId: string
    :param GatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    
    :returns: None

    **Examples** 

    This example disables the specified virtual private gateway from propagating static routes to the specified route table.
    ::

      response = client.disable_vgw_route_propagation(
          GatewayId='vgw-9a4cacf3',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: disable_vpc_classic_link(**kwargs)

    

    Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink>`_    


    **Request Syntax** 
    ::

      response = client.disable_vpc_classic_link(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DisableVpcClassicLink.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: disable_vpc_classic_link_dns_support(**kwargs)

    

    Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information about ClassicLink, see `ClassicLink <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport>`_    


    **Request Syntax** 
    ::

      response = client.disable_vpc_classic_link_dns_support(
          VpcId='string'
      )
    :type VpcId: string
    :param VpcId: 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DisableVpcClassicLinkDnsSupport.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: disassociate_address(**kwargs)

    

    Disassociates an Elastic IP address from the instance or network interface it's associated with.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress>`_    


    **Request Syntax** 
    ::

      response = client.disassociate_address(
          AssociationId='string',
          PublicIp='string',
          DryRun=True|False
      )
    :type AssociationId: string
    :param AssociationId: 

      [EC2-VPC] The association ID. Required for EC2-VPC.

      

    
    :type PublicIp: string
    :param PublicIp: 

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example disassociates an Elastic IP address from an instance in a VPC.
    ::

      response = client.disassociate_address(
          AssociationId='eipassoc-2bebb745',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example disassociates an Elastic IP address from an instance in EC2-Classic.
    ::

      response = client.disassociate_address(
          PublicIp='198.51.100.0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: disassociate_iam_instance_profile(**kwargs)

    

    Disassociates an IAM instance profile from a running or stopped instance.

     

    Use  DescribeIamInstanceProfileAssociations to get the association ID.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile>`_    


    **Request Syntax** 
    ::

      response = client.disassociate_iam_instance_profile(
          AssociationId='string'
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The ID of the IAM instance profile association.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'IamInstanceProfileAssociation': {
                'AssociationId': 'string',
                'InstanceId': 'string',
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Id': 'string'
                },
                'State': 'associating'|'associated'|'disassociating'|'disassociated',
                'Timestamp': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **IamInstanceProfileAssociation** *(dict) --* 

          Information about the IAM instance profile association.

          
          

          - **AssociationId** *(string) --* 

            The ID of the association.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **IamInstanceProfile** *(dict) --* 

            The IAM instance profile.

            
            

            - **Arn** *(string) --* 

              The Amazon Resource Name (ARN) of the instance profile.

              
            

            - **Id** *(string) --* 

              The ID of the instance profile.

              
        
          

          - **State** *(string) --* 

            The state of the association.

            
          

          - **Timestamp** *(datetime) --* 

            The time the IAM instance profile was associated with the instance.

            
      
    

  .. py:method:: disassociate_route_table(**kwargs)

    

    Disassociates a subnet from a route table.

     

    After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable>`_    


    **Request Syntax** 
    ::

      response = client.disassociate_route_table(
          AssociationId='string',
          DryRun=True|False
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The association ID representing the current association between the route table and subnet.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example disassociates the specified route table from its associated subnet.
    ::

      response = client.disassociate_route_table(
          AssociationId='rtbassoc-781d0d1a',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: disassociate_subnet_cidr_block(**kwargs)

    

    Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock>`_    


    **Request Syntax** 
    ::

      response = client.disassociate_subnet_cidr_block(
          AssociationId='string'
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The association ID for the CIDR block.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Ipv6CidrBlockAssociation': {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
            'SubnetId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Ipv6CidrBlockAssociation** *(dict) --* 

          Information about the IPv6 CIDR block association.

          
          

          - **AssociationId** *(string) --* 

            The association ID for the CIDR block.

            
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
          

          - **Ipv6CidrBlockState** *(dict) --* 

            Information about the state of the CIDR block.

            
            

            - **State** *(string) --* 

              The state of a CIDR block.

              
            

            - **StatusMessage** *(string) --* 

              A message about the status of the CIDR block, if applicable.

              
        
      
        

        - **SubnetId** *(string) --* 

          The ID of the subnet.

          
    

  .. py:method:: disassociate_vpc_cidr_block(**kwargs)

    

    Disassociates a CIDR block from a VPC. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock>`_    


    **Request Syntax** 
    ::

      response = client.disassociate_vpc_cidr_block(
          AssociationId='string'
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The association ID for the CIDR block.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Ipv6CidrBlockAssociation': {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
            'VpcId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Ipv6CidrBlockAssociation** *(dict) --* 

          Information about the IPv6 CIDR block association.

          
          

          - **AssociationId** *(string) --* 

            The association ID for the IPv6 CIDR block.

            
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
          

          - **Ipv6CidrBlockState** *(dict) --* 

            Information about the state of the CIDR block.

            
            

            - **State** *(string) --* 

              The state of the CIDR block.

              
            

            - **StatusMessage** *(string) --* 

              A message about the status of the CIDR block, if applicable.

              
        
      
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
    

  .. py:method:: enable_vgw_route_propagation(**kwargs)

    

    Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation>`_    


    **Request Syntax** 
    ::

      response = client.enable_vgw_route_propagation(
          GatewayId='string',
          RouteTableId='string'
      )
    :type GatewayId: string
    :param GatewayId: **[REQUIRED]** 

      The ID of the virtual private gateway.

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    
    :returns: None

    **Examples** 

    This example enables the specified virtual private gateway to propagate static routes to the specified route table.
    ::

      response = client.enable_vgw_route_propagation(
          GatewayId='vgw-9a4cacf3',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: enable_volume_io(**kwargs)

    

    Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO>`_    


    **Request Syntax** 
    ::

      response = client.enable_volume_io(
          DryRun=True|False,
          VolumeId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    
    :returns: None

    **Examples** 

    This example enables I/O on volume ``vol-1234567890abcdef0``.
    ::

      response = client.enable_volume_io(
          VolumeId='vol-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: enable_vpc_classic_link(**kwargs)

    

    Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC's route tables have existing routes for address ranges within the ``10.0.0.0/8`` IP address range, excluding local routes for VPCs in the ``10.0.0.0/16`` and ``10.1.0.0/16`` IP address ranges. For more information, see `ClassicLink <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink>`_    


    **Request Syntax** 
    ::

      response = client.enable_vpc_classic_link(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of EnableVpcClassicLink.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: enable_vpc_classic_link_dns_support(**kwargs)

    

    Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information about ClassicLink, see `ClassicLink <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport>`_    


    **Request Syntax** 
    ::

      response = client.enable_vpc_classic_link_dns_support(
          VpcId='string'
      )
    :type VpcId: string
    :param VpcId: 

      The ID of the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of EnableVpcClassicLinkDnsSupport.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

        
    Generate a presigned url given a client, its method, and arguments
    
    :type ClientMethod: string
    :param ClientMethod: The client method to presign for
    
    :type Params: dict
    :param Params: The parameters normally passed to
        ``ClientMethod``.
    
    :type ExpiresIn: int
    :param ExpiresIn: The number of seconds the presigned url is valid
        for. By default it expires in an hour (3600 seconds)
    
    :type HttpMethod: string
    :param HttpMethod: The http method to use on the generated url. By
        default, the http method is whatever is used in the method's model.
    
    :returns: The presigned url


  .. py:method:: get_console_output(**kwargs)

    

    Gets the console output for the specified instance.

     

    Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.

     

    Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.

     

    For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.

     

    For Windows instances, the instance console output includes output from the EC2Config service.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput>`_    


    **Request Syntax** 
    ::

      response = client.get_console_output(
          InstanceId='string',
          DryRun=True|False
      )
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceId': 'string',
            'Output': 'string',
            'Timestamp': datetime(2015, 1, 1)
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of GetConsoleOutput.

        
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **Output** *(string) --* 

          The console output, Base64-encoded. If using a command line tool, the tool decodes the output for you.

          
        

        - **Timestamp** *(datetime) --* 

          The time the output was last updated.

          
    

  .. py:method:: get_console_screenshot(**kwargs)

    

    Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.

     

    The returned content is Base64-encoded.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot>`_    


    **Request Syntax** 
    ::

      response = client.get_console_screenshot(
          DryRun=True|False,
          InstanceId='string',
          WakeUp=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type WakeUp: boolean
    :param WakeUp: 

      When set to ``true`` , acts as keystroke input and wakes up an instance that's in standby or "sleep" mode.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImageData': 'string',
            'InstanceId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of the request.

        
        

        - **ImageData** *(string) --* 

          The data that comprises the image.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
    

  .. py:method:: get_host_reservation_purchase_preview(**kwargs)

    

    Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.

     

    This is a preview of the  PurchaseHostReservation action and does not result in the offering being purchased.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview>`_    


    **Request Syntax** 
    ::

      response = client.get_host_reservation_purchase_preview(
          HostIdSet=[
              'string',
          ],
          OfferingId='string'
      )
    :type HostIdSet: list
    :param HostIdSet: **[REQUIRED]** 

      The ID/s of the Dedicated Host/s that the reservation will be associated with.

      

    
      - *(string) --* 

      
  
    :type OfferingId: string
    :param OfferingId: **[REQUIRED]** 

      The offering ID of the reservation.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CurrencyCode': 'USD',
            'Purchase': [
                {
                    'CurrencyCode': 'USD',
                    'Duration': 123,
                    'HostIdSet': [
                        'string',
                    ],
                    'HostReservationId': 'string',
                    'HourlyPrice': 'string',
                    'InstanceFamily': 'string',
                    'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
                    'UpfrontPrice': 'string'
                },
            ],
            'TotalHourlyPrice': 'string',
            'TotalUpfrontPrice': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **CurrencyCode** *(string) --* 

          The currency in which the ``totalUpfrontPrice`` and ``totalHourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

          
        

        - **Purchase** *(list) --* 

          The purchase information of the Dedicated Host Reservation and the Dedicated Hosts associated with it.

          
          

          - *(dict) --* 

            Describes the result of the purchase.

            
            

            - **CurrencyCode** *(string) --* 

              The currency in which the ``UpfrontPrice`` and ``HourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

              
            

            - **Duration** *(integer) --* 

              The duration of the reservation's term in seconds.

              
            

            - **HostIdSet** *(list) --* 

              The IDs of the Dedicated Hosts associated with the reservation.

              
              

              - *(string) --* 
          
            

            - **HostReservationId** *(string) --* 

              The ID of the reservation.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price of the reservation per hour.

              
            

            - **InstanceFamily** *(string) --* 

              The instance family on the Dedicated Host that the reservation can be associated with.

              
            

            - **PaymentOption** *(string) --* 

              The payment option for the reservation.

              
            

            - **UpfrontPrice** *(string) --* 

              The upfront price of the reservation.

              
        
      
        

        - **TotalHourlyPrice** *(string) --* 

          The potential total hourly price of the reservation per hour.

          
        

        - **TotalUpfrontPrice** *(string) --* 

          The potential total upfront price. This is billed immediately.

          
    

  .. py:method:: get_paginator(operation_name)

        
    Create a paginator for an operation.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :raise OperationNotPageableError: Raised if the operation is not
        pageable.  You can use the ``client.can_paginate`` method to
        check if an operation is pageable.
    
    :rtype: L{botocore.paginate.Paginator}
    :return: A paginator object.


  .. py:method:: get_password_data(**kwargs)

    

    Retrieves the encrypted administrator password for an instance running Windows.

     

    The Windows password is generated at boot if the ``EC2Config`` service plugin, ``Ec2SetPassword`` , is enabled. This usually only happens the first time an AMI is launched, and then ``Ec2SetPassword`` is automatically disabled. The password is not generated for rebundled AMIs unless ``Ec2SetPassword`` is enabled before bundling.

     

    The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

     

    Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData>`_    


    **Request Syntax** 
    ::

      response = client.get_password_data(
          InstanceId='string',
          DryRun=True|False
      )
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the Windows instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceId': 'string',
            'PasswordData': 'string',
            'Timestamp': datetime(2015, 1, 1)
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of GetPasswordData.

        
        

        - **InstanceId** *(string) --* 

          The ID of the Windows instance.

          
        

        - **PasswordData** *(string) --* 

          The password of the instance.

          
        

        - **Timestamp** *(datetime) --* 

          The time the data was last updated.

          
    

  .. py:method:: get_reserved_instances_exchange_quote(**kwargs)

    

    Returns details about the values and term of your specified Convertible Reserved Instances. When a target configuration is specified, it returns information about whether the exchange is valid and can be performed.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote>`_    


    **Request Syntax** 
    ::

      response = client.get_reserved_instances_exchange_quote(
          DryRun=True|False,
          ReservedInstanceIds=[
              'string',
          ],
          TargetConfigurations=[
              {
                  'InstanceCount': 123,
                  'OfferingId': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type ReservedInstanceIds: list
    :param ReservedInstanceIds: **[REQUIRED]** 

      The IDs of the Convertible Reserved Instances to exchange.

      

    
      - *(string) --* 

      
  
    :type TargetConfigurations: list
    :param TargetConfigurations: 

      The configuration requirements of the Convertible Reserved Instances to exchange for your current Convertible Reserved Instances.

      

    
      - *(dict) --* 

        Details about the target configuration.

        

      
        - **InstanceCount** *(integer) --* 

          The number of instances the Covertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

          

        
        - **OfferingId** *(string) --* **[REQUIRED]** 

          The Convertible Reserved Instance offering ID.

          

        
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CurrencyCode': 'string',
            'IsValidExchange': True|False,
            'OutputReservedInstancesWillExpireAt': datetime(2015, 1, 1),
            'PaymentDue': 'string',
            'ReservedInstanceValueRollup': {
                'HourlyPrice': 'string',
                'RemainingTotalValue': 'string',
                'RemainingUpfrontValue': 'string'
            },
            'ReservedInstanceValueSet': [
                {
                    'ReservationValue': {
                        'HourlyPrice': 'string',
                        'RemainingTotalValue': 'string',
                        'RemainingUpfrontValue': 'string'
                    },
                    'ReservedInstanceId': 'string'
                },
            ],
            'TargetConfigurationValueRollup': {
                'HourlyPrice': 'string',
                'RemainingTotalValue': 'string',
                'RemainingUpfrontValue': 'string'
            },
            'TargetConfigurationValueSet': [
                {
                    'ReservationValue': {
                        'HourlyPrice': 'string',
                        'RemainingTotalValue': 'string',
                        'RemainingUpfrontValue': 'string'
                    },
                    'TargetConfiguration': {
                        'InstanceCount': 123,
                        'OfferingId': 'string'
                    }
                },
            ],
            'ValidationFailureReason': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of GetReservedInstancesExchangeQuote.

        
        

        - **CurrencyCode** *(string) --* 

          The currency of the transaction.

          
        

        - **IsValidExchange** *(boolean) --* 

          If ``true`` , the exchange is valid. If ``false`` , the exchange cannot be completed.

          
        

        - **OutputReservedInstancesWillExpireAt** *(datetime) --* 

          The new end date of the reservation term.

          
        

        - **PaymentDue** *(string) --* 

          The total true upfront charge for the exchange.

          
        

        - **ReservedInstanceValueRollup** *(dict) --* 

          The cost associated with the Reserved Instance.

          
          

          - **HourlyPrice** *(string) --* 

            The hourly rate of the reservation.

            
          

          - **RemainingTotalValue** *(string) --* 

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

            
          

          - **RemainingUpfrontValue** *(string) --* 

            The remaining upfront cost of the reservation.

            
      
        

        - **ReservedInstanceValueSet** *(list) --* 

          The configuration of your Convertible Reserved Instances.

          
          

          - *(dict) --* 

            The total value of the Convertible Reserved Instance.

            
            

            - **ReservationValue** *(dict) --* 

              The total value of the Convertible Reserved Instance that you are exchanging.

              
              

              - **HourlyPrice** *(string) --* 

                The hourly rate of the reservation.

                
              

              - **RemainingTotalValue** *(string) --* 

                The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

                
              

              - **RemainingUpfrontValue** *(string) --* 

                The remaining upfront cost of the reservation.

                
          
            

            - **ReservedInstanceId** *(string) --* 

              The ID of the Convertible Reserved Instance that you are exchanging.

              
        
      
        

        - **TargetConfigurationValueRollup** *(dict) --* 

          The cost associated with the Reserved Instance.

          
          

          - **HourlyPrice** *(string) --* 

            The hourly rate of the reservation.

            
          

          - **RemainingTotalValue** *(string) --* 

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

            
          

          - **RemainingUpfrontValue** *(string) --* 

            The remaining upfront cost of the reservation.

            
      
        

        - **TargetConfigurationValueSet** *(list) --* 

          The values of the target Convertible Reserved Instances.

          
          

          - *(dict) --* 

            The total value of the new Convertible Reserved Instances.

            
            

            - **ReservationValue** *(dict) --* 

              The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.

              
              

              - **HourlyPrice** *(string) --* 

                The hourly rate of the reservation.

                
              

              - **RemainingTotalValue** *(string) --* 

                The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

                
              

              - **RemainingUpfrontValue** *(string) --* 

                The remaining upfront cost of the reservation.

                
          
            

            - **TargetConfiguration** *(dict) --* 

              The configuration of the Convertible Reserved Instances that make up the exchange.

              
              

              - **InstanceCount** *(integer) --* 

                The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

                
              

              - **OfferingId** *(string) --* 

                The ID of the Convertible Reserved Instance offering.

                
          
        
      
        

        - **ValidationFailureReason** *(string) --* 

          Describes the reason why the exchange cannot be completed.

          
    

  .. py:method:: get_waiter(waiter_name)

        


  .. py:method:: import_image(**kwargs)

    

    Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see `Importing a VM as an Image Using VM Import/Export <http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html>`_ in the *VM Import/Export User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage>`_    


    **Request Syntax** 
    ::

      response = client.import_image(
          Architecture='string',
          ClientData={
              'Comment': 'string',
              'UploadEnd': datetime(2015, 1, 1),
              'UploadSize': 123.0,
              'UploadStart': datetime(2015, 1, 1)
          },
          ClientToken='string',
          Description='string',
          DiskContainers=[
              {
                  'Description': 'string',
                  'DeviceName': 'string',
                  'Format': 'string',
                  'SnapshotId': 'string',
                  'Url': 'string',
                  'UserBucket': {
                      'S3Bucket': 'string',
                      'S3Key': 'string'
                  }
              },
          ],
          DryRun=True|False,
          Hypervisor='string',
          LicenseType='string',
          Platform='string',
          RoleName='string'
      )
    :type Architecture: string
    :param Architecture: 

      The architecture of the virtual machine.

       

      Valid values: ``i386`` | ``x86_64``  

      

    
    :type ClientData: dict
    :param ClientData: 

      The client-specific data.

      

    
      - **Comment** *(string) --* 

        A user-defined comment about the disk upload.

        

      
      - **UploadEnd** *(datetime) --* 

        The time that the disk upload ends.

        

      
      - **UploadSize** *(float) --* 

        The size of the uploaded disk image, in GiB.

        

      
      - **UploadStart** *(datetime) --* 

        The time that the disk upload starts.

        

      
    
    :type ClientToken: string
    :param ClientToken: 

      The token to enable idempotency for VM import requests.

      

    
    :type Description: string
    :param Description: 

      A description string for the import image task.

      

    
    :type DiskContainers: list
    :param DiskContainers: 

      Information about the disk containers.

      

    
      - *(dict) --* 

        Describes the disk container object for an import image task.

        

      
        - **Description** *(string) --* 

          The description of the disk image.

          

        
        - **DeviceName** *(string) --* 

          The block device mapping for the disk.

          

        
        - **Format** *(string) --* 

          The format of the disk image being imported.

           

          Valid values: ``RAW`` | ``VHD`` | ``VMDK`` | ``OVA``  

          

        
        - **SnapshotId** *(string) --* 

          The ID of the EBS snapshot to be used for importing the snapshot.

          

        
        - **Url** *(string) --* 

          The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)

          

        
        - **UserBucket** *(dict) --* 

          The S3 bucket for the disk image.

          

        
          - **S3Bucket** *(string) --* 

            The name of the S3 bucket where the disk image is located.

            

          
          - **S3Key** *(string) --* 

            The file name of the disk image.

            

          
        
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Hypervisor: string
    :param Hypervisor: 

      The target hypervisor platform.

       

      Valid values: ``xen``  

      

    
    :type LicenseType: string
    :param LicenseType: 

      The license type to be used for the Amazon Machine Image (AMI) after importing.

       

       **Note:** You may only use BYOL if you have existing licenses with rights to use these licenses in a third party cloud like AWS. For more information, see `Prerequisites <http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image>`_ in the VM Import/Export User Guide.

       

      Valid values: ``AWS`` | ``BYOL``  

      

    
    :type Platform: string
    :param Platform: 

      The operating system of the virtual machine.

       

      Valid values: ``Windows`` | ``Linux``  

      

    
    :type RoleName: string
    :param RoleName: 

      The name of the role to use when not using the default role, 'vmimport'.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Architecture': 'string',
            'Description': 'string',
            'Hypervisor': 'string',
            'ImageId': 'string',
            'ImportTaskId': 'string',
            'LicenseType': 'string',
            'Platform': 'string',
            'Progress': 'string',
            'SnapshotDetails': [
                {
                    'Description': 'string',
                    'DeviceName': 'string',
                    'DiskImageSize': 123.0,
                    'Format': 'string',
                    'Progress': 'string',
                    'SnapshotId': 'string',
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'Url': 'string',
                    'UserBucket': {
                        'S3Bucket': 'string',
                        'S3Key': 'string'
                    }
                },
            ],
            'Status': 'string',
            'StatusMessage': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for ImportImage.

        
        

        - **Architecture** *(string) --* 

          The architecture of the virtual machine.

          
        

        - **Description** *(string) --* 

          A description of the import task.

          
        

        - **Hypervisor** *(string) --* 

          The target hypervisor of the import task.

          
        

        - **ImageId** *(string) --* 

          The ID of the Amazon Machine Image (AMI) created by the import task.

          
        

        - **ImportTaskId** *(string) --* 

          The task ID of the import image task.

          
        

        - **LicenseType** *(string) --* 

          The license type of the virtual machine.

          
        

        - **Platform** *(string) --* 

          The operating system of the virtual machine.

          
        

        - **Progress** *(string) --* 

          The progress of the task.

          
        

        - **SnapshotDetails** *(list) --* 

          Information about the snapshots.

          
          

          - *(dict) --* 

            Describes the snapshot created from the imported disk.

            
            

            - **Description** *(string) --* 

              A description for the snapshot.

              
            

            - **DeviceName** *(string) --* 

              The block device mapping for the snapshot.

              
            

            - **DiskImageSize** *(float) --* 

              The size of the disk in the snapshot, in GiB.

              
            

            - **Format** *(string) --* 

              The format of the disk image from which the snapshot is created.

              
            

            - **Progress** *(string) --* 

              The percentage of progress for the task.

              
            

            - **SnapshotId** *(string) --* 

              The snapshot ID of the disk being imported.

              
            

            - **Status** *(string) --* 

              A brief status of the snapshot creation.

              
            

            - **StatusMessage** *(string) --* 

              A detailed status message for the snapshot creation.

              
            

            - **Url** *(string) --* 

              The URL used to access the disk image.

              
            

            - **UserBucket** *(dict) --* 

              The S3 bucket for the disk image.

              
              

              - **S3Bucket** *(string) --* 

                The S3 bucket from which the disk image was created.

                
              

              - **S3Key** *(string) --* 

                The file name of the disk image.

                
          
        
      
        

        - **Status** *(string) --* 

          A brief status of the task.

          
        

        - **StatusMessage** *(string) --* 

          A detailed status message of the import task.

          
    

  .. py:method:: import_instance(**kwargs)

    

    Creates an import instance task using metadata from the specified disk image. ``ImportInstance`` only supports single-volume VMs. To import multi-volume VMs, use  ImportImage . For more information, see `Importing a Virtual Machine Using the Amazon EC2 CLI <http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html>`_ .

     

    For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance>`_    


    **Request Syntax** 
    ::

      response = client.import_instance(
          Description='string',
          DiskImages=[
              {
                  'Description': 'string',
                  'Image': {
                      'Bytes': 123,
                      'Format': 'VMDK'|'RAW'|'VHD',
                      'ImportManifestUrl': 'string'
                  },
                  'Volume': {
                      'Size': 123
                  }
              },
          ],
          DryRun=True|False,
          LaunchSpecification={
              'AdditionalInfo': 'string',
              'Architecture': 'i386'|'x86_64',
              'GroupIds': [
                  'string',
              ],
              'GroupNames': [
                  'string',
              ],
              'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
              'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
              'Monitoring': True|False,
              'Placement': {
                  'AvailabilityZone': 'string',
                  'Affinity': 'string',
                  'GroupName': 'string',
                  'HostId': 'string',
                  'Tenancy': 'default'|'dedicated'|'host',
                  'SpreadDomain': 'string'
              },
              'PrivateIpAddress': 'string',
              'SubnetId': 'string',
              'UserData': {
                  'Data': 'string'
              }
          },
          Platform='Windows'
      )
    :type Description: string
    :param Description: 

      A description for the instance being imported.

      

    
    :type DiskImages: list
    :param DiskImages: 

      The disk image.

      

    
      - *(dict) --* 

        Describes a disk image.

        

      
        - **Description** *(string) --* 

          A description of the disk image.

          

        
        - **Image** *(dict) --* 

          Information about the disk image.

          

        
          - **Bytes** *(integer) --* **[REQUIRED]** 

            The size of the disk image, in GiB.

            

          
          - **Format** *(string) --* **[REQUIRED]** 

            The disk image format.

            

          
          - **ImportManifestUrl** *(string) --* **[REQUIRED]** 

            A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

             

            For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

            

          
        
        - **Volume** *(dict) --* 

          Information about the volume.

          

        
          - **Size** *(integer) --* **[REQUIRED]** 

            The size of the volume, in GiB.

            

          
        
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type LaunchSpecification: dict
    :param LaunchSpecification: 

      The launch specification.

      

    
      - **AdditionalInfo** *(string) --* 

        Reserved.

        

      
      - **Architecture** *(string) --* 

        The architecture of the instance.

        

      
      - **GroupIds** *(list) --* 

        One or more security group IDs.

        

      
        - *(string) --* 

        
    
      - **GroupNames** *(list) --* 

        One or more security group names.

        

      
        - *(string) --* 

        
    
      - **InstanceInitiatedShutdownBehavior** *(string) --* 

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

        

      
      - **InstanceType** *(string) --* 

        The instance type. For more information about the instance types that you can import, see `Instance Types <http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#vmimport-instance-types>`_ in the VM Import/Export User Guide.

        

      
      - **Monitoring** *(boolean) --* 

        Indicates whether monitoring is enabled.

        

      
      - **Placement** *(dict) --* 

        The placement information for the instance.

        

      
        - **AvailabilityZone** *(string) --* 

          The Availability Zone of the instance.

          

        
        - **Affinity** *(string) --* 

          The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

          

        
        - **GroupName** *(string) --* 

          The name of the placement group the instance is in (for cluster compute instances).

          

        
        - **HostId** *(string) --* 

          The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

          

        
        - **Tenancy** *(string) --* 

          The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

          

        
        - **SpreadDomain** *(string) --* 

          Reserved for future use.

          

        
      
      - **PrivateIpAddress** *(string) --* 

        [EC2-VPC] An available IP address from the IP address range of the subnet.

        

      
      - **SubnetId** *(string) --* 

        [EC2-VPC] The ID of the subnet in which to launch the instance.

        

      
      - **UserData** *(dict) --* 

        The user data to make available to the instance. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

        

      
        - **Data** *(string) --* 

          The user data. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

          

        
      
    
    :type Platform: string
    :param Platform: **[REQUIRED]** 

      The instance operating system.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ConversionTask': {
                'ConversionTaskId': 'string',
                'ExpirationTime': 'string',
                'ImportInstance': {
                    'Description': 'string',
                    'InstanceId': 'string',
                    'Platform': 'Windows',
                    'Volumes': [
                        {
                            'AvailabilityZone': 'string',
                            'BytesConverted': 123,
                            'Description': 'string',
                            'Image': {
                                'Checksum': 'string',
                                'Format': 'VMDK'|'RAW'|'VHD',
                                'ImportManifestUrl': 'string',
                                'Size': 123
                            },
                            'Status': 'string',
                            'StatusMessage': 'string',
                            'Volume': {
                                'Id': 'string',
                                'Size': 123
                            }
                        },
                    ]
                },
                'ImportVolume': {
                    'AvailabilityZone': 'string',
                    'BytesConverted': 123,
                    'Description': 'string',
                    'Image': {
                        'Checksum': 'string',
                        'Format': 'VMDK'|'RAW'|'VHD',
                        'ImportManifestUrl': 'string',
                        'Size': 123
                    },
                    'Volume': {
                        'Id': 'string',
                        'Size': 123
                    }
                },
                'State': 'active'|'cancelling'|'cancelled'|'completed',
                'StatusMessage': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for ImportInstance.

        
        

        - **ConversionTask** *(dict) --* 

          Information about the conversion task.

          
          

          - **ConversionTaskId** *(string) --* 

            The ID of the conversion task.

            
          

          - **ExpirationTime** *(string) --* 

            The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.

            
          

          - **ImportInstance** *(dict) --* 

            If the task is for importing an instance, this contains information about the import instance task.

            
            

            - **Description** *(string) --* 

              A description of the task.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Platform** *(string) --* 

              The instance operating system.

              
            

            - **Volumes** *(list) --* 

              One or more volumes.

              
              

              - *(dict) --* 

                Describes an import volume task.

                
                

                - **AvailabilityZone** *(string) --* 

                  The Availability Zone where the resulting instance will reside.

                  
                

                - **BytesConverted** *(integer) --* 

                  The number of bytes converted so far.

                  
                

                - **Description** *(string) --* 

                  A description of the task.

                  
                

                - **Image** *(dict) --* 

                  The image.

                  
                  

                  - **Checksum** *(string) --* 

                    The checksum computed for the disk image.

                    
                  

                  - **Format** *(string) --* 

                    The disk image format.

                    
                  

                  - **ImportManifestUrl** *(string) --* 

                    A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                     

                    For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                    
                  

                  - **Size** *(integer) --* 

                    The size of the disk image, in GiB.

                    
              
                

                - **Status** *(string) --* 

                  The status of the import of this particular disk image.

                  
                

                - **StatusMessage** *(string) --* 

                  The status information or errors related to the disk image.

                  
                

                - **Volume** *(dict) --* 

                  The volume.

                  
                  

                  - **Id** *(string) --* 

                    The volume identifier.

                    
                  

                  - **Size** *(integer) --* 

                    The size of the volume, in GiB.

                    
              
            
          
        
          

          - **ImportVolume** *(dict) --* 

            If the task is for importing a volume, this contains information about the import volume task.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone where the resulting volume will reside.

              
            

            - **BytesConverted** *(integer) --* 

              The number of bytes converted so far.

              
            

            - **Description** *(string) --* 

              The description you provided when starting the import volume task.

              
            

            - **Image** *(dict) --* 

              The image.

              
              

              - **Checksum** *(string) --* 

                The checksum computed for the disk image.

                
              

              - **Format** *(string) --* 

                The disk image format.

                
              

              - **ImportManifestUrl** *(string) --* 

                A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                 

                For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                
              

              - **Size** *(integer) --* 

                The size of the disk image, in GiB.

                
          
            

            - **Volume** *(dict) --* 

              The volume.

              
              

              - **Id** *(string) --* 

                The volume identifier.

                
              

              - **Size** *(integer) --* 

                The size of the volume, in GiB.

                
          
        
          

          - **State** *(string) --* 

            The state of the conversion task.

            
          

          - **StatusMessage** *(string) --* 

            The status message related to the conversion task.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the task.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

  .. py:method:: import_key_pair(**kwargs)

    

    Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with  CreateKeyPair , in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.

     

    For more information about key pairs, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair>`_    


    **Request Syntax** 
    ::

      response = client.import_key_pair(
          DryRun=True|False,
          KeyName='string',
          PublicKeyMaterial=b'bytes'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type KeyName: string
    :param KeyName: **[REQUIRED]** 

      A unique name for the key pair.

      

    
    :type PublicKeyMaterial: bytes
    :param PublicKeyMaterial: **[REQUIRED]** 

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'KeyFingerprint': 'string',
            'KeyName': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ImportKeyPair.

        
        

        - **KeyFingerprint** *(string) --* 

          The MD5 public key fingerprint as specified in section 4 of RFC 4716.

          
        

        - **KeyName** *(string) --* 

          The key pair name you provided.

          
    

  .. py:method:: import_snapshot(**kwargs)

    

    Imports a disk into an EBS snapshot.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot>`_    


    **Request Syntax** 
    ::

      response = client.import_snapshot(
          ClientData={
              'Comment': 'string',
              'UploadEnd': datetime(2015, 1, 1),
              'UploadSize': 123.0,
              'UploadStart': datetime(2015, 1, 1)
          },
          ClientToken='string',
          Description='string',
          DiskContainer={
              'Description': 'string',
              'Format': 'string',
              'Url': 'string',
              'UserBucket': {
                  'S3Bucket': 'string',
                  'S3Key': 'string'
              }
          },
          DryRun=True|False,
          RoleName='string'
      )
    :type ClientData: dict
    :param ClientData: 

      The client-specific data.

      

    
      - **Comment** *(string) --* 

        A user-defined comment about the disk upload.

        

      
      - **UploadEnd** *(datetime) --* 

        The time that the disk upload ends.

        

      
      - **UploadSize** *(float) --* 

        The size of the uploaded disk image, in GiB.

        

      
      - **UploadStart** *(datetime) --* 

        The time that the disk upload starts.

        

      
    
    :type ClientToken: string
    :param ClientToken: 

      Token to enable idempotency for VM import requests.

      

    
    :type Description: string
    :param Description: 

      The description string for the import snapshot task.

      

    
    :type DiskContainer: dict
    :param DiskContainer: 

      Information about the disk container.

      

    
      - **Description** *(string) --* 

        The description of the disk image being imported.

        

      
      - **Format** *(string) --* 

        The format of the disk image being imported.

         

        Valid values: ``RAW`` | ``VHD`` | ``VMDK`` | ``OVA``  

        

      
      - **Url** *(string) --* 

        The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).

        

      
      - **UserBucket** *(dict) --* 

        The S3 bucket for the disk image.

        

      
        - **S3Bucket** *(string) --* 

          The name of the S3 bucket where the disk image is located.

          

        
        - **S3Key** *(string) --* 

          The file name of the disk image.

          

        
      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RoleName: string
    :param RoleName: 

      The name of the role to use when not using the default role, 'vmimport'.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Description': 'string',
            'ImportTaskId': 'string',
            'SnapshotTaskDetail': {
                'Description': 'string',
                'DiskImageSize': 123.0,
                'Format': 'string',
                'Progress': 'string',
                'SnapshotId': 'string',
                'Status': 'string',
                'StatusMessage': 'string',
                'Url': 'string',
                'UserBucket': {
                    'S3Bucket': 'string',
                    'S3Key': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for ImportSnapshot.

        
        

        - **Description** *(string) --* 

          A description of the import snapshot task.

          
        

        - **ImportTaskId** *(string) --* 

          The ID of the import snapshot task.

          
        

        - **SnapshotTaskDetail** *(dict) --* 

          Information about the import snapshot task.

          
          

          - **Description** *(string) --* 

            The description of the snapshot.

            
          

          - **DiskImageSize** *(float) --* 

            The size of the disk in the snapshot, in GiB.

            
          

          - **Format** *(string) --* 

            The format of the disk image from which the snapshot is created.

            
          

          - **Progress** *(string) --* 

            The percentage of completion for the import snapshot task.

            
          

          - **SnapshotId** *(string) --* 

            The snapshot ID of the disk being imported.

            
          

          - **Status** *(string) --* 

            A brief status for the import snapshot task.

            
          

          - **StatusMessage** *(string) --* 

            A detailed status message for the import snapshot task.

            
          

          - **Url** *(string) --* 

            The URL of the disk image from which the snapshot is created.

            
          

          - **UserBucket** *(dict) --* 

            The S3 bucket for the disk image.

            
            

            - **S3Bucket** *(string) --* 

              The S3 bucket from which the disk image was created.

              
            

            - **S3Key** *(string) --* 

              The file name of the disk image.

              
        
      
    

  .. py:method:: import_volume(**kwargs)

    

    Creates an import volume task using metadata from the specified disk image.For more information, see `Importing Disks to Amazon EBS <http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html>`_ .

     

    For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume>`_    


    **Request Syntax** 
    ::

      response = client.import_volume(
          AvailabilityZone='string',
          Description='string',
          DryRun=True|False,
          Image={
              'Bytes': 123,
              'Format': 'VMDK'|'RAW'|'VHD',
              'ImportManifestUrl': 'string'
          },
          Volume={
              'Size': 123
          }
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: **[REQUIRED]** 

      The Availability Zone for the resulting EBS volume.

      

    
    :type Description: string
    :param Description: 

      A description of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Image: dict
    :param Image: **[REQUIRED]** 

      The disk image.

      

    
      - **Bytes** *(integer) --* **[REQUIRED]** 

        The size of the disk image, in GiB.

        

      
      - **Format** *(string) --* **[REQUIRED]** 

        The disk image format.

        

      
      - **ImportManifestUrl** *(string) --* **[REQUIRED]** 

        A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

         

        For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

        

      
    
    :type Volume: dict
    :param Volume: **[REQUIRED]** 

      The volume size.

      

    
      - **Size** *(integer) --* **[REQUIRED]** 

        The size of the volume, in GiB.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ConversionTask': {
                'ConversionTaskId': 'string',
                'ExpirationTime': 'string',
                'ImportInstance': {
                    'Description': 'string',
                    'InstanceId': 'string',
                    'Platform': 'Windows',
                    'Volumes': [
                        {
                            'AvailabilityZone': 'string',
                            'BytesConverted': 123,
                            'Description': 'string',
                            'Image': {
                                'Checksum': 'string',
                                'Format': 'VMDK'|'RAW'|'VHD',
                                'ImportManifestUrl': 'string',
                                'Size': 123
                            },
                            'Status': 'string',
                            'StatusMessage': 'string',
                            'Volume': {
                                'Id': 'string',
                                'Size': 123
                            }
                        },
                    ]
                },
                'ImportVolume': {
                    'AvailabilityZone': 'string',
                    'BytesConverted': 123,
                    'Description': 'string',
                    'Image': {
                        'Checksum': 'string',
                        'Format': 'VMDK'|'RAW'|'VHD',
                        'ImportManifestUrl': 'string',
                        'Size': 123
                    },
                    'Volume': {
                        'Id': 'string',
                        'Size': 123
                    }
                },
                'State': 'active'|'cancelling'|'cancelled'|'completed',
                'StatusMessage': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output for ImportVolume.

        
        

        - **ConversionTask** *(dict) --* 

          Information about the conversion task.

          
          

          - **ConversionTaskId** *(string) --* 

            The ID of the conversion task.

            
          

          - **ExpirationTime** *(string) --* 

            The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.

            
          

          - **ImportInstance** *(dict) --* 

            If the task is for importing an instance, this contains information about the import instance task.

            
            

            - **Description** *(string) --* 

              A description of the task.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Platform** *(string) --* 

              The instance operating system.

              
            

            - **Volumes** *(list) --* 

              One or more volumes.

              
              

              - *(dict) --* 

                Describes an import volume task.

                
                

                - **AvailabilityZone** *(string) --* 

                  The Availability Zone where the resulting instance will reside.

                  
                

                - **BytesConverted** *(integer) --* 

                  The number of bytes converted so far.

                  
                

                - **Description** *(string) --* 

                  A description of the task.

                  
                

                - **Image** *(dict) --* 

                  The image.

                  
                  

                  - **Checksum** *(string) --* 

                    The checksum computed for the disk image.

                    
                  

                  - **Format** *(string) --* 

                    The disk image format.

                    
                  

                  - **ImportManifestUrl** *(string) --* 

                    A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                     

                    For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                    
                  

                  - **Size** *(integer) --* 

                    The size of the disk image, in GiB.

                    
              
                

                - **Status** *(string) --* 

                  The status of the import of this particular disk image.

                  
                

                - **StatusMessage** *(string) --* 

                  The status information or errors related to the disk image.

                  
                

                - **Volume** *(dict) --* 

                  The volume.

                  
                  

                  - **Id** *(string) --* 

                    The volume identifier.

                    
                  

                  - **Size** *(integer) --* 

                    The size of the volume, in GiB.

                    
              
            
          
        
          

          - **ImportVolume** *(dict) --* 

            If the task is for importing a volume, this contains information about the import volume task.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone where the resulting volume will reside.

              
            

            - **BytesConverted** *(integer) --* 

              The number of bytes converted so far.

              
            

            - **Description** *(string) --* 

              The description you provided when starting the import volume task.

              
            

            - **Image** *(dict) --* 

              The image.

              
              

              - **Checksum** *(string) --* 

                The checksum computed for the disk image.

                
              

              - **Format** *(string) --* 

                The disk image format.

                
              

              - **ImportManifestUrl** *(string) --* 

                A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the `Authenticating REST Requests <http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html>`_ topic in the *Amazon Simple Storage Service Developer Guide* .

                 

                For information about the import manifest referenced by this API action, see `VM Import Manifest <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html>`_ .

                
              

              - **Size** *(integer) --* 

                The size of the disk image, in GiB.

                
          
            

            - **Volume** *(dict) --* 

              The volume.

              
              

              - **Id** *(string) --* 

                The volume identifier.

                
              

              - **Size** *(integer) --* 

                The size of the volume, in GiB.

                
          
        
          

          - **State** *(string) --* 

            The state of the conversion task.

            
          

          - **StatusMessage** *(string) --* 

            The status message related to the conversion task.

            
          

          - **Tags** *(list) --* 

            Any tags assigned to the task.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
      
    

  .. py:method:: modify_hosts(**kwargs)

    

    Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, AWS will place instances that you launch with a tenancy of ``host`` , but without targeting a specific host ID, onto any available Dedicated Host in your account which has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID if you want the instance to launch onto a specific host. If no host ID is provided, the instance will be launched onto a suitable host which has auto-placement enabled.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts>`_    


    **Request Syntax** 
    ::

      response = client.modify_hosts(
          AutoPlacement='on'|'off',
          HostIds=[
              'string',
          ]
      )
    :type AutoPlacement: string
    :param AutoPlacement: **[REQUIRED]** 

      Specify whether to enable or disable auto-placement.

      

    
    :type HostIds: list
    :param HostIds: **[REQUIRED]** 

      The host IDs of the Dedicated Hosts you want to modify.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Successful': [
                'string',
            ],
            'Unsuccessful': [
                {
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'ResourceId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ModifyHosts.

        
        

        - **Successful** *(list) --* 

          The IDs of the Dedicated Hosts that were successfully modified.

          
          

          - *(string) --* 
      
        

        - **Unsuccessful** *(list) --* 

          The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.

          
          

          - *(dict) --* 

            Information about items that were not successfully processed in a batch call.

            
            

            - **Error** *(dict) --* 

              Information about the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message accompanying the error code.

                
          
            

            - **ResourceId** *(string) --* 

              The ID of the resource.

              
        
      
    

  .. py:method:: modify_id_format(**kwargs)

    

    Modifies the ID format for the specified resource on a per-region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created. The following resource types support longer IDs: ``instance`` | ``reservation`` | ``snapshot`` | ``volume`` .

     

    This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see `Resource IDs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

     

    Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant ``Describe`` command for the resource type.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat>`_    


    **Request Syntax** 
    ::

      response = client.modify_id_format(
          Resource='string',
          UseLongIds=True|False
      )
    :type Resource: string
    :param Resource: **[REQUIRED]** 

      The type of resource: ``instance`` | ``reservation`` | ``snapshot`` | ``volume``  

      

    
    :type UseLongIds: boolean
    :param UseLongIds: **[REQUIRED]** 

      Indicate whether the resource should use longer IDs (17-character IDs).

      

    
    
    :returns: None

  .. py:method:: modify_identity_id_format(**kwargs)

    

    Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created. 

     

    The following resource types support longer IDs: ``instance`` | ``reservation`` | ``snapshot`` | ``volume`` . For more information, see `Resource IDs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . 

     

    This setting applies to the principal specified in the request; it does not apply to the principal that makes the request. 

     

    Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant ``Describe`` command for the resource type.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat>`_    


    **Request Syntax** 
    ::

      response = client.modify_identity_id_format(
          PrincipalArn='string',
          Resource='string',
          UseLongIds=True|False
      )
    :type PrincipalArn: string
    :param PrincipalArn: **[REQUIRED]** 

      The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify ``all`` to modify the ID format for all IAM users, IAM roles, and the root user of the account.

      

    
    :type Resource: string
    :param Resource: **[REQUIRED]** 

      The type of resource: ``instance`` | ``reservation`` | ``snapshot`` | ``volume``  

      

    
    :type UseLongIds: boolean
    :param UseLongIds: **[REQUIRED]** 

      Indicates whether the resource should use longer IDs (17-character IDs)

      

    
    
    :returns: None

  .. py:method:: modify_image_attribute(**kwargs)

    

    Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.

     

    .. note::

       

      AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.

       

     

    .. note::

       

      The SriovNetSupport enhanced networking attribute cannot be changed using this command. Instead, enable SriovNetSupport on an instance and create an AMI from the instance. This will result in an image with SriovNetSupport enabled.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_image_attribute(
          Attribute='string',
          Description={
              'Value': 'string'
          },
          ImageId='string',
          LaunchPermission={
              'Add': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ],
              'Remove': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ]
          },
          OperationType='add'|'remove',
          ProductCodes=[
              'string',
          ],
          UserGroups=[
              'string',
          ],
          UserIds=[
              'string',
          ],
          Value='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The name of the attribute to modify.

      

    
    :type Description: dict
    :param Description: 

      A description for the AMI.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI.

      

    
    :type LaunchPermission: dict
    :param LaunchPermission: 

      A launch permission modification.

      

    
      - **Add** *(list) --* 

        The AWS account ID to add to the list of launch permissions for the AMI.

        

      
        - *(dict) --* 

          Describes a launch permission.

          

        
          - **Group** *(string) --* 

            The name of the group.

            

          
          - **UserId** *(string) --* 

            The AWS account ID.

            

          
        
    
      - **Remove** *(list) --* 

        The AWS account ID to remove from the list of launch permissions for the AMI.

        

      
        - *(dict) --* 

          Describes a launch permission.

          

        
          - **Group** *(string) --* 

            The name of the group.

            

          
          - **UserId** *(string) --* 

            The AWS account ID.

            

          
        
    
    
    :type OperationType: string
    :param OperationType: 

      The operation type.

      

    
    :type ProductCodes: list
    :param ProductCodes: 

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the ``productCodes`` attribute.

      

    
      - *(string) --* 

      
  
    :type UserGroups: list
    :param UserGroups: 

      One or more user groups. This is only valid when modifying the ``launchPermission`` attribute.

      

    
      - *(string) --* 

      
  
    :type UserIds: list
    :param UserIds: 

      One or more AWS account IDs. This is only valid when modifying the ``launchPermission`` attribute.

      

    
      - *(string) --* 

      
  
    :type Value: string
    :param Value: 

      The value of the attribute being modified. This is only valid when modifying the ``description`` attribute.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: modify_instance_attribute(**kwargs)

    

    Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

     

    To modify some attributes, the instance must be stopped. For more information, see `Modifying Attributes of a Stopped Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_instance_attribute(
          SourceDestCheck={
              'Value': True|False
          },
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'Ebs': {
                      'DeleteOnTermination': True|False,
                      'VolumeId': 'string'
                  },
                  'NoDevice': 'string',
                  'VirtualName': 'string'
              },
          ],
          DisableApiTermination={
              'Value': True|False
          },
          DryRun=True|False,
          EbsOptimized={
              'Value': True|False
          },
          EnaSupport={
              'Value': True|False
          },
          Groups=[
              'string',
          ],
          InstanceId='string',
          InstanceInitiatedShutdownBehavior={
              'Value': 'string'
          },
          InstanceType={
              'Value': 'string'
          },
          Kernel={
              'Value': 'string'
          },
          Ramdisk={
              'Value': 'string'
          },
          SriovNetSupport={
              'Value': 'string'
          },
          UserData={
              'Value': b'bytes'
          },
          Value='string'
      )
    :type SourceDestCheck: dict
    :param SourceDestCheck: 

      Specifies whether source/destination checking is enabled. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type Attribute: string
    :param Attribute: 

      The name of the attribute.

      

    
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      Modifies the ``DeleteOnTermination`` attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for ``DeleteOnTermination`` , the default is ``true`` and the volume is deleted when the instance is terminated.

       

      To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see `Updating the Block Device Mapping when Launching an Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
      - *(dict) --* 

        Describes a block device mapping entry.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the volume is deleted on instance termination.

            

          
          - **VolumeId** *(string) --* 

            The ID of the EBS volume.

            

          
        
        - **NoDevice** *(string) --* 

          suppress the specified device included in the block device mapping.

          

        
        - **VirtualName** *(string) --* 

          The virtual device name.

          

        
      
  
    :type DisableApiTermination: dict
    :param DisableApiTermination: 

      If the value is ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EbsOptimized: dict
    :param EbsOptimized: 

      Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type EnaSupport: dict
    :param EnaSupport: 

      Set to ``true`` to enable enhanced networking with ENA for the instance.

       

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type Groups: list
    :param Groups: 

      [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

      

    
      - *(string) --* 

      
  
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type InstanceInitiatedShutdownBehavior: dict
    :param InstanceInitiatedShutdownBehavior: 

      Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type InstanceType: dict
    :param InstanceType: 

      Changes the instance type to the specified value. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ . If the instance type is not valid, the error returned is ``InvalidInstanceAttributeValue`` .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type Kernel: dict
    :param Kernel: 

      Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html>`_ .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type Ramdisk: dict
    :param Ramdisk: 

      Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html>`_ .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type SriovNetSupport: dict
    :param SriovNetSupport: 

      Set to ``simple`` to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

       

      There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

       

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type UserData: dict
    :param UserData: 

      Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

      

    
      - **Value** *(bytes) --* 

      
    
    :type Value: string
    :param Value: 

      A new value for the attribute. Use only with the ``kernel`` , ``ramdisk`` , ``userData`` , ``disableApiTermination`` , or ``instanceInitiatedShutdownBehavior`` attribute.

      

    
    
    :returns: None

  .. py:method:: modify_instance_placement(**kwargs)

    

    Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.

     

    Instance affinity is disabled by default. When instance affinity is ``host`` and it is not associated with a specific Dedicated Host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.

     

    You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.

     

    You can modify the tenancy of a stopped instance with a tenancy of ``host`` or ``dedicated`` .

     

    Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement>`_    


    **Request Syntax** 
    ::

      response = client.modify_instance_placement(
          Affinity='default'|'host',
          HostId='string',
          InstanceId='string',
          Tenancy='dedicated'|'host'
      )
    :type Affinity: string
    :param Affinity: 

      The new affinity setting for the instance.

      

    
    :type HostId: string
    :param HostId: 

      The ID of the Dedicated Host that the instance will have affinity with.

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance that you are modifying.

      

    
    :type Tenancy: string
    :param Tenancy: 

      The tenancy of the instance that you are modifying.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ModifyInstancePlacement.

        
        

        - **Return** *(boolean) --* 

          Is ``true`` if the request succeeds, and an error otherwise.

          
    

  .. py:method:: modify_network_interface_attribute(**kwargs)

    

    Modifies the specified network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_network_interface_attribute(
          Attachment={
              'AttachmentId': 'string',
              'DeleteOnTermination': True|False
          },
          Description={
              'Value': 'string'
          },
          DryRun=True|False,
          Groups=[
              'string',
          ],
          NetworkInterfaceId='string',
          SourceDestCheck={
              'Value': True|False
          }
      )
    :type Attachment: dict
    :param Attachment: 

      Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

      

    
      - **AttachmentId** *(string) --* 

        The ID of the network interface attachment.

        

      
      - **DeleteOnTermination** *(boolean) --* 

        Indicates whether the network interface is deleted when the instance is terminated.

        

      
    
    :type Description: dict
    :param Description: 

      A description for the network interface.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: 

      Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

      

    
      - *(string) --* 

      
  
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    :type SourceDestCheck: dict
    :param SourceDestCheck: 

      Indicates whether source/destination checking is enabled. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    
    :returns: None

    **Examples** 

    This example modifies the attachment attribute of the specified network interface.
    ::

      response = client.modify_network_interface_attribute(
          Attachment={
              'AttachmentId': 'eni-attach-43348162',
              'DeleteOnTermination': False,
          },
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example modifies the description attribute of the specified network interface.
    ::

      response = client.modify_network_interface_attribute(
          Description={
              'Value': 'My description',
          },
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example command modifies the groupSet attribute of the specified network interface.
    ::

      response = client.modify_network_interface_attribute(
          Groups=[
              'sg-903004f8',
              'sg-1a2b3c4d',
          ],
          NetworkInterfaceId='eni-686ea200',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example command modifies the sourceDestCheck attribute of the specified network interface.
    ::

      response = client.modify_network_interface_attribute(
          NetworkInterfaceId='eni-686ea200',
          SourceDestCheck={
              'Value': False,
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_reserved_instances(**kwargs)

    

    Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.

     

    For more information, see `Modifying Reserved Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html>`_ in the Amazon Elastic Compute Cloud User Guide.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances>`_    


    **Request Syntax** 
    ::

      response = client.modify_reserved_instances(
          ReservedInstancesIds=[
              'string',
          ],
          ClientToken='string',
          TargetConfigurations=[
              {
                  'AvailabilityZone': 'string',
                  'InstanceCount': 123,
                  'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                  'Platform': 'string',
                  'Scope': 'Availability Zone'|'Region'
              },
          ]
      )
    :type ReservedInstancesIds: list
    :param ReservedInstancesIds: **[REQUIRED]** 

      The IDs of the Reserved Instances to modify.

      

    
      - *(string) --* 

      
  
    :type ClientToken: string
    :param ClientToken: 

      A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

      

    
    :type TargetConfigurations: list
    :param TargetConfigurations: **[REQUIRED]** 

      The configuration settings for the Reserved Instances to modify.

      

    
      - *(dict) --* 

        Describes the configuration settings for the modified Reserved Instances.

        

      
        - **AvailabilityZone** *(string) --* 

          The Availability Zone for the modified Reserved Instances.

          

        
        - **InstanceCount** *(integer) --* 

          The number of modified Reserved Instances.

          

        
        - **InstanceType** *(string) --* 

          The instance type for the modified Reserved Instances.

          

        
        - **Platform** *(string) --* 

          The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

          

        
        - **Scope** *(string) --* 

          Whether the Reserved Instance is applied to instances in a region or instances in a specific Availability Zone.

          

        
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesModificationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ModifyReservedInstances.

        
        

        - **ReservedInstancesModificationId** *(string) --* 

          The ID for the modification.

          
    

  .. py:method:: modify_snapshot_attribute(**kwargs)

    

    Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.

     

    .. note::

       

      Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.

       

     

    For more information on modifying snapshot permissions, see `Sharing Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_snapshot_attribute(
          Attribute='productCodes'|'createVolumePermission',
          CreateVolumePermission={
              'Add': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ],
              'Remove': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ]
          },
          GroupNames=[
              'string',
          ],
          OperationType='add'|'remove',
          SnapshotId='string',
          UserIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The snapshot attribute to modify.

       

      .. note::

         

        Only volume creation permissions may be modified at the customer level.

         

      

    
    :type CreateVolumePermission: dict
    :param CreateVolumePermission: 

      A JSON representation of the snapshot attribute modification.

      

    
      - **Add** *(list) --* 

        Adds a specific AWS account ID or group to a volume's list of create volume permissions.

        

      
        - *(dict) --* 

          Describes the user or group to be added or removed from the permissions for a volume.

          

        
          - **Group** *(string) --* 

            The specific group that is to be added or removed from a volume's list of create volume permissions.

            

          
          - **UserId** *(string) --* 

            The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

            

          
        
    
      - **Remove** *(list) --* 

        Removes a specific AWS account ID or group from a volume's list of create volume permissions.

        

      
        - *(dict) --* 

          Describes the user or group to be added or removed from the permissions for a volume.

          

        
          - **Group** *(string) --* 

            The specific group that is to be added or removed from a volume's list of create volume permissions.

            

          
          - **UserId** *(string) --* 

            The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

            

          
        
    
    
    :type GroupNames: list
    :param GroupNames: 

      The group to modify for the snapshot.

      

    
      - *(string) --* 

      
  
    :type OperationType: string
    :param OperationType: 

      The type of operation to perform to the attribute.

      

    
    :type SnapshotId: string
    :param SnapshotId: **[REQUIRED]** 

      The ID of the snapshot.

      

    
    :type UserIds: list
    :param UserIds: 

      The account ID to modify for the snapshot.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example modifies snapshot ``snap-1234567890abcdef0`` to remove the create volume permission for a user with the account ID ``123456789012``. If the command succeeds, no output is returned.
    ::

      response = client.modify_snapshot_attribute(
          Attribute='createVolumePermission',
          OperationType='remove',
          SnapshotId='snap-1234567890abcdef0',
          UserIds=[
              '123456789012',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example makes the snapshot ``snap-1234567890abcdef0`` public.
    ::

      response = client.modify_snapshot_attribute(
          Attribute='createVolumePermission',
          GroupNames=[
              'all',
          ],
          OperationType='add',
          SnapshotId='snap-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_spot_fleet_request(**kwargs)

    

    Modifies the specified Spot fleet request.

     

    While the Spot fleet request is being modified, it is in the ``modifying`` state.

     

    To scale up your Spot fleet, increase its target capacity. The Spot fleet launches the additional Spot instances according to the allocation strategy for the Spot fleet request. If the allocation strategy is ``lowestPrice`` , the Spot fleet launches instances using the Spot pool with the lowest price. If the allocation strategy is ``diversified`` , the Spot fleet distributes the instances across the Spot pools.

     

    To scale down your Spot fleet, decrease its target capacity. First, the Spot fleet cancels any open bids that exceed the new target capacity. You can request that the Spot fleet terminate Spot instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is ``lowestPrice`` , the Spot fleet terminates the instances with the highest price per unit. If the allocation strategy is ``diversified`` , the Spot fleet terminates instances across the Spot pools. Alternatively, you can request that the Spot fleet keep the fleet at its current size, but not replace any Spot instances that are interrupted or that you terminate manually.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest>`_    


    **Request Syntax** 
    ::

      response = client.modify_spot_fleet_request(
          ExcessCapacityTerminationPolicy='noTermination'|'default',
          SpotFleetRequestId='string',
          TargetCapacity=123
      )
    :type ExcessCapacityTerminationPolicy: string
    :param ExcessCapacityTerminationPolicy: 

      Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

      

    
    :type SpotFleetRequestId: string
    :param SpotFleetRequestId: **[REQUIRED]** 

      The ID of the Spot fleet request.

      

    
    :type TargetCapacity: integer
    :param TargetCapacity: 

      The size of the fleet.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ModifySpotFleetRequest.

        
        

        - **Return** *(boolean) --* 

          Is ``true`` if the request succeeds, and an error otherwise.

          
    

    **Examples** 

    This example increases the target capacity of the specified Spot fleet request.
    ::

      response = client.modify_spot_fleet_request(
          SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          TargetCapacity=20,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Return': True,
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example decreases the target capacity of the specified Spot fleet request without terminating any Spot Instances as a result.
    ::

      response = client.modify_spot_fleet_request(
          ExcessCapacityTerminationPolicy='NoTermination ',
          SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          TargetCapacity=10,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Return': True,
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_subnet_attribute(**kwargs)

    

    Modifies a subnet attribute. You can only modify one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_subnet_attribute(
          AssignIpv6AddressOnCreation={
              'Value': True|False
          },
          MapPublicIpOnLaunch={
              'Value': True|False
          },
          SubnetId='string'
      )
    :type AssignIpv6AddressOnCreation: dict
    :param AssignIpv6AddressOnCreation: 

      Specify ``true`` to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives an IPv6 address). 

       

      If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it's created using version ``2016-11-15`` or later of the Amazon EC2 API.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type MapPublicIpOnLaunch: dict
    :param MapPublicIpOnLaunch: 

      Specify ``true`` to indicate that network interfaces created in the specified subnet should be assigned a public IPv4 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives a public IPv4 address).

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet.

      

    
    
    :returns: None

    **Examples** 

    This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address.
    ::

      response = client.modify_subnet_attribute(
          MapPublicIpOnLaunch={
              'Value': True,
          },
          SubnetId='subnet-1a2b3c4d',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_volume(**kwargs)

    

    You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you may be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying an EBS volume running Linux, see `Modifying the Size, IOPS, or Type of an EBS Volume on Linux <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html>`_ . For more information about modifying an EBS volume running Windows, see `Modifying the Size, IOPS, or Type of an EBS Volume on Windows <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html>`_ . 

     

    When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For information about extending a Linux file system, see `Extending a Linux File System <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux>`_ . For information about extending a Windows file system, see `Extending a Windows File System <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows>`_ . 

     

    You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the `Amazon CloudWatch Events User Guide <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/>`_ . You can also track the status of a modification using the  DescribeVolumesModifications API. For information about tracking status changes using either method, see `Monitoring Volume Modifications <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods>`_ . 

     

    .. note::

       

      With previous-generation instance types, resizing an EBS volume may require detaching and reattaching the volume or stopping and restarting the instance. For more information about modifying an EBS volume running Linux, see `Modifying the Size, IOPS, or Type of an EBS Volume on Linux <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html>`_ . For more information about modifying an EBS volume running Windows, see `Modifying the Size, IOPS, or Type of an EBS Volume on Windows <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html>`_ .

       

     

    .. note::

       

      If you reach the maximum volume modification rate per volume limit, you will need to wait at least six hours before applying further modifications to the affected EBS volume.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume>`_    


    **Request Syntax** 
    ::

      response = client.modify_volume(
          DryRun=True|False,
          VolumeId='string',
          Size=123,
          VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
          Iops=123
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

    
    :type Size: integer
    :param Size: 

      Target size in GiB of the volume to be modified. Target volume size must be greater than or equal to than the existing size of the volume. For information about available EBS volume sizes, see `http\://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ .

       

      Default: If no size is specified, the existing size is retained. 

      

    
    :type VolumeType: string
    :param VolumeType: 

      Target EBS volume type of the volume to be modified

       

      The API does not support modifications for volume type ``standard`` . You also cannot change the type of a volume to ``standard`` . 

       

      Default: If no type is specified, the existing type is retained. 

      

    
    :type Iops: integer
    :param Iops: 

      Target IOPS rate of the volume to be modified.

       

      Only valid for Provisioned IOPS SSD (``io1`` ) volumes. For more information about ``io1`` IOPS configuration, see `http\://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops>`_ .

       

      Default: If no IOPS value is specified, the existing value is retained. 

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VolumeModification': {
                'VolumeId': 'string',
                'ModificationState': 'modifying'|'optimizing'|'completed'|'failed',
                'StatusMessage': 'string',
                'TargetSize': 123,
                'TargetIops': 123,
                'TargetVolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
                'OriginalSize': 123,
                'OriginalIops': 123,
                'OriginalVolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
                'Progress': 123,
                'StartTime': datetime(2015, 1, 1),
                'EndTime': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **VolumeModification** *(dict) --* 

          A  VolumeModification object.

          
          

          - **VolumeId** *(string) --* 

            ID of the volume being modified.

            
          

          - **ModificationState** *(string) --* 

            Current state of modification. Modification state is null for unmodified volumes. 

            
          

          - **StatusMessage** *(string) --* 

            Generic status message on modification progress or failure.

            
          

          - **TargetSize** *(integer) --* 

            Target size of the volume being modified.

            
          

          - **TargetIops** *(integer) --* 

            Target IOPS rate of the volume being modified.

            
          

          - **TargetVolumeType** *(string) --* 

            Target EBS volume type of the volume being modified.

            
          

          - **OriginalSize** *(integer) --* 

            Original size of the volume being modified.

            
          

          - **OriginalIops** *(integer) --* 

            Original IOPS rate of the volume being modified.

            
          

          - **OriginalVolumeType** *(string) --* 

            Original EBS volume type of the volume being modified.

            
          

          - **Progress** *(integer) --* 

            Modification progress from 0 to 100%.

            
          

          - **StartTime** *(datetime) --* 

            Modification start time 

            
          

          - **EndTime** *(datetime) --* 

            Modification completion or failure time.

            
      
    

  .. py:method:: modify_volume_attribute(**kwargs)

    

    Modifies a volume attribute.

     

    By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

     

    You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_volume_attribute(
          AutoEnableIO={
              'Value': True|False
          },
          VolumeId='string',
          DryRun=True|False
      )
    :type AutoEnableIO: dict
    :param AutoEnableIO: 

      Indicates whether the volume should be auto-enabled for I/O operations.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example sets the ``autoEnableIo`` attribute of the volume with the ID ``vol-1234567890abcdef0`` to ``true``. If the command succeeds, no output is returned.
    ::

      response = client.modify_volume_attribute(
          AutoEnableIO={
              'Value': True,
          },
          DryRun=True,
          VolumeId='vol-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_vpc_attribute(**kwargs)

    

    Modifies the specified attribute of the specified VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute>`_    


    **Request Syntax** 
    ::

      response = client.modify_vpc_attribute(
          EnableDnsHostnames={
              'Value': True|False
          },
          EnableDnsSupport={
              'Value': True|False
          },
          VpcId='string'
      )
    :type EnableDnsHostnames: dict
    :param EnableDnsHostnames: 

      Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

       

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type EnableDnsSupport: dict
    :param EnableDnsSupport: 

      Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" will succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

       

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :returns: None

    **Examples** 

    This example modifies the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for instances in the VPC to their corresponding IP addresses; otherwise, it does not.
    ::

      response = client.modify_vpc_attribute(
          EnableDnsSupport={
              'Value': False,
          },
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example modifies the enableDnsHostnames attribute. This attribute indicates whether instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.
    ::

      response = client.modify_vpc_attribute(
          EnableDnsHostnames={
              'Value': False,
          },
          VpcId='vpc-a01106c2',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: modify_vpc_endpoint(**kwargs)

    

    Modifies attributes of a specified VPC endpoint. You can modify the policy associated with the endpoint, and you can add and remove route tables associated with the endpoint.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint>`_    


    **Request Syntax** 
    ::

      response = client.modify_vpc_endpoint(
          AddRouteTableIds=[
              'string',
          ],
          DryRun=True|False,
          PolicyDocument='string',
          RemoveRouteTableIds=[
              'string',
          ],
          ResetPolicy=True|False,
          VpcEndpointId='string'
      )
    :type AddRouteTableIds: list
    :param AddRouteTableIds: 

      One or more route tables IDs to associate with the endpoint.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PolicyDocument: string
    :param PolicyDocument: 

      A policy document to attach to the endpoint. The policy must be in valid JSON format.

      

    
    :type RemoveRouteTableIds: list
    :param RemoveRouteTableIds: 

      One or more route table IDs to disassociate from the endpoint.

      

    
      - *(string) --* 

      
  
    :type ResetPolicy: boolean
    :param ResetPolicy: 

      Specify ``true`` to reset the policy document to the default policy. The default policy allows access to the service.

      

    
    :type VpcEndpointId: string
    :param VpcEndpointId: **[REQUIRED]** 

      The ID of the endpoint.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ModifyVpcEndpoint.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: modify_vpc_peering_connection_options(**kwargs)

    

    Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:

     

     
    * Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC. 
     
    * Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC. 
     
    * Enable/disable a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. 
     

     

    If the peered VPCs are in different accounts, each owner must initiate a separate request to modify the peering connection options, depending on whether their VPC was the requester or accepter for the VPC peering connection. If the peered VPCs are in the same account, you can modify the requester and accepter options in the same request. To confirm which VPC is the accepter and requester for a VPC peering connection, use the  DescribeVpcPeeringConnections command.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions>`_    


    **Request Syntax** 
    ::

      response = client.modify_vpc_peering_connection_options(
          AccepterPeeringConnectionOptions={
              'AllowDnsResolutionFromRemoteVpc': True|False,
              'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
              'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
          },
          DryRun=True|False,
          RequesterPeeringConnectionOptions={
              'AllowDnsResolutionFromRemoteVpc': True|False,
              'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
              'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
          },
          VpcPeeringConnectionId='string'
      )
    :type AccepterPeeringConnectionOptions: dict
    :param AccepterPeeringConnectionOptions: 

      The VPC peering connection options for the accepter VPC.

      

    
      - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

        If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

        

      
      - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.

        

      
      - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RequesterPeeringConnectionOptions: dict
    :param RequesterPeeringConnectionOptions: 

      The VPC peering connection options for the requester VPC.

      

    
      - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

        If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

        

      
      - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.

        

      
      - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.

        

      
    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: **[REQUIRED]** 

      The ID of the VPC peering connection.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AccepterPeeringConnectionOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'RequesterPeeringConnectionOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **AccepterPeeringConnectionOptions** *(dict) --* 

          Information about the VPC peering connection options for the accepter VPC.

          
          

          - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

            If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

            
          

          - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

            If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.

            
          

          - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

            If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.

            
      
        

        - **RequesterPeeringConnectionOptions** *(dict) --* 

          Information about the VPC peering connection options for the requester VPC.

          
          

          - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

            If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

            
          

          - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

            If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.

            
          

          - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

            If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.

            
      
    

  .. py:method:: monitor_instances(**kwargs)

    

    Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    To disable detailed monitoring, see .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_    


    **Request Syntax** 
    ::

      response = client.monitor_instances(
          InstanceIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceMonitorings': [
                {
                    'InstanceId': 'string',
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of MonitorInstances.

        
        

        - **InstanceMonitorings** *(list) --* 

          The monitoring information.

          
          

          - *(dict) --* 

            Describes the monitoring of an instance.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Monitoring** *(dict) --* 

              The monitoring for the instance.

              
              

              - **State** *(string) --* 

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                
          
        
      
    

  .. py:method:: move_address_to_vpc(**kwargs)

    

    Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the  RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc>`_    


    **Request Syntax** 
    ::

      response = client.move_address_to_vpc(
          DryRun=True|False,
          PublicIp='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PublicIp: string
    :param PublicIp: **[REQUIRED]** 

      The Elastic IP address.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AllocationId': 'string',
            'Status': 'MoveInProgress'|'InVpc'|'InClassic'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of MoveAddressToVpc.

        
        

        - **AllocationId** *(string) --* 

          The allocation ID for the Elastic IP address.

          
        

        - **Status** *(string) --* 

          The status of the move of the IP address.

          
    

    **Examples** 

    This example moves the specified Elastic IP address to the EC2-VPC platform.
    ::

      response = client.move_address_to_vpc(
          PublicIp='54.123.4.56',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'Status': 'MoveInProgress',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: purchase_host_reservation(**kwargs)

    

    Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation>`_    


    **Request Syntax** 
    ::

      response = client.purchase_host_reservation(
          ClientToken='string',
          CurrencyCode='USD',
          HostIdSet=[
              'string',
          ],
          LimitPrice='string',
          OfferingId='string'
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type CurrencyCode: string
    :param CurrencyCode: 

      The currency in which the ``totalUpfrontPrice`` , ``LimitPrice`` , and ``totalHourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

      

    
    :type HostIdSet: list
    :param HostIdSet: **[REQUIRED]** 

      The ID/s of the Dedicated Host/s that the reservation will be associated with.

      

    
      - *(string) --* 

      
  
    :type LimitPrice: string
    :param LimitPrice: 

      The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request will fail. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is ``USD`` . For example, to indicate a limit price of USD 100, specify 100.00.

      

    
    :type OfferingId: string
    :param OfferingId: **[REQUIRED]** 

      The ID of the offering.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ClientToken': 'string',
            'CurrencyCode': 'USD',
            'Purchase': [
                {
                    'CurrencyCode': 'USD',
                    'Duration': 123,
                    'HostIdSet': [
                        'string',
                    ],
                    'HostReservationId': 'string',
                    'HourlyPrice': 'string',
                    'InstanceFamily': 'string',
                    'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
                    'UpfrontPrice': 'string'
                },
            ],
            'TotalHourlyPrice': 'string',
            'TotalUpfrontPrice': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **ClientToken** *(string) --* 

          Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide*  

          
        

        - **CurrencyCode** *(string) --* 

          The currency in which the ``totalUpfrontPrice`` and ``totalHourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

          
        

        - **Purchase** *(list) --* 

          Describes the details of the purchase.

          
          

          - *(dict) --* 

            Describes the result of the purchase.

            
            

            - **CurrencyCode** *(string) --* 

              The currency in which the ``UpfrontPrice`` and ``HourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD`` .

              
            

            - **Duration** *(integer) --* 

              The duration of the reservation's term in seconds.

              
            

            - **HostIdSet** *(list) --* 

              The IDs of the Dedicated Hosts associated with the reservation.

              
              

              - *(string) --* 
          
            

            - **HostReservationId** *(string) --* 

              The ID of the reservation.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price of the reservation per hour.

              
            

            - **InstanceFamily** *(string) --* 

              The instance family on the Dedicated Host that the reservation can be associated with.

              
            

            - **PaymentOption** *(string) --* 

              The payment option for the reservation.

              
            

            - **UpfrontPrice** *(string) --* 

              The upfront price of the reservation.

              
        
      
        

        - **TotalHourlyPrice** *(string) --* 

          The total hourly price of the reservation calculated per hour.

          
        

        - **TotalUpfrontPrice** *(string) --* 

          The total amount that will be charged to your account when you purchase the reservation.

          
    

  .. py:method:: purchase_reserved_instances_offering(**kwargs)

    

    Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

     

    Use  DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with  DescribeReservedInstances .

     

    For more information, see `Reserved Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html>`_ and `Reserved Instance Marketplace <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering>`_    


    **Request Syntax** 
    ::

      response = client.purchase_reserved_instances_offering(
          InstanceCount=123,
          ReservedInstancesOfferingId='string',
          DryRun=True|False,
          LimitPrice={
              'Amount': 123.0,
              'CurrencyCode': 'USD'
          }
      )
    :type InstanceCount: integer
    :param InstanceCount: **[REQUIRED]** 

      The number of Reserved Instances to purchase.

      

    
    :type ReservedInstancesOfferingId: string
    :param ReservedInstancesOfferingId: **[REQUIRED]** 

      The ID of the Reserved Instance offering to purchase.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type LimitPrice: dict
    :param LimitPrice: 

      Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

      

    
      - **Amount** *(float) --* 

        Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).

        

      
      - **CurrencyCode** *(string) --* 

        The currency in which the ``limitPrice`` amount is specified. At this time, the only supported currency is ``USD`` .

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of PurchaseReservedInstancesOffering.

        
        

        - **ReservedInstancesId** *(string) --* 

          The IDs of the purchased Reserved Instances.

          
    

  .. py:method:: purchase_scheduled_instances(**kwargs)

    

    Purchases one or more Scheduled Instances with the specified schedule.

     

    Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call  DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call  RunScheduledInstances during each scheduled time period.

     

    After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances>`_    


    **Request Syntax** 
    ::

      response = client.purchase_scheduled_instances(
          ClientToken='string',
          DryRun=True|False,
          PurchaseRequests=[
              {
                  'InstanceCount': 123,
                  'PurchaseToken': 'string'
              },
          ]
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

      This field is autopopulated if not provided.

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PurchaseRequests: list
    :param PurchaseRequests: **[REQUIRED]** 

      One or more purchase requests.

      

    
      - *(dict) --* 

        Describes a request to purchase Scheduled Instances.

        

      
        - **InstanceCount** *(integer) --* **[REQUIRED]** 

          The number of instances.

          

        
        - **PurchaseToken** *(string) --* **[REQUIRED]** 

          The purchase token.

          

        
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ScheduledInstanceSet': [
                {
                    'AvailabilityZone': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'HourlyPrice': 'string',
                    'InstanceCount': 123,
                    'InstanceType': 'string',
                    'NetworkPlatform': 'string',
                    'NextSlotStartTime': datetime(2015, 1, 1),
                    'Platform': 'string',
                    'PreviousSlotEndTime': datetime(2015, 1, 1),
                    'Recurrence': {
                        'Frequency': 'string',
                        'Interval': 123,
                        'OccurrenceDaySet': [
                            123,
                        ],
                        'OccurrenceRelativeToEnd': True|False,
                        'OccurrenceUnit': 'string'
                    },
                    'ScheduledInstanceId': 'string',
                    'SlotDurationInHours': 123,
                    'TermEndDate': datetime(2015, 1, 1),
                    'TermStartDate': datetime(2015, 1, 1),
                    'TotalScheduledInstanceHours': 123
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of PurchaseScheduledInstances.

        
        

        - **ScheduledInstanceSet** *(list) --* 

          Information about the Scheduled Instances.

          
          

          - *(dict) --* 

            Describes a Scheduled Instance.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **CreateDate** *(datetime) --* 

              The date when the Scheduled Instance was purchased.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price for a single instance.

              
            

            - **InstanceCount** *(integer) --* 

              The number of instances.

              
            

            - **InstanceType** *(string) --* 

              The instance type.

              
            

            - **NetworkPlatform** *(string) --* 

              The network platform (``EC2-Classic`` or ``EC2-VPC`` ).

              
            

            - **NextSlotStartTime** *(datetime) --* 

              The time for the next schedule to start.

              
            

            - **Platform** *(string) --* 

              The platform (``Linux/UNIX`` or ``Windows`` ).

              
            

            - **PreviousSlotEndTime** *(datetime) --* 

              The time that the previous schedule ended or will end.

              
            

            - **Recurrence** *(dict) --* 

              The schedule recurrence.

              
              

              - **Frequency** *(string) --* 

                The frequency (``Daily`` , ``Weekly`` , or ``Monthly`` ).

                
              

              - **Interval** *(integer) --* 

                The interval quantity. The interval unit depends on the value of ``frequency`` . For example, every 2 weeks or every 2 months.

                
              

              - **OccurrenceDaySet** *(list) --* 

                The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

                
                

                - *(integer) --* 
            
              

              - **OccurrenceRelativeToEnd** *(boolean) --* 

                Indicates whether the occurrence is relative to the end of the specified week or month.

                
              

              - **OccurrenceUnit** *(string) --* 

                The unit for ``occurrenceDaySet`` (``DayOfWeek`` or ``DayOfMonth`` ).

                
          
            

            - **ScheduledInstanceId** *(string) --* 

              The Scheduled Instance ID.

              
            

            - **SlotDurationInHours** *(integer) --* 

              The number of hours in the schedule.

              
            

            - **TermEndDate** *(datetime) --* 

              The end date for the Scheduled Instance.

              
            

            - **TermStartDate** *(datetime) --* 

              The start date for the Scheduled Instance.

              
            

            - **TotalScheduledInstanceHours** *(integer) --* 

              The total number of hours for a single instance for the entire term.

              
        
      
    

    **Examples** 

    This example purchases a Scheduled Instance.
    ::

      response = client.purchase_scheduled_instances(
          PurchaseRequests=[
              {
                  'InstanceCount': 1,
                  'PurchaseToken': 'eyJ2IjoiMSIsInMiOjEsImMiOi...',
              },
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ScheduledInstanceSet': [
              {
                  'AvailabilityZone': 'us-west-2b',
                  'CreateDate': datetime(2016, 1, 25, 21, 43, 38, 0, 25, 0),
                  'HourlyPrice': '0.095',
                  'InstanceCount': 1,
                  'InstanceType': 'c4.large',
                  'NetworkPlatform': 'EC2-VPC',
                  'NextSlotStartTime': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
                  'Platform': 'Linux/UNIX',
                  'Recurrence': {
                      'Frequency': 'Weekly',
                      'Interval': 1,
                      'OccurrenceDaySet': [
                          1,
                      ],
                      'OccurrenceRelativeToEnd': False,
                      'OccurrenceUnit': '',
                  },
                  'ScheduledInstanceId': 'sci-1234-1234-1234-1234-123456789012',
                  'SlotDurationInHours': 32,
                  'TermEndDate': datetime(2017, 1, 31, 9, 0, 0, 1, 31, 0),
                  'TermStartDate': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
                  'TotalScheduledInstanceHours': 1696,
              },
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: reboot_instances(**kwargs)

    

    Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

     

    If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

     

    For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_    


    **Request Syntax** 
    ::

      response = client.reboot_instances(
          InstanceIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: register_image(**kwargs)

    

    Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see `Creating Your Own AMIs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    .. note::

       

      For Amazon EBS-backed instances,  CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.

       

     

    You can also use ``RegisterImage`` to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see `Launching a Linux Instance from a Backup <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.

     

    Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see  CreateImage .

     

    If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage>`_    


    **Request Syntax** 
    ::

      response = client.register_image(
          ImageLocation='string',
          Architecture='i386'|'x86_64',
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          Description='string',
          DryRun=True|False,
          EnaSupport=True|False,
          KernelId='string',
          Name='string',
          BillingProducts=[
              'string',
          ],
          RamdiskId='string',
          RootDeviceName='string',
          SriovNetSupport='string',
          VirtualizationType='string'
      )
    :type ImageLocation: string
    :param ImageLocation: 

      The full path to your AMI manifest in Amazon S3 storage.

      

    
    :type Architecture: string
    :param Architecture: 

      The architecture of the AMI.

       

      Default: For Amazon EBS-backed AMIs, ``i386`` . For instance store-backed AMIs, the architecture specified in the manifest file.

      

    
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      One or more block device mapping entries.

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type Description: string
    :param Description: 

      A description for your AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EnaSupport: boolean
    :param EnaSupport: 

      Set to ``true`` to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

       

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

      

    
    :type KernelId: string
    :param KernelId: 

      The ID of the kernel.

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      A name for your AMI.

       

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

      

    
    :type BillingProducts: list
    :param BillingProducts: 

      The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.

      

    
      - *(string) --* 

      
  
    :type RamdiskId: string
    :param RamdiskId: 

      The ID of the RAM disk.

      

    
    :type RootDeviceName: string
    :param RootDeviceName: 

      The name of the root device (for example, ``/dev/sda1`` , or ``/dev/xvda`` ).

      

    
    :type SriovNetSupport: string
    :param SriovNetSupport: 

      Set to ``simple`` to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

       

      There is no way to disable ``sriovNetSupport`` at this time.

       

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

      

    
    :type VirtualizationType: string
    :param VirtualizationType: 

      The type of virtualization.

       

      Default: ``paravirtual``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ImageId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RegisterImage.

        
        

        - **ImageId** *(string) --* 

          The ID of the newly registered AMI.

          
    

  .. py:method:: reject_vpc_peering_connection(**kwargs)

    

    Rejects a VPC peering connection request. The VPC peering connection must be in the ``pending-acceptance`` state. Use the  DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use  DeleteVpcPeeringConnection .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = client.reject_vpc_peering_connection(
          DryRun=True|False,
          VpcPeeringConnectionId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: **[REQUIRED]** 

      The ID of the VPC peering connection.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RejectVpcPeeringConnection.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: release_address(**kwargs)

    

    Releases the specified Elastic IP address.

     

    [EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use  DisassociateAddress .

     

    [Nondefault VPC] You must use  DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (``InvalidIPAddress.InUse`` ).

     

    After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an ``AuthFailure`` error if the address is already allocated to another AWS account.

     

    [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see  AllocateAddress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress>`_    


    **Request Syntax** 
    ::

      response = client.release_address(
          AllocationId='string',
          PublicIp='string',
          DryRun=True|False
      )
    :type AllocationId: string
    :param AllocationId: 

      [EC2-VPC] The allocation ID. Required for EC2-VPC.

      

    
    :type PublicIp: string
    :param PublicIp: 

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example releases an Elastic IP address for use with instances in a VPC.
    ::

      response = client.release_address(
          AllocationId='eipalloc-64d5890a',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example releases an Elastic IP address for use with instances in EC2-Classic.
    ::

      response = client.release_address(
          PublicIp='198.51.100.0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: release_hosts(**kwargs)

    

    When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into ``released`` state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, e.g., ModifyHosts. You must stop or terminate all instances on a host before it can be released.

     

    When Dedicated Hosts are released, it make take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated hosts. Try waiting a few minutes, and then try again.

     

    Released hosts will still appear in a  DescribeHosts response.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts>`_    


    **Request Syntax** 
    ::

      response = client.release_hosts(
          HostIds=[
              'string',
          ]
      )
    :type HostIds: list
    :param HostIds: **[REQUIRED]** 

      The IDs of the Dedicated Hosts you want to release.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Successful': [
                'string',
            ],
            'Unsuccessful': [
                {
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'ResourceId': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ReleaseHosts.

        
        

        - **Successful** *(list) --* 

          The IDs of the Dedicated Hosts that were successfully released.

          
          

          - *(string) --* 
      
        

        - **Unsuccessful** *(list) --* 

          The IDs of the Dedicated Hosts that could not be released, including an error message.

          
          

          - *(dict) --* 

            Information about items that were not successfully processed in a batch call.

            
            

            - **Error** *(dict) --* 

              Information about the error.

              
              

              - **Code** *(string) --* 

                The error code.

                
              

              - **Message** *(string) --* 

                The error message accompanying the error code.

                
          
            

            - **ResourceId** *(string) --* 

              The ID of the resource.

              
        
      
    

  .. py:method:: replace_iam_instance_profile_association(**kwargs)

    

    Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.

     

    Use  DescribeIamInstanceProfileAssociations to get the association ID.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation>`_    


    **Request Syntax** 
    ::

      response = client.replace_iam_instance_profile_association(
          IamInstanceProfile={
              'Arn': 'string',
              'Name': 'string'
          },
          AssociationId='string'
      )
    :type IamInstanceProfile: dict
    :param IamInstanceProfile: **[REQUIRED]** 

      The IAM instance profile.

      

    
      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        

      
      - **Name** *(string) --* 

        The name of the instance profile.

        

      
    
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The ID of the existing IAM instance profile association.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'IamInstanceProfileAssociation': {
                'AssociationId': 'string',
                'InstanceId': 'string',
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Id': 'string'
                },
                'State': 'associating'|'associated'|'disassociating'|'disassociated',
                'Timestamp': datetime(2015, 1, 1)
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **IamInstanceProfileAssociation** *(dict) --* 

          Information about the IAM instance profile association.

          
          

          - **AssociationId** *(string) --* 

            The ID of the association.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **IamInstanceProfile** *(dict) --* 

            The IAM instance profile.

            
            

            - **Arn** *(string) --* 

              The Amazon Resource Name (ARN) of the instance profile.

              
            

            - **Id** *(string) --* 

              The ID of the instance profile.

              
        
          

          - **State** *(string) --* 

            The state of the association.

            
          

          - **Timestamp** *(datetime) --* 

            The time the IAM instance profile was associated with the instance.

            
      
    

  .. py:method:: replace_network_acl_association(**kwargs)

    

    Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation>`_    


    **Request Syntax** 
    ::

      response = client.replace_network_acl_association(
          AssociationId='string',
          DryRun=True|False,
          NetworkAclId='string'
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The ID of the current association between the original network ACL and the subnet.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkAclId: string
    :param NetworkAclId: **[REQUIRED]** 

      The ID of the new network ACL to associate with the subnet.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NewAssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ReplaceNetworkAclAssociation.

        
        

        - **NewAssociationId** *(string) --* 

          The ID of the new association.

          
    

    **Examples** 

    This example associates the specified network ACL with the subnet for the specified network ACL association.
    ::

      response = client.replace_network_acl_association(
          AssociationId='aclassoc-e5b95c8c',
          NetworkAclId='acl-5fb85d36',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NewAssociationId': 'aclassoc-3999875b',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: replace_network_acl_entry(**kwargs)

    

    Replaces an entry (rule) in a network ACL. For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = client.replace_network_acl_entry(
          CidrBlock='string',
          DryRun=True|False,
          Egress=True|False,
          IcmpTypeCode={
              'Code': 123,
              'Type': 123
          },
          Ipv6CidrBlock='string',
          NetworkAclId='string',
          PortRange={
              'From': 123,
              'To': 123
          },
          Protocol='string',
          RuleAction='allow'|'deny',
          RuleNumber=123
      )
    :type CidrBlock: string
    :param CidrBlock: 

      The IPv4 network range to allow or deny, in CIDR notation (for example ``172.16.0.0/24`` ).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether to replace the egress rule.

       

      Default: If no value is specified, we replace the ingress rule.

      

    
    :type IcmpTypeCode: dict
    :param IcmpTypeCode: 

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      

    
      - **Code** *(integer) --* 

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

        

      
      - **Type** *(integer) --* 

        The ICMP type. A value of -1 means all types.

        

      
    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range to allow or deny, in CIDR notation (for example ``2001:bd8:1234:1a00::/64`` ).

      

    
    :type NetworkAclId: string
    :param NetworkAclId: **[REQUIRED]** 

      The ID of the ACL.

      

    
    :type PortRange: dict
    :param PortRange: 

      TCP or UDP protocols: The range of ports the rule applies to. Required if specifying TCP (6) or UDP (17) for the protocol.

      

    
      - **From** *(integer) --* 

        The first port in the range.

        

      
      - **To** *(integer) --* 

        The last port in the range.

        

      
    
    :type Protocol: string
    :param Protocol: **[REQUIRED]** 

      The IP protocol. You can specify ``all`` or ``-1`` to mean all protocols. If you specify ``all`` , ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , or ``icmp`` , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

      

    
    :type RuleAction: string
    :param RuleAction: **[REQUIRED]** 

      Indicates whether to allow or deny the traffic that matches the rule.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number of the entry to replace.

      

    
    
    :returns: None

    **Examples** 

    This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.
    ::

      response = client.replace_network_acl_entry(
          CidrBlock='203.0.113.12/24',
          Egress=False,
          NetworkAclId='acl-5fb85d36',
          PortRange={
              'From': 53,
              'To': 53,
          },
          Protocol='udp',
          RuleAction='allow',
          RuleNumber=100,
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: replace_route(**kwargs)

    

    Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute>`_    


    **Request Syntax** 
    ::

      response = client.replace_route(
          DestinationCidrBlock='string',
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          EgressOnlyInternetGatewayId='string',
          GatewayId='string',
          InstanceId='string',
          NatGatewayId='string',
          NetworkInterfaceId='string',
          RouteTableId='string',
          VpcPeeringConnectionId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: 

      The IPv4 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.

      

    
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayId: string
    :param EgressOnlyInternetGatewayId: 

      [IPv6 traffic only] The ID of an egress-only Internet gateway.

      

    
    :type GatewayId: string
    :param GatewayId: 

      The ID of an Internet gateway or virtual private gateway.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of a NAT instance in your VPC.

      

    
    :type NatGatewayId: string
    :param NatGatewayId: 

      [IPv4 traffic only] The ID of a NAT gateway.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      The ID of a network interface.

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the route table.

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: 

      The ID of a VPC peering connection.

      

    
    
    :returns: None

    **Examples** 

    This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.
    ::

      response = client.replace_route(
          DestinationCidrBlock='10.0.0.0/16',
          GatewayId='vgw-9a4cacf3',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: replace_route_table_association(**kwargs)

    

    Changes the route table associated with a given subnet in a VPC. After the operation completes, the subnet uses the routes in the new route table it's associated with. For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can also use ReplaceRouteTableAssociation to change which table is the main route table in the VPC. You just specify the main route table's association ID and the route table to be the new main route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation>`_    


    **Request Syntax** 
    ::

      response = client.replace_route_table_association(
          AssociationId='string',
          DryRun=True|False,
          RouteTableId='string'
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The association ID.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the new route table to associate with the subnet.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NewAssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ReplaceRouteTableAssociation.

        
        

        - **NewAssociationId** *(string) --* 

          The ID of the new association.

          
    

    **Examples** 

    This example associates the specified route table with the subnet for the specified route table association.
    ::

      response = client.replace_route_table_association(
          AssociationId='rtbassoc-781d0d1a',
          RouteTableId='rtb-22574640',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'NewAssociationId': 'rtbassoc-3a1f0f58',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: report_instance_status(**kwargs)

    

    Submits feedback about the status of an instance. The instance must be in the ``running`` state. If your experience with the instance differs from the instance status returned by  DescribeInstanceStatus , use  ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

     

    Use of this action does not change the value returned by  DescribeInstanceStatus .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus>`_    


    **Request Syntax** 
    ::

      response = client.report_instance_status(
          Description='string',
          DryRun=True|False,
          EndTime=datetime(2015, 1, 1),
          Instances=[
              'string',
          ],
          ReasonCodes=[
              'instance-stuck-in-state'|'unresponsive'|'not-accepting-credentials'|'password-not-available'|'performance-network'|'performance-instance-store'|'performance-ebs-volume'|'performance-other'|'other',
          ],
          StartTime=datetime(2015, 1, 1),
          Status='ok'|'impaired'
      )
    :type Description: string
    :param Description: 

      Descriptive text about the health state of your instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EndTime: datetime
    :param EndTime: 

      The time at which the reported instance health state ended.

      

    
    :type Instances: list
    :param Instances: **[REQUIRED]** 

      One or more instances.

      

    
      - *(string) --* 

      
  
    :type ReasonCodes: list
    :param ReasonCodes: **[REQUIRED]** 

      One or more reason codes that describes the health state of your instance.

       

       
      * ``instance-stuck-in-state`` : My instance is stuck in a state. 
       
      * ``unresponsive`` : My instance is unresponsive. 
       
      * ``not-accepting-credentials`` : My instance is not accepting my credentials. 
       
      * ``password-not-available`` : A password is not available for my instance. 
       
      * ``performance-network`` : My instance is experiencing performance problems which I believe are network related. 
       
      * ``performance-instance-store`` : My instance is experiencing performance problems which I believe are related to the instance stores. 
       
      * ``performance-ebs-volume`` : My instance is experiencing performance problems which I believe are related to an EBS volume. 
       
      * ``performance-other`` : My instance is experiencing performance problems. 
       
      * ``other`` : [explain using the description parameter] 
       

      

    
      - *(string) --* 

      
  
    :type StartTime: datetime
    :param StartTime: 

      The time at which the reported instance health state began.

      

    
    :type Status: string
    :param Status: **[REQUIRED]** 

      The status of all instances listed.

      

    
    
    :returns: None

  .. py:method:: request_spot_fleet(**kwargs)

    

    Creates a Spot fleet request.

     

    You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

     

    By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.

     

    Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.

     

    For more information, see `Spot Fleet Requests <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet>`_    


    **Request Syntax** 
    ::

      response = client.request_spot_fleet(
          DryRun=True|False,
          SpotFleetRequestConfig={
              'AllocationStrategy': 'lowestPrice'|'diversified',
              'ClientToken': 'string',
              'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
              'FulfilledCapacity': 123.0,
              'IamFleetRole': 'string',
              'LaunchSpecifications': [
                  {
                      'SecurityGroups': [
                          {
                              'GroupName': 'string',
                              'GroupId': 'string'
                          },
                      ],
                      'AddressingType': 'string',
                      'BlockDeviceMappings': [
                          {
                              'DeviceName': 'string',
                              'VirtualName': 'string',
                              'Ebs': {
                                  'Encrypted': True|False,
                                  'DeleteOnTermination': True|False,
                                  'Iops': 123,
                                  'SnapshotId': 'string',
                                  'VolumeSize': 123,
                                  'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                              },
                              'NoDevice': 'string'
                          },
                      ],
                      'EbsOptimized': True|False,
                      'IamInstanceProfile': {
                          'Arn': 'string',
                          'Name': 'string'
                      },
                      'ImageId': 'string',
                      'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                      'KernelId': 'string',
                      'KeyName': 'string',
                      'Monitoring': {
                          'Enabled': True|False
                      },
                      'NetworkInterfaces': [
                          {
                              'AssociatePublicIpAddress': True|False,
                              'DeleteOnTermination': True|False,
                              'Description': 'string',
                              'DeviceIndex': 123,
                              'Groups': [
                                  'string',
                              ],
                              'Ipv6AddressCount': 123,
                              'Ipv6Addresses': [
                                  {
                                      'Ipv6Address': 'string'
                                  },
                              ],
                              'NetworkInterfaceId': 'string',
                              'PrivateIpAddress': 'string',
                              'PrivateIpAddresses': [
                                  {
                                      'Primary': True|False,
                                      'PrivateIpAddress': 'string'
                                  },
                              ],
                              'SecondaryPrivateIpAddressCount': 123,
                              'SubnetId': 'string'
                          },
                      ],
                      'Placement': {
                          'AvailabilityZone': 'string',
                          'GroupName': 'string',
                          'Tenancy': 'default'|'dedicated'|'host'
                      },
                      'RamdiskId': 'string',
                      'SpotPrice': 'string',
                      'SubnetId': 'string',
                      'UserData': 'string',
                      'WeightedCapacity': 123.0,
                      'TagSpecifications': [
                          {
                              'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                              'Tags': [
                                  {
                                      'Key': 'string',
                                      'Value': 'string'
                                  },
                              ]
                          },
                      ]
                  },
              ],
              'SpotPrice': 'string',
              'TargetCapacity': 123,
              'TerminateInstancesWithExpiration': True|False,
              'Type': 'request'|'maintain',
              'ValidFrom': datetime(2015, 1, 1),
              'ValidUntil': datetime(2015, 1, 1),
              'ReplaceUnhealthyInstances': True|False
          }
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotFleetRequestConfig: dict
    :param SpotFleetRequestConfig: **[REQUIRED]** 

      The configuration for the Spot fleet request.

      

    
      - **AllocationStrategy** *(string) --* 

        Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is ``lowestPrice`` .

        

      
      - **ClientToken** *(string) --* 

        A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

        

      
      - **ExcessCapacityTerminationPolicy** *(string) --* 

        Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

        

      
      - **FulfilledCapacity** *(float) --* 

        The number of units fulfilled by this request compared to the set target capacity.

        

      
      - **IamFleetRole** *(string) --* **[REQUIRED]** 

        Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using  CancelSpotFleetRequests or when the Spot fleet request expires, if you set ``terminateInstancesWithExpiration`` .

        

      
      - **LaunchSpecifications** *(list) --* **[REQUIRED]** 

        Information about the launch specifications for the Spot fleet request.

        

      
        - *(dict) --* 

          Describes the launch specification for one or more Spot instances.

          

        
          - **SecurityGroups** *(list) --* 

            One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

            

          
            - *(dict) --* 

              Describes a security group.

              

            
              - **GroupName** *(string) --* 

                The name of the security group.

                

              
              - **GroupId** *(string) --* 

                The ID of the security group.

                

              
            
        
          - **AddressingType** *(string) --* 

            Deprecated.

            

          
          - **BlockDeviceMappings** *(list) --* 

            One or more block device mapping entries.

            

          
            - *(dict) --* 

              Describes a block device mapping.

              

            
              - **DeviceName** *(string) --* 

                The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                

              
              - **VirtualName** *(string) --* 

                The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                 

                Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                

              
              - **Ebs** *(dict) --* 

                Parameters used to automatically set up EBS volumes when the instance is launched.

                

              
                - **Encrypted** *(boolean) --* 

                  Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                  

                
                - **DeleteOnTermination** *(boolean) --* 

                  Indicates whether the EBS volume is deleted on instance termination.

                  

                
                - **Iops** *(integer) --* 

                  The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                   

                  Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                   

                  Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                  

                
                - **SnapshotId** *(string) --* 

                  The ID of the snapshot.

                  

                
                - **VolumeSize** *(integer) --* 

                  The size of the volume, in GiB.

                   

                  Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                   

                  Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                  

                
                - **VolumeType** *(string) --* 

                  The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                   

                  Default: ``standard``  

                  

                
              
              - **NoDevice** *(string) --* 

                Suppresses the specified device included in the block device mapping of the AMI.

                

              
            
        
          - **EbsOptimized** *(boolean) --* 

            Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

             

            Default: ``false``  

            

          
          - **IamInstanceProfile** *(dict) --* 

            The IAM instance profile.

            

          
            - **Arn** *(string) --* 

              The Amazon Resource Name (ARN) of the instance profile.

              

            
            - **Name** *(string) --* 

              The name of the instance profile.

              

            
          
          - **ImageId** *(string) --* 

            The ID of the AMI.

            

          
          - **InstanceType** *(string) --* 

            The instance type. Note that T2 and HS1 instance types are not supported.

            

          
          - **KernelId** *(string) --* 

            The ID of the kernel.

            

          
          - **KeyName** *(string) --* 

            The name of the key pair.

            

          
          - **Monitoring** *(dict) --* 

            Enable or disable monitoring for the instances.

            

          
            - **Enabled** *(boolean) --* 

              Enables monitoring for the instance.

               

              Default: ``false``  

              

            
          
          - **NetworkInterfaces** *(list) --* 

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            

          
            - *(dict) --* 

              Describes a network interface.

              

            
              - **AssociatePublicIpAddress** *(boolean) --* 

                Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

                

              
              - **DeleteOnTermination** *(boolean) --* 

                If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

                

              
              - **Description** *(string) --* 

                The description of the network interface. Applies only if creating a network interface when launching an instance.

                

              
              - **DeviceIndex** *(integer) --* 

                The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

                

              
              - **Groups** *(list) --* 

                The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                

              
                - *(string) --* 

                
            
              - **Ipv6AddressCount** *(integer) --* 

                A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                

              
              - **Ipv6Addresses** *(list) --* 

                One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                

              
                - *(dict) --* 

                  Describes an IPv6 address.

                  

                
                  - **Ipv6Address** *(string) --* 

                    The IPv6 address.

                    

                  
                
            
              - **NetworkInterfaceId** *(string) --* 

                The ID of the network interface.

                

              
              - **PrivateIpAddress** *(string) --* 

                The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                

              
              - **PrivateIpAddresses** *(list) --* 

                One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                

              
                - *(dict) --* 

                  Describes a secondary private IPv4 address for a network interface.

                  

                
                  - **Primary** *(boolean) --* 

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                    

                  
                  - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

                    The private IPv4 addresses.

                    

                  
                
            
              - **SecondaryPrivateIpAddressCount** *(integer) --* 

                The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                

              
              - **SubnetId** *(string) --* 

                The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

                

              
            
        
          - **Placement** *(dict) --* 

            The placement information.

            

          
            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

               

              [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

              

            
            - **GroupName** *(string) --* 

              The name of the placement group (for cluster instances).

              

            
            - **Tenancy** *(string) --* 

              The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

              

            
          
          - **RamdiskId** *(string) --* 

            The ID of the RAM disk.

            

          
          - **SpotPrice** *(string) --* 

            The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of ``WeightedCapacity`` .

            

          
          - **SubnetId** *(string) --* 

            The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".

            

          
          - **UserData** *(string) --* 

            The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

            

          
          - **WeightedCapacity** *(float) --* 

            The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).

             

            If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.

            

          
          - **TagSpecifications** *(list) --* 

            The tags to apply during creation.

            

          
            - *(dict) --* 

              The tags for a Spot fleet resource.

              

            
              - **ResourceType** *(string) --* 

                The type of resource. Currently, the only resource type that is supported is ``instance`` .

                

              
              - **Tags** *(list) --* 

                The tags.

                

              
                - *(dict) --* 

                  Describes a tag.

                  

                
                  - **Key** *(string) --* 

                    The key of the tag.

                     

                    Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                    

                  
                  - **Value** *(string) --* 

                    The value of the tag.

                     

                    Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                    

                  
                
            
            
        
        
    
      - **SpotPrice** *(string) --* **[REQUIRED]** 

        The bid price per unit hour.

        

      
      - **TargetCapacity** *(integer) --* **[REQUIRED]** 

        The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.

        

      
      - **TerminateInstancesWithExpiration** *(boolean) --* 

        Indicates whether running Spot instances should be terminated when the Spot fleet request expires.

        

      
      - **Type** *(string) --* 

        The type of request. Indicates whether the fleet will only ``request`` the target capacity or also attempt to ``maintain`` it. When you ``request`` a certain target capacity, the fleet will only place the required bids. It will not attempt to replenish Spot instances if capacity is diminished, nor will it submit bids in alternative Spot pools if capacity is not available. When you want to ``maintain`` a certain target capacity, fleet will place the required bids to meet this target capacity. It will also automatically replenish any interrupted instances. Default: ``maintain`` .

        

      
      - **ValidFrom** *(datetime) --* 

        The start date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). The default is to start fulfilling the request immediately.

        

      
      - **ValidUntil** *(datetime) --* 

        The end date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.

        

      
      - **ReplaceUnhealthyInstances** *(boolean) --* 

        Indicates whether Spot fleet should replace unhealthy instances.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotFleetRequestId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RequestSpotFleet.

        
        

        - **SpotFleetRequestId** *(string) --* 

          The ID of the Spot fleet request.

          
    

    **Examples** 

    This example creates a Spot fleet request with two launch specifications that differ only by subnet. The Spot fleet launches the instances in the specified subnet with the lowest price. If the instances are launched in a default VPC, they receive a public IP address by default. If the instances are launched in a nondefault VPC, they do not receive a public IP address by default. Note that you can't specify different subnets from the same Availability Zone in a Spot fleet request.
    ::

      response = client.request_spot_fleet(
          SpotFleetRequestConfig={
              'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
              'LaunchSpecifications': [
                  {
                      'IamInstanceProfile': {
                          'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
                      },
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'm3.medium',
                      'KeyName': 'my-key-pair',
                      'SecurityGroups': [
                          {
                              'GroupId': 'sg-1a2b3c4d',
                          },
                      ],
                      'SubnetId': 'subnet-1a2b3c4d, subnet-3c4d5e6f',
                  },
              ],
              'SpotPrice': '0.04',
              'TargetCapacity': 2,
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example creates a Spot fleet request with two launch specifications that differ only by Availability Zone. The Spot fleet launches the instances in the specified Availability Zone with the lowest price. If your account supports EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of the Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the Availability Zone.
    ::

      response = client.request_spot_fleet(
          SpotFleetRequestConfig={
              'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
              'LaunchSpecifications': [
                  {
                      'IamInstanceProfile': {
                          'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
                      },
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'm3.medium',
                      'KeyName': 'my-key-pair',
                      'Placement': {
                          'AvailabilityZone': 'us-west-2a, us-west-2b',
                      },
                      'SecurityGroups': [
                          {
                              'GroupId': 'sg-1a2b3c4d',
                          },
                      ],
                  },
              ],
              'SpotPrice': '0.04',
              'TargetCapacity': 2,
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example assigns public addresses to instances launched in a nondefault VPC. Note that when you specify a network interface, you must include the subnet ID and security group ID using the network interface.
    ::

      response = client.request_spot_fleet(
          SpotFleetRequestConfig={
              'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
              'LaunchSpecifications': [
                  {
                      'IamInstanceProfile': {
                          'Arn': 'arn:aws:iam::880185128111:instance-profile/my-iam-role',
                      },
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'm3.medium',
                      'KeyName': 'my-key-pair',
                      'NetworkInterfaces': [
                          {
                              'AssociatePublicIpAddress': True,
                              'DeviceIndex': 0,
                              'Groups': [
                                  'sg-1a2b3c4d',
                              ],
                              'SubnetId': 'subnet-1a2b3c4d',
                          },
                      ],
                  },
              ],
              'SpotPrice': '0.04',
              'TargetCapacity': 2,
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example creates a Spot fleet request that launches 30 instances using the diversified allocation strategy. The launch specifications differ by instance type. The Spot fleet distributes the instances across the launch specifications such that there are 10 instances of each type.
    ::

      response = client.request_spot_fleet(
          SpotFleetRequestConfig={
              'AllocationStrategy': 'diversified',
              'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
              'LaunchSpecifications': [
                  {
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'c4.2xlarge',
                      'SubnetId': 'subnet-1a2b3c4d',
                  },
                  {
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'm3.2xlarge',
                      'SubnetId': 'subnet-1a2b3c4d',
                  },
                  {
                      'ImageId': 'ami-1a2b3c4d',
                      'InstanceType': 'r3.2xlarge',
                      'SubnetId': 'subnet-1a2b3c4d',
                  },
              ],
              'SpotPrice': '0.70',
              'TargetCapacity': 30,
          },
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: request_spot_instances(**kwargs)

    

    Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see `Spot Instance Requests <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances>`_    


    **Request Syntax** 
    ::

      response = client.request_spot_instances(
          AvailabilityZoneGroup='string',
          BlockDurationMinutes=123,
          ClientToken='string',
          DryRun=True|False,
          InstanceCount=123,
          LaunchGroup='string',
          LaunchSpecification={
              'SecurityGroupIds': [
                  'string',
              ],
              'SecurityGroups': [
                  'string',
              ],
              'AddressingType': 'string',
              'BlockDeviceMappings': [
                  {
                      'DeviceName': 'string',
                      'VirtualName': 'string',
                      'Ebs': {
                          'Encrypted': True|False,
                          'DeleteOnTermination': True|False,
                          'Iops': 123,
                          'SnapshotId': 'string',
                          'VolumeSize': 123,
                          'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                      },
                      'NoDevice': 'string'
                  },
              ],
              'EbsOptimized': True|False,
              'IamInstanceProfile': {
                  'Arn': 'string',
                  'Name': 'string'
              },
              'ImageId': 'string',
              'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
              'KernelId': 'string',
              'KeyName': 'string',
              'Monitoring': {
                  'Enabled': True|False
              },
              'NetworkInterfaces': [
                  {
                      'AssociatePublicIpAddress': True|False,
                      'DeleteOnTermination': True|False,
                      'Description': 'string',
                      'DeviceIndex': 123,
                      'Groups': [
                          'string',
                      ],
                      'Ipv6AddressCount': 123,
                      'Ipv6Addresses': [
                          {
                              'Ipv6Address': 'string'
                          },
                      ],
                      'NetworkInterfaceId': 'string',
                      'PrivateIpAddress': 'string',
                      'PrivateIpAddresses': [
                          {
                              'Primary': True|False,
                              'PrivateIpAddress': 'string'
                          },
                      ],
                      'SecondaryPrivateIpAddressCount': 123,
                      'SubnetId': 'string'
                  },
              ],
              'Placement': {
                  'AvailabilityZone': 'string',
                  'GroupName': 'string',
                  'Tenancy': 'default'|'dedicated'|'host'
              },
              'RamdiskId': 'string',
              'SubnetId': 'string',
              'UserData': 'string'
          },
          SpotPrice='string',
          Type='one-time'|'persistent',
          ValidFrom=datetime(2015, 1, 1),
          ValidUntil=datetime(2015, 1, 1)
      )
    :type AvailabilityZoneGroup: string
    :param AvailabilityZoneGroup: 

      The user-specified name for a logical grouping of bids.

       

      When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.

       

      If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.

       

      Default: Instances are launched in any available Availability Zone.

      

    
    :type BlockDurationMinutes: integer
    :param BlockDurationMinutes: 

      The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

       

      The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

       

      Note that you can't specify an Availability Zone group or a launch group if you specify a duration.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see `How to Ensure Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceCount: integer
    :param InstanceCount: 

      The maximum number of Spot instances to launch.

       

      Default: 1

      

    
    :type LaunchGroup: string
    :param LaunchGroup: 

      The instance launch group. Launch groups are Spot instances that launch together and terminate together.

       

      Default: Instances are launched and terminated individually

      

    
    :type LaunchSpecification: dict
    :param LaunchSpecification: 

      The launch specification.

      

    
      - **SecurityGroupIds** *(list) --* 

        One or more security group IDs.

        

      
        - *(string) --* 

        
    
      - **SecurityGroups** *(list) --* 

        One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

        

      
        - *(string) --* 

        
    
      - **AddressingType** *(string) --* 

        Deprecated.

        

      
      - **BlockDeviceMappings** *(list) --* 

        One or more block device mapping entries.

         

        Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.

        

      
        - *(dict) --* 

          Describes a block device mapping.

          

        
          - **DeviceName** *(string) --* 

            The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

            

          
          - **VirtualName** *(string) --* 

            The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

             

            Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

            

          
          - **Ebs** *(dict) --* 

            Parameters used to automatically set up EBS volumes when the instance is launched.

            

          
            - **Encrypted** *(boolean) --* 

              Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

              

            
            - **DeleteOnTermination** *(boolean) --* 

              Indicates whether the EBS volume is deleted on instance termination.

              

            
            - **Iops** *(integer) --* 

              The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

               

              Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

               

              Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

              

            
            - **SnapshotId** *(string) --* 

              The ID of the snapshot.

              

            
            - **VolumeSize** *(integer) --* 

              The size of the volume, in GiB.

               

              Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

               

              Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

              

            
            - **VolumeType** *(string) --* 

              The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

               

              Default: ``standard``  

              

            
          
          - **NoDevice** *(string) --* 

            Suppresses the specified device included in the block device mapping of the AMI.

            

          
        
    
      - **EbsOptimized** *(boolean) --* 

        Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

         

        Default: ``false``  

        

      
      - **IamInstanceProfile** *(dict) --* 

        The IAM instance profile.

        

      
        - **Arn** *(string) --* 

          The Amazon Resource Name (ARN) of the instance profile.

          

        
        - **Name** *(string) --* 

          The name of the instance profile.

          

        
      
      - **ImageId** *(string) --* 

        The ID of the AMI.

        

      
      - **InstanceType** *(string) --* 

        The instance type.

        

      
      - **KernelId** *(string) --* 

        The ID of the kernel.

        

      
      - **KeyName** *(string) --* 

        The name of the key pair.

        

      
      - **Monitoring** *(dict) --* 

        Indicates whether basic or detailed monitoring is enabled for the instance.

         

        Default: Disabled

        

      
        - **Enabled** *(boolean) --* **[REQUIRED]** 

          Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

          

        
      
      - **NetworkInterfaces** *(list) --* 

        One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

        

      
        - *(dict) --* 

          Describes a network interface.

          

        
          - **AssociatePublicIpAddress** *(boolean) --* 

            Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

            

          
          - **DeleteOnTermination** *(boolean) --* 

            If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

            

          
          - **Description** *(string) --* 

            The description of the network interface. Applies only if creating a network interface when launching an instance.

            

          
          - **DeviceIndex** *(integer) --* 

            The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

            

          
          - **Groups** *(list) --* 

            The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

            

          
            - *(string) --* 

            
        
          - **Ipv6AddressCount** *(integer) --* 

            A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

            

          
          - **Ipv6Addresses** *(list) --* 

            One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

            

          
            - *(dict) --* 

              Describes an IPv6 address.

              

            
              - **Ipv6Address** *(string) --* 

                The IPv6 address.

                

              
            
        
          - **NetworkInterfaceId** *(string) --* 

            The ID of the network interface.

            

          
          - **PrivateIpAddress** *(string) --* 

            The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

            

          
          - **PrivateIpAddresses** *(list) --* 

            One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

            

          
            - *(dict) --* 

              Describes a secondary private IPv4 address for a network interface.

              

            
              - **Primary** *(boolean) --* 

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                

              
              - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

                The private IPv4 addresses.

                

              
            
        
          - **SecondaryPrivateIpAddressCount** *(integer) --* 

            The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

            

          
          - **SubnetId** *(string) --* 

            The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

            

          
        
    
      - **Placement** *(dict) --* 

        The placement information for the instance.

        

      
        - **AvailabilityZone** *(string) --* 

          The Availability Zone.

           

          [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

          

        
        - **GroupName** *(string) --* 

          The name of the placement group (for cluster instances).

          

        
        - **Tenancy** *(string) --* 

          The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

          

        
      
      - **RamdiskId** *(string) --* 

        The ID of the RAM disk.

        

      
      - **SubnetId** *(string) --* 

        The ID of the subnet in which to launch the instance.

        

      
      - **UserData** *(string) --* 

        The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

        

      
    
    :type SpotPrice: string
    :param SpotPrice: **[REQUIRED]** 

      The maximum hourly price (bid) for any Spot instance launched to fulfill the request.

      

    
    :type Type: string
    :param Type: 

      The Spot instance request type.

       

      Default: ``one-time``  

      

    
    :type ValidFrom: datetime
    :param ValidFrom: 

      The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

       

      Default: The request is effective indefinitely.

      

    
    :type ValidUntil: datetime
    :param ValidUntil: 

      The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

       

      Default: The request is effective indefinitely.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotInstanceRequests': [
                {
                    'ActualBlockHourlyPrice': 'string',
                    'AvailabilityZoneGroup': 'string',
                    'BlockDurationMinutes': 123,
                    'CreateTime': datetime(2015, 1, 1),
                    'Fault': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'InstanceId': 'string',
                    'LaunchGroup': 'string',
                    'LaunchSpecification': {
                        'UserData': 'string',
                        'SecurityGroups': [
                            {
                                'GroupName': 'string',
                                'GroupId': 'string'
                            },
                        ],
                        'AddressingType': 'string',
                        'BlockDeviceMappings': [
                            {
                                'DeviceName': 'string',
                                'VirtualName': 'string',
                                'Ebs': {
                                    'Encrypted': True|False,
                                    'DeleteOnTermination': True|False,
                                    'Iops': 123,
                                    'SnapshotId': 'string',
                                    'VolumeSize': 123,
                                    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                                },
                                'NoDevice': 'string'
                            },
                        ],
                        'EbsOptimized': True|False,
                        'IamInstanceProfile': {
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'ImageId': 'string',
                        'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                        'KernelId': 'string',
                        'KeyName': 'string',
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True|False,
                                'DeleteOnTermination': True|False,
                                'Description': 'string',
                                'DeviceIndex': 123,
                                'Groups': [
                                    'string',
                                ],
                                'Ipv6AddressCount': 123,
                                'Ipv6Addresses': [
                                    {
                                        'Ipv6Address': 'string'
                                    },
                                ],
                                'NetworkInterfaceId': 'string',
                                'PrivateIpAddress': 'string',
                                'PrivateIpAddresses': [
                                    {
                                        'Primary': True|False,
                                        'PrivateIpAddress': 'string'
                                    },
                                ],
                                'SecondaryPrivateIpAddressCount': 123,
                                'SubnetId': 'string'
                            },
                        ],
                        'Placement': {
                            'AvailabilityZone': 'string',
                            'GroupName': 'string',
                            'Tenancy': 'default'|'dedicated'|'host'
                        },
                        'RamdiskId': 'string',
                        'SubnetId': 'string',
                        'Monitoring': {
                            'Enabled': True|False
                        }
                    },
                    'LaunchedAvailabilityZone': 'string',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'SpotInstanceRequestId': 'string',
                    'SpotPrice': 'string',
                    'State': 'open'|'active'|'closed'|'cancelled'|'failed',
                    'Status': {
                        'Code': 'string',
                        'Message': 'string',
                        'UpdateTime': datetime(2015, 1, 1)
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'Type': 'one-time'|'persistent',
                    'ValidFrom': datetime(2015, 1, 1),
                    'ValidUntil': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RequestSpotInstances.

        
        

        - **SpotInstanceRequests** *(list) --* 

          One or more Spot instance requests.

          
          

          - *(dict) --* 

            Describes a Spot instance request.

            
            

            - **ActualBlockHourlyPrice** *(string) --* 

              If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

              
            

            - **AvailabilityZoneGroup** *(string) --* 

              The Availability Zone group. If you specify the same Availability Zone group for all Spot instance requests, all Spot instances are launched in the same Availability Zone.

              
            

            - **BlockDurationMinutes** *(integer) --* 

              The duration for the Spot instance, in minutes.

              
            

            - **CreateTime** *(datetime) --* 

              The date and time when the Spot instance request was created, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

              
            

            - **Fault** *(dict) --* 

              The fault codes for the Spot instance request, if any.

              
              

              - **Code** *(string) --* 

                The reason code for the Spot instance state change.

                
              

              - **Message** *(string) --* 

                The message for the Spot instance state change.

                
          
            

            - **InstanceId** *(string) --* 

              The instance ID, if an instance has been launched to fulfill the Spot instance request.

              
            

            - **LaunchGroup** *(string) --* 

              The instance launch group. Launch groups are Spot instances that launch together and terminate together.

              
            

            - **LaunchSpecification** *(dict) --* 

              Additional information for launching instances.

              
              

              - **UserData** *(string) --* 

                The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

                
              

              - **SecurityGroups** *(list) --* 

                One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

                
                

                - *(dict) --* 

                  Describes a security group.

                  
                  

                  - **GroupName** *(string) --* 

                    The name of the security group.

                    
                  

                  - **GroupId** *(string) --* 

                    The ID of the security group.

                    
              
            
              

              - **AddressingType** *(string) --* 

                Deprecated.

                
              

              - **BlockDeviceMappings** *(list) --* 

                One or more block device mapping entries.

                 

                Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.

                
                

                - *(dict) --* 

                  Describes a block device mapping.

                  
                  

                  - **DeviceName** *(string) --* 

                    The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                    
                  

                  - **VirtualName** *(string) --* 

                    The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                     

                    Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                    
                  

                  - **Ebs** *(dict) --* 

                    Parameters used to automatically set up EBS volumes when the instance is launched.

                    
                    

                    - **Encrypted** *(boolean) --* 

                      Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                      
                    

                    - **DeleteOnTermination** *(boolean) --* 

                      Indicates whether the EBS volume is deleted on instance termination.

                      
                    

                    - **Iops** *(integer) --* 

                      The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                       

                      Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                       

                      Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                      
                    

                    - **SnapshotId** *(string) --* 

                      The ID of the snapshot.

                      
                    

                    - **VolumeSize** *(integer) --* 

                      The size of the volume, in GiB.

                       

                      Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                       

                      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                      
                    

                    - **VolumeType** *(string) --* 

                      The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                       

                      Default: ``standard``  

                      
                
                  

                  - **NoDevice** *(string) --* 

                    Suppresses the specified device included in the block device mapping of the AMI.

                    
              
            
              

              - **EbsOptimized** *(boolean) --* 

                Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                 

                Default: ``false``  

                
              

              - **IamInstanceProfile** *(dict) --* 

                The IAM instance profile.

                
                

                - **Arn** *(string) --* 

                  The Amazon Resource Name (ARN) of the instance profile.

                  
                

                - **Name** *(string) --* 

                  The name of the instance profile.

                  
            
              

              - **ImageId** *(string) --* 

                The ID of the AMI.

                
              

              - **InstanceType** *(string) --* 

                The instance type.

                
              

              - **KernelId** *(string) --* 

                The ID of the kernel.

                
              

              - **KeyName** *(string) --* 

                The name of the key pair.

                
              

              - **NetworkInterfaces** *(list) --* 

                One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                
                

                - *(dict) --* 

                  Describes a network interface.

                  
                  

                  - **AssociatePublicIpAddress** *(boolean) --* 

                    Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

                    
                  

                  - **DeleteOnTermination** *(boolean) --* 

                    If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

                    
                  

                  - **Description** *(string) --* 

                    The description of the network interface. Applies only if creating a network interface when launching an instance.

                    
                  

                  - **DeviceIndex** *(integer) --* 

                    The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

                    
                  

                  - **Groups** *(list) --* 

                    The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                    
                    

                    - *(string) --* 
                
                  

                  - **Ipv6AddressCount** *(integer) --* 

                    A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                    
                  

                  - **Ipv6Addresses** *(list) --* 

                    One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                    
                    

                    - *(dict) --* 

                      Describes an IPv6 address.

                      
                      

                      - **Ipv6Address** *(string) --* 

                        The IPv6 address.

                        
                  
                
                  

                  - **NetworkInterfaceId** *(string) --* 

                    The ID of the network interface.

                    
                  

                  - **PrivateIpAddress** *(string) --* 

                    The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                  

                  - **PrivateIpAddresses** *(list) --* 

                    One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                    

                    - *(dict) --* 

                      Describes a secondary private IPv4 address for a network interface.

                      
                      

                      - **Primary** *(boolean) --* 

                        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                        
                      

                      - **PrivateIpAddress** *(string) --* 

                        The private IPv4 addresses.

                        
                  
                
                  

                  - **SecondaryPrivateIpAddressCount** *(integer) --* 

                    The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                    
                  

                  - **SubnetId** *(string) --* 

                    The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

                    
              
            
              

              - **Placement** *(dict) --* 

                The placement information for the instance.

                
                

                - **AvailabilityZone** *(string) --* 

                  The Availability Zone.

                   

                  [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

                  
                

                - **GroupName** *(string) --* 

                  The name of the placement group (for cluster instances).

                  
                

                - **Tenancy** *(string) --* 

                  The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

                  
            
              

              - **RamdiskId** *(string) --* 

                The ID of the RAM disk.

                
              

              - **SubnetId** *(string) --* 

                The ID of the subnet in which to launch the instance.

                
              

              - **Monitoring** *(dict) --* 

                Describes the monitoring of an instance.

                
                

                - **Enabled** *(boolean) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
            

            - **LaunchedAvailabilityZone** *(string) --* 

              The Availability Zone in which the bid is launched.

              
            

            - **ProductDescription** *(string) --* 

              The product description associated with the Spot instance.

              
            

            - **SpotInstanceRequestId** *(string) --* 

              The ID of the Spot instance request.

              
            

            - **SpotPrice** *(string) --* 

              The maximum hourly price (bid) for the Spot instance launched to fulfill the request.

              
            

            - **State** *(string) --* 

              The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see `Spot Bid Status <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

              
            

            - **Status** *(dict) --* 

              The status code and status message describing the Spot instance request.

              
              

              - **Code** *(string) --* 

                The status code. For a list of status codes, see `Spot Bid Status Codes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                
              

              - **Message** *(string) --* 

                The description for the status code.

                
              

              - **UpdateTime** *(datetime) --* 

                The date and time of the most recent status update, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

                
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the resource.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **Type** *(string) --* 

              The Spot instance request type.

              
            

            - **ValidFrom** *(datetime) --* 

              The start date of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). The request becomes active at this date and time.

              
            

            - **ValidUntil** *(datetime) --* 

              The end date of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

              
        
      
    

    **Examples** 

    This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.
    ::

      response = client.request_spot_instances(
          InstanceCount=5,
          LaunchSpecification={
              'IamInstanceProfile': {
                  'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
              },
              'ImageId': 'ami-1a2b3c4d',
              'InstanceType': 'm3.medium',
              'KeyName': 'my-key-pair',
              'Placement': {
                  'AvailabilityZone': 'us-west-2a',
              },
              'SecurityGroupIds': [
                  'sg-1a2b3c4d',
              ],
          },
          SpotPrice='0.03',
          Type='one-time',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.
    ::

      response = client.request_spot_instances(
          InstanceCount=5,
          LaunchSpecification={
              'IamInstanceProfile': {
                  'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
              },
              'ImageId': 'ami-1a2b3c4d',
              'InstanceType': 'm3.medium',
              'SecurityGroupIds': [
                  'sg-1a2b3c4d',
              ],
              'SubnetId': 'subnet-1a2b3c4d',
          },
          SpotPrice='0.050',
          Type='one-time',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: reset_image_attribute(**kwargs)

    

    Resets an attribute of an AMI to its default value.

     

    .. note::

       

      The productCodes attribute can't be reset.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute>`_    


    **Request Syntax** 
    ::

      response = client.reset_image_attribute(
          Attribute='launchPermission',
          ImageId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset (currently you can only reset the launch permission attribute).

      

    
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reset_instance_attribute(**kwargs)

    

    Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk`` , the instance must be in a stopped state. To reset the ``sourceDestCheck`` , the instance can be either running or stopped.

     

    The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true`` , which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.reset_instance_attribute(
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          DryRun=True|False,
          InstanceId='string'
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset.

       

      .. warning::

         

        You can only reset the following attributes: ``kernel`` | ``ramdisk`` | ``sourceDestCheck`` . To change an instance attribute, use  ModifyInstanceAttribute .

         

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    
    :returns: None

  .. py:method:: reset_network_interface_attribute(**kwargs)

    

    Resets a network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = client.reset_network_interface_attribute(
          DryRun=True|False,
          NetworkInterfaceId='string',
          SourceDestCheck='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    :type SourceDestCheck: string
    :param SourceDestCheck: 

      The source/destination checking attribute. Resets the value to ``true`` .

      

    
    
    :returns: None

  .. py:method:: reset_snapshot_attribute(**kwargs)

    

    Resets permission settings for the specified snapshot.

     

    For more information on modifying snapshot permissions, see `Sharing Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = client.reset_snapshot_attribute(
          Attribute='productCodes'|'createVolumePermission',
          SnapshotId='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

      

    
    :type SnapshotId: string
    :param SnapshotId: **[REQUIRED]** 

      The ID of the snapshot.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

    **Examples** 

    This example resets the create volume permissions for snapshot ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.
    ::

      response = client.reset_snapshot_attribute(
          Attribute='createVolumePermission',
          SnapshotId='snap-1234567890abcdef0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: restore_address_to_classic(**kwargs)

    

    Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic>`_    


    **Request Syntax** 
    ::

      response = client.restore_address_to_classic(
          DryRun=True|False,
          PublicIp='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PublicIp: string
    :param PublicIp: **[REQUIRED]** 

      The Elastic IP address.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'PublicIp': 'string',
            'Status': 'MoveInProgress'|'InVpc'|'InClassic'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RestoreAddressToClassic.

        
        

        - **PublicIp** *(string) --* 

          The Elastic IP address.

          
        

        - **Status** *(string) --* 

          The move status for the IP address.

          
    

    **Examples** 

    This example restores the specified Elastic IP address to the EC2-Classic platform.
    ::

      response = client.restore_address_to_classic(
          PublicIp='198.51.100.0',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'PublicIp': '198.51.100.0',
          'Status': 'MoveInProgress',
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: revoke_security_group_egress(**kwargs)

    

    [EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.

     

    Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress>`_    


    **Request Syntax** 
    ::

      response = client.revoke_security_group_egress(
          DryRun=True|False,
          GroupId='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          CidrIp='string',
          FromPort=123,
          IpProtocol='string',
          ToPort=123,
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupId: string
    :param GroupId: **[REQUIRED]** 

      The ID of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      The name of a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      The AWS account number for a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    
    :returns: None

  .. py:method:: revoke_security_group_ingress(**kwargs)

    

    Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.

     

    .. note::

       

      [EC2-Classic security groups only] If the values you specify do not match the existing rule's values, no error is returned. Use  DescribeSecurityGroups to verify that the rule has been removed.

       

     

    Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress>`_    


    **Request Syntax** 
    ::

      response = client.revoke_security_group_ingress(
          CidrIp='string',
          FromPort=123,
          GroupId='string',
          GroupName='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          IpProtocol='string',
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string',
          ToPort=123,
          DryRun=True|False
      )
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use ``-1`` to specify all ICMP types.

      

    
    :type GroupId: string
    :param GroupId: 

      The ID of the security group. Required for a security group in a nondefault VPC.

      

    
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a source security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). Use ``-1`` to specify all.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      [EC2-Classic] The AWS account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use ``-1`` to specify all ICMP codes for the ICMP type.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: run_instances(**kwargs)

    

    Launches the specified number of instances using an AMI for which you have permissions. 

     

    You can specify a number of options, or leave the default options. The following rules apply:

     

     
    * [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request. 
     
    * [EC2-Classic] If don't specify an Availability Zone, we choose one for you. 
     
    * Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see `Instance Types Available Only in a VPC <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types>`_ . 
     
    * [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet. 
     
    * Not all instance types support IPv6 addresses. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ . 
     
    * If you don't specify a security group ID, we use the default security group. For more information, see `Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ . 
     
    * If any of the AMIs have a product code attached for which the user has not subscribed, the request fails. 
     

     

    To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.

     

    An instance is ready for you to use when it's in the ``running`` state. You can check the state of your instance using  DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see  CreateTags and `Tagging Your Amazon EC2 Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ .

     

    Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For troubleshooting, see `What To Do If An Instance Immediately Terminates <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html>`_ , and `Troubleshooting Connecting to Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances>`_    


    **Request Syntax** 
    ::

      response = client.run_instances(
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          ImageId='string',
          InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          KernelId='string',
          KeyName='string',
          MaxCount=123,
          MinCount=123,
          Monitoring={
              'Enabled': True|False
          },
          Placement={
              'AvailabilityZone': 'string',
              'Affinity': 'string',
              'GroupName': 'string',
              'HostId': 'string',
              'Tenancy': 'default'|'dedicated'|'host',
              'SpreadDomain': 'string'
          },
          RamdiskId='string',
          SecurityGroupIds=[
              'string',
          ],
          SecurityGroups=[
              'string',
          ],
          SubnetId='string',
          UserData='string',
          AdditionalInfo='string',
          ClientToken='string',
          DisableApiTermination=True|False,
          DryRun=True|False,
          EbsOptimized=True|False,
          IamInstanceProfile={
              'Arn': 'string',
              'Name': 'string'
          },
          InstanceInitiatedShutdownBehavior='stop'|'terminate',
          NetworkInterfaces=[
              {
                  'AssociatePublicIpAddress': True|False,
                  'DeleteOnTermination': True|False,
                  'Description': 'string',
                  'DeviceIndex': 123,
                  'Groups': [
                      'string',
                  ],
                  'Ipv6AddressCount': 123,
                  'Ipv6Addresses': [
                      {
                          'Ipv6Address': 'string'
                      },
                  ],
                  'NetworkInterfaceId': 'string',
                  'PrivateIpAddress': 'string',
                  'PrivateIpAddresses': [
                      {
                          'Primary': True|False,
                          'PrivateIpAddress': 'string'
                      },
                  ],
                  'SecondaryPrivateIpAddressCount': 123,
                  'SubnetId': 'string'
              },
          ],
          PrivateIpAddress='string',
          ElasticGpuSpecification=[
              {
                  'Type': 'string'
              },
          ],
          TagSpecifications=[
              {
                  'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ]
      )
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      The block device mapping.

       

      .. warning::

         

        Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.

         

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI, which you can get by calling  DescribeImages .

      

    
    :type InstanceType: string
    :param InstanceType: 

      The instance type. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      Default: ``m1.small``  

      

    
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type KernelId: string
    :param KernelId: 

      The ID of the kernel.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type KeyName: string
    :param KeyName: 

      The name of the key pair. You can create a key pair using  CreateKeyPair or  ImportKeyPair .

       

      .. warning::

         

        If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

         

      

    
    :type MaxCount: integer
    :param MaxCount: **[REQUIRED]** 

      The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above ``MinCount`` .

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 FAQ.

      

    
    :type MinCount: integer
    :param MinCount: **[REQUIRED]** 

      The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 General FAQ.

      

    
    :type Monitoring: dict
    :param Monitoring: 

      The monitoring for the instance.

      

    
      - **Enabled** *(boolean) --* **[REQUIRED]** 

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        

      
    
    :type Placement: dict
    :param Placement: 

      The placement for the instance.

      

    
      - **AvailabilityZone** *(string) --* 

        The Availability Zone of the instance.

        

      
      - **Affinity** *(string) --* 

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

        

      
      - **GroupName** *(string) --* 

        The name of the placement group the instance is in (for cluster compute instances).

        

      
      - **HostId** *(string) --* 

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

        

      
      - **Tenancy** *(string) --* 

        The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

        

      
      - **SpreadDomain** *(string) --* 

        Reserved for future use.

        

      
    
    :type RamdiskId: string
    :param RamdiskId: 

      The ID of the RAM disk.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type SecurityGroupIds: list
    :param SecurityGroupIds: 

      One or more security group IDs. You can create a security group using  CreateSecurityGroup .

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type SecurityGroups: list
    :param SecurityGroups: 

      [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type SubnetId: string
    :param SubnetId: 

      [EC2-VPC] The ID of the subnet to launch the instance into.

      

    
    :type UserData: string
    :param UserData: 

      The user data to make available to the instance. For more information, see `Running Commands on Your Linux Instance at Launch <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html>`_ (Linux) and `Adding User Data <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data>`_ (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

            **This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.**


    
    :type AdditionalInfo: string
    :param AdditionalInfo: 

      Reserved.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

       

      Constraints: Maximum 64 ASCII characters

      

    
    :type DisableApiTermination: boolean
    :param DisableApiTermination: 

      If you set this parameter to ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to ``false`` after launch, use  ModifyInstanceAttribute . Alternatively, if you set ``InstanceInitiatedShutdownBehavior`` to ``terminate`` , you can terminate the instance by running the shutdown command from the instance.

       

      Default: ``false``  

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EbsOptimized: boolean
    :param EbsOptimized: 

      Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

       

      Default: ``false``  

      

    
    :type IamInstanceProfile: dict
    :param IamInstanceProfile: 

      The IAM instance profile.

      

    
      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        

      
      - **Name** *(string) --* 

        The name of the instance profile.

        

      
    
    :type InstanceInitiatedShutdownBehavior: string
    :param InstanceInitiatedShutdownBehavior: 

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

       

      Default: ``stop``  

      

    
    :type NetworkInterfaces: list
    :param NetworkInterfaces: 

      One or more network interfaces.

      

    
      - *(dict) --* 

        Describes a network interface.

        

      
        - **AssociatePublicIpAddress** *(boolean) --* 

          Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

          

        
        - **DeleteOnTermination** *(boolean) --* 

          If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

          

        
        - **Description** *(string) --* 

          The description of the network interface. Applies only if creating a network interface when launching an instance.

          

        
        - **DeviceIndex** *(integer) --* 

          The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

          

        
        - **Groups** *(list) --* 

          The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

          

        
          - *(string) --* 

          
      
        - **Ipv6AddressCount** *(integer) --* 

          A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

          

        
        - **Ipv6Addresses** *(list) --* 

          One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

          

        
          - *(dict) --* 

            Describes an IPv6 address.

            

          
            - **Ipv6Address** *(string) --* 

              The IPv6 address.

              

            
          
      
        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          

        
        - **PrivateIpAddress** *(string) --* 

          The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **PrivateIpAddresses** *(list) --* 

          One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
          - *(dict) --* 

            Describes a secondary private IPv4 address for a network interface.

            

          
            - **Primary** *(boolean) --* 

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              

            
            - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

              The private IPv4 addresses.

              

            
          
      
        - **SecondaryPrivateIpAddressCount** *(integer) --* 

          The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **SubnetId** *(string) --* 

          The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

       

      Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

      

    
    :type ElasticGpuSpecification: list
    :param ElasticGpuSpecification: 

      An Elastic GPU to associate with the instance.

      

    
      - *(dict) --* 

        A specification for an Elastic GPU.

        

      
        - **Type** *(string) --* **[REQUIRED]** 

          The type of Elastic GPU.

          

        
      
  
    :type TagSpecifications: list
    :param TagSpecifications: 

      The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.

      

    
      - *(dict) --* 

        The tags to apply to a resource when the resource is being created.

        

      
        - **ResourceType** *(string) --* 

          The type of resource to tag. Currently, the resource types that support tagging on creation are ``instance`` and ``volume`` . 

          

        
        - **Tags** *(list) --* 

          The tags to apply to the resource.

          

        
          - *(dict) --* 

            Describes a tag.

            

          
            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              

            
            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              

            
          
      
      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'Instances': [
                {
                    'AmiLaunchIndex': 123,
                    'ImageId': 'string',
                    'InstanceId': 'string',
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'KernelId': 'string',
                    'KeyName': 'string',
                    'LaunchTime': datetime(2015, 1, 1),
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    },
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'Affinity': 'string',
                        'GroupName': 'string',
                        'HostId': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'SpreadDomain': 'string'
                    },
                    'Platform': 'Windows',
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string',
                    'ProductCodes': [
                        {
                            'ProductCodeId': 'string',
                            'ProductCodeType': 'devpay'|'marketplace'
                        },
                    ],
                    'PublicDnsName': 'string',
                    'PublicIpAddress': 'string',
                    'RamdiskId': 'string',
                    'State': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'StateTransitionReason': 'string',
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'Architecture': 'i386'|'x86_64',
                    'BlockDeviceMappings': [
                        {
                            'DeviceName': 'string',
                            'Ebs': {
                                'AttachTime': datetime(2015, 1, 1),
                                'DeleteOnTermination': True|False,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'VolumeId': 'string'
                            }
                        },
                    ],
                    'ClientToken': 'string',
                    'EbsOptimized': True|False,
                    'EnaSupport': True|False,
                    'Hypervisor': 'ovm'|'xen',
                    'IamInstanceProfile': {
                        'Arn': 'string',
                        'Id': 'string'
                    },
                    'InstanceLifecycle': 'spot'|'scheduled',
                    'ElasticGpuAssociations': [
                        {
                            'ElasticGpuId': 'string',
                            'ElasticGpuAssociationId': 'string',
                            'ElasticGpuAssociationState': 'string',
                            'ElasticGpuAssociationTime': 'string'
                        },
                    ],
                    'NetworkInterfaces': [
                        {
                            'Association': {
                                'IpOwnerId': 'string',
                                'PublicDnsName': 'string',
                                'PublicIp': 'string'
                            },
                            'Attachment': {
                                'AttachTime': datetime(2015, 1, 1),
                                'AttachmentId': 'string',
                                'DeleteOnTermination': True|False,
                                'DeviceIndex': 123,
                                'Status': 'attaching'|'attached'|'detaching'|'detached'
                            },
                            'Description': 'string',
                            'Groups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'Ipv6Addresses': [
                                {
                                    'Ipv6Address': 'string'
                                },
                            ],
                            'MacAddress': 'string',
                            'NetworkInterfaceId': 'string',
                            'OwnerId': 'string',
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string',
                            'PrivateIpAddresses': [
                                {
                                    'Association': {
                                        'IpOwnerId': 'string',
                                        'PublicDnsName': 'string',
                                        'PublicIp': 'string'
                                    },
                                    'Primary': True|False,
                                    'PrivateDnsName': 'string',
                                    'PrivateIpAddress': 'string'
                                },
                            ],
                            'SourceDestCheck': True|False,
                            'Status': 'available'|'attaching'|'in-use'|'detaching',
                            'SubnetId': 'string',
                            'VpcId': 'string'
                        },
                    ],
                    'RootDeviceName': 'string',
                    'RootDeviceType': 'ebs'|'instance-store',
                    'SecurityGroups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'SourceDestCheck': True|False,
                    'SpotInstanceRequestId': 'string',
                    'SriovNetSupport': 'string',
                    'StateReason': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VirtualizationType': 'hvm'|'paravirtual'
                },
            ],
            'OwnerId': 'string',
            'RequesterId': 'string',
            'ReservationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes a reservation.

        
        

        - **Groups** *(list) --* 

          [EC2-Classic only] One or more security groups.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **Instances** *(list) --* 

          One or more instances.

          
          

          - *(dict) --* 

            Describes an instance.

            
            

            - **AmiLaunchIndex** *(integer) --* 

              The AMI launch index, which can be used to find this instance in the launch group.

              
            

            - **ImageId** *(string) --* 

              The ID of the AMI used to launch the instance.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type.

              
            

            - **KernelId** *(string) --* 

              The kernel associated with this instance, if applicable.

              
            

            - **KeyName** *(string) --* 

              The name of the key pair, if this instance was launched with an associated key pair.

              
            

            - **LaunchTime** *(datetime) --* 

              The time the instance was launched.

              
            

            - **Monitoring** *(dict) --* 

              The monitoring for the instance.

              
              

              - **State** *(string) --* 

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                
          
            

            - **Placement** *(dict) --* 

              The location where the instance launched, if applicable.

              
              

              - **AvailabilityZone** *(string) --* 

                The Availability Zone of the instance.

                
              

              - **Affinity** *(string) --* 

                The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

                
              

              - **GroupName** *(string) --* 

                The name of the placement group the instance is in (for cluster compute instances).

                
              

              - **HostId** *(string) --* 

                The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

                
              

              - **Tenancy** *(string) --* 

                The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

                
              

              - **SpreadDomain** *(string) --* 

                Reserved for future use.

                
          
            

            - **Platform** *(string) --* 

              The value is ``Windows`` for Windows instances; otherwise blank.

              
            

            - **PrivateDnsName** *(string) --* 

              (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the ``running`` state. 

               

              [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

              
            

            - **PrivateIpAddress** *(string) --* 

              The private IPv4 address assigned to the instance.

              
            

            - **ProductCodes** *(list) --* 

              The product codes attached to this instance, if applicable.

              
              

              - *(dict) --* 

                Describes a product code.

                
                

                - **ProductCodeId** *(string) --* 

                  The product code.

                  
                

                - **ProductCodeType** *(string) --* 

                  The type of product code.

                  
            
          
            

            - **PublicDnsName** *(string) --* 

              (IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the ``running`` state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

              
            

            - **PublicIpAddress** *(string) --* 

              The public IPv4 address assigned to the instance, if applicable.

              
            

            - **RamdiskId** *(string) --* 

              The RAM disk associated with this instance, if applicable.

              
            

            - **State** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **StateTransitionReason** *(string) --* 

              The reason for the most recent state transition. This might be an empty string.

              
            

            - **SubnetId** *(string) --* 

              [EC2-VPC] The ID of the subnet in which the instance is running.

              
            

            - **VpcId** *(string) --* 

              [EC2-VPC] The ID of the VPC in which the instance is running.

              
            

            - **Architecture** *(string) --* 

              The architecture of the image.

              
            

            - **BlockDeviceMappings** *(list) --* 

              Any block device mapping entries for the instance.

              
              

              - *(dict) --* 

                Describes a block device mapping.

                
                

                - **DeviceName** *(string) --* 

                  The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                  
                

                - **Ebs** *(dict) --* 

                  Parameters used to automatically set up EBS volumes when the instance is launched.

                  
                  

                  - **AttachTime** *(datetime) --* 

                    The time stamp when the attachment initiated.

                    
                  

                  - **DeleteOnTermination** *(boolean) --* 

                    Indicates whether the volume is deleted on instance termination.

                    
                  

                  - **Status** *(string) --* 

                    The attachment state.

                    
                  

                  - **VolumeId** *(string) --* 

                    The ID of the EBS volume.

                    
              
            
          
            

            - **ClientToken** *(string) --* 

              The idempotency token you provided when you launched the instance, if applicable.

              
            

            - **EbsOptimized** *(boolean) --* 

              Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

              
            

            - **EnaSupport** *(boolean) --* 

              Specifies whether enhanced networking with ENA is enabled.

              
            

            - **Hypervisor** *(string) --* 

              The hypervisor type of the instance.

              
            

            - **IamInstanceProfile** *(dict) --* 

              The IAM instance profile associated with the instance, if applicable.

              
              

              - **Arn** *(string) --* 

                The Amazon Resource Name (ARN) of the instance profile.

                
              

              - **Id** *(string) --* 

                The ID of the instance profile.

                
          
            

            - **InstanceLifecycle** *(string) --* 

              Indicates whether this is a Spot instance or a Scheduled Instance.

              
            

            - **ElasticGpuAssociations** *(list) --* 

              The Elastic GPU associated with the instance.

              
              

              - *(dict) --* 

                Describes the association between an instance and an Elastic GPU.

                
                

                - **ElasticGpuId** *(string) --* 

                  The ID of the Elastic GPU.

                  
                

                - **ElasticGpuAssociationId** *(string) --* 

                  The ID of the association.

                  
                

                - **ElasticGpuAssociationState** *(string) --* 

                  The state of the association between the instance and the Elastic GPU.

                  
                

                - **ElasticGpuAssociationTime** *(string) --* 

                  The time the Elastic GPU was associated with the instance.

                  
            
          
            

            - **NetworkInterfaces** *(list) --* 

              [EC2-VPC] One or more network interfaces for the instance.

              
              

              - *(dict) --* 

                Describes a network interface.

                
                

                - **Association** *(dict) --* 

                  The association information for an Elastic IPv4 associated with the network interface.

                  
                  

                  - **IpOwnerId** *(string) --* 

                    The ID of the owner of the Elastic IP address.

                    
                  

                  - **PublicDnsName** *(string) --* 

                    The public DNS name.

                    
                  

                  - **PublicIp** *(string) --* 

                    The public IP address or Elastic IP address bound to the network interface.

                    
              
                

                - **Attachment** *(dict) --* 

                  The network interface attachment.

                  
                  

                  - **AttachTime** *(datetime) --* 

                    The time stamp when the attachment initiated.

                    
                  

                  - **AttachmentId** *(string) --* 

                    The ID of the network interface attachment.

                    
                  

                  - **DeleteOnTermination** *(boolean) --* 

                    Indicates whether the network interface is deleted when the instance is terminated.

                    
                  

                  - **DeviceIndex** *(integer) --* 

                    The index of the device on the instance for the network interface attachment.

                    
                  

                  - **Status** *(string) --* 

                    The attachment state.

                    
              
                

                - **Description** *(string) --* 

                  The description.

                  
                

                - **Groups** *(list) --* 

                  One or more security groups.

                  
                  

                  - *(dict) --* 

                    Describes a security group.

                    
                    

                    - **GroupName** *(string) --* 

                      The name of the security group.

                      
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                
              
                

                - **Ipv6Addresses** *(list) --* 

                  One or more IPv6 addresses associated with the network interface.

                  
                  

                  - *(dict) --* 

                    Describes an IPv6 address.

                    
                    

                    - **Ipv6Address** *(string) --* 

                      The IPv6 address.

                      
                
              
                

                - **MacAddress** *(string) --* 

                  The MAC address.

                  
                

                - **NetworkInterfaceId** *(string) --* 

                  The ID of the network interface.

                  
                

                - **OwnerId** *(string) --* 

                  The ID of the AWS account that created the network interface.

                  
                

                - **PrivateDnsName** *(string) --* 

                  The private DNS name.

                  
                

                - **PrivateIpAddress** *(string) --* 

                  The IPv4 address of the network interface within the subnet.

                  
                

                - **PrivateIpAddresses** *(list) --* 

                  One or more private IPv4 addresses associated with the network interface.

                  
                  

                  - *(dict) --* 

                    Describes a private IPv4 address.

                    
                    

                    - **Association** *(dict) --* 

                      The association information for an Elastic IP address for the network interface.

                      
                      

                      - **IpOwnerId** *(string) --* 

                        The ID of the owner of the Elastic IP address.

                        
                      

                      - **PublicDnsName** *(string) --* 

                        The public DNS name.

                        
                      

                      - **PublicIp** *(string) --* 

                        The public IP address or Elastic IP address bound to the network interface.

                        
                  
                    

                    - **Primary** *(boolean) --* 

                      Indicates whether this IPv4 address is the primary private IP address of the network interface.

                      
                    

                    - **PrivateDnsName** *(string) --* 

                      The private IPv4 DNS name.

                      
                    

                    - **PrivateIpAddress** *(string) --* 

                      The private IPv4 address of the network interface.

                      
                
              
                

                - **SourceDestCheck** *(boolean) --* 

                  Indicates whether to validate network traffic to or from this network interface.

                  
                

                - **Status** *(string) --* 

                  The status of the network interface.

                  
                

                - **SubnetId** *(string) --* 

                  The ID of the subnet.

                  
                

                - **VpcId** *(string) --* 

                  The ID of the VPC.

                  
            
          
            

            - **RootDeviceName** *(string) --* 

              The root device name (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

              
            

            - **RootDeviceType** *(string) --* 

              The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

              
            

            - **SecurityGroups** *(list) --* 

              One or more security groups for the instance.

              
              

              - *(dict) --* 

                Describes a security group.

                
                

                - **GroupName** *(string) --* 

                  The name of the security group.

                  
                

                - **GroupId** *(string) --* 

                  The ID of the security group.

                  
            
          
            

            - **SourceDestCheck** *(boolean) --* 

              Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

              
            

            - **SpotInstanceRequestId** *(string) --* 

              If the request is a Spot instance request, the ID of the request.

              
            

            - **SriovNetSupport** *(string) --* 

              Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

              
            

            - **StateReason** *(dict) --* 

              The reason for the most recent state transition.

              
              

              - **Code** *(string) --* 

                The reason code for the state change.

                
              

              - **Message** *(string) --* 

                The message for the state change.

                 

                 
                * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
                 
                * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
                 
                * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
                 
                * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
                 
                * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
                 
                * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
                 
                * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
                 
                * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
                 
                * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
                 

                
          
            

            - **Tags** *(list) --* 

              Any tags assigned to the instance.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VirtualizationType** *(string) --* 

              The virtualization type of the instance.

              
        
      
        

        - **OwnerId** *(string) --* 

          The ID of the AWS account that owns the reservation.

          
        

        - **RequesterId** *(string) --* 

          The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).

          
        

        - **ReservationId** *(string) --* 

          The ID of the reservation.

          
    

  .. py:method:: run_scheduled_instances(**kwargs)

    

    Launches the specified Scheduled Instances.

     

    Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using  PurchaseScheduledInstances .

     

    You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see `Scheduled Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances>`_    


    **Request Syntax** 
    ::

      response = client.run_scheduled_instances(
          ClientToken='string',
          DryRun=True|False,
          InstanceCount=123,
          LaunchSpecification={
              'BlockDeviceMappings': [
                  {
                      'DeviceName': 'string',
                      'Ebs': {
                          'DeleteOnTermination': True|False,
                          'Encrypted': True|False,
                          'Iops': 123,
                          'SnapshotId': 'string',
                          'VolumeSize': 123,
                          'VolumeType': 'string'
                      },
                      'NoDevice': 'string',
                      'VirtualName': 'string'
                  },
              ],
              'EbsOptimized': True|False,
              'IamInstanceProfile': {
                  'Arn': 'string',
                  'Name': 'string'
              },
              'ImageId': 'string',
              'InstanceType': 'string',
              'KernelId': 'string',
              'KeyName': 'string',
              'Monitoring': {
                  'Enabled': True|False
              },
              'NetworkInterfaces': [
                  {
                      'AssociatePublicIpAddress': True|False,
                      'DeleteOnTermination': True|False,
                      'Description': 'string',
                      'DeviceIndex': 123,
                      'Groups': [
                          'string',
                      ],
                      'Ipv6AddressCount': 123,
                      'Ipv6Addresses': [
                          {
                              'Ipv6Address': 'string'
                          },
                      ],
                      'NetworkInterfaceId': 'string',
                      'PrivateIpAddress': 'string',
                      'PrivateIpAddressConfigs': [
                          {
                              'Primary': True|False,
                              'PrivateIpAddress': 'string'
                          },
                      ],
                      'SecondaryPrivateIpAddressCount': 123,
                      'SubnetId': 'string'
                  },
              ],
              'Placement': {
                  'AvailabilityZone': 'string',
                  'GroupName': 'string'
              },
              'RamdiskId': 'string',
              'SecurityGroupIds': [
                  'string',
              ],
              'SubnetId': 'string',
              'UserData': 'string'
          },
          ScheduledInstanceId='string'
      )
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

      This field is autopopulated if not provided.

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceCount: integer
    :param InstanceCount: 

      The number of instances.

       

      Default: 1

      

    
    :type LaunchSpecification: dict
    :param LaunchSpecification: **[REQUIRED]** 

      The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

      

    
      - **BlockDeviceMappings** *(list) --* 

        One or more block device mapping entries.

        

      
        - *(dict) --* 

          Describes a block device mapping for a Scheduled Instance.

          

        
          - **DeviceName** *(string) --* 

            The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

            

          
          - **Ebs** *(dict) --* 

            Parameters used to set up EBS volumes automatically when the instance is launched.

            

          
            - **DeleteOnTermination** *(boolean) --* 

              Indicates whether the volume is deleted on instance termination.

              

            
            - **Encrypted** *(boolean) --* 

              Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.

              

            
            - **Iops** *(integer) --* 

              The number of I/O operations per second (IOPS) that the volume supports. For io1 volumes, this represents the number of IOPS that are provisioned for the volume. For ``gp2`` volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about ``gp2`` baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

               

              Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

               

              Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

              

            
            - **SnapshotId** *(string) --* 

              The ID of the snapshot.

              

            
            - **VolumeSize** *(integer) --* 

              The size of the volume, in GiB.

               

              Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

              

            
            - **VolumeType** *(string) --* 

              The volume type. ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, Throughput Optimized HDD for ``st1`` , Cold HDD for ``sc1`` , or ``standard`` for Magnetic.

               

              Default: ``standard``  

              

            
          
          - **NoDevice** *(string) --* 

            Suppresses the specified device included in the block device mapping of the AMI.

            

          
          - **VirtualName** *(string) --* 

            The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

             

            Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

            

          
        
    
      - **EbsOptimized** *(boolean) --* 

        Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

         

        Default: ``false``  

        

      
      - **IamInstanceProfile** *(dict) --* 

        The IAM instance profile.

        

      
        - **Arn** *(string) --* 

          The Amazon Resource Name (ARN).

          

        
        - **Name** *(string) --* 

          The name.

          

        
      
      - **ImageId** *(string) --* **[REQUIRED]** 

        The ID of the Amazon Machine Image (AMI).

        

      
      - **InstanceType** *(string) --* 

        The instance type.

        

      
      - **KernelId** *(string) --* 

        The ID of the kernel.

        

      
      - **KeyName** *(string) --* 

        The name of the key pair.

        

      
      - **Monitoring** *(dict) --* 

        Enable or disable monitoring for the instances.

        

      
        - **Enabled** *(boolean) --* 

          Indicates whether monitoring is enabled.

          

        
      
      - **NetworkInterfaces** *(list) --* 

        One or more network interfaces.

        

      
        - *(dict) --* 

          Describes a network interface for a Scheduled Instance.

          

        
          - **AssociatePublicIpAddress** *(boolean) --* 

            Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether to delete the interface when the instance is terminated.

            

          
          - **Description** *(string) --* 

            The description.

            

          
          - **DeviceIndex** *(integer) --* 

            The index of the device for the network interface attachment.

            

          
          - **Groups** *(list) --* 

            The IDs of one or more security groups.

            

          
            - *(string) --* 

            
        
          - **Ipv6AddressCount** *(integer) --* 

            The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.

            

          
          - **Ipv6Addresses** *(list) --* 

            One or more specific IPv6 addresses from the subnet range.

            

          
            - *(dict) --* 

              Describes an IPv6 address.

              

            
              - **Ipv6Address** *(string) --* 

                The IPv6 address.

                

              
            
        
          - **NetworkInterfaceId** *(string) --* 

            The ID of the network interface.

            

          
          - **PrivateIpAddress** *(string) --* 

            The IPv4 address of the network interface within the subnet.

            

          
          - **PrivateIpAddressConfigs** *(list) --* 

            The private IPv4 addresses.

            

          
            - *(dict) --* 

              Describes a private IPv4 address for a Scheduled Instance.

              

            
              - **Primary** *(boolean) --* 

                Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.

                

              
              - **PrivateIpAddress** *(string) --* 

                The IPv4 address.

                

              
            
        
          - **SecondaryPrivateIpAddressCount** *(integer) --* 

            The number of secondary private IPv4 addresses.

            

          
          - **SubnetId** *(string) --* 

            The ID of the subnet.

            

          
        
    
      - **Placement** *(dict) --* 

        The placement information.

        

      
        - **AvailabilityZone** *(string) --* 

          The Availability Zone.

          

        
        - **GroupName** *(string) --* 

          The name of the placement group.

          

        
      
      - **RamdiskId** *(string) --* 

        The ID of the RAM disk.

        

      
      - **SecurityGroupIds** *(list) --* 

        The IDs of one or more security groups.

        

      
        - *(string) --* 

        
    
      - **SubnetId** *(string) --* 

        The ID of the subnet in which to launch the instances.

        

      
      - **UserData** *(string) --* 

        The base64-encoded MIME user data.

        

      
    
    :type ScheduledInstanceId: string
    :param ScheduledInstanceId: **[REQUIRED]** 

      The Scheduled Instance ID.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceIdSet': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RunScheduledInstances.

        
        

        - **InstanceIdSet** *(list) --* 

          The IDs of the newly launched instances.

          
          

          - *(string) --* 
      
    

    **Examples** 

    This example launches the specified Scheduled Instance in a VPC.
    ::

      response = client.run_scheduled_instances(
          InstanceCount=1,
          LaunchSpecification={
              'IamInstanceProfile': {
                  'Name': 'my-iam-role',
              },
              'ImageId': 'ami-12345678',
              'InstanceType': 'c4.large',
              'KeyName': 'my-key-pair',
              'NetworkInterfaces': [
                  {
                      'AssociatePublicIpAddress': True,
                      'DeviceIndex': 0,
                      'Groups': [
                          'sg-12345678',
                      ],
                      'SubnetId': 'subnet-12345678',
                  },
              ],
          },
          ScheduledInstanceId='sci-1234-1234-1234-1234-123456789012',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'InstanceIdSet': [
              'i-1234567890abcdef0',
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

    This example launches the specified Scheduled Instance in EC2-Classic.
    ::

      response = client.run_scheduled_instances(
          InstanceCount=1,
          LaunchSpecification={
              'IamInstanceProfile': {
                  'Name': 'my-iam-role',
              },
              'ImageId': 'ami-12345678',
              'InstanceType': 'c4.large',
              'KeyName': 'my-key-pair',
              'Placement': {
                  'AvailabilityZone': 'us-west-2b',
              },
              'SecurityGroupIds': [
                  'sg-12345678',
              ],
          },
          ScheduledInstanceId='sci-1234-1234-1234-1234-123456789012',
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'InstanceIdSet': [
              'i-1234567890abcdef0',
          ],
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: start_instances(**kwargs)

    

    Starts an Amazon EBS-backed AMI that you've previously stopped.

     

    Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

     

    Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

     

    Performing this operation on an instance that uses an instance store as its root device returns an error.

     

    For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_    


    **Request Syntax** 
    ::

      response = client.start_instances(
          InstanceIds=[
              'string',
          ],
          AdditionalInfo='string',
          DryRun=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

      

    
      - *(string) --* 

      
  
    :type AdditionalInfo: string
    :param AdditionalInfo: 

      Reserved.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'StartingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of StartInstances.

        
        

        - **StartingInstances** *(list) --* 

          Information about one or more started instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: stop_instances(**kwargs)

    

    Stops an Amazon EBS-backed instance.

     

    We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

     

    You can't start or stop Spot instances, and you can't stop instance store-backed instances.

     

    When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

     

    Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_    


    **Request Syntax** 
    ::

      response = client.stop_instances(
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          Force=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Force: boolean
    :param Force: 

      Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

       

      Default: ``false``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'StoppingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of StopInstances.

        
        

        - **StoppingInstances** *(list) --* 

          Information about one or more stopped instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: terminate_instances(**kwargs)

    

    Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

     

    If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

     

    Terminated instances remain visible after termination (for approximately one hour).

     

    By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

     

    You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_    


    **Request Syntax** 
    ::

      response = client.terminate_instances(
          InstanceIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

       

      Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'TerminatingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of TerminateInstances.

        
        

        - **TerminatingInstances** *(list) --* 

          Information about one or more terminated instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: unassign_ipv6_addresses(**kwargs)

    

    Unassigns one or more IPv6 addresses from a network interface.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses>`_    


    **Request Syntax** 
    ::

      response = client.unassign_ipv6_addresses(
          Ipv6Addresses=[
              'string',
          ],
          NetworkInterfaceId='string'
      )
    :type Ipv6Addresses: list
    :param Ipv6Addresses: **[REQUIRED]** 

      The IPv6 addresses to unassign from the network interface.

      

    
      - *(string) --* 

      
  
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NetworkInterfaceId': 'string',
            'UnassignedIpv6Addresses': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
        

        - **UnassignedIpv6Addresses** *(list) --* 

          The IPv6 addresses that have been unassigned from the network interface.

          
          

          - *(string) --* 
      
    

  .. py:method:: unassign_private_ip_addresses(**kwargs)

    

    Unassigns one or more secondary private IP addresses from a network interface.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses>`_    


    **Request Syntax** 
    ::

      response = client.unassign_private_ip_addresses(
          NetworkInterfaceId='string',
          PrivateIpAddresses=[
              'string',
          ]
      )
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: **[REQUIRED]** 

      The ID of the network interface.

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: **[REQUIRED]** 

      The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

      

    
      - *(string) --* 

      
  
    
    :returns: None

    **Examples** 

    This example unassigns the specified private IP address from the specified network interface.
    ::

      response = client.unassign_private_ip_addresses(
          NetworkInterfaceId='eni-e5aa89a3',
          PrivateIpAddresses=[
              '10.0.0.82',
          ],
      )
      
      print(response)

    
    Expected Output:
    ::

      {
          'ResponseMetadata': {
              '...': '...',
          },
      }

    

  .. py:method:: unmonitor_instances(**kwargs)

    

    Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_    


    **Request Syntax** 
    ::

      response = client.unmonitor_instances(
          InstanceIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type InstanceIds: list
    :param InstanceIds: **[REQUIRED]** 

      One or more instance IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceMonitorings': [
                {
                    'InstanceId': 'string',
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of UnmonitorInstances.

        
        

        - **InstanceMonitorings** *(list) --* 

          The monitoring information.

          
          

          - *(dict) --* 

            Describes the monitoring of an instance.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Monitoring** *(dict) --* 

              The monitoring for the instance.

              
              

              - **State** *(string) --* 

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                
          
        
      
    

==========
Paginators
==========


The available paginators are:

* :py:class:`EC2.Paginator.DescribeInstanceStatus`


* :py:class:`EC2.Paginator.DescribeInstances`


* :py:class:`EC2.Paginator.DescribeNatGateways`


* :py:class:`EC2.Paginator.DescribeReservedInstancesModifications`


* :py:class:`EC2.Paginator.DescribeReservedInstancesOfferings`


* :py:class:`EC2.Paginator.DescribeSnapshots`


* :py:class:`EC2.Paginator.DescribeSpotFleetRequests`


* :py:class:`EC2.Paginator.DescribeSpotPriceHistory`


* :py:class:`EC2.Paginator.DescribeTags`


* :py:class:`EC2.Paginator.DescribeVolumeStatus`


* :py:class:`EC2.Paginator.DescribeVolumes`



.. py:class:: EC2.Paginator.DescribeInstanceStatus

  ::

    
    paginator = client.get_paginator('describe_instance_status')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_instance_status`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          IncludeAllInstances=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.code`` - The code for the scheduled event (``instance-reboot`` | ``system-reboot`` | ``system-maintenance`` | ``instance-retirement`` | ``instance-stop`` ). 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.not-after`` - The latest end time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``event.not-before`` - The earliest start time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``instance-state-code`` - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-status.reachability`` - Filters on instance status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``instance-status.status`` - The status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       
      * ``system-status.reachability`` - Filters on system status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``system-status.status`` - The system status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

       

      Constraints: Maximum 100 explicitly specified instance IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IncludeAllInstances: boolean
    :param IncludeAllInstances: 

      When ``true`` , includes the health status for all instances. When ``false`` , includes the health status for running instances only.

       

      Default: ``false``  

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceStatuses': [
                {
                    'AvailabilityZone': 'string',
                    'Events': [
                        {
                            'Code': 'instance-reboot'|'system-reboot'|'system-maintenance'|'instance-retirement'|'instance-stop',
                            'Description': 'string',
                            'NotAfter': datetime(2015, 1, 1),
                            'NotBefore': datetime(2015, 1, 1)
                        },
                    ],
                    'InstanceId': 'string',
                    'InstanceState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceStatus': {
                        'Details': [
                            {
                                'ImpairedSince': datetime(2015, 1, 1),
                                'Name': 'reachability',
                                'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
                    },
                    'SystemStatus': {
                        'Details': [
                            {
                                'ImpairedSince': datetime(2015, 1, 1),
                                'Name': 'reachability',
                                'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
                    }
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeInstanceStatus.

        
        

        - **InstanceStatuses** *(list) --* 

          One or more instance status descriptions.

          
          

          - *(dict) --* 

            Describes the status of an instance.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the instance.

              
            

            - **Events** *(list) --* 

              Any scheduled events associated with the instance.

              
              

              - *(dict) --* 

                Describes a scheduled event for an instance.

                
                

                - **Code** *(string) --* 

                  The event code.

                  
                

                - **Description** *(string) --* 

                  A description of the event.

                   

                  After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

                  
                

                - **NotAfter** *(datetime) --* 

                  The latest scheduled end time for the event.

                  
                

                - **NotBefore** *(datetime) --* 

                  The earliest scheduled start time for the event.

                  
            
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceState** *(dict) --* 

              The intended state of the instance.  DescribeInstanceStatus requires that an instance be in the ``running`` state.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceStatus** *(dict) --* 

              Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

              
              

              - **Details** *(list) --* 

                The system instance health or application instance health.

                
                

                - *(dict) --* 

                  Describes the instance status.

                  
                  

                  - **ImpairedSince** *(datetime) --* 

                    The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

                    
                  

                  - **Name** *(string) --* 

                    The type of instance status.

                    
                  

                  - **Status** *(string) --* 

                    The status.

                    
              
            
              

              - **Status** *(string) --* 

                The status.

                
          
            

            - **SystemStatus** *(dict) --* 

              Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

              
              

              - **Details** *(list) --* 

                The system instance health or application instance health.

                
                

                - *(dict) --* 

                  Describes the instance status.

                  
                  

                  - **ImpairedSince** *(datetime) --* 

                    The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

                    
                  

                  - **Name** *(string) --* 

                    The type of instance status.

                    
                  

                  - **Status** *(string) --* 

                    The status.

                    
              
            
              

              - **Status** *(string) --* 

                The status.

                
          
        
      
    

.. py:class:: EC2.Paginator.DescribeInstances

  ::

    
    paginator = client.get_paginator('describe_instances')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_instances`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Reservations': [
                {
                    'Groups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'Instances': [
                        {
                            'AmiLaunchIndex': 123,
                            'ImageId': 'string',
                            'InstanceId': 'string',
                            'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                            'KernelId': 'string',
                            'KeyName': 'string',
                            'LaunchTime': datetime(2015, 1, 1),
                            'Monitoring': {
                                'State': 'disabled'|'disabling'|'enabled'|'pending'
                            },
                            'Placement': {
                                'AvailabilityZone': 'string',
                                'Affinity': 'string',
                                'GroupName': 'string',
                                'HostId': 'string',
                                'Tenancy': 'default'|'dedicated'|'host',
                                'SpreadDomain': 'string'
                            },
                            'Platform': 'Windows',
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string',
                            'ProductCodes': [
                                {
                                    'ProductCodeId': 'string',
                                    'ProductCodeType': 'devpay'|'marketplace'
                                },
                            ],
                            'PublicDnsName': 'string',
                            'PublicIpAddress': 'string',
                            'RamdiskId': 'string',
                            'State': {
                                'Code': 123,
                                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                            },
                            'StateTransitionReason': 'string',
                            'SubnetId': 'string',
                            'VpcId': 'string',
                            'Architecture': 'i386'|'x86_64',
                            'BlockDeviceMappings': [
                                {
                                    'DeviceName': 'string',
                                    'Ebs': {
                                        'AttachTime': datetime(2015, 1, 1),
                                        'DeleteOnTermination': True|False,
                                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                                        'VolumeId': 'string'
                                    }
                                },
                            ],
                            'ClientToken': 'string',
                            'EbsOptimized': True|False,
                            'EnaSupport': True|False,
                            'Hypervisor': 'ovm'|'xen',
                            'IamInstanceProfile': {
                                'Arn': 'string',
                                'Id': 'string'
                            },
                            'InstanceLifecycle': 'spot'|'scheduled',
                            'ElasticGpuAssociations': [
                                {
                                    'ElasticGpuId': 'string',
                                    'ElasticGpuAssociationId': 'string',
                                    'ElasticGpuAssociationState': 'string',
                                    'ElasticGpuAssociationTime': 'string'
                                },
                            ],
                            'NetworkInterfaces': [
                                {
                                    'Association': {
                                        'IpOwnerId': 'string',
                                        'PublicDnsName': 'string',
                                        'PublicIp': 'string'
                                    },
                                    'Attachment': {
                                        'AttachTime': datetime(2015, 1, 1),
                                        'AttachmentId': 'string',
                                        'DeleteOnTermination': True|False,
                                        'DeviceIndex': 123,
                                        'Status': 'attaching'|'attached'|'detaching'|'detached'
                                    },
                                    'Description': 'string',
                                    'Groups': [
                                        {
                                            'GroupName': 'string',
                                            'GroupId': 'string'
                                        },
                                    ],
                                    'Ipv6Addresses': [
                                        {
                                            'Ipv6Address': 'string'
                                        },
                                    ],
                                    'MacAddress': 'string',
                                    'NetworkInterfaceId': 'string',
                                    'OwnerId': 'string',
                                    'PrivateDnsName': 'string',
                                    'PrivateIpAddress': 'string',
                                    'PrivateIpAddresses': [
                                        {
                                            'Association': {
                                                'IpOwnerId': 'string',
                                                'PublicDnsName': 'string',
                                                'PublicIp': 'string'
                                            },
                                            'Primary': True|False,
                                            'PrivateDnsName': 'string',
                                            'PrivateIpAddress': 'string'
                                        },
                                    ],
                                    'SourceDestCheck': True|False,
                                    'Status': 'available'|'attaching'|'in-use'|'detaching',
                                    'SubnetId': 'string',
                                    'VpcId': 'string'
                                },
                            ],
                            'RootDeviceName': 'string',
                            'RootDeviceType': 'ebs'|'instance-store',
                            'SecurityGroups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'SourceDestCheck': True|False,
                            'SpotInstanceRequestId': 'string',
                            'SriovNetSupport': 'string',
                            'StateReason': {
                                'Code': 'string',
                                'Message': 'string'
                            },
                            'Tags': [
                                {
                                    'Key': 'string',
                                    'Value': 'string'
                                },
                            ],
                            'VirtualizationType': 'hvm'|'paravirtual'
                        },
                    ],
                    'OwnerId': 'string',
                    'RequesterId': 'string',
                    'ReservationId': 'string'
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeInstances.

        
        

        - **Reservations** *(list) --* 

          Zero or more reservations.

          
          

          - *(dict) --* 

            Describes a reservation.

            
            

            - **Groups** *(list) --* 

              [EC2-Classic only] One or more security groups.

              
              

              - *(dict) --* 

                Describes a security group.

                
                

                - **GroupName** *(string) --* 

                  The name of the security group.

                  
                

                - **GroupId** *(string) --* 

                  The ID of the security group.

                  
            
          
            

            - **Instances** *(list) --* 

              One or more instances.

              
              

              - *(dict) --* 

                Describes an instance.

                
                

                - **AmiLaunchIndex** *(integer) --* 

                  The AMI launch index, which can be used to find this instance in the launch group.

                  
                

                - **ImageId** *(string) --* 

                  The ID of the AMI used to launch the instance.

                  
                

                - **InstanceId** *(string) --* 

                  The ID of the instance.

                  
                

                - **InstanceType** *(string) --* 

                  The instance type.

                  
                

                - **KernelId** *(string) --* 

                  The kernel associated with this instance, if applicable.

                  
                

                - **KeyName** *(string) --* 

                  The name of the key pair, if this instance was launched with an associated key pair.

                  
                

                - **LaunchTime** *(datetime) --* 

                  The time the instance was launched.

                  
                

                - **Monitoring** *(dict) --* 

                  The monitoring for the instance.

                  
                  

                  - **State** *(string) --* 

                    Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                    
              
                

                - **Placement** *(dict) --* 

                  The location where the instance launched, if applicable.

                  
                  

                  - **AvailabilityZone** *(string) --* 

                    The Availability Zone of the instance.

                    
                  

                  - **Affinity** *(string) --* 

                    The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

                    
                  

                  - **GroupName** *(string) --* 

                    The name of the placement group the instance is in (for cluster compute instances).

                    
                  

                  - **HostId** *(string) --* 

                    The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

                    
                  

                  - **Tenancy** *(string) --* 

                    The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

                    
                  

                  - **SpreadDomain** *(string) --* 

                    Reserved for future use.

                    
              
                

                - **Platform** *(string) --* 

                  The value is ``Windows`` for Windows instances; otherwise blank.

                  
                

                - **PrivateDnsName** *(string) --* 

                  (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the ``running`` state. 

                   

                  [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

                  
                

                - **PrivateIpAddress** *(string) --* 

                  The private IPv4 address assigned to the instance.

                  
                

                - **ProductCodes** *(list) --* 

                  The product codes attached to this instance, if applicable.

                  
                  

                  - *(dict) --* 

                    Describes a product code.

                    
                    

                    - **ProductCodeId** *(string) --* 

                      The product code.

                      
                    

                    - **ProductCodeType** *(string) --* 

                      The type of product code.

                      
                
              
                

                - **PublicDnsName** *(string) --* 

                  (IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the ``running`` state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

                  
                

                - **PublicIpAddress** *(string) --* 

                  The public IPv4 address assigned to the instance, if applicable.

                  
                

                - **RamdiskId** *(string) --* 

                  The RAM disk associated with this instance, if applicable.

                  
                

                - **State** *(dict) --* 

                  The current state of the instance.

                  
                  

                  - **Code** *(integer) --* 

                    The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                     

                     
                    * ``0`` : ``pending``   
                     
                    * ``16`` : ``running``   
                     
                    * ``32`` : ``shutting-down``   
                     
                    * ``48`` : ``terminated``   
                     
                    * ``64`` : ``stopping``   
                     
                    * ``80`` : ``stopped``   
                     

                    
                  

                  - **Name** *(string) --* 

                    The current state of the instance.

                    
              
                

                - **StateTransitionReason** *(string) --* 

                  The reason for the most recent state transition. This might be an empty string.

                  
                

                - **SubnetId** *(string) --* 

                  [EC2-VPC] The ID of the subnet in which the instance is running.

                  
                

                - **VpcId** *(string) --* 

                  [EC2-VPC] The ID of the VPC in which the instance is running.

                  
                

                - **Architecture** *(string) --* 

                  The architecture of the image.

                  
                

                - **BlockDeviceMappings** *(list) --* 

                  Any block device mapping entries for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a block device mapping.

                    
                    

                    - **DeviceName** *(string) --* 

                      The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                      
                    

                    - **Ebs** *(dict) --* 

                      Parameters used to automatically set up EBS volumes when the instance is launched.

                      
                      

                      - **AttachTime** *(datetime) --* 

                        The time stamp when the attachment initiated.

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        Indicates whether the volume is deleted on instance termination.

                        
                      

                      - **Status** *(string) --* 

                        The attachment state.

                        
                      

                      - **VolumeId** *(string) --* 

                        The ID of the EBS volume.

                        
                  
                
              
                

                - **ClientToken** *(string) --* 

                  The idempotency token you provided when you launched the instance, if applicable.

                  
                

                - **EbsOptimized** *(boolean) --* 

                  Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                  
                

                - **EnaSupport** *(boolean) --* 

                  Specifies whether enhanced networking with ENA is enabled.

                  
                

                - **Hypervisor** *(string) --* 

                  The hypervisor type of the instance.

                  
                

                - **IamInstanceProfile** *(dict) --* 

                  The IAM instance profile associated with the instance, if applicable.

                  
                  

                  - **Arn** *(string) --* 

                    The Amazon Resource Name (ARN) of the instance profile.

                    
                  

                  - **Id** *(string) --* 

                    The ID of the instance profile.

                    
              
                

                - **InstanceLifecycle** *(string) --* 

                  Indicates whether this is a Spot instance or a Scheduled Instance.

                  
                

                - **ElasticGpuAssociations** *(list) --* 

                  The Elastic GPU associated with the instance.

                  
                  

                  - *(dict) --* 

                    Describes the association between an instance and an Elastic GPU.

                    
                    

                    - **ElasticGpuId** *(string) --* 

                      The ID of the Elastic GPU.

                      
                    

                    - **ElasticGpuAssociationId** *(string) --* 

                      The ID of the association.

                      
                    

                    - **ElasticGpuAssociationState** *(string) --* 

                      The state of the association between the instance and the Elastic GPU.

                      
                    

                    - **ElasticGpuAssociationTime** *(string) --* 

                      The time the Elastic GPU was associated with the instance.

                      
                
              
                

                - **NetworkInterfaces** *(list) --* 

                  [EC2-VPC] One or more network interfaces for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a network interface.

                    
                    

                    - **Association** *(dict) --* 

                      The association information for an Elastic IPv4 associated with the network interface.

                      
                      

                      - **IpOwnerId** *(string) --* 

                        The ID of the owner of the Elastic IP address.

                        
                      

                      - **PublicDnsName** *(string) --* 

                        The public DNS name.

                        
                      

                      - **PublicIp** *(string) --* 

                        The public IP address or Elastic IP address bound to the network interface.

                        
                  
                    

                    - **Attachment** *(dict) --* 

                      The network interface attachment.

                      
                      

                      - **AttachTime** *(datetime) --* 

                        The time stamp when the attachment initiated.

                        
                      

                      - **AttachmentId** *(string) --* 

                        The ID of the network interface attachment.

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        Indicates whether the network interface is deleted when the instance is terminated.

                        
                      

                      - **DeviceIndex** *(integer) --* 

                        The index of the device on the instance for the network interface attachment.

                        
                      

                      - **Status** *(string) --* 

                        The attachment state.

                        
                  
                    

                    - **Description** *(string) --* 

                      The description.

                      
                    

                    - **Groups** *(list) --* 

                      One or more security groups.

                      
                      

                      - *(dict) --* 

                        Describes a security group.

                        
                        

                        - **GroupName** *(string) --* 

                          The name of the security group.

                          
                        

                        - **GroupId** *(string) --* 

                          The ID of the security group.

                          
                    
                  
                    

                    - **Ipv6Addresses** *(list) --* 

                      One or more IPv6 addresses associated with the network interface.

                      
                      

                      - *(dict) --* 

                        Describes an IPv6 address.

                        
                        

                        - **Ipv6Address** *(string) --* 

                          The IPv6 address.

                          
                    
                  
                    

                    - **MacAddress** *(string) --* 

                      The MAC address.

                      
                    

                    - **NetworkInterfaceId** *(string) --* 

                      The ID of the network interface.

                      
                    

                    - **OwnerId** *(string) --* 

                      The ID of the AWS account that created the network interface.

                      
                    

                    - **PrivateDnsName** *(string) --* 

                      The private DNS name.

                      
                    

                    - **PrivateIpAddress** *(string) --* 

                      The IPv4 address of the network interface within the subnet.

                      
                    

                    - **PrivateIpAddresses** *(list) --* 

                      One or more private IPv4 addresses associated with the network interface.

                      
                      

                      - *(dict) --* 

                        Describes a private IPv4 address.

                        
                        

                        - **Association** *(dict) --* 

                          The association information for an Elastic IP address for the network interface.

                          
                          

                          - **IpOwnerId** *(string) --* 

                            The ID of the owner of the Elastic IP address.

                            
                          

                          - **PublicDnsName** *(string) --* 

                            The public DNS name.

                            
                          

                          - **PublicIp** *(string) --* 

                            The public IP address or Elastic IP address bound to the network interface.

                            
                      
                        

                        - **Primary** *(boolean) --* 

                          Indicates whether this IPv4 address is the primary private IP address of the network interface.

                          
                        

                        - **PrivateDnsName** *(string) --* 

                          The private IPv4 DNS name.

                          
                        

                        - **PrivateIpAddress** *(string) --* 

                          The private IPv4 address of the network interface.

                          
                    
                  
                    

                    - **SourceDestCheck** *(boolean) --* 

                      Indicates whether to validate network traffic to or from this network interface.

                      
                    

                    - **Status** *(string) --* 

                      The status of the network interface.

                      
                    

                    - **SubnetId** *(string) --* 

                      The ID of the subnet.

                      
                    

                    - **VpcId** *(string) --* 

                      The ID of the VPC.

                      
                
              
                

                - **RootDeviceName** *(string) --* 

                  The root device name (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

                  
                

                - **RootDeviceType** *(string) --* 

                  The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

                  
                

                - **SecurityGroups** *(list) --* 

                  One or more security groups for the instance.

                  
                  

                  - *(dict) --* 

                    Describes a security group.

                    
                    

                    - **GroupName** *(string) --* 

                      The name of the security group.

                      
                    

                    - **GroupId** *(string) --* 

                      The ID of the security group.

                      
                
              
                

                - **SourceDestCheck** *(boolean) --* 

                  Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

                  
                

                - **SpotInstanceRequestId** *(string) --* 

                  If the request is a Spot instance request, the ID of the request.

                  
                

                - **SriovNetSupport** *(string) --* 

                  Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

                  
                

                - **StateReason** *(dict) --* 

                  The reason for the most recent state transition.

                  
                  

                  - **Code** *(string) --* 

                    The reason code for the state change.

                    
                  

                  - **Message** *(string) --* 

                    The message for the state change.

                     

                     
                    * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
                     
                    * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
                     
                    * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
                     
                    * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
                     
                    * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
                     
                    * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
                     
                    * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
                     
                    * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
                     
                    * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
                     

                    
              
                

                - **Tags** *(list) --* 

                  Any tags assigned to the instance.

                  
                  

                  - *(dict) --* 

                    Describes a tag.

                    
                    

                    - **Key** *(string) --* 

                      The key of the tag.

                       

                      Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                      
                    

                    - **Value** *(string) --* 

                      The value of the tag.

                       

                      Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                      
                
              
                

                - **VirtualizationType** *(string) --* 

                  The virtualization type of the instance.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The ID of the AWS account that owns the reservation.

              
            

            - **RequesterId** *(string) --* 

              The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).

              
            

            - **ReservationId** *(string) --* 

              The ID of the reservation.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeNatGateways

  ::

    
    paginator = client.get_paginator('describe_nat_gateways')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_nat_gateways`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          NatGatewayIds=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``nat-gateway-id`` - The ID of the NAT gateway. 
       
      * ``state`` - The state of the NAT gateway (``pending`` | ``failed`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``subnet-id`` - The ID of the subnet in which the NAT gateway resides. 
       
      * ``vpc-id`` - The ID of the VPC in which the NAT gateway resides. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type NatGatewayIds: list
    :param NatGatewayIds: 

      One or more NAT gateway IDs.

      

    
      - *(string) --* 

      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NatGateways': [
                {
                    'CreateTime': datetime(2015, 1, 1),
                    'DeleteTime': datetime(2015, 1, 1),
                    'FailureCode': 'string',
                    'FailureMessage': 'string',
                    'NatGatewayAddresses': [
                        {
                            'AllocationId': 'string',
                            'NetworkInterfaceId': 'string',
                            'PrivateIp': 'string',
                            'PublicIp': 'string'
                        },
                    ],
                    'NatGatewayId': 'string',
                    'ProvisionedBandwidth': {
                        'ProvisionTime': datetime(2015, 1, 1),
                        'Provisioned': 'string',
                        'RequestTime': datetime(2015, 1, 1),
                        'Requested': 'string',
                        'Status': 'string'
                    },
                    'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
                    'SubnetId': 'string',
                    'VpcId': 'string'
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNatGateways.

        
        

        - **NatGateways** *(list) --* 

          Information about the NAT gateways.

          
          

          - *(dict) --* 

            Describes a NAT gateway.

            
            

            - **CreateTime** *(datetime) --* 

              The date and time the NAT gateway was created.

              
            

            - **DeleteTime** *(datetime) --* 

              The date and time the NAT gateway was deleted, if applicable.

              
            

            - **FailureCode** *(string) --* 

              If the NAT gateway could not be created, specifies the error code for the failure. (``InsufficientFreeAddressesInSubnet`` | ``Gateway.NotAttached`` | ``InvalidAllocationID.NotFound`` | ``Resource.AlreadyAssociated`` | ``InternalError`` | ``InvalidSubnetID.NotFound`` )

              
            

            - **FailureMessage** *(string) --* 

              If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

               

               
              * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway" 
               
              * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached" 
               
              * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway" 
               
              * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated" 
               
              * For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again." 
               
              * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found." 
               

              
            

            - **NatGatewayAddresses** *(list) --* 

              Information about the IP addresses and network interface associated with the NAT gateway.

              
              

              - *(dict) --* 

                Describes the IP addresses and network interface associated with a NAT gateway.

                
                

                - **AllocationId** *(string) --* 

                  The allocation ID of the Elastic IP address that's associated with the NAT gateway.

                  
                

                - **NetworkInterfaceId** *(string) --* 

                  The ID of the network interface associated with the NAT gateway.

                  
                

                - **PrivateIp** *(string) --* 

                  The private IP address associated with the Elastic IP address.

                  
                

                - **PublicIp** *(string) --* 

                  The Elastic IP address associated with the NAT gateway.

                  
            
          
            

            - **NatGatewayId** *(string) --* 

              The ID of the NAT gateway.

              
            

            - **ProvisionedBandwidth** *(dict) --* 

              Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

              
              

              - **ProvisionTime** *(datetime) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Provisioned** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **RequestTime** *(datetime) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Requested** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
              

              - **Status** *(string) --* 

                Reserved. If you need to sustain traffic greater than the `documented limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html>`_ , contact us through the `Support Center <https://console.aws.amazon.com/support/home?>`_ .

                
          
            

            - **State** *(string) --* 

              The state of the NAT gateway.

               

               
              * ``pending`` : The NAT gateway is being created and is not ready to process traffic. 
               
              * ``failed`` : The NAT gateway could not be created. Check the ``failureCode`` and ``failureMessage`` fields for the reason. 
               
              * ``available`` : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway. 
               
              * ``deleting`` : The NAT gateway is in the process of being terminated and may still be processing traffic. 
               
              * ``deleted`` : The NAT gateway has been terminated and is no longer processing traffic. 
               

              
            

            - **SubnetId** *(string) --* 

              The ID of the subnet in which the NAT gateway is located.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC in which the NAT gateway is located.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeReservedInstancesModifications

  ::

    
    paginator = client.get_paginator('describe_reserved_instances_modifications')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_reserved_instances_modifications`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ReservedInstancesModificationIds=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``client-token`` - The idempotency token for the modification request. 
       
      * ``create-date`` - The time when the modification request was created. 
       
      * ``effective-date`` - The time when the modification becomes effective. 
       
      * ``modification-result.reserved-instances-id`` - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is ``fulfilled`` . 
       
      * ``modification-result.target-configuration.availability-zone`` - The Availability Zone for the new Reserved Instances. 
       
      * ``modification-result.target-configuration.instance-count`` - The number of new Reserved Instances. 
       
      * ``modification-result.target-configuration.instance-type`` - The instance type of the new Reserved Instances. 
       
      * ``modification-result.target-configuration.platform`` - The network platform of the new Reserved Instances (``EC2-Classic`` | ``EC2-VPC`` ). 
       
      * ``reserved-instances-id`` - The ID of the Reserved Instances modified. 
       
      * ``reserved-instances-modification-id`` - The ID of the modification request. 
       
      * ``status`` - The status of the Reserved Instances modification request (``processing`` | ``fulfilled`` | ``failed`` ). 
       
      * ``status-message`` - The reason for the status. 
       
      * ``update-date`` - The time when the modification request was last updated. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ReservedInstancesModificationIds: list
    :param ReservedInstancesModificationIds: 

      IDs for the submitted modification request.

      

    
      - *(string) --* 

      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesModifications': [
                {
                    'ClientToken': 'string',
                    'CreateDate': datetime(2015, 1, 1),
                    'EffectiveDate': datetime(2015, 1, 1),
                    'ModificationResults': [
                        {
                            'ReservedInstancesId': 'string',
                            'TargetConfiguration': {
                                'AvailabilityZone': 'string',
                                'InstanceCount': 123,
                                'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                                'Platform': 'string',
                                'Scope': 'Availability Zone'|'Region'
                            }
                        },
                    ],
                    'ReservedInstancesIds': [
                        {
                            'ReservedInstancesId': 'string'
                        },
                    ],
                    'ReservedInstancesModificationId': 'string',
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'UpdateDate': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeReservedInstancesModifications.

        
        

        - **ReservedInstancesModifications** *(list) --* 

          The Reserved Instance modification information.

          
          

          - *(dict) --* 

            Describes a Reserved Instance modification.

            
            

            - **ClientToken** *(string) --* 

              A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

              
            

            - **CreateDate** *(datetime) --* 

              The time when the modification request was created.

              
            

            - **EffectiveDate** *(datetime) --* 

              The time for the modification to become effective.

              
            

            - **ModificationResults** *(list) --* 

              Contains target configurations along with their corresponding new Reserved Instance IDs.

              
              

              - *(dict) --* 

                Describes the modification request/s.

                
                

                - **ReservedInstancesId** *(string) --* 

                  The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.

                  
                

                - **TargetConfiguration** *(dict) --* 

                  The target Reserved Instances configurations supplied as part of the modification request.

                  
                  

                  - **AvailabilityZone** *(string) --* 

                    The Availability Zone for the modified Reserved Instances.

                    
                  

                  - **InstanceCount** *(integer) --* 

                    The number of modified Reserved Instances.

                    
                  

                  - **InstanceType** *(string) --* 

                    The instance type for the modified Reserved Instances.

                    
                  

                  - **Platform** *(string) --* 

                    The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

                    
                  

                  - **Scope** *(string) --* 

                    Whether the Reserved Instance is applied to instances in a region or instances in a specific Availability Zone.

                    
              
            
          
            

            - **ReservedInstancesIds** *(list) --* 

              The IDs of one or more Reserved Instances.

              
              

              - *(dict) --* 

                Describes the ID of a Reserved Instance.

                
                

                - **ReservedInstancesId** *(string) --* 

                  The ID of the Reserved Instance.

                  
            
          
            

            - **ReservedInstancesModificationId** *(string) --* 

              A unique ID for the Reserved Instance modification.

              
            

            - **Status** *(string) --* 

              The status of the Reserved Instances modification request.

              
            

            - **StatusMessage** *(string) --* 

              The reason for the status.

              
            

            - **UpdateDate** *(datetime) --* 

              The time when the modification request was last updated.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeReservedInstancesOfferings

  ::

    
    paginator = client.get_paginator('describe_reserved_instances_offerings')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_reserved_instances_offerings`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          AvailabilityZone='string',
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          IncludeMarketplace=True|False,
          InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          MaxDuration=123,
          MaxInstanceCount=123,
          MinDuration=123,
          OfferingClass='standard'|'convertible',
          ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
          ReservedInstancesOfferingIds=[
              'string',
          ],
          DryRun=True|False,
          InstanceTenancy='default'|'dedicated'|'host',
          OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone in which the Reserved Instance can be used.

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone where the Reserved Instance can be used. 
       
      * ``duration`` - The duration of the Reserved Instance (for example, one year or three years), in seconds (``31536000`` | ``94608000`` ). 
       
      * ``fixed-price`` - The purchase price of the Reserved Instance (for example, 9800.0). 
       
      * ``instance-type`` - The instance type that is covered by the reservation. 
       
      * ``marketplace`` - Set to ``true`` to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed. 
       
      * ``product-description`` - The Reserved Instance product platform description. Instances that include ``(Amazon VPC)`` in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (``Linux/UNIX`` | ``Linux/UNIX (Amazon VPC)`` | ``SUSE Linux`` | ``SUSE Linux (Amazon VPC)`` | ``Red Hat Enterprise Linux`` | ``Red Hat Enterprise Linux (Amazon VPC)`` | ``Windows`` | ``Windows (Amazon VPC)`` | ``Windows with SQL Server Standard`` | ``Windows with SQL Server Standard (Amazon VPC)`` | ``Windows with SQL Server Web`` | ``Windows with SQL Server Web (Amazon VPC)`` | ``Windows with SQL Server Enterprise`` | ``Windows with SQL Server Enterprise (Amazon VPC)`` )  
       
      * ``reserved-instances-offering-id`` - The Reserved Instances offering ID. 
       
      * ``scope`` - The scope of the Reserved Instance (``Availability Zone`` or ``Region`` ). 
       
      * ``usage-price`` - The usage price of the Reserved Instance, per hour (for example, 0.84). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type IncludeMarketplace: boolean
    :param IncludeMarketplace: 

      Include Reserved Instance Marketplace offerings in the response.

      

    
    :type InstanceType: string
    :param InstanceType: 

      The instance type that the reservation will cover (for example, ``m1.small`` ). For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type MaxDuration: integer
    :param MaxDuration: 

      The maximum duration (in seconds) to filter when searching for offerings.

       

      Default: 94608000 (3 years)

      

    
    :type MaxInstanceCount: integer
    :param MaxInstanceCount: 

      The maximum number of instances to filter when searching for offerings.

       

      Default: 20

      

    
    :type MinDuration: integer
    :param MinDuration: 

      The minimum duration (in seconds) to filter when searching for offerings.

       

      Default: 2592000 (1 month)

      

    
    :type OfferingClass: string
    :param OfferingClass: 

      The offering class of the Reserved Instance. Can be ``standard`` or ``convertible`` .

      

    
    :type ProductDescription: string
    :param ProductDescription: 

      The Reserved Instance product platform description. Instances that include ``(Amazon VPC)`` in the description are for use with Amazon VPC.

      

    
    :type ReservedInstancesOfferingIds: list
    :param ReservedInstancesOfferingIds: 

      One or more Reserved Instances offering IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceTenancy: string
    :param InstanceTenancy: 

      The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of ``dedicated`` is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).

       

       **Important:** The ``host`` value cannot be used with this parameter. Use the ``default`` or ``dedicated`` values only.

       

      Default: ``default``  

      

    
    :type OfferingType: string
    :param OfferingType: 

      The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the ``Medium Utilization`` Reserved Instance offering type. 

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'ReservedInstancesOfferings': [
                {
                    'AvailabilityZone': 'string',
                    'Duration': 123,
                    'FixedPrice': ...,
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'ReservedInstancesOfferingId': 'string',
                    'UsagePrice': ...,
                    'CurrencyCode': 'USD',
                    'InstanceTenancy': 'default'|'dedicated'|'host',
                    'Marketplace': True|False,
                    'OfferingClass': 'standard'|'convertible',
                    'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
                    'PricingDetails': [
                        {
                            'Count': 123,
                            'Price': 123.0
                        },
                    ],
                    'RecurringCharges': [
                        {
                            'Amount': 123.0,
                            'Frequency': 'Hourly'
                        },
                    ],
                    'Scope': 'Availability Zone'|'Region'
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeReservedInstancesOfferings.

        
        

        - **ReservedInstancesOfferings** *(list) --* 

          A list of Reserved Instances offerings.

          
          

          - *(dict) --* 

            Describes a Reserved Instance offering.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone in which the Reserved Instance can be used.

              
            

            - **Duration** *(integer) --* 

              The duration of the Reserved Instance, in seconds.

              
            

            - **FixedPrice** *(float) --* 

              The purchase price of the Reserved Instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type on which the Reserved Instance can be used.

              
            

            - **ProductDescription** *(string) --* 

              The Reserved Instance product platform description.

              
            

            - **ReservedInstancesOfferingId** *(string) --* 

              The ID of the Reserved Instance offering. This is the offering ID used in  GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

              
            

            - **UsagePrice** *(float) --* 

              The usage price of the Reserved Instance, per hour.

              
            

            - **CurrencyCode** *(string) --* 

              The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is ``USD`` .

              
            

            - **InstanceTenancy** *(string) --* 

              The tenancy of the instance.

              
            

            - **Marketplace** *(boolean) --* 

              Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is ``true`` .

              
            

            - **OfferingClass** *(string) --* 

              If ``convertible`` it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If ``standard`` , it is not possible to perform an exchange.

              
            

            - **OfferingType** *(string) --* 

              The Reserved Instance offering type.

              
            

            - **PricingDetails** *(list) --* 

              The pricing details of the Reserved Instance offering.

              
              

              - *(dict) --* 

                Describes a Reserved Instance offering.

                
                

                - **Count** *(integer) --* 

                  The number of reservations available for the price.

                  
                

                - **Price** *(float) --* 

                  The price per instance.

                  
            
          
            

            - **RecurringCharges** *(list) --* 

              The recurring charge tag assigned to the resource.

              
              

              - *(dict) --* 

                Describes a recurring charge.

                
                

                - **Amount** *(float) --* 

                  The amount of the recurring charge.

                  
                

                - **Frequency** *(string) --* 

                  The frequency of the recurring charge.

                  
            
          
            

            - **Scope** *(string) --* 

              Whether the Reserved Instance is applied to instances in a region or an Availability Zone.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeSnapshots

  ::

    
    paginator = client.get_paginator('describe_snapshots')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_snapshots`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          OwnerIds=[
              'string',
          ],
          RestorableByUserIds=[
              'string',
          ],
          SnapshotIds=[
              'string',
          ],
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``description`` - A description of the snapshot. 
       
      * ``owner-alias`` - Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The ID of the AWS account that owns the snapshot. 
       
      * ``progress`` - The progress of the snapshot, as a percentage (for example, 80%). 
       
      * ``snapshot-id`` - The snapshot ID. 
       
      * ``start-time`` - The time stamp when the snapshot was initiated. 
       
      * ``status`` - The status of the snapshot (``pending`` | ``completed`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The ID of the volume the snapshot is for. 
       
      * ``volume-size`` - The size of the volume, in GiB. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type OwnerIds: list
    :param OwnerIds: 

      Returns the snapshots owned by the specified owner. Multiple owners can be specified.

      

    
      - *(string) --* 

      
  
    :type RestorableByUserIds: list
    :param RestorableByUserIds: 

      One or more AWS accounts IDs that can create volumes from the snapshot.

      

    
      - *(string) --* 

      
  
    :type SnapshotIds: list
    :param SnapshotIds: 

      One or more snapshot IDs.

       

      Default: Describes snapshots for which you have launch permissions.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Snapshots': [
                {
                    'DataEncryptionKeyId': 'string',
                    'Description': 'string',
                    'Encrypted': True|False,
                    'KmsKeyId': 'string',
                    'OwnerId': 'string',
                    'Progress': 'string',
                    'SnapshotId': 'string',
                    'StartTime': datetime(2015, 1, 1),
                    'State': 'pending'|'completed'|'error',
                    'StateMessage': 'string',
                    'VolumeId': 'string',
                    'VolumeSize': 123,
                    'OwnerAlias': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSnapshots.

        
        

        - **Snapshots** *(list) --* 

          Information about the snapshots.

          
          

          - *(dict) --* 

            Describes a snapshot.

            
            

            - **DataEncryptionKeyId** *(string) --* 

              The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the  DescribeSnapshots API operation.

              
            

            - **Description** *(string) --* 

              The description for the snapshot.

              
            

            - **Encrypted** *(boolean) --* 

              Indicates whether the snapshot is encrypted.

              
            

            - **KmsKeyId** *(string) --* 

              The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.

              
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the EBS snapshot owner.

              
            

            - **Progress** *(string) --* 

              The progress of the snapshot, as a percentage.

              
            

            - **SnapshotId** *(string) --* 

              The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

              
            

            - **StartTime** *(datetime) --* 

              The time stamp when the snapshot was initiated.

              
            

            - **State** *(string) --* 

              The snapshot state.

              
            

            - **StateMessage** *(string) --* 

              Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the  DescribeSnapshots API operation.

              
            

            - **VolumeId** *(string) --* 

              The ID of the volume that was used to create the snapshot. Snapshots created by the  CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

              
            

            - **VolumeSize** *(integer) --* 

              The size of the volume, in GiB.

              
            

            - **OwnerAlias** *(string) --* 

              Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the snapshot.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
        
      
    

.. py:class:: EC2.Paginator.DescribeSpotFleetRequests

  ::

    
    paginator = client.get_paginator('describe_spot_fleet_requests')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_spot_fleet_requests`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          DryRun=True|False,
          SpotFleetRequestIds=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotFleetRequestIds: list
    :param SpotFleetRequestIds: 

      The IDs of the Spot fleet requests.

      

    
      - *(string) --* 

      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotFleetRequestConfigs': [
                {
                    'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
                    'CreateTime': datetime(2015, 1, 1),
                    'SpotFleetRequestConfig': {
                        'AllocationStrategy': 'lowestPrice'|'diversified',
                        'ClientToken': 'string',
                        'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
                        'FulfilledCapacity': 123.0,
                        'IamFleetRole': 'string',
                        'LaunchSpecifications': [
                            {
                                'SecurityGroups': [
                                    {
                                        'GroupName': 'string',
                                        'GroupId': 'string'
                                    },
                                ],
                                'AddressingType': 'string',
                                'BlockDeviceMappings': [
                                    {
                                        'DeviceName': 'string',
                                        'VirtualName': 'string',
                                        'Ebs': {
                                            'Encrypted': True|False,
                                            'DeleteOnTermination': True|False,
                                            'Iops': 123,
                                            'SnapshotId': 'string',
                                            'VolumeSize': 123,
                                            'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                                        },
                                        'NoDevice': 'string'
                                    },
                                ],
                                'EbsOptimized': True|False,
                                'IamInstanceProfile': {
                                    'Arn': 'string',
                                    'Name': 'string'
                                },
                                'ImageId': 'string',
                                'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                                'KernelId': 'string',
                                'KeyName': 'string',
                                'Monitoring': {
                                    'Enabled': True|False
                                },
                                'NetworkInterfaces': [
                                    {
                                        'AssociatePublicIpAddress': True|False,
                                        'DeleteOnTermination': True|False,
                                        'Description': 'string',
                                        'DeviceIndex': 123,
                                        'Groups': [
                                            'string',
                                        ],
                                        'Ipv6AddressCount': 123,
                                        'Ipv6Addresses': [
                                            {
                                                'Ipv6Address': 'string'
                                            },
                                        ],
                                        'NetworkInterfaceId': 'string',
                                        'PrivateIpAddress': 'string',
                                        'PrivateIpAddresses': [
                                            {
                                                'Primary': True|False,
                                                'PrivateIpAddress': 'string'
                                            },
                                        ],
                                        'SecondaryPrivateIpAddressCount': 123,
                                        'SubnetId': 'string'
                                    },
                                ],
                                'Placement': {
                                    'AvailabilityZone': 'string',
                                    'GroupName': 'string',
                                    'Tenancy': 'default'|'dedicated'|'host'
                                },
                                'RamdiskId': 'string',
                                'SpotPrice': 'string',
                                'SubnetId': 'string',
                                'UserData': 'string',
                                'WeightedCapacity': 123.0,
                                'TagSpecifications': [
                                    {
                                        'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                                        'Tags': [
                                            {
                                                'Key': 'string',
                                                'Value': 'string'
                                            },
                                        ]
                                    },
                                ]
                            },
                        ],
                        'SpotPrice': 'string',
                        'TargetCapacity': 123,
                        'TerminateInstancesWithExpiration': True|False,
                        'Type': 'request'|'maintain',
                        'ValidFrom': datetime(2015, 1, 1),
                        'ValidUntil': datetime(2015, 1, 1),
                        'ReplaceUnhealthyInstances': True|False
                    },
                    'SpotFleetRequestId': 'string',
                    'SpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotFleetRequests.

        
        

        - **SpotFleetRequestConfigs** *(list) --* 

          Information about the configuration of your Spot fleet.

          
          

          - *(dict) --* 

            Describes a Spot fleet request.

            
            

            - **ActivityStatus** *(string) --* 

              The progress of the Spot fleet request. If there is an error, the status is ``error`` . After all bids are placed, the status is ``pending_fulfillment`` . If the size of the fleet is equal to or greater than its target capacity, the status is ``fulfilled`` . If the size of the fleet is decreased, the status is ``pending_termination`` while Spot instances are terminating.

              
            

            - **CreateTime** *(datetime) --* 

              The creation date and time of the request.

              
            

            - **SpotFleetRequestConfig** *(dict) --* 

              Information about the configuration of the Spot fleet request.

              
              

              - **AllocationStrategy** *(string) --* 

                Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is ``lowestPrice`` .

                
              

              - **ClientToken** *(string) --* 

                A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

                
              

              - **ExcessCapacityTerminationPolicy** *(string) --* 

                Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

                
              

              - **FulfilledCapacity** *(float) --* 

                The number of units fulfilled by this request compared to the set target capacity.

                
              

              - **IamFleetRole** *(string) --* 

                Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using  CancelSpotFleetRequests or when the Spot fleet request expires, if you set ``terminateInstancesWithExpiration`` .

                
              

              - **LaunchSpecifications** *(list) --* 

                Information about the launch specifications for the Spot fleet request.

                
                

                - *(dict) --* 

                  Describes the launch specification for one or more Spot instances.

                  
                  

                  - **SecurityGroups** *(list) --* 

                    One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

                    
                    

                    - *(dict) --* 

                      Describes a security group.

                      
                      

                      - **GroupName** *(string) --* 

                        The name of the security group.

                        
                      

                      - **GroupId** *(string) --* 

                        The ID of the security group.

                        
                  
                
                  

                  - **AddressingType** *(string) --* 

                    Deprecated.

                    
                  

                  - **BlockDeviceMappings** *(list) --* 

                    One or more block device mapping entries.

                    
                    

                    - *(dict) --* 

                      Describes a block device mapping.

                      
                      

                      - **DeviceName** *(string) --* 

                        The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

                        
                      

                      - **VirtualName** *(string) --* 

                        The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

                         

                        Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

                        
                      

                      - **Ebs** *(dict) --* 

                        Parameters used to automatically set up EBS volumes when the instance is launched.

                        
                        

                        - **Encrypted** *(boolean) --* 

                          Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                          
                        

                        - **DeleteOnTermination** *(boolean) --* 

                          Indicates whether the EBS volume is deleted on instance termination.

                          
                        

                        - **Iops** *(integer) --* 

                          The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                           

                          Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                           

                          Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                          
                        

                        - **SnapshotId** *(string) --* 

                          The ID of the snapshot.

                          
                        

                        - **VolumeSize** *(integer) --* 

                          The size of the volume, in GiB.

                           

                          Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                           

                          Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                          
                        

                        - **VolumeType** *(string) --* 

                          The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                           

                          Default: ``standard``  

                          
                    
                      

                      - **NoDevice** *(string) --* 

                        Suppresses the specified device included in the block device mapping of the AMI.

                        
                  
                
                  

                  - **EbsOptimized** *(boolean) --* 

                    Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

                     

                    Default: ``false``  

                    
                  

                  - **IamInstanceProfile** *(dict) --* 

                    The IAM instance profile.

                    
                    

                    - **Arn** *(string) --* 

                      The Amazon Resource Name (ARN) of the instance profile.

                      
                    

                    - **Name** *(string) --* 

                      The name of the instance profile.

                      
                
                  

                  - **ImageId** *(string) --* 

                    The ID of the AMI.

                    
                  

                  - **InstanceType** *(string) --* 

                    The instance type. Note that T2 and HS1 instance types are not supported.

                    
                  

                  - **KernelId** *(string) --* 

                    The ID of the kernel.

                    
                  

                  - **KeyName** *(string) --* 

                    The name of the key pair.

                    
                  

                  - **Monitoring** *(dict) --* 

                    Enable or disable monitoring for the instances.

                    
                    

                    - **Enabled** *(boolean) --* 

                      Enables monitoring for the instance.

                       

                      Default: ``false``  

                      
                
                  

                  - **NetworkInterfaces** *(list) --* 

                    One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                    
                    

                    - *(dict) --* 

                      Describes a network interface.

                      
                      

                      - **AssociatePublicIpAddress** *(boolean) --* 

                        Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

                        
                      

                      - **DeleteOnTermination** *(boolean) --* 

                        If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

                        
                      

                      - **Description** *(string) --* 

                        The description of the network interface. Applies only if creating a network interface when launching an instance.

                        
                      

                      - **DeviceIndex** *(integer) --* 

                        The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

                        
                      

                      - **Groups** *(list) --* 

                        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                        
                        

                        - *(string) --* 
                    
                      

                      - **Ipv6AddressCount** *(integer) --* 

                        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                        
                      

                      - **Ipv6Addresses** *(list) --* 

                        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                        
                        

                        - *(dict) --* 

                          Describes an IPv6 address.

                          
                          

                          - **Ipv6Address** *(string) --* 

                            The IPv6 address.

                            
                      
                    
                      

                      - **NetworkInterfaceId** *(string) --* 

                        The ID of the network interface.

                        
                      

                      - **PrivateIpAddress** *(string) --* 

                        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                      

                      - **PrivateIpAddresses** *(list) --* 

                        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                        

                        - *(dict) --* 

                          Describes a secondary private IPv4 address for a network interface.

                          
                          

                          - **Primary** *(boolean) --* 

                            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                            
                          

                          - **PrivateIpAddress** *(string) --* 

                            The private IPv4 addresses.

                            
                      
                    
                      

                      - **SecondaryPrivateIpAddressCount** *(integer) --* 

                        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

                        
                      

                      - **SubnetId** *(string) --* 

                        The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

                        
                  
                
                  

                  - **Placement** *(dict) --* 

                    The placement information.

                    
                    

                    - **AvailabilityZone** *(string) --* 

                      The Availability Zone.

                       

                      [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

                      
                    

                    - **GroupName** *(string) --* 

                      The name of the placement group (for cluster instances).

                      
                    

                    - **Tenancy** *(string) --* 

                      The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for Spot instances.

                      
                
                  

                  - **RamdiskId** *(string) --* 

                    The ID of the RAM disk.

                    
                  

                  - **SpotPrice** *(string) --* 

                    The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of ``WeightedCapacity`` .

                    
                  

                  - **SubnetId** *(string) --* 

                    The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".

                    
                  

                  - **UserData** *(string) --* 

                    The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

                    
                  

                  - **WeightedCapacity** *(float) --* 

                    The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).

                     

                    If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.

                    
                  

                  - **TagSpecifications** *(list) --* 

                    The tags to apply during creation.

                    
                    

                    - *(dict) --* 

                      The tags for a Spot fleet resource.

                      
                      

                      - **ResourceType** *(string) --* 

                        The type of resource. Currently, the only resource type that is supported is ``instance`` .

                        
                      

                      - **Tags** *(list) --* 

                        The tags.

                        
                        

                        - *(dict) --* 

                          Describes a tag.

                          
                          

                          - **Key** *(string) --* 

                            The key of the tag.

                             

                            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                            
                          

                          - **Value** *(string) --* 

                            The value of the tag.

                             

                            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                            
                      
                    
                  
                
              
            
              

              - **SpotPrice** *(string) --* 

                The bid price per unit hour.

                
              

              - **TargetCapacity** *(integer) --* 

                The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.

                
              

              - **TerminateInstancesWithExpiration** *(boolean) --* 

                Indicates whether running Spot instances should be terminated when the Spot fleet request expires.

                
              

              - **Type** *(string) --* 

                The type of request. Indicates whether the fleet will only ``request`` the target capacity or also attempt to ``maintain`` it. When you ``request`` a certain target capacity, the fleet will only place the required bids. It will not attempt to replenish Spot instances if capacity is diminished, nor will it submit bids in alternative Spot pools if capacity is not available. When you want to ``maintain`` a certain target capacity, fleet will place the required bids to meet this target capacity. It will also automatically replenish any interrupted instances. Default: ``maintain`` .

                
              

              - **ValidFrom** *(datetime) --* 

                The start date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). The default is to start fulfilling the request immediately.

                
              

              - **ValidUntil** *(datetime) --* 

                The end date and time of the request, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.

                
              

              - **ReplaceUnhealthyInstances** *(boolean) --* 

                Indicates whether Spot fleet should replace unhealthy instances.

                
          
            

            - **SpotFleetRequestId** *(string) --* 

              The ID of the Spot fleet request.

              
            

            - **SpotFleetRequestState** *(string) --* 

              The state of the Spot fleet request.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeSpotPriceHistory

  ::

    
    paginator = client.get_paginator('describe_spot_price_history')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_spot_price_history`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          AvailabilityZone='string',
          DryRun=True|False,
          EndTime=datetime(2015, 1, 1),
          InstanceTypes=[
              't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          ],
          ProductDescriptions=[
              'string',
          ],
          StartTime=datetime(2015, 1, 1),
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone for which prices should be returned. 
       
      * ``instance-type`` - The type of instance (for example, ``m3.medium`` ). 
       
      * ``product-description`` - The product description for the Spot price (``Linux/UNIX`` | ``SUSE Linux`` | ``Windows`` | ``Linux/UNIX (Amazon VPC)`` | ``SUSE Linux (Amazon VPC)`` | ``Windows (Amazon VPC)`` ). 
       
      * ``spot-price`` - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported). 
       
      * ``timestamp`` - The timestamp of the Spot price history, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      Filters the results by the specified Availability Zone.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EndTime: datetime
    :param EndTime: 

      The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

      

    
    :type InstanceTypes: list
    :param InstanceTypes: 

      Filters the results by the specified instance types. Note that T2 and HS1 instance types are not supported.

      

    
      - *(string) --* 

      
  
    :type ProductDescriptions: list
    :param ProductDescriptions: 

      Filters the results by the specified basic product descriptions.

      

    
      - *(string) --* 

      
  
    :type StartTime: datetime
    :param StartTime: 

      The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SpotPriceHistory': [
                {
                    'AvailabilityZone': 'string',
                    'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
                    'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
                    'SpotPrice': 'string',
                    'Timestamp': datetime(2015, 1, 1)
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSpotPriceHistory.

        
        

        - **SpotPriceHistory** *(list) --* 

          The historical Spot prices.

          
          

          - *(dict) --* 

            Describes the maximum hourly price (bid) for any Spot instance launched to fulfill the request.

            
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone.

              
            

            - **InstanceType** *(string) --* 

              The instance type. Note that T2 and HS1 instance types are not supported.

              
            

            - **ProductDescription** *(string) --* 

              A general description of the AMI.

              
            

            - **SpotPrice** *(string) --* 

              The maximum price (bid) that you are willing to pay for a Spot instance.

              
            

            - **Timestamp** *(datetime) --* 

              The date and time the request was created, in UTC format (for example, *YYYY* -*MM* -*DD* T*HH* :*MM* :*SS* Z).

              
        
      
    

.. py:class:: EC2.Paginator.DescribeTags

  ::

    
    paginator = client.get_paginator('describe_tags')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_tags`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          DryRun=True|False,
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``key`` - The tag key. 
       
      * ``resource-id`` - The resource ID. 
       
      * ``resource-type`` - The resource type (``customer-gateway`` | ``dhcp-options`` | ``image`` | ``instance`` | ``internet-gateway`` | ``network-acl`` | ``network-interface`` | ``reserved-instances`` | ``route-table`` | ``security-group`` | ``snapshot`` | ``spot-instances-request`` | ``subnet`` | ``volume`` | ``vpc`` | ``vpn-connection`` | ``vpn-gateway`` ). 
       
      * ``value`` - The tag value. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Tags': [
                {
                    'Key': 'string',
                    'ResourceId': 'string',
                    'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                    'Value': 'string'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeTags.

        
        

        - **Tags** *(list) --* 

          A list of tags.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

            - **Key** *(string) --* 

              The tag key.

              
            

            - **ResourceId** *(string) --* 

              The ID of the resource. For example, ``ami-1a2b3c4d`` .

              
            

            - **ResourceType** *(string) --* 

              The resource type.

              
            

            - **Value** *(string) --* 

              The tag value.

              
        
      
    

.. py:class:: EC2.Paginator.DescribeVolumeStatus

  ::

    
    paginator = client.get_paginator('describe_volume_status')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_volume_status`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``action.code`` - The action code for the event (for example, ``enable-volume-io`` ). 
       
      * ``action.description`` - A description of the action. 
       
      * ``action.event-id`` - The event ID associated with the action. 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.event-id`` - The event ID. 
       
      * ``event.event-type`` - The event type (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``io-performance:degraded`` | ``io-performance:severely-degraded`` | ``io-performance:stalled`` ). 
       
      * ``event.not-after`` - The latest end time for the event. 
       
      * ``event.not-before`` - The earliest start time for the event. 
       
      * ``volume-status.details-name`` - The cause for ``volume-status.status`` (``io-enabled`` | ``io-performance`` ). 
       
      * ``volume-status.details-status`` - The status of ``volume-status.details-name`` (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``normal`` | ``degraded`` | ``severely-degraded`` | ``stalled`` ). 
       
      * ``volume-status.status`` - The status of the volume (``ok`` | ``impaired`` | ``warning`` | ``insufficient-data`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

       

      Default: Describes all your volumes.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VolumeStatuses': [
                {
                    'Actions': [
                        {
                            'Code': 'string',
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string'
                        },
                    ],
                    'AvailabilityZone': 'string',
                    'Events': [
                        {
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string',
                            'NotAfter': datetime(2015, 1, 1),
                            'NotBefore': datetime(2015, 1, 1)
                        },
                    ],
                    'VolumeId': 'string',
                    'VolumeStatus': {
                        'Details': [
                            {
                                'Name': 'io-enabled'|'io-performance',
                                'Status': 'string'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumeStatus.

        
        

        - **VolumeStatuses** *(list) --* 

          A list of volumes.

          
          

          - *(dict) --* 

            Describes the volume status.

            
            

            - **Actions** *(list) --* 

              The details of the operation.

              
              

              - *(dict) --* 

                Describes a volume status operation code.

                
                

                - **Code** *(string) --* 

                  The code identifying the operation, for example, ``enable-volume-io`` .

                  
                

                - **Description** *(string) --* 

                  A description of the operation.

                  
                

                - **EventId** *(string) --* 

                  The ID of the event associated with this operation.

                  
                

                - **EventType** *(string) --* 

                  The event type associated with this operation.

                  
            
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the volume.

              
            

            - **Events** *(list) --* 

              A list of events associated with the volume.

              
              

              - *(dict) --* 

                Describes a volume status event.

                
                

                - **Description** *(string) --* 

                  A description of the event.

                  
                

                - **EventId** *(string) --* 

                  The ID of this event.

                  
                

                - **EventType** *(string) --* 

                  The type of this event.

                  
                

                - **NotAfter** *(datetime) --* 

                  The latest end time of the event.

                  
                

                - **NotBefore** *(datetime) --* 

                  The earliest start time of the event.

                  
            
          
            

            - **VolumeId** *(string) --* 

              The volume ID.

              
            

            - **VolumeStatus** *(dict) --* 

              The volume status.

              
              

              - **Details** *(list) --* 

                The details of the volume status.

                
                

                - *(dict) --* 

                  Describes a volume status.

                  
                  

                  - **Name** *(string) --* 

                    The name of the volume status.

                    
                  

                  - **Status** *(string) --* 

                    The intended status of the volume status.

                    
              
            
              

              - **Status** *(string) --* 

                The status of the volume.

                
          
        
      
    

.. py:class:: EC2.Paginator.DescribeVolumes

  ::

    
    paginator = client.get_paginator('describe_volumes')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_volumes`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_    


    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
       
      * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
       
      * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
       
      * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
       
      * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone in which the volume was created. 
       
      * ``create-time`` - The time stamp when the volume was created. 
       
      * ``encrypted`` - The encryption status of the volume. 
       
      * ``size`` - The size of the volume, in GiB. 
       
      * ``snapshot-id`` - The snapshot from which the volume was created. 
       
      * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The volume ID. 
       
      * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

        

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Volumes': [
                {
                    'Attachments': [
                        {
                            'AttachTime': datetime(2015, 1, 1),
                            'Device': 'string',
                            'InstanceId': 'string',
                            'State': 'attaching'|'attached'|'detaching'|'detached',
                            'VolumeId': 'string',
                            'DeleteOnTermination': True|False
                        },
                    ],
                    'AvailabilityZone': 'string',
                    'CreateTime': datetime(2015, 1, 1),
                    'Encrypted': True|False,
                    'KmsKeyId': 'string',
                    'Size': 123,
                    'SnapshotId': 'string',
                    'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
                    'VolumeId': 'string',
                    'Iops': 123,
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                },
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumes.

        
        

        - **Volumes** *(list) --* 

          Information about the volumes.

          
          

          - *(dict) --* 

            Describes a volume.

            
            

            - **Attachments** *(list) --* 

              Information about the volume attachments.

              
              

              - *(dict) --* 

                Describes volume attachment details.

                
                

                - **AttachTime** *(datetime) --* 

                  The time stamp when the attachment initiated.

                  
                

                - **Device** *(string) --* 

                  The device name.

                  
                

                - **InstanceId** *(string) --* 

                  The ID of the instance.

                  
                

                - **State** *(string) --* 

                  The attachment state of the volume.

                  
                

                - **VolumeId** *(string) --* 

                  The ID of the volume.

                  
                

                - **DeleteOnTermination** *(boolean) --* 

                  Indicates whether the EBS volume is deleted on instance termination.

                  
            
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone for the volume.

              
            

            - **CreateTime** *(datetime) --* 

              The time stamp when volume creation was initiated.

              
            

            - **Encrypted** *(boolean) --* 

              Indicates whether the volume will be encrypted.

              
            

            - **KmsKeyId** *(string) --* 

              The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

              
            

            - **Size** *(integer) --* 

              The size of the volume, in GiBs.

              
            

            - **SnapshotId** *(string) --* 

              The snapshot from which the volume was created, if applicable.

              
            

            - **State** *(string) --* 

              The volume state.

              
            

            - **VolumeId** *(string) --* 

              The ID of the volume.

              
            

            - **Iops** *(integer) --* 

              The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

               

              Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for ``gp2`` volumes.

               

              Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the volume.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                  
            
          
            

            - **VolumeType** *(string) --* 

              The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

              
        
      
    

=======
Waiters
=======


The available waiters are:

* :py:class:`EC2.Waiter.BundleTaskComplete`


* :py:class:`EC2.Waiter.ConversionTaskCancelled`


* :py:class:`EC2.Waiter.ConversionTaskCompleted`


* :py:class:`EC2.Waiter.ConversionTaskDeleted`


* :py:class:`EC2.Waiter.CustomerGatewayAvailable`


* :py:class:`EC2.Waiter.ExportTaskCancelled`


* :py:class:`EC2.Waiter.ExportTaskCompleted`


* :py:class:`EC2.Waiter.ImageAvailable`


* :py:class:`EC2.Waiter.ImageExists`


* :py:class:`EC2.Waiter.InstanceExists`


* :py:class:`EC2.Waiter.InstanceRunning`


* :py:class:`EC2.Waiter.InstanceStatusOk`


* :py:class:`EC2.Waiter.InstanceStopped`


* :py:class:`EC2.Waiter.InstanceTerminated`


* :py:class:`EC2.Waiter.KeyPairExists`


* :py:class:`EC2.Waiter.NatGatewayAvailable`


* :py:class:`EC2.Waiter.NetworkInterfaceAvailable`


* :py:class:`EC2.Waiter.PasswordDataAvailable`


* :py:class:`EC2.Waiter.SnapshotCompleted`


* :py:class:`EC2.Waiter.SpotInstanceRequestFulfilled`


* :py:class:`EC2.Waiter.SubnetAvailable`


* :py:class:`EC2.Waiter.SystemStatusOk`


* :py:class:`EC2.Waiter.VolumeAvailable`


* :py:class:`EC2.Waiter.VolumeDeleted`


* :py:class:`EC2.Waiter.VolumeInUse`


* :py:class:`EC2.Waiter.VpcAvailable`


* :py:class:`EC2.Waiter.VpcExists`


* :py:class:`EC2.Waiter.VpcPeeringConnectionExists`


* :py:class:`EC2.Waiter.VpnConnectionAvailable`


* :py:class:`EC2.Waiter.VpnConnectionDeleted`



.. py:class:: EC2.Waiter.BundleTaskComplete

  ::

    
    waiter = client.get_waiter('bundle_task_complete')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_bundle_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          BundleIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type BundleIds: list
    :param BundleIds: 

      One or more bundle task IDs.

       

      Default: Describes all your bundle tasks.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``bundle-id`` - The ID of the bundle task. 
       
      * ``error-code`` - If the task failed, the error code returned. 
       
      * ``error-message`` - If the task failed, the error message returned. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``progress`` - The level of task completion, as a percentage (for example, 20%). 
       
      * ``s3-bucket`` - The Amazon S3 bucket to store the AMI. 
       
      * ``s3-prefix`` - The beginning of the AMI name. 
       
      * ``start-time`` - The time the task started (for example, 2013-09-15T17:15:20.000Z). 
       
      * ``state`` - The state of the task (``pending`` | ``waiting-for-shutdown`` | ``bundling`` | ``storing`` | ``cancelling`` | ``complete`` | ``failed`` ). 
       
      * ``update-time`` - The time of the most recent update for the task. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.ConversionTaskCancelled

  ::

    
    waiter = client.get_waiter('conversion_task_cancelled')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_conversion_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ConversionTaskIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type ConversionTaskIds: list
    :param ConversionTaskIds: 

      One or more conversion task IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.ConversionTaskCompleted

  ::

    
    waiter = client.get_waiter('conversion_task_completed')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_conversion_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ConversionTaskIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type ConversionTaskIds: list
    :param ConversionTaskIds: 

      One or more conversion task IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.ConversionTaskDeleted

  ::

    
    waiter = client.get_waiter('conversion_task_deleted')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_conversion_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ConversionTaskIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type ConversionTaskIds: list
    :param ConversionTaskIds: 

      One or more conversion task IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.CustomerGatewayAvailable

  ::

    
    waiter = client.get_waiter('customer_gateway_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_customer_gateways` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          CustomerGatewayIds=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type CustomerGatewayIds: list
    :param CustomerGatewayIds: 

      One or more customer gateway IDs.

       

      Default: Describes all your customer gateways.

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``bgp-asn`` - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). 
       
      * ``customer-gateway-id`` - The ID of the customer gateway. 
       
      * ``ip-address`` - The IP address of the customer gateway's Internet-routable external interface. 
       
      * ``state`` - The state of the customer gateway (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``type`` - The type of customer gateway. Currently, the only supported type is ``ipsec.1`` . 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.ExportTaskCancelled

  ::

    
    waiter = client.get_waiter('export_task_cancelled')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_export_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ExportTaskIds=[
              'string',
          ]
      )
    :type ExportTaskIds: list
    :param ExportTaskIds: 

      One or more export task IDs.

      

    
      - *(string) --* 

      
  
    
    :returns: None

.. py:class:: EC2.Waiter.ExportTaskCompleted

  ::

    
    waiter = client.get_waiter('export_task_completed')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_export_tasks` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ExportTaskIds=[
              'string',
          ]
      )
    :type ExportTaskIds: list
    :param ExportTaskIds: 

      One or more export task IDs.

      

    
      - *(string) --* 

      
  
    
    :returns: None

.. py:class:: EC2.Waiter.ImageAvailable

  ::

    
    waiter = client.get_waiter('image_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_images` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ExecutableUsers=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ImageIds=[
              'string',
          ],
          Owners=[
              'string',
          ],
          DryRun=True|False
      )
    :type ExecutableUsers: list
    :param ExecutableUsers: 

      Scopes the images by users with explicit launch permissions. Specify an AWS account ID, ``self`` (the sender of the request), or ``all`` (public AMIs).

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``architecture`` - The image architecture (``i386`` | ``x86_64`` ). 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``block-device-mapping.snapshot-id`` - The ID of the snapshot used for the EBS volume. 
       
      * ``block-device-mapping.volume-size`` - The volume size of the EBS volume, in GiB. 
       
      * ``block-device-mapping.volume-type`` - The volume type of the EBS volume (``gp2`` | ``io1`` | ``st1`` | ``sc1`` | ``standard`` ). 
       
      * ``description`` - The description of the image (provided during image creation). 
       
      * ``ena-support`` - A Boolean that indicates whether enhanced networking with ENA is enabled. 
       
      * ``hypervisor`` - The hypervisor type (``ovm`` | ``xen`` ). 
       
      * ``image-id`` - The ID of the image. 
       
      * ``image-type`` - The image type (``machine`` | ``kernel`` | ``ramdisk`` ). 
       
      * ``is-public`` - A Boolean that indicates whether the image is public. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``manifest-location`` - The location of the image manifest. 
       
      * ``name`` - The name of the AMI (provided during image creation). 
       
      * ``owner-alias`` - String value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The AWS account ID of the image owner. 
       
      * ``platform`` - The platform. To only list Windows-based AMIs, use ``windows`` . 
       
      * ``product-code`` - The product code. 
       
      * ``product-code.type`` - The type of the product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``root-device-name`` - The name of the root device volume (for example, ``/dev/sda1`` ). 
       
      * ``root-device-type`` - The type of the root device volume (``ebs`` | ``instance-store`` ). 
       
      * ``state`` - The state of the image (``available`` | ``pending`` | ``failed`` ). 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - The message for the state change. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``virtualization-type`` - The virtualization type (``paravirtual`` | ``hvm`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ImageIds: list
    :param ImageIds: 

      One or more image IDs.

       

      Default: Describes all images available to you.

      

    
      - *(string) --* 

      
  
    :type Owners: list
    :param Owners: 

      Filters the images by the owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` | ``microsoft`` ). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.ImageExists

  ::

    
    waiter = client.get_waiter('image_exists')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_images` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          ExecutableUsers=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          ImageIds=[
              'string',
          ],
          Owners=[
              'string',
          ],
          DryRun=True|False
      )
    :type ExecutableUsers: list
    :param ExecutableUsers: 

      Scopes the images by users with explicit launch permissions. Specify an AWS account ID, ``self`` (the sender of the request), or ``all`` (public AMIs).

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``architecture`` - The image architecture (``i386`` | ``x86_64`` ). 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``block-device-mapping.snapshot-id`` - The ID of the snapshot used for the EBS volume. 
       
      * ``block-device-mapping.volume-size`` - The volume size of the EBS volume, in GiB. 
       
      * ``block-device-mapping.volume-type`` - The volume type of the EBS volume (``gp2`` | ``io1`` | ``st1`` | ``sc1`` | ``standard`` ). 
       
      * ``description`` - The description of the image (provided during image creation). 
       
      * ``ena-support`` - A Boolean that indicates whether enhanced networking with ENA is enabled. 
       
      * ``hypervisor`` - The hypervisor type (``ovm`` | ``xen`` ). 
       
      * ``image-id`` - The ID of the image. 
       
      * ``image-type`` - The image type (``machine`` | ``kernel`` | ``ramdisk`` ). 
       
      * ``is-public`` - A Boolean that indicates whether the image is public. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``manifest-location`` - The location of the image manifest. 
       
      * ``name`` - The name of the AMI (provided during image creation). 
       
      * ``owner-alias`` - String value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The AWS account ID of the image owner. 
       
      * ``platform`` - The platform. To only list Windows-based AMIs, use ``windows`` . 
       
      * ``product-code`` - The product code. 
       
      * ``product-code.type`` - The type of the product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``root-device-name`` - The name of the root device volume (for example, ``/dev/sda1`` ). 
       
      * ``root-device-type`` - The type of the root device volume (``ebs`` | ``instance-store`` ). 
       
      * ``state`` - The state of the image (``available`` | ``pending`` | ``failed`` ). 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - The message for the state change. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``virtualization-type`` - The virtualization type (``paravirtual`` | ``hvm`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type ImageIds: list
    :param ImageIds: 

      One or more image IDs.

       

      Default: Describes all images available to you.

      

    
      - *(string) --* 

      
  
    :type Owners: list
    :param Owners: 

      Filters the images by the owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` | ``microsoft`` ). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.InstanceExists

  ::

    
    waiter = client.get_waiter('instance_exists')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instances` every 5 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.InstanceRunning

  ::

    
    waiter = client.get_waiter('instance_running')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.InstanceStatusOk

  ::

    
    waiter = client.get_waiter('instance_status_ok')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instance_status` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string',
          DryRun=True|False,
          IncludeAllInstances=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.code`` - The code for the scheduled event (``instance-reboot`` | ``system-reboot`` | ``system-maintenance`` | ``instance-retirement`` | ``instance-stop`` ). 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.not-after`` - The latest end time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``event.not-before`` - The earliest start time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``instance-state-code`` - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-status.reachability`` - Filters on instance status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``instance-status.status`` - The status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       
      * ``system-status.reachability`` - Filters on system status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``system-status.status`` - The system status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

       

      Constraints: Maximum 100 explicitly specified instance IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IncludeAllInstances: boolean
    :param IncludeAllInstances: 

      When ``true`` , includes the health status for all instances. When ``false`` , includes the health status for running instances only.

       

      Default: ``false``  

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.InstanceStopped

  ::

    
    waiter = client.get_waiter('instance_stopped')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.InstanceTerminated

  ::

    
    waiter = client.get_waiter('instance_terminated')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.KeyPairExists

  ::

    
    waiter = client.get_waiter('key_pair_exists')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_key_pairs` every 5 seconds until a successful state is reached. An error is returned after 6 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          KeyNames=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``fingerprint`` - The fingerprint of the key pair. 
       
      * ``key-name`` - The name of the key pair. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type KeyNames: list
    :param KeyNames: 

      One or more key pair names.

       

      Default: Describes all your key pairs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.NatGatewayAvailable

  ::

    
    waiter = client.get_waiter('nat_gateway_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_nat_gateways` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NatGatewayIds=[
              'string',
          ],
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``nat-gateway-id`` - The ID of the NAT gateway. 
       
      * ``state`` - The state of the NAT gateway (``pending`` | ``failed`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``subnet-id`` - The ID of the subnet in which the NAT gateway resides. 
       
      * ``vpc-id`` - The ID of the VPC in which the NAT gateway resides. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

       

      Constraint: If the value specified is greater than 1000, we return only 1000 items.

      

    
    :type NatGatewayIds: list
    :param NatGatewayIds: 

      One or more NAT gateway IDs.

      

    
      - *(string) --* 

      
  
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.NetworkInterfaceAvailable

  ::

    
    waiter = client.get_waiter('network_interface_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_network_interfaces` every 20 seconds until a successful state is reached. An error is returned after 10 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          NetworkInterfaceIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``addresses.private-ip-address`` - The private IPv4 addresses associated with the network interface. 
       
      * ``addresses.primary`` - Whether the private IPv4 address is the primary IP address associated with the network interface.  
       
      * ``addresses.association.public-ip`` - The association ID returned when the network interface was associated with the Elastic IP address (IPv4). 
       
      * ``addresses.association.owner-id`` - The owner ID of the addresses associated with the network interface. 
       
      * ``association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``association.public-dns-name`` - The public DNS name for the network interface (IPv4). 
       
      * ``attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``attachment.attach.time`` - The time that the network interface was attached to an instance. 
       
      * ``attachment.delete-on-termination`` - Indicates whether the attachment is deleted when an instance is terminated. 
       
      * ``attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``attachment.nat-gateway-id`` - The ID of the NAT gateway to which the network interface is attached. 
       
      * ``attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone of the network interface. 
       
      * ``description`` - The description of the network interface. 
       
      * ``group-id`` - The ID of a security group associated with the network interface. 
       
      * ``group-name`` - The name of a security group associated with the network interface. 
       
      * ``ipv6-addresses.ipv6-address`` - An IPv6 address associated with the network interface. 
       
      * ``mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface-id`` - The ID of the network interface. 
       
      * ``owner-id`` - The AWS account ID of the network interface owner. 
       
      * ``private-ip-address`` - The private IPv4 address or addresses of the network interface. 
       
      * ``private-dns-name`` - The private DNS name of the network interface (IPv4). 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``requester-managed`` - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``source-desk-check`` - Indicates whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC.  
       
      * ``status`` - The status of the network interface. If the network interface is not attached to an instance, the status is ``available`` ; if a network interface is attached to an instance the status is ``in-use`` . 
       
      * ``subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the network interface. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceIds: list
    :param NetworkInterfaceIds: 

      One or more network interface IDs.

       

      Default: Describes all your network interfaces.

      

    
      - *(string) --* 

      
  
    
    :returns: None

.. py:class:: EC2.Waiter.PasswordDataAvailable

  ::

    
    waiter = client.get_waiter('password_data_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.get_password_data` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          InstanceId='string',
          DryRun=True|False
      )
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the Windows instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.SnapshotCompleted

  ::

    
    waiter = client.get_waiter('snapshot_completed')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_snapshots` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          OwnerIds=[
              'string',
          ],
          RestorableByUserIds=[
              'string',
          ],
          SnapshotIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``description`` - A description of the snapshot. 
       
      * ``owner-alias`` - Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The ID of the AWS account that owns the snapshot. 
       
      * ``progress`` - The progress of the snapshot, as a percentage (for example, 80%). 
       
      * ``snapshot-id`` - The snapshot ID. 
       
      * ``start-time`` - The time stamp when the snapshot was initiated. 
       
      * ``status`` - The status of the snapshot (``pending`` | ``completed`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The ID of the volume the snapshot is for. 
       
      * ``volume-size`` - The size of the volume, in GiB. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of snapshot results returned by ``DescribeSnapshots`` in paginated output. When this parameter is used, ``DescribeSnapshots`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeSnapshots`` request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeSnapshots`` returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeSnapshots`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    :type OwnerIds: list
    :param OwnerIds: 

      Returns the snapshots owned by the specified owner. Multiple owners can be specified.

      

    
      - *(string) --* 

      
  
    :type RestorableByUserIds: list
    :param RestorableByUserIds: 

      One or more AWS accounts IDs that can create volumes from the snapshot.

      

    
      - *(string) --* 

      
  
    :type SnapshotIds: list
    :param SnapshotIds: 

      One or more snapshot IDs.

       

      Default: Describes snapshots for which you have launch permissions.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.SpotInstanceRequestFulfilled

  ::

    
    waiter = client.get_waiter('spot_instance_request_fulfilled')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_spot_instance_requests` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          SpotInstanceRequestIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone-group`` - The Availability Zone group. 
       
      * ``create-time`` - The time stamp when the Spot instance request was created. 
       
      * ``fault-code`` - The fault code related to the request. 
       
      * ``fault-message`` - The fault message related to the request. 
       
      * ``instance-id`` - The ID of the instance that fulfilled the request. 
       
      * ``launch-group`` - The Spot instance launch group. 
       
      * ``launch.block-device-mapping.delete-on-termination`` - Indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``launch.block-device-mapping.device-name`` - The device name for the Amazon EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``launch.block-device-mapping.snapshot-id`` - The ID of the snapshot used for the Amazon EBS volume. 
       
      * ``launch.block-device-mapping.volume-size`` - The size of the Amazon EBS volume, in GiB. 
       
      * ``launch.block-device-mapping.volume-type`` - The type of the Amazon EBS volume: ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic. 
       
      * ``launch.group-id`` - The security group for the instance. 
       
      * ``launch.image-id`` - The ID of the AMI. 
       
      * ``launch.instance-type`` - The type of instance (for example, ``m3.medium`` ). 
       
      * ``launch.kernel-id`` - The kernel ID. 
       
      * ``launch.key-name`` - The name of the key pair the instance launched with. 
       
      * ``launch.monitoring-enabled`` - Whether monitoring is enabled for the Spot instance. 
       
      * ``launch.ramdisk-id`` - The RAM disk ID. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.device-index`` - The index of the device for the network interface attachment on the instance. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the instance. 
       
      * ``network-interface.description`` - A description of the network interface. 
       
      * ``network-interface.private-ip-address`` - The primary private IP address of the network interface. 
       
      * ``network-interface.delete-on-termination`` - Indicates whether the network interface is deleted when the instance is terminated. 
       
      * ``network-interface.group-id`` - The ID of the security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of the security group associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Indicates whether the IP address is the primary private IP address. 
       
      * ``product-description`` - The product description associated with the instance (``Linux/UNIX`` | ``Windows`` ). 
       
      * ``spot-instance-request-id`` - The Spot instance request ID. 
       
      * ``spot-price`` - The maximum hourly price for any Spot instance launched to fulfill the request. 
       
      * ``state`` - The state of the Spot instance request (``open`` | ``active`` | ``closed`` | ``cancelled`` | ``failed`` ). Spot bid status information can help you track your Amazon EC2 Spot instance requests. For more information, see `Spot Bid Status <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html>`_ in the Amazon Elastic Compute Cloud User Guide. 
       
      * ``status-code`` - The short code describing the most recent evaluation of your Spot instance request. 
       
      * ``status-message`` - The message explaining the status of the Spot instance request. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of Spot instance request (``one-time`` | ``persistent`` ). 
       
      * ``launched-availability-zone`` - The Availability Zone in which the bid is launched. 
       
      * ``valid-from`` - The start date of the request. 
       
      * ``valid-until`` - The end date of the request. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SpotInstanceRequestIds: list
    :param SpotInstanceRequestIds: 

      One or more Spot instance request IDs.

      

    
      - *(string) --* 

      
  
    
    :returns: None

.. py:class:: EC2.Waiter.SubnetAvailable

  ::

    
    waiter = client.get_waiter('subnet_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_subnets` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          SubnetIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availabilityZone`` - The Availability Zone for the subnet. You can also use ``availability-zone`` as the filter name. 
       
      * ``available-ip-address-count`` - The number of IPv4 addresses in the subnet that are available. 
       
      * ``cidrBlock`` - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use ``cidr`` or ``cidr-block`` as the filter names. 
       
      * ``defaultForAz`` - Indicates whether this is the default subnet for the Availability Zone. You can also use ``default-for-az`` as the filter name. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the subnet. 
       
      * ``ipv6-cidr-block-association.association-id`` - An association ID for an IPv6 CIDR block associated with the subnet. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the subnet. 
       
      * ``state`` - The state of the subnet (``pending`` | ``available`` ). 
       
      * ``subnet-id`` - The ID of the subnet. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC for the subnet. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type SubnetIds: list
    :param SubnetIds: 

      One or more subnet IDs.

       

      Default: Describes all your subnets.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.SystemStatusOk

  ::

    
    waiter = client.get_waiter('system_status_ok')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_instance_status` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          InstanceIds=[
              'string',
          ],
          MaxResults=123,
          NextToken='string',
          DryRun=True|False,
          IncludeAllInstances=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.code`` - The code for the scheduled event (``instance-reboot`` | ``system-reboot`` | ``system-maintenance`` | ``instance-retirement`` | ``instance-stop`` ). 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.not-after`` - The latest end time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``event.not-before`` - The earliest start time for the scheduled event (for example, ``2014-09-15T17:15:20.000Z`` ). 
       
      * ``instance-state-code`` - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-status.reachability`` - Filters on instance status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``instance-status.status`` - The status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       
      * ``system-status.reachability`` - Filters on system status where the name is ``reachability`` (``passed`` | ``failed`` | ``initializing`` | ``insufficient-data`` ). 
       
      * ``system-status.status`` - The system status of the instance (``ok`` | ``impaired`` | ``initializing`` | ``insufficient-data`` | ``not-applicable`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type InstanceIds: list
    :param InstanceIds: 

      One or more instance IDs.

       

      Default: Describes all your instances.

       

      Constraints: Maximum 100 explicitly specified instance IDs.

      

    
      - *(string) --* 

      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to retrieve the next page of results.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IncludeAllInstances: boolean
    :param IncludeAllInstances: 

      When ``true`` , includes the health status for all instances. When ``false`` , includes the health status for running instances only.

       

      Default: ``false``  

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VolumeAvailable

  ::

    
    waiter = client.get_waiter('volume_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_volumes` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
       
      * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
       
      * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
       
      * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
       
      * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone in which the volume was created. 
       
      * ``create-time`` - The time stamp when the volume was created. 
       
      * ``encrypted`` - The encryption status of the volume. 
       
      * ``size`` - The size of the volume, in GiB. 
       
      * ``snapshot-id`` - The snapshot from which the volume was created. 
       
      * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The volume ID. 
       
      * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VolumeDeleted

  ::

    
    waiter = client.get_waiter('volume_deleted')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_volumes` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
       
      * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
       
      * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
       
      * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
       
      * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone in which the volume was created. 
       
      * ``create-time`` - The time stamp when the volume was created. 
       
      * ``encrypted`` - The encryption status of the volume. 
       
      * ``size`` - The size of the volume, in GiB. 
       
      * ``snapshot-id`` - The snapshot from which the volume was created. 
       
      * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The volume ID. 
       
      * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VolumeInUse

  ::

    
    waiter = client.get_waiter('volume_in_use')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_volumes` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VolumeIds=[
              'string',
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
       
      * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
       
      * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
       
      * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
       
      * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``availability-zone`` - The Availability Zone in which the volume was created. 
       
      * ``create-time`` - The time stamp when the volume was created. 
       
      * ``encrypted`` - The encryption status of the volume. 
       
      * ``size`` - The size of the volume, in GiB. 
       
      * ``snapshot-id`` - The snapshot from which the volume was created. 
       
      * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The volume ID. 
       
      * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VolumeIds: list
    :param VolumeIds: 

      One or more volume IDs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VpcAvailable

  ::

    
    waiter = client.get_waiter('vpc_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_vpcs` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpcIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
       
      * ``isDefault`` - Indicates whether the VPC is the default VPC. 
       
      * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpcIds: list
    :param VpcIds: 

      One or more VPC IDs.

       

      Default: Describes all your VPCs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VpcExists

  ::

    
    waiter = client.get_waiter('vpc_exists')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_vpcs` every 1 seconds until a successful state is reached. An error is returned after 5 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpcIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
       
      * ``isDefault`` - Indicates whether the VPC is the default VPC. 
       
      * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpcIds: list
    :param VpcIds: 

      One or more VPC IDs.

       

      Default: Describes all your VPCs.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VpcPeeringConnectionExists

  ::

    
    waiter = client.get_waiter('vpc_peering_connection_exists')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_vpc_peering_connections` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          VpcPeeringConnectionIds=[
              'string',
          ]
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``accepter-vpc-info.cidr-block`` - The IPv4 CIDR block of the peer VPC. 
       
      * ``accepter-vpc-info.owner-id`` - The AWS account ID of the owner of the peer VPC. 
       
      * ``accepter-vpc-info.vpc-id`` - The ID of the peer VPC. 
       
      * ``expiration-time`` - The expiration date and time for the VPC peering connection. 
       
      * ``requester-vpc-info.cidr-block`` - The IPv4 CIDR block of the requester's VPC. 
       
      * ``requester-vpc-info.owner-id`` - The AWS account ID of the owner of the requester VPC. 
       
      * ``requester-vpc-info.vpc-id`` - The ID of the requester VPC. 
       
      * ``status-code`` - The status of the VPC peering connection (``pending-acceptance`` | ``failed`` | ``expired`` | ``provisioning`` | ``active`` | ``deleted`` | ``rejected`` ). 
       
      * ``status-message`` - A message that provides more information about the status of the VPC peering connection, if applicable. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-peering-connection-id`` - The ID of the VPC peering connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcPeeringConnectionIds: list
    :param VpcPeeringConnectionIds: 

      One or more VPC peering connection IDs.

       

      Default: Describes all your VPC peering connections.

      

    
      - *(string) --* 

      
  
    
    :returns: None

.. py:class:: EC2.Waiter.VpnConnectionAvailable

  ::

    
    waiter = client.get_waiter('vpn_connection_available')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_vpn_connections` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpnConnectionIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``customer-gateway-configuration`` - The configuration information for the customer gateway. 
       
      * ``customer-gateway-id`` - The ID of a customer gateway associated with the VPN connection. 
       
      * ``state`` - The state of the VPN connection (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``option.static-routes-only`` - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP). 
       
      * ``route.destination-cidr-block`` - The destination CIDR block. This corresponds to the subnet used in a customer data center. 
       
      * ``bgp-asn`` - The BGP Autonomous System Number (ASN) associated with a BGP device. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of VPN connection. Currently the only supported type is ``ipsec.1`` . 
       
      * ``vpn-connection-id`` - The ID of the VPN connection. 
       
      * ``vpn-gateway-id`` - The ID of a virtual private gateway associated with the VPN connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpnConnectionIds: list
    :param VpnConnectionIds: 

      One or more VPN connection IDs.

       

      Default: Describes your VPN connections.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

.. py:class:: EC2.Waiter.VpnConnectionDeleted

  ::

    
    waiter = client.get_waiter('vpn_connection_deleted')

  
  

  .. py:method:: wait(**kwargs)

    Polls :py:meth:`EC2.Client.describe_vpn_connections` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections>`_    


    **Request Syntax** 
    ::

      waiter.wait(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          VpnConnectionIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``customer-gateway-configuration`` - The configuration information for the customer gateway. 
       
      * ``customer-gateway-id`` - The ID of a customer gateway associated with the VPN connection. 
       
      * ``state`` - The state of the VPN connection (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
       
      * ``option.static-routes-only`` - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP). 
       
      * ``route.destination-cidr-block`` - The destination CIDR block. This corresponds to the subnet used in a customer data center. 
       
      * ``bgp-asn`` - The BGP Autonomous System Number (ASN) associated with a BGP device. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``type`` - The type of VPN connection. Currently the only supported type is ``ipsec.1`` . 
       
      * ``vpn-connection-id`` - The ID of the VPN connection. 
       
      * ``vpn-gateway-id`` - The ID of a virtual private gateway associated with the VPN connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type VpnConnectionIds: list
    :param VpnConnectionIds: 

      One or more VPN connection IDs.

       

      Default: Describes your VPN connections.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

================
Service Resource
================



.. py:class:: EC2.ServiceResource()

  A resource representing Amazon Elastic Compute Cloud (EC2)::

    
    import boto3
    
    ec2 = boto3.resource('ec2')

  
  These are the resource's available actions:
  
  *   :py:meth:`create_dhcp_options()`

  
  *   :py:meth:`create_instances()`

  
  *   :py:meth:`create_internet_gateway()`

  
  *   :py:meth:`create_key_pair()`

  
  *   :py:meth:`create_network_acl()`

  
  *   :py:meth:`create_network_interface()`

  
  *   :py:meth:`create_placement_group()`

  
  *   :py:meth:`create_route_table()`

  
  *   :py:meth:`create_security_group()`

  
  *   :py:meth:`create_snapshot()`

  
  *   :py:meth:`create_subnet()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`create_volume()`

  
  *   :py:meth:`create_vpc()`

  
  *   :py:meth:`create_vpc_peering_connection()`

  
  *   :py:meth:`disassociate_route_table()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`import_key_pair()`

  
  *   :py:meth:`register_image()`

  
  These are the resource's available sub-resources:
  
  *   :py:meth:`ClassicAddress()`

  
  *   :py:meth:`DhcpOptions()`

  
  *   :py:meth:`Image()`

  
  *   :py:meth:`Instance()`

  
  *   :py:meth:`InternetGateway()`

  
  *   :py:meth:`KeyPair()`

  
  *   :py:meth:`NetworkAcl()`

  
  *   :py:meth:`NetworkInterface()`

  
  *   :py:meth:`NetworkInterfaceAssociation()`

  
  *   :py:meth:`PlacementGroup()`

  
  *   :py:meth:`Route()`

  
  *   :py:meth:`RouteTable()`

  
  *   :py:meth:`RouteTableAssociation()`

  
  *   :py:meth:`SecurityGroup()`

  
  *   :py:meth:`Snapshot()`

  
  *   :py:meth:`Subnet()`

  
  *   :py:meth:`Tag()`

  
  *   :py:meth:`Volume()`

  
  *   :py:meth:`Vpc()`

  
  *   :py:meth:`VpcAddress()`

  
  *   :py:meth:`VpcPeeringConnection()`

  
  These are the resource's available collections:
  
  *   :py:attr:`classic_addresses`

  
  *   :py:attr:`dhcp_options_sets`

  
  *   :py:attr:`images`

  
  *   :py:attr:`instances`

  
  *   :py:attr:`internet_gateways`

  
  *   :py:attr:`key_pairs`

  
  *   :py:attr:`network_acls`

  
  *   :py:attr:`network_interfaces`

  
  *   :py:attr:`placement_groups`

  
  *   :py:attr:`route_tables`

  
  *   :py:attr:`security_groups`

  
  *   :py:attr:`snapshots`

  
  *   :py:attr:`subnets`

  
  *   :py:attr:`volumes`

  
  *   :py:attr:`vpc_addresses`

  
  *   :py:attr:`vpc_peering_connections`

  
  *   :py:attr:`vpcs`

  
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: create_dhcp_options(**kwargs)

    

    Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see `RFC 2132 <http://www.ietf.org/rfc/rfc2132.txt>`_ .

     

     
    * ``domain-name-servers`` - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified in ``domain-name`` , you must set ``domain-name-servers`` to a custom DNS server. 
     
    * ``domain-name`` - If you're using AmazonProvidedDNS in ``us-east-1`` , specify ``ec2.internal`` . If you're using AmazonProvidedDNS in another region, specify ``region.compute.internal`` (for example, ``ap-northeast-1.compute.internal`` ). Otherwise, specify a domain name (for example, ``MyCompany.com`` ). This value is used to complete unqualified DNS hostnames. **Important** : Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name. 
     
    * ``ntp-servers`` - The IP addresses of up to four Network Time Protocol (NTP) servers. 
     
    * ``netbios-name-servers`` - The IP addresses of up to four NetBIOS name servers. 
     
    * ``netbios-node-type`` - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see `RFC 2132 <http://www.ietf.org/rfc/rfc2132.txt>`_ . 
     

     

    Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the ``domain-name-servers`` option either to ``AmazonProvidedDNS`` or to a domain name server of your choice. For more information about DHCP options, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions>`_    


    **Request Syntax** 
    ::

      dhcp_options = ec2.create_dhcp_options(
          DhcpConfigurations=[
              {
                  'Key': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type DhcpConfigurations: list
    :param DhcpConfigurations: **[REQUIRED]** 

      A DHCP configuration option.

      

    
      - *(dict) --* 

      
        - **Key** *(string) --* 

        
        - **Values** *(list) --* 

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.DhcpOptions`
    :returns: DhcpOptions resource
    

  .. py:method:: create_instances(**kwargs)

    

    Launches the specified number of instances using an AMI for which you have permissions. 

     

    You can specify a number of options, or leave the default options. The following rules apply:

     

     
    * [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request. 
     
    * [EC2-Classic] If don't specify an Availability Zone, we choose one for you. 
     
    * Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see `Instance Types Available Only in a VPC <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types>`_ . 
     
    * [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet. 
     
    * Not all instance types support IPv6 addresses. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ . 
     
    * If you don't specify a security group ID, we use the default security group. For more information, see `Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ . 
     
    * If any of the AMIs have a product code attached for which the user has not subscribed, the request fails. 
     

     

    To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.

     

    An instance is ready for you to use when it's in the ``running`` state. You can check the state of your instance using  DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see  CreateTags and `Tagging Your Amazon EC2 Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ .

     

    Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For troubleshooting, see `What To Do If An Instance Immediately Terminates <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html>`_ , and `Troubleshooting Connecting to Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances>`_    


    **Request Syntax** 
    ::

      instance = ec2.create_instances(
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          ImageId='string',
          InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          KernelId='string',
          KeyName='string',
          MaxCount=123,
          MinCount=123,
          Monitoring={
              'Enabled': True|False
          },
          Placement={
              'AvailabilityZone': 'string',
              'Affinity': 'string',
              'GroupName': 'string',
              'HostId': 'string',
              'Tenancy': 'default'|'dedicated'|'host',
              'SpreadDomain': 'string'
          },
          RamdiskId='string',
          SecurityGroupIds=[
              'string',
          ],
          SecurityGroups=[
              'string',
          ],
          SubnetId='string',
          UserData='string',
          AdditionalInfo='string',
          ClientToken='string',
          DisableApiTermination=True|False,
          DryRun=True|False,
          EbsOptimized=True|False,
          IamInstanceProfile={
              'Arn': 'string',
              'Name': 'string'
          },
          InstanceInitiatedShutdownBehavior='stop'|'terminate',
          NetworkInterfaces=[
              {
                  'AssociatePublicIpAddress': True|False,
                  'DeleteOnTermination': True|False,
                  'Description': 'string',
                  'DeviceIndex': 123,
                  'Groups': [
                      'string',
                  ],
                  'Ipv6AddressCount': 123,
                  'Ipv6Addresses': [
                      {
                          'Ipv6Address': 'string'
                      },
                  ],
                  'NetworkInterfaceId': 'string',
                  'PrivateIpAddress': 'string',
                  'PrivateIpAddresses': [
                      {
                          'Primary': True|False,
                          'PrivateIpAddress': 'string'
                      },
                  ],
                  'SecondaryPrivateIpAddressCount': 123,
                  'SubnetId': 'string'
              },
          ],
          PrivateIpAddress='string',
          ElasticGpuSpecification=[
              {
                  'Type': 'string'
              },
          ],
          TagSpecifications=[
              {
                  'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ]
      )
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      The block device mapping.

       

      .. warning::

         

        Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.

         

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI, which you can get by calling  DescribeImages .

      

    
    :type InstanceType: string
    :param InstanceType: 

      The instance type. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      Default: ``m1.small``  

      

    
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type KernelId: string
    :param KernelId: 

      The ID of the kernel.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type KeyName: string
    :param KeyName: 

      The name of the key pair. You can create a key pair using  CreateKeyPair or  ImportKeyPair .

       

      .. warning::

         

        If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

         

      

    
    :type MaxCount: integer
    :param MaxCount: **[REQUIRED]** 

      The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above ``MinCount`` .

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 FAQ.

      

    
    :type MinCount: integer
    :param MinCount: **[REQUIRED]** 

      The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 General FAQ.

      

    
    :type Monitoring: dict
    :param Monitoring: 

      The monitoring for the instance.

      

    
      - **Enabled** *(boolean) --* **[REQUIRED]** 

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        

      
    
    :type Placement: dict
    :param Placement: 

      The placement for the instance.

      

    
      - **AvailabilityZone** *(string) --* 

        The Availability Zone of the instance.

        

      
      - **Affinity** *(string) --* 

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

        

      
      - **GroupName** *(string) --* 

        The name of the placement group the instance is in (for cluster compute instances).

        

      
      - **HostId** *(string) --* 

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

        

      
      - **Tenancy** *(string) --* 

        The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

        

      
      - **SpreadDomain** *(string) --* 

        Reserved for future use.

        

      
    
    :type RamdiskId: string
    :param RamdiskId: 

      The ID of the RAM disk.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type SecurityGroupIds: list
    :param SecurityGroupIds: 

      One or more security group IDs. You can create a security group using  CreateSecurityGroup .

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type SecurityGroups: list
    :param SecurityGroups: 

      [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type SubnetId: string
    :param SubnetId: 

      [EC2-VPC] The ID of the subnet to launch the instance into.

      

    
    :type UserData: string
    :param UserData: 

      The user data to make available to the instance. For more information, see `Running Commands on Your Linux Instance at Launch <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html>`_ (Linux) and `Adding User Data <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data>`_ (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

            **This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.**


    
    :type AdditionalInfo: string
    :param AdditionalInfo: 

      Reserved.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

       

      Constraints: Maximum 64 ASCII characters

      

    
    :type DisableApiTermination: boolean
    :param DisableApiTermination: 

      If you set this parameter to ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to ``false`` after launch, use  ModifyInstanceAttribute . Alternatively, if you set ``InstanceInitiatedShutdownBehavior`` to ``terminate`` , you can terminate the instance by running the shutdown command from the instance.

       

      Default: ``false``  

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EbsOptimized: boolean
    :param EbsOptimized: 

      Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

       

      Default: ``false``  

      

    
    :type IamInstanceProfile: dict
    :param IamInstanceProfile: 

      The IAM instance profile.

      

    
      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        

      
      - **Name** *(string) --* 

        The name of the instance profile.

        

      
    
    :type InstanceInitiatedShutdownBehavior: string
    :param InstanceInitiatedShutdownBehavior: 

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

       

      Default: ``stop``  

      

    
    :type NetworkInterfaces: list
    :param NetworkInterfaces: 

      One or more network interfaces.

      

    
      - *(dict) --* 

        Describes a network interface.

        

      
        - **AssociatePublicIpAddress** *(boolean) --* 

          Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

          

        
        - **DeleteOnTermination** *(boolean) --* 

          If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

          

        
        - **Description** *(string) --* 

          The description of the network interface. Applies only if creating a network interface when launching an instance.

          

        
        - **DeviceIndex** *(integer) --* 

          The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

          

        
        - **Groups** *(list) --* 

          The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

          

        
          - *(string) --* 

          
      
        - **Ipv6AddressCount** *(integer) --* 

          A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

          

        
        - **Ipv6Addresses** *(list) --* 

          One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

          

        
          - *(dict) --* 

            Describes an IPv6 address.

            

          
            - **Ipv6Address** *(string) --* 

              The IPv6 address.

              

            
          
      
        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          

        
        - **PrivateIpAddress** *(string) --* 

          The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **PrivateIpAddresses** *(list) --* 

          One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
          - *(dict) --* 

            Describes a secondary private IPv4 address for a network interface.

            

          
            - **Primary** *(boolean) --* 

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              

            
            - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

              The private IPv4 addresses.

              

            
          
      
        - **SecondaryPrivateIpAddressCount** *(integer) --* 

          The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **SubnetId** *(string) --* 

          The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

       

      Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

      

    
    :type ElasticGpuSpecification: list
    :param ElasticGpuSpecification: 

      An Elastic GPU to associate with the instance.

      

    
      - *(dict) --* 

        A specification for an Elastic GPU.

        

      
        - **Type** *(string) --* **[REQUIRED]** 

          The type of Elastic GPU.

          

        
      
  
    :type TagSpecifications: list
    :param TagSpecifications: 

      The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.

      

    
      - *(dict) --* 

        The tags to apply to a resource when the resource is being created.

        

      
        - **ResourceType** *(string) --* 

          The type of resource to tag. Currently, the resource types that support tagging on creation are ``instance`` and ``volume`` . 

          

        
        - **Tags** *(list) --* 

          The tags to apply to the resource.

          

        
          - *(dict) --* 

            Describes a tag.

            

          
            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              

            
            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              

            
          
      
      
  
    
    :rtype: list(:py:class:`ec2.Instance`)
    :returns: A list of Instance resources
    

  .. py:method:: create_internet_gateway(**kwargs)

    

    Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using  AttachInternetGateway .

     

    For more information about your VPC and Internet gateway, see the `Amazon Virtual Private Cloud User Guide <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway>`_    


    **Request Syntax** 
    ::

      internet_gateway = ec2.create_internet_gateway(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.InternetGateway`
    :returns: InternetGateway resource
    

  .. py:method:: create_key_pair(**kwargs)

    

    Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

     

    You can have up to five thousand key pairs per region.

     

    The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use  ImportKeyPair .

     

    For more information about key pairs, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair>`_    


    **Request Syntax** 
    ::

      key_pair = ec2.create_key_pair(
          KeyName='string',
          DryRun=True|False
      )
    :type KeyName: string
    :param KeyName: **[REQUIRED]** 

      A unique name for the key pair.

       

      Constraints: Up to 255 ASCII characters

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.KeyPair`
    :returns: KeyPair resource
    

  .. py:method:: create_network_acl(**kwargs)

    

    Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl>`_    


    **Request Syntax** 
    ::

      network_acl = ec2.create_network_acl(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: :py:class:`ec2.NetworkAcl`
    :returns: NetworkAcl resource
    

  .. py:method:: create_network_interface(**kwargs)

    

    Creates a network interface in the specified subnet.

     

    For more information about network interfaces, see `Elastic Network Interfaces <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface>`_    


    **Request Syntax** 
    ::

      network_interface = ec2.create_network_interface(
          Description='string',
          DryRun=True|False,
          Groups=[
              'string',
          ],
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          PrivateIpAddress='string',
          PrivateIpAddresses=[
              {
                  'Primary': True|False,
                  'PrivateIpAddress': 'string'
              },
          ],
          SecondaryPrivateIpAddressCount=123,
          SubnetId='string'
      )
    :type Description: string
    :param Description: 

      A description for the network interface.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: 

      The IDs of one or more security groups.

      

    
      - *(string) --* 

      
  
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the ``AssignIpv6AddressOnCreation`` attribute set to ``true`` , you can specify ``0`` to override this setting.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in ``privateIpAddresses`` as primary (only one IP address can be designated as primary).

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: 

      One or more private IPv4 addresses.

      

    
      - *(dict) --* 

        Describes a secondary private IPv4 address for a network interface.

        

      
        - **Primary** *(boolean) --* 

          Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          

        
        - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

          The private IPv4 addresses.

          

        
      
  
    :type SecondaryPrivateIpAddressCount: integer
    :param SecondaryPrivateIpAddressCount: 

      The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using ``privateIpAddresses`` .

       

      The number of IP addresses you can assign to a network interface varies by instance type. For more information, see `IP Addresses Per ENI Per Instance Type <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet to associate with the network interface.

      

    
    
    :rtype: :py:class:`ec2.NetworkInterface`
    :returns: NetworkInterface resource
    

  .. py:method:: create_placement_group(**kwargs)

    

    Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.

     

    For more information about placement groups and cluster instances, see `Cluster Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup>`_    


    **Request Syntax** 
    ::

      placement_group = ec2.create_placement_group(
          DryRun=True|False,
          GroupName='string',
          Strategy='cluster'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      A name for the placement group.

       

      Constraints: Up to 255 ASCII characters

      

    
    :type Strategy: string
    :param Strategy: **[REQUIRED]** 

      The placement strategy.

      

    
    
    :rtype: :py:class:`ec2.PlacementGroup`
    :returns: PlacementGroup resource
    

  .. py:method:: create_route_table(**kwargs)

    

    Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable>`_    


    **Request Syntax** 
    ::

      route_table = ec2.create_route_table(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :rtype: :py:class:`ec2.RouteTable`
    :returns: RouteTable resource
    

  .. py:method:: create_security_group(**kwargs)

    

    Creates a security group.

     

    A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see `Amazon EC2 Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ in the *Amazon Elastic Compute Cloud User Guide* and `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    .. warning::

       

      EC2-Classic: You can have up to 500 security groups.

       

      EC2-VPC: You can create up to 500 security groups per VPC.

       

     

    When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

     

    You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

     

    You can add or remove rules from your security groups using  AuthorizeSecurityGroupIngress ,  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupIngress , and  RevokeSecurityGroupEgress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup>`_    


    **Request Syntax** 
    ::

      security_group = ec2.create_security_group(
          Description='string',
          GroupName='string',
          VpcId='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: **[REQUIRED]** 

      A description for the security group. This is informational only.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      The name of the security group.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type VpcId: string
    :param VpcId: 

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.SecurityGroup`
    :returns: SecurityGroup resource
    

  .. py:method:: create_snapshot(**kwargs)

    

    Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

     

    When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

     

    You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is ``pending`` .

     

    To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

     

    Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

     

    For more information, see `Amazon Elastic Block Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html>`_ and `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot>`_    


    **Request Syntax** 
    ::

      snapshot = ec2.create_snapshot(
          Description='string',
          VolumeId='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: 

      A description for the snapshot.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the EBS volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.Snapshot`
    :returns: Snapshot resource
    

  .. py:method:: create_subnet(**kwargs)

    

    Creates a subnet in an existing VPC.

     

    When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).

     

    If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length. 

     

    .. warning::

       

      AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

       

     

    If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

     

    If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

     

    For more information about subnets, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet>`_    


    **Request Syntax** 
    ::

      subnet = ec2.create_subnet(
          AvailabilityZone='string',
          CidrBlock='string',
          Ipv6CidrBlock='string',
          VpcId='string',
          DryRun=True|False
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone for the subnet.

       

      Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.

      

    
    :type CidrBlock: string
    :param CidrBlock: **[REQUIRED]** 

      The IPv4 network range for the subnet, in CIDR notation. For example, ``10.0.0.0/24`` .

      

    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.Subnet`
    :returns: Subnet resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      response = ec2.create_tags(
          DryRun=True|False,
          Resources=[
              'string',
          ],
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Resources: list
    :param Resources: **[REQUIRED]** 

      The IDs of one or more resources to tag. For example, ami-1a2b3c4d.

      

    
      - *(string) --* 

      
  
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :returns: None

  .. py:method:: create_volume(**kwargs)

    

    Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see `Regions and Endpoints <http://docs.aws.amazon.com/general/latest/gr/rande.html>`_ .

     

    You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

     

    You can create encrypted volumes with the ``Encrypted`` parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    You can tag your volumes during creation. For more information, see `Tagging Your Amazon EC2 Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ .

     

    For more information, see `Creating an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume>`_    


    **Request Syntax** 
    ::

      volume = ec2.create_volume(
          AvailabilityZone='string',
          Encrypted=True|False,
          Iops=123,
          KmsKeyId='string',
          Size=123,
          SnapshotId='string',
          VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
          DryRun=True|False,
          TagSpecifications=[
              {
                  'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ]
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: **[REQUIRED]** 

      The Availability Zone in which to create the volume. Use  DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

      

    
    :type Encrypted: boolean
    :param Encrypted: 

      Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type Iops: integer
    :param Iops: 

      Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB.

       

      Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes 

      

    
    :type KmsKeyId: string
    :param KmsKeyId: 

      The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the ``arn:aws:kms`` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the ``key`` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1* :*012345678910* :key/*abcd1234-a123-456a-a12b-a123b4cd56ef* . If a ``KmsKeyId`` is specified, the ``Encrypted`` flag must also be set.

      

    
    :type Size: integer
    :param Size: 

      The size of the volume, in GiBs.

       

      Constraints: 1-16384 for ``gp2`` , 4-16384 for ``io1`` , 500-16384 for ``st1`` , 500-16384 for ``sc1`` , and 1-1024 for ``standard`` . If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

       

      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

      

    
    :type SnapshotId: string
    :param SnapshotId: 

      The snapshot from which to create the volume.

      

    
    :type VolumeType: string
    :param VolumeType: 

      The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

       

      Default: ``standard``  

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type TagSpecifications: list
    :param TagSpecifications: 

      The tags to apply to the volume during creation.

      

    
      - *(dict) --* 

        The tags to apply to a resource when the resource is being created.

        

      
        - **ResourceType** *(string) --* 

          The type of resource to tag. Currently, the resource types that support tagging on creation are ``instance`` and ``volume`` . 

          

        
        - **Tags** *(list) --* 

          The tags to apply to the resource.

          

        
          - *(dict) --* 

            Describes a tag.

            

          
            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              

            
            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              

            
          
      
      
  
    
    :rtype: :py:class:`ec2.Volume`
    :returns: Volume resource
    

  .. py:method:: create_vpc(**kwargs)

    

    Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.

     

    By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see `Dedicated Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc>`_    


    **Request Syntax** 
    ::

      vpc = ec2.create_vpc(
          CidrBlock='string',
          AmazonProvidedIpv6CidrBlock=True|False,
          DryRun=True|False,
          InstanceTenancy='default'|'dedicated'|'host'
      )
    :type CidrBlock: string
    :param CidrBlock: **[REQUIRED]** 

      The IPv4 network range for the VPC, in CIDR notation. For example, ``10.0.0.0/16`` .

      

    
    :type AmazonProvidedIpv6CidrBlock: boolean
    :param AmazonProvidedIpv6CidrBlock: 

      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceTenancy: string
    :param InstanceTenancy: 

      The tenancy options for instances launched into the VPC. For ``default`` , instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For ``dedicated`` , instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of ``dedicated`` or ``host`` into a dedicated tenancy VPC. 

       

       **Important:** The ``host`` value cannot be used with this parameter. Use the ``default`` or ``dedicated`` values only.

       

      Default: ``default``  

      

    
    
    :rtype: :py:class:`ec2.Vpc`
    :returns: Vpc resource
    

  .. py:method:: create_vpc_peering_connection(**kwargs)

    

    Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.

     

    The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

     

    If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to ``failed`` .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      vpc_peering_connection = ec2.create_vpc_peering_connection(
          DryRun=True|False,
          PeerOwnerId='string',
          PeerVpcId='string',
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PeerOwnerId: string
    :param PeerOwnerId: 

      The AWS account ID of the owner of the peer VPC.

       

      Default: Your AWS account ID

      

    
    :type PeerVpcId: string
    :param PeerVpcId: 

      The ID of the VPC with which you are creating the VPC peering connection.

      

    
    :type VpcId: string
    :param VpcId: 

      The ID of the requester VPC.

      

    
    
    :rtype: :py:class:`ec2.VpcPeeringConnection`
    :returns: VpcPeeringConnection resource
    

  .. py:method:: disassociate_route_table(**kwargs)

    

    Disassociates a subnet from a route table.

     

    After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable>`_    


    **Request Syntax** 
    ::

      response = ec2.disassociate_route_table(
          AssociationId='string',
          DryRun=True|False
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The association ID representing the current association between the route table and subnet.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: import_key_pair(**kwargs)

    

    Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with  CreateKeyPair , in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.

     

    For more information about key pairs, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair>`_    


    **Request Syntax** 
    ::

      key_pair_info = ec2.import_key_pair(
          DryRun=True|False,
          KeyName='string',
          PublicKeyMaterial=b'bytes'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type KeyName: string
    :param KeyName: **[REQUIRED]** 

      A unique name for the key pair.

      

    
    :type PublicKeyMaterial: bytes
    :param PublicKeyMaterial: **[REQUIRED]** 

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

      

    
    
    :rtype: :py:class:`ec2.KeyPairInfo`
    :returns: KeyPairInfo resource
    

  .. py:method:: register_image(**kwargs)

    

    Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see `Creating Your Own AMIs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    .. note::

       

      For Amazon EBS-backed instances,  CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.

       

     

    You can also use ``RegisterImage`` to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see `Launching a Linux Instance from a Backup <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.

     

    Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see  CreateImage .

     

    If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage>`_    


    **Request Syntax** 
    ::

      image = ec2.register_image(
          ImageLocation='string',
          Architecture='i386'|'x86_64',
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          Description='string',
          DryRun=True|False,
          EnaSupport=True|False,
          KernelId='string',
          Name='string',
          BillingProducts=[
              'string',
          ],
          RamdiskId='string',
          RootDeviceName='string',
          SriovNetSupport='string',
          VirtualizationType='string'
      )
    :type ImageLocation: string
    :param ImageLocation: 

      The full path to your AMI manifest in Amazon S3 storage.

      

    
    :type Architecture: string
    :param Architecture: 

      The architecture of the AMI.

       

      Default: For Amazon EBS-backed AMIs, ``i386`` . For instance store-backed AMIs, the architecture specified in the manifest file.

      

    
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      One or more block device mapping entries.

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type Description: string
    :param Description: 

      A description for your AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EnaSupport: boolean
    :param EnaSupport: 

      Set to ``true`` to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

       

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

      

    
    :type KernelId: string
    :param KernelId: 

      The ID of the kernel.

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      A name for your AMI.

       

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

      

    
    :type BillingProducts: list
    :param BillingProducts: 

      The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.

      

    
      - *(string) --* 

      
  
    :type RamdiskId: string
    :param RamdiskId: 

      The ID of the RAM disk.

      

    
    :type RootDeviceName: string
    :param RootDeviceName: 

      The name of the root device (for example, ``/dev/sda1`` , or ``/dev/xvda`` ).

      

    
    :type SriovNetSupport: string
    :param SriovNetSupport: 

      Set to ``simple`` to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

       

      There is no way to disable ``sriovNetSupport`` at this time.

       

      This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

      

    
    :type VirtualizationType: string
    :param VirtualizationType: 

      The type of virtualization.

       

      Default: ``paravirtual``  

      

    
    
    :rtype: :py:class:`ec2.Image`
    :returns: Image resource
    
  .. rst-class:: admonition-title
  
  Sub-resources
  
  Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child.
  For more information about sub-resources refer to the :ref:`Resources Introduction Guide<subresources_intro>`.
  

  .. py:method:: ClassicAddress(public_ip)

    Creates a ClassicAddress resource.::

      classic_address = ec2.ClassicAddress('public_ip')

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

  .. py:method:: DhcpOptions(id)

    Creates a DhcpOptions resource.::

      dhcp_options = ec2.DhcpOptions('id')

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

  .. py:method:: Image(id)

    Creates a Image resource.::

      image = ec2.Image('id')

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

  .. py:method:: Instance(id)

    Creates a Instance resource.::

      instance = ec2.Instance('id')

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

  .. py:method:: InternetGateway(id)

    Creates a InternetGateway resource.::

      internet_gateway = ec2.InternetGateway('id')

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

  .. py:method:: KeyPair(name)

    Creates a KeyPairInfo resource.::

      key_pair_info = ec2.KeyPair('name')

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

  .. py:method:: NetworkAcl(id)

    Creates a NetworkAcl resource.::

      network_acl = ec2.NetworkAcl('id')

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

  .. py:method:: NetworkInterface(id)

    Creates a NetworkInterface resource.::

      network_interface = ec2.NetworkInterface('id')

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

  .. py:method:: NetworkInterfaceAssociation(id)

    Creates a NetworkInterfaceAssociation resource.::

      network_interface_association = ec2.NetworkInterfaceAssociation('id')

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

  .. py:method:: PlacementGroup(name)

    Creates a PlacementGroup resource.::

      placement_group = ec2.PlacementGroup('name')

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

  .. py:method:: Route(route_table_id,destination_cidr_block)

    Creates a Route resource.::

      route = ec2.Route('route_table_id','destination_cidr_block')

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

  .. py:method:: RouteTable(id)

    Creates a RouteTable resource.::

      route_table = ec2.RouteTable('id')

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

  .. py:method:: RouteTableAssociation(id)

    Creates a RouteTableAssociation resource.::

      route_table_association = ec2.RouteTableAssociation('id')

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

  .. py:method:: SecurityGroup(id)

    Creates a SecurityGroup resource.::

      security_group = ec2.SecurityGroup('id')

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

  .. py:method:: Snapshot(id)

    Creates a Snapshot resource.::

      snapshot = ec2.Snapshot('id')

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

  .. py:method:: 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
    

  .. py:method:: Tag(resource_id,key,value)

    Creates a Tag resource.::

      tag = ec2.Tag('resource_id','key','value')

    :type resource_id: string
    :param resource_id: The Tag's resource_id identifier. This **must** be set.
    :type key: string
    :param key: The Tag's key identifier. This **must** be set.
    :type value: string
    :param value: The Tag's value identifier. This **must** be set.
    
    :rtype: :py:class:`EC2.Tag`
    :returns: A Tag resource
    

  .. py:method:: Volume(id)

    Creates a Volume resource.::

      volume = ec2.Volume('id')

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

  .. py:method:: Vpc(id)

    Creates a Vpc resource.::

      vpc = ec2.Vpc('id')

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

  .. py:method:: VpcAddress(allocation_id)

    Creates a VpcAddress resource.::

      vpc_address = ec2.VpcAddress('allocation_id')

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

  .. py:method:: VpcPeeringConnection(id)

    Creates a VpcPeeringConnection resource.::

      vpc_peering_connection = ec2.VpcPeeringConnection('id')

    :type id: string
    :param id: The VpcPeeringConnection's id identifier. This **must** be set.
    
    :rtype: :py:class:`EC2.VpcPeeringConnection`
    :returns: A VpcPeeringConnection resource
    
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: classic_addresses

    A collection of ClassicAddress resources

    .. py:method:: all()

      Creates an iterable of all ClassicAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        classic_address_iterator = ec2.classic_addresses.all()
        
      
      :rtype: list(:py:class:`ec2.ClassicAddress`)
      :returns: A list of ClassicAddress resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all ClassicAddress resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        classic_address_iterator = ec2.classic_addresses.filter(
            PublicIps=[
                'string',
            ],
            AllocationIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type PublicIps: list
      :param PublicIps: 

        [EC2-Classic] One or more Elastic IP addresses.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type AllocationIds: list
      :param AllocationIds: 

        [EC2-VPC] One or more allocation IDs.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.ClassicAddress`)
      :returns: A list of ClassicAddress resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of ClassicAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        classic_address_iterator = ec2.classic_addresses.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.ClassicAddress`)
      :returns: A list of ClassicAddress resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all ClassicAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        classic_address_iterator = ec2.classic_addresses.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.ClassicAddress`)
      :returns: A list of ClassicAddress resources
      

  .. py:attribute:: dhcp_options_sets

    A collection of DhcpOptions resources

    .. py:method:: all()

      Creates an iterable of all DhcpOptions resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions>`_      


      **Request Syntax** 
      ::

        dhcp_options_iterator = ec2.dhcp_options_sets.all()
        
      
      :rtype: list(:py:class:`ec2.DhcpOptions`)
      :returns: A list of DhcpOptions resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all DhcpOptions resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions>`_      


      **Request Syntax** 
      ::

        dhcp_options_iterator = ec2.dhcp_options_sets.filter(
            DhcpOptionsIds=[
                'string',
            ],
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False
        )
      :type DhcpOptionsIds: list
      :param DhcpOptionsIds: 

        The IDs of one or more DHCP options sets.

         

        Default: Describes all your DHCP options sets.

        

      
        - *(string) --* 

        
    
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``dhcp-options-id`` - The ID of a set of DHCP options. 
         
        * ``key`` - The key for one of the options (for example, ``domain-name`` ). 
         
        * ``value`` - The value for one of the options. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.DhcpOptions`)
      :returns: A list of DhcpOptions resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of DhcpOptions resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions>`_      


      **Request Syntax** 
      ::

        dhcp_options_iterator = ec2.dhcp_options_sets.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.DhcpOptions`)
      :returns: A list of DhcpOptions resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all DhcpOptions resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions>`_      


      **Request Syntax** 
      ::

        dhcp_options_iterator = ec2.dhcp_options_sets.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.DhcpOptions`)
      :returns: A list of DhcpOptions resources
      

  .. py:attribute:: images

    A collection of Image resources

    .. py:method:: all()

      Creates an iterable of all Image resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_      


      **Request Syntax** 
      ::

        image_iterator = ec2.images.all()
        
      
      :rtype: list(:py:class:`ec2.Image`)
      :returns: A list of Image resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Image resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_      


      **Request Syntax** 
      ::

        image_iterator = ec2.images.filter(
            ExecutableUsers=[
                'string',
            ],
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            ImageIds=[
                'string',
            ],
            Owners=[
                'string',
            ],
            DryRun=True|False
        )
      :type ExecutableUsers: list
      :param ExecutableUsers: 

        Scopes the images by users with explicit launch permissions. Specify an AWS account ID, ``self`` (the sender of the request), or ``all`` (public AMIs).

        

      
        - *(string) --* 

        
    
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``architecture`` - The image architecture (``i386`` | ``x86_64`` ). 
         
        * ``block-device-mapping.delete-on-termination`` - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. 
         
        * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` ). 
         
        * ``block-device-mapping.snapshot-id`` - The ID of the snapshot used for the EBS volume. 
         
        * ``block-device-mapping.volume-size`` - The volume size of the EBS volume, in GiB. 
         
        * ``block-device-mapping.volume-type`` - The volume type of the EBS volume (``gp2`` | ``io1`` | ``st1`` | ``sc1`` | ``standard`` ). 
         
        * ``description`` - The description of the image (provided during image creation). 
         
        * ``ena-support`` - A Boolean that indicates whether enhanced networking with ENA is enabled. 
         
        * ``hypervisor`` - The hypervisor type (``ovm`` | ``xen`` ). 
         
        * ``image-id`` - The ID of the image. 
         
        * ``image-type`` - The image type (``machine`` | ``kernel`` | ``ramdisk`` ). 
         
        * ``is-public`` - A Boolean that indicates whether the image is public. 
         
        * ``kernel-id`` - The kernel ID. 
         
        * ``manifest-location`` - The location of the image manifest. 
         
        * ``name`` - The name of the AMI (provided during image creation). 
         
        * ``owner-alias`` - String value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
         
        * ``owner-id`` - The AWS account ID of the image owner. 
         
        * ``platform`` - The platform. To only list Windows-based AMIs, use ``windows`` . 
         
        * ``product-code`` - The product code. 
         
        * ``product-code.type`` - The type of the product code (``devpay`` | ``marketplace`` ). 
         
        * ``ramdisk-id`` - The RAM disk ID. 
         
        * ``root-device-name`` - The name of the root device volume (for example, ``/dev/sda1`` ). 
         
        * ``root-device-type`` - The type of the root device volume (``ebs`` | ``instance-store`` ). 
         
        * ``state`` - The state of the image (``available`` | ``pending`` | ``failed`` ). 
         
        * ``state-reason-code`` - The reason code for the state change. 
         
        * ``state-reason-message`` - The message for the state change. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``virtualization-type`` - The virtualization type (``paravirtual`` | ``hvm`` ). 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type ImageIds: list
      :param ImageIds: 

        One or more image IDs.

         

        Default: Describes all images available to you.

        

      
        - *(string) --* 

        
    
      :type Owners: list
      :param Owners: 

        Filters the images by the owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` | ``microsoft`` ). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Image`)
      :returns: A list of Image resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Image resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_      


      **Request Syntax** 
      ::

        image_iterator = ec2.images.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Image`)
      :returns: A list of Image resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Image resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_      


      **Request Syntax** 
      ::

        image_iterator = ec2.images.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Image`)
      :returns: A list of Image resources
      

  .. py:attribute:: instances

    A collection of Instance resources

    .. py:method:: all()

      Creates an iterable of all Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = ec2.instances.all()
        
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: create_tags(**kwargs)

      

      Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

       

      For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.create_tags(
            DryRun=True|False,
            Tags=[
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Tags: list
      :param Tags: **[REQUIRED]** 

        One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

        

      
        - *(dict) --* 

          Describes a tag.

          

        
          - **Key** *(string) --* 

            The key of the tag.

             

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

            

          
          - **Value** *(string) --* 

            The value of the tag.

             

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

            

          
        
    
      
      :returns: None

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = ec2.instances.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            InstanceIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
         
        * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
         
        * ``availability-zone`` - The Availability Zone of the instance. 
         
        * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
         
        * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
         
        * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
         
        * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
         
        * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
         
        * ``client-token`` - The idempotency token you provided when you launched the instance. 
         
        * ``dns-name`` - The public DNS name of the instance. 
         
        * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
         
        * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
         
        * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
         
        * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
         
        * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
         
        * ``image-id`` - The ID of the image used to launch the instance. 
         
        * ``instance-id`` - The ID of the instance. 
         
        * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
         
        * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
         
        * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
         
        * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
         
        * ``instance.group-id`` - The ID of the security group for the instance.  
         
        * ``instance.group-name`` - The name of the security group for the instance.  
         
        * ``ip-address`` - The public IPv4 address of the instance. 
         
        * ``kernel-id`` - The kernel ID. 
         
        * ``key-name`` - The name of the key pair used when the instance was launched. 
         
        * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
         
        * ``launch-time`` - The time when the instance was launched. 
         
        * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
         
        * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
         
        * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
         
        * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
         
        * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
         
        * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
         
        * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
         
        * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
         
        * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
         
        * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
         
        * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
         
        * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
         
        * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
         
        * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
         
        * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
         
        * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
         
        * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
         
        * ``network-interface.description`` - The description of the network interface. 
         
        * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
         
        * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
         
        * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
         
        * ``network-interface.mac-address`` - The MAC address of the network interface. 
         
        * ``network-interface.network-interface-id`` - The ID of the network interface. 
         
        * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
         
        * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
         
        * ``network-interface.requester-id`` - The requester ID for the network interface. 
         
        * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
         
        * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
         
        * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
         
        * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
         
        * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
         
        * ``owner-id`` - The AWS account ID of the instance owner. 
         
        * ``placement-group-name`` - The name of the placement group for the instance. 
         
        * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
         
        * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
         
        * ``private-ip-address`` - The private IPv4 address of the instance. 
         
        * ``product-code`` - The product code associated with the AMI used to launch the instance. 
         
        * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
         
        * ``ramdisk-id`` - The RAM disk ID. 
         
        * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
         
        * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
         
        * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
         
        * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
         
        * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
         
        * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
         
        * ``spot-instance-request-id`` - The ID of the Spot instance request. 
         
        * ``state-reason-code`` - The reason code for the state change. 
         
        * ``state-reason-message`` - A message that describes the state change. 
         
        * ``subnet-id`` - The ID of the subnet for the instance. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
         
        * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
         
        * ``vpc-id`` - The ID of the VPC that the instance is running in. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type InstanceIds: list
      :param InstanceIds: 

        One or more instance IDs.

         

        Default: Describes all your instances.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

        

      
      :type NextToken: string
      :param NextToken: 

        The token to request the next page of results.

        

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = ec2.instances.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: monitor(**kwargs)

      

      Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      To disable detailed monitoring, see .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.monitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of MonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = ec2.instances.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: reboot(**kwargs)

      

      Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

       

      If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

       

      For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.reboot(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :returns: None

    .. py:method:: start(**kwargs)

      

      Starts an Amazon EBS-backed AMI that you've previously stopped.

       

      Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Performing this operation on an instance that uses an instance store as its root device returns an error.

       

      For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.start(
            AdditionalInfo='string',
            DryRun=True|False
        )
      :type AdditionalInfo: string
      :param AdditionalInfo: 

        Reserved.

        

      
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StartingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StartInstances.

          
          

          - **StartingInstances** *(list) --* 

            Information about one or more started instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: stop(**kwargs)

      

      Stops an Amazon EBS-backed instance.

       

      We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      You can't start or stop Spot instances, and you can't stop instance store-backed instances.

       

      When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.stop(
            DryRun=True|False,
            Force=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Force: boolean
      :param Force: 

        Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

         

        Default: ``false``  

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StoppingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StopInstances.

          
          

          - **StoppingInstances** *(list) --* 

            Information about one or more stopped instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: terminate(**kwargs)

      

      Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

       

      If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

       

      Terminated instances remain visible after termination (for approximately one hour).

       

      By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

       

      You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.terminate(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'TerminatingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of TerminateInstances.

          
          

          - **TerminatingInstances** *(list) --* 

            Information about one or more terminated instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: unmonitor(**kwargs)

      

      Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_      


      **Request Syntax** 
      ::

        response = ec2.instances.unmonitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of UnmonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

  .. py:attribute:: internet_gateways

    A collection of InternetGateway resources

    .. py:method:: all()

      Creates an iterable of all InternetGateway resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = ec2.internet_gateways.all()
        
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all InternetGateway resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = ec2.internet_gateways.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            InternetGatewayIds=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``attachment.state`` - The current state of the attachment between the gateway and the VPC (``available`` ). Present only if a VPC is attached. 
         
        * ``attachment.vpc-id`` - The ID of an attached VPC. 
         
        * ``internet-gateway-id`` - The ID of the Internet gateway. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type InternetGatewayIds: list
      :param InternetGatewayIds: 

        One or more Internet gateway IDs.

         

        Default: Describes all your Internet gateways.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of InternetGateway resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = ec2.internet_gateways.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all InternetGateway resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = ec2.internet_gateways.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

  .. py:attribute:: key_pairs

    A collection of KeyPairInfo resources

    .. py:method:: all()

      Creates an iterable of all KeyPairInfo resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_      


      **Request Syntax** 
      ::

        key_pair_info_iterator = ec2.key_pairs.all()
        
      
      :rtype: list(:py:class:`ec2.KeyPairInfo`)
      :returns: A list of KeyPairInfo resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all KeyPairInfo resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_      


      **Request Syntax** 
      ::

        key_pair_info_iterator = ec2.key_pairs.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            KeyNames=[
                'string',
            ],
            DryRun=True|False
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``fingerprint`` - The fingerprint of the key pair. 
         
        * ``key-name`` - The name of the key pair. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type KeyNames: list
      :param KeyNames: 

        One or more key pair names.

         

        Default: Describes all your key pairs.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.KeyPairInfo`)
      :returns: A list of KeyPairInfo resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of KeyPairInfo resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_      


      **Request Syntax** 
      ::

        key_pair_info_iterator = ec2.key_pairs.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.KeyPairInfo`)
      :returns: A list of KeyPairInfo resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all KeyPairInfo resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs>`_      


      **Request Syntax** 
      ::

        key_pair_info_iterator = ec2.key_pairs.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.KeyPairInfo`)
      :returns: A list of KeyPairInfo resources
      

  .. py:attribute:: network_acls

    A collection of NetworkAcl resources

    .. py:method:: all()

      Creates an iterable of all NetworkAcl resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = ec2.network_acls.all()
        
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all NetworkAcl resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = ec2.network_acls.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            NetworkAclIds=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``association.association-id`` - The ID of an association ID for the ACL. 
         
        * ``association.network-acl-id`` - The ID of the network ACL involved in the association. 
         
        * ``association.subnet-id`` - The ID of the subnet involved in the association. 
         
        * ``default`` - Indicates whether the ACL is the default network ACL for the VPC. 
         
        * ``entry.cidr`` - The IPv4 CIDR range specified in the entry. 
         
        * ``entry.egress`` - Indicates whether the entry applies to egress traffic. 
         
        * ``entry.icmp.code`` - The ICMP code specified in the entry, if any. 
         
        * ``entry.icmp.type`` - The ICMP type specified in the entry, if any. 
         
        * ``entry.ipv6-cidr`` - The IPv6 CIDR range specified in the entry. 
         
        * ``entry.port-range.from`` - The start of the port range specified in the entry.  
         
        * ``entry.port-range.to`` - The end of the port range specified in the entry.  
         
        * ``entry.protocol`` - The protocol specified in the entry (``tcp`` | ``udp`` | ``icmp`` or a protocol number). 
         
        * ``entry.rule-action`` - Allows or denies the matching traffic (``allow`` | ``deny`` ). 
         
        * ``entry.rule-number`` - The number of an entry (in other words, rule) in the ACL's set of entries. 
         
        * ``network-acl-id`` - The ID of the network ACL. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-id`` - The ID of the VPC for the network ACL. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type NetworkAclIds: list
      :param NetworkAclIds: 

        One or more network ACL IDs.

         

        Default: Describes all your network ACLs.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of NetworkAcl resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = ec2.network_acls.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all NetworkAcl resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = ec2.network_acls.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

  .. py:attribute:: network_interfaces

    A collection of NetworkInterface resources

    .. py:method:: all()

      Creates an iterable of all NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = ec2.network_interfaces.all()
        
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = ec2.network_interfaces.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            NetworkInterfaceIds=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``addresses.private-ip-address`` - The private IPv4 addresses associated with the network interface. 
         
        * ``addresses.primary`` - Whether the private IPv4 address is the primary IP address associated with the network interface.  
         
        * ``addresses.association.public-ip`` - The association ID returned when the network interface was associated with the Elastic IP address (IPv4). 
         
        * ``addresses.association.owner-id`` - The owner ID of the addresses associated with the network interface. 
         
        * ``association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
         
        * ``association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
         
        * ``association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
         
        * ``association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
         
        * ``association.public-dns-name`` - The public DNS name for the network interface (IPv4). 
         
        * ``attachment.attachment-id`` - The ID of the interface attachment. 
         
        * ``attachment.attach.time`` - The time that the network interface was attached to an instance. 
         
        * ``attachment.delete-on-termination`` - Indicates whether the attachment is deleted when an instance is terminated. 
         
        * ``attachment.device-index`` - The device index to which the network interface is attached. 
         
        * ``attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
         
        * ``attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
         
        * ``attachment.nat-gateway-id`` - The ID of the NAT gateway to which the network interface is attached. 
         
        * ``attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
         
        * ``availability-zone`` - The Availability Zone of the network interface. 
         
        * ``description`` - The description of the network interface. 
         
        * ``group-id`` - The ID of a security group associated with the network interface. 
         
        * ``group-name`` - The name of a security group associated with the network interface. 
         
        * ``ipv6-addresses.ipv6-address`` - An IPv6 address associated with the network interface. 
         
        * ``mac-address`` - The MAC address of the network interface. 
         
        * ``network-interface-id`` - The ID of the network interface. 
         
        * ``owner-id`` - The AWS account ID of the network interface owner. 
         
        * ``private-ip-address`` - The private IPv4 address or addresses of the network interface. 
         
        * ``private-dns-name`` - The private DNS name of the network interface (IPv4). 
         
        * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
         
        * ``requester-managed`` - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on). 
         
        * ``source-desk-check`` - Indicates whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC.  
         
        * ``status`` - The status of the network interface. If the network interface is not attached to an instance, the status is ``available`` ; if a network interface is attached to an instance the status is ``in-use`` . 
         
        * ``subnet-id`` - The ID of the subnet for the network interface. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-id`` - The ID of the VPC for the network interface. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type NetworkInterfaceIds: list
      :param NetworkInterfaceIds: 

        One or more network interface IDs.

         

        Default: Describes all your network interfaces.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = ec2.network_interfaces.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = ec2.network_interfaces.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

  .. py:attribute:: placement_groups

    A collection of PlacementGroup resources

    .. py:method:: all()

      Creates an iterable of all PlacementGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups>`_      


      **Request Syntax** 
      ::

        placement_group_iterator = ec2.placement_groups.all()
        
      
      :rtype: list(:py:class:`ec2.PlacementGroup`)
      :returns: A list of PlacementGroup resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all PlacementGroup resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups>`_      


      **Request Syntax** 
      ::

        placement_group_iterator = ec2.placement_groups.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            GroupNames=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``group-name`` - The name of the placement group. 
         
        * ``state`` - The state of the placement group (``pending`` | ``available`` | ``deleting`` | ``deleted`` ). 
         
        * ``strategy`` - The strategy of the placement group (``cluster`` ). 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type GroupNames: list
      :param GroupNames: 

        One or more placement group names.

         

        Default: Describes all your placement groups, or only those otherwise specified.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.PlacementGroup`)
      :returns: A list of PlacementGroup resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of PlacementGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups>`_      


      **Request Syntax** 
      ::

        placement_group_iterator = ec2.placement_groups.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.PlacementGroup`)
      :returns: A list of PlacementGroup resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all PlacementGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups>`_      


      **Request Syntax** 
      ::

        placement_group_iterator = ec2.placement_groups.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.PlacementGroup`)
      :returns: A list of PlacementGroup resources
      

  .. py:attribute:: route_tables

    A collection of RouteTable resources

    .. py:method:: all()

      Creates an iterable of all RouteTable resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = ec2.route_tables.all()
        
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all RouteTable resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = ec2.route_tables.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            RouteTableIds=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``association.route-table-association-id`` - The ID of an association ID for the route table. 
         
        * ``association.route-table-id`` - The ID of the route table involved in the association. 
         
        * ``association.subnet-id`` - The ID of the subnet involved in the association. 
         
        * ``association.main`` - Indicates whether the route table is the main route table for the VPC (``true`` | ``false`` ). Route tables that do not have an association ID are not returned in the response. 
         
        * ``route-table-id`` - The ID of the route table. 
         
        * ``route.destination-cidr-block`` - The IPv4 CIDR range specified in a route in the table. 
         
        * ``route.destination-ipv6-cidr-block`` - The IPv6 CIDR range specified in a route in the route table. 
         
        * ``route.destination-prefix-list-id`` - The ID (prefix) of the AWS service specified in a route in the table. 
         
        * ``route.egress-only-internet-gateway-id`` - The ID of an egress-only Internet gateway specified in a route in the route table. 
         
        * ``route.gateway-id`` - The ID of a gateway specified in a route in the table. 
         
        * ``route.instance-id`` - The ID of an instance specified in a route in the table. 
         
        * ``route.nat-gateway-id`` - The ID of a NAT gateway. 
         
        * ``route.origin`` - Describes how the route was created. ``CreateRouteTable`` indicates that the route was automatically created when the route table was created; ``CreateRoute`` indicates that the route was manually added to the route table; ``EnableVgwRoutePropagation`` indicates that the route was propagated by route propagation. 
         
        * ``route.state`` - The state of a route in the route table (``active`` | ``blackhole`` ). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on). 
         
        * ``route.vpc-peering-connection-id`` - The ID of a VPC peering connection specified in a route in the table. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-id`` - The ID of the VPC for the route table. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type RouteTableIds: list
      :param RouteTableIds: 

        One or more route table IDs.

         

        Default: Describes all your route tables.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of RouteTable resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = ec2.route_tables.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all RouteTable resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = ec2.route_tables.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

  .. py:attribute:: security_groups

    A collection of SecurityGroup resources

    .. py:method:: all()

      Creates an iterable of all SecurityGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = ec2.security_groups.all()
        
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all SecurityGroup resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = ec2.security_groups.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            GroupIds=[
                'string',
            ],
            GroupNames=[
                'string',
            ],
            DryRun=True|False
        )
      :type Filters: list
      :param Filters: 

        One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

         

         
        * ``description`` - The description of the security group. 
         
        * ``egress.ip-permission.prefix-list-id`` - The ID (prefix) of the AWS service to which the security group allows access. 
         
        * ``group-id`` - The ID of the security group.  
         
        * ``group-name`` - The name of the security group. 
         
        * ``ip-permission.cidr`` - An IPv4 CIDR range that has been granted permission in a security group rule. 
         
        * ``ip-permission.from-port`` - The start of port range for the TCP and UDP protocols, or an ICMP type number. 
         
        * ``ip-permission.group-id`` - The ID of a security group that has been granted permission. 
         
        * ``ip-permission.group-name`` - The name of a security group that has been granted permission. 
         
        * ``ip-permission.ipv6-cidr`` - An IPv6 CIDR range that has been granted permission in a security group rule. 
         
        * ``ip-permission.protocol`` - The IP protocol for the permission (``tcp`` | ``udp`` | ``icmp`` or a protocol number). 
         
        * ``ip-permission.to-port`` - The end of port range for the TCP and UDP protocols, or an ICMP code. 
         
        * ``ip-permission.user-id`` - The ID of an AWS account that has been granted permission. 
         
        * ``owner-id`` - The AWS account ID of the owner of the security group. 
         
        * ``tag-key`` - The key of a tag assigned to the security group. 
         
        * ``tag-value`` - The value of a tag assigned to the security group. 
         
        * ``vpc-id`` - The ID of the VPC specified when the security group was created. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type GroupIds: list
      :param GroupIds: 

        One or more security group IDs. Required for security groups in a nondefault VPC.

         

        Default: Describes all your security groups.

        

      
        - *(string) --* 

        
    
      :type GroupNames: list
      :param GroupNames: 

        [EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the ``group-name`` filter to describe security groups by name.

         

        Default: Describes all your security groups.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of SecurityGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = ec2.security_groups.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all SecurityGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = ec2.security_groups.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

  .. py:attribute:: snapshots

    A collection of Snapshot resources

    .. py:method:: all()

      Creates an iterable of all Snapshot resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = ec2.snapshots.all()
        
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Snapshot resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = ec2.snapshots.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            MaxResults=123,
            NextToken='string',
            OwnerIds=[
                'string',
            ],
            RestorableByUserIds=[
                'string',
            ],
            SnapshotIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``description`` - A description of the snapshot. 
         
        * ``owner-alias`` - Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
         
        * ``owner-id`` - The ID of the AWS account that owns the snapshot. 
         
        * ``progress`` - The progress of the snapshot, as a percentage (for example, 80%). 
         
        * ``snapshot-id`` - The snapshot ID. 
         
        * ``start-time`` - The time stamp when the snapshot was initiated. 
         
        * ``status`` - The status of the snapshot (``pending`` | ``completed`` | ``error`` ). 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``volume-id`` - The ID of the volume the snapshot is for. 
         
        * ``volume-size`` - The size of the volume, in GiB. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of snapshot results returned by ``DescribeSnapshots`` in paginated output. When this parameter is used, ``DescribeSnapshots`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeSnapshots`` request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeSnapshots`` returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

        

      
      :type NextToken: string
      :param NextToken: 

        The ``NextToken`` value returned from a previous paginated ``DescribeSnapshots`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

        

      
      :type OwnerIds: list
      :param OwnerIds: 

        Returns the snapshots owned by the specified owner. Multiple owners can be specified.

        

      
        - *(string) --* 

        
    
      :type RestorableByUserIds: list
      :param RestorableByUserIds: 

        One or more AWS accounts IDs that can create volumes from the snapshot.

        

      
        - *(string) --* 

        
    
      :type SnapshotIds: list
      :param SnapshotIds: 

        One or more snapshot IDs.

         

        Default: Describes snapshots for which you have launch permissions.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Snapshot resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = ec2.snapshots.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Snapshot resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = ec2.snapshots.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

  .. py:attribute:: subnets

    A collection of Subnet resources

    .. py:method:: all()

      Creates an iterable of all Subnet resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = ec2.subnets.all()
        
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Subnet resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = ec2.subnets.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            SubnetIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``availabilityZone`` - The Availability Zone for the subnet. You can also use ``availability-zone`` as the filter name. 
         
        * ``available-ip-address-count`` - The number of IPv4 addresses in the subnet that are available. 
         
        * ``cidrBlock`` - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use ``cidr`` or ``cidr-block`` as the filter names. 
         
        * ``defaultForAz`` - Indicates whether this is the default subnet for the Availability Zone. You can also use ``default-for-az`` as the filter name. 
         
        * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the subnet. 
         
        * ``ipv6-cidr-block-association.association-id`` - An association ID for an IPv6 CIDR block associated with the subnet. 
         
        * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the subnet. 
         
        * ``state`` - The state of the subnet (``pending`` | ``available`` ). 
         
        * ``subnet-id`` - The ID of the subnet. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-id`` - The ID of the VPC for the subnet. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type SubnetIds: list
      :param SubnetIds: 

        One or more subnet IDs.

         

        Default: Describes all your subnets.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Subnet resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = ec2.subnets.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Subnet resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = ec2.subnets.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

  .. py:attribute:: volumes

    A collection of Volume resources

    .. py:method:: all()

      Creates an iterable of all Volume resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = ec2.volumes.all()
        
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Volume resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = ec2.volumes.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            VolumeIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``attachment.attach-time`` - The time stamp when the attachment initiated. 
         
        * ``attachment.delete-on-termination`` - Whether the volume is deleted on instance termination. 
         
        * ``attachment.device`` - The device name that is exposed to the instance (for example, ``/dev/sda1`` ). 
         
        * ``attachment.instance-id`` - The ID of the instance the volume is attached to. 
         
        * ``attachment.status`` - The attachment state (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
         
        * ``availability-zone`` - The Availability Zone in which the volume was created. 
         
        * ``create-time`` - The time stamp when the volume was created. 
         
        * ``encrypted`` - The encryption status of the volume. 
         
        * ``size`` - The size of the volume, in GiB. 
         
        * ``snapshot-id`` - The snapshot from which the volume was created. 
         
        * ``status`` - The status of the volume (``creating`` | ``available`` | ``in-use`` | ``deleting`` | ``deleted`` | ``error`` ). 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``volume-id`` - The volume ID. 
         
        * ``volume-type`` - The Amazon EBS volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type VolumeIds: list
      :param VolumeIds: 

        One or more volume IDs.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

        

      
      :type NextToken: string
      :param NextToken: 

        The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

        

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Volume resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = ec2.volumes.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Volume resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = ec2.volumes.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

  .. py:attribute:: vpc_addresses

    A collection of VpcAddress resources

    .. py:method:: all()

      Creates an iterable of all VpcAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = ec2.vpc_addresses.all()
        
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all VpcAddress resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = ec2.vpc_addresses.filter(
            PublicIps=[
                'string',
            ],
            AllocationIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type PublicIps: list
      :param PublicIps: 

        [EC2-Classic] One or more Elastic IP addresses.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type AllocationIds: list
      :param AllocationIds: 

        [EC2-VPC] One or more allocation IDs.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of VpcAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = ec2.vpc_addresses.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all VpcAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = ec2.vpc_addresses.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

  .. py:attribute:: vpc_peering_connections

    A collection of VpcPeeringConnection resources

    .. py:method:: all()

      Creates an iterable of all VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = ec2.vpc_peering_connections.all()
        
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = ec2.vpc_peering_connections.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            DryRun=True|False,
            VpcPeeringConnectionIds=[
                'string',
            ]
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``accepter-vpc-info.cidr-block`` - The IPv4 CIDR block of the peer VPC. 
         
        * ``accepter-vpc-info.owner-id`` - The AWS account ID of the owner of the peer VPC. 
         
        * ``accepter-vpc-info.vpc-id`` - The ID of the peer VPC. 
         
        * ``expiration-time`` - The expiration date and time for the VPC peering connection. 
         
        * ``requester-vpc-info.cidr-block`` - The IPv4 CIDR block of the requester's VPC. 
         
        * ``requester-vpc-info.owner-id`` - The AWS account ID of the owner of the requester VPC. 
         
        * ``requester-vpc-info.vpc-id`` - The ID of the requester VPC. 
         
        * ``status-code`` - The status of the VPC peering connection (``pending-acceptance`` | ``failed`` | ``expired`` | ``provisioning`` | ``active`` | ``deleted`` | ``rejected`` ). 
         
        * ``status-message`` - A message that provides more information about the status of the VPC peering connection, if applicable. 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-peering-connection-id`` - The ID of the VPC peering connection. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type VpcPeeringConnectionIds: list
      :param VpcPeeringConnectionIds: 

        One or more VPC peering connection IDs.

         

        Default: Describes all your VPC peering connections.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = ec2.vpc_peering_connections.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = ec2.vpc_peering_connections.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

  .. py:attribute:: vpcs

    A collection of Vpc resources

    .. py:method:: all()

      Creates an iterable of all Vpc resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_      


      **Request Syntax** 
      ::

        vpc_iterator = ec2.vpcs.all()
        
      
      :rtype: list(:py:class:`ec2.Vpc`)
      :returns: A list of Vpc resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Vpc resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_      


      **Request Syntax** 
      ::

        vpc_iterator = ec2.vpcs.filter(
            Filters=[
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            VpcIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type Filters: list
      :param Filters: 

        One or more filters.

         

         
        * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
         
        * ``dhcp-options-id`` - The ID of a set of DHCP options. 
         
        * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
         
        * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
         
        * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
         
        * ``isDefault`` - Indicates whether the VPC is the default VPC. 
         
        * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
         
        * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
         
        * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
         
        * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
         
        * ``vpc-id`` - The ID of the VPC. 
         

        

      
        - *(dict) --* 

          A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

          

        
          - **Name** *(string) --* 

            The name of the filter. Filter names are case-sensitive.

            

          
          - **Values** *(list) --* 

            One or more filter values. Filter values are case-sensitive.

            

          
            - *(string) --* 

            
        
        
    
      :type VpcIds: list
      :param VpcIds: 

        One or more VPC IDs.

         

        Default: Describes all your VPCs.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Vpc`)
      :returns: A list of Vpc resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Vpc resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_      


      **Request Syntax** 
      ::

        vpc_iterator = ec2.vpcs.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Vpc`)
      :returns: A list of Vpc resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Vpc resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_      


      **Request Syntax** 
      ::

        vpc_iterator = ec2.vpcs.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Vpc`)
      :returns: A list of Vpc resources
      

==============
ClassicAddress
==============



.. py:class:: EC2.ClassicAddress(public_ip)

  A resource representing an Amazon Elastic Compute Cloud (EC2) ClassicAddress::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    classic_address = ec2.ClassicAddress('public_ip')

  :type public_ip: string
  :param public_ip: The ClassicAddress's public_ip identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`public_ip`

  
  These are the resource's available attributes:
  
  *   :py:attr:`allocation_id`

  
  *   :py:attr:`association_id`

  
  *   :py:attr:`domain`

  
  *   :py:attr:`instance_id`

  
  *   :py:attr:`network_interface_id`

  
  *   :py:attr:`network_interface_owner_id`

  
  *   :py:attr:`private_ip_address`

  
  These are the resource's available actions:
  
  *   :py:meth:`associate()`

  
  *   :py:meth:`disassociate()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`release()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: public_ip

    *(string)* The ClassicAddress's public_ip identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: allocation_id

    

    - *(string) --* 

      The ID representing the allocation of the address for use with EC2-VPC.

      

  .. py:attribute:: association_id

    

    - *(string) --* 

      The ID representing the association of the address with an instance in a VPC.

      

  .. py:attribute:: domain

    

    - *(string) --* 

      Indicates whether this Elastic IP address is for use with instances in EC2-Classic (``standard`` ) or instances in a VPC (``vpc`` ).

      

  .. py:attribute:: instance_id

    

    - *(string) --* 

      The ID of the instance that the address is associated with (if any).

      

  .. py:attribute:: network_interface_id

    

    - *(string) --* 

      The ID of the network interface.

      

  .. py:attribute:: network_interface_owner_id

    

    - *(string) --* 

      The ID of the AWS account that owns the network interface.

      

  .. py:attribute:: private_ip_address

    

    - *(string) --* 

      The private IP address associated with the Elastic IP address.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: associate(**kwargs)

    

    Associates an Elastic IP address with an instance or a network interface.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

     

    [VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

     

    .. warning::

       

      This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the *Elastic IP Addresses* section of `Amazon EC2 Pricing <http://aws.amazon.com/ec2/pricing/>`_ .

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress>`_    


    **Request Syntax** 
    ::

      response = classic_address.associate(
          AllocationId='string',
          InstanceId='string',
          AllowReassociation=True|False,
          DryRun=True|False,
          NetworkInterfaceId='string',
          PrivateIpAddress='string'
      )
    :type AllocationId: string
    :param AllocationId: 

      [EC2-VPC] The allocation ID. This is required for EC2-VPC.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

      

    
    :type AllowReassociation: boolean
    :param AllowReassociation: 

      [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

      

    
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AssociateAddress.

        
        

        - **AssociationId** *(string) --* 

          [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

          
    

  .. py:method:: disassociate(**kwargs)

    

    Disassociates an Elastic IP address from the instance or network interface it's associated with.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress>`_    


    **Request Syntax** 
    ::

      response = classic_address.disassociate(
          AssociationId='string',
          DryRun=True|False
      )
    :type AssociationId: string
    :param AssociationId: 

      [EC2-VPC] The association ID. Required for EC2-VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_addresses` to update the attributes of the ClassicAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      classic_address.load()
    :returns: None

  .. py:method:: release(**kwargs)

    

    Releases the specified Elastic IP address.

     

    [EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use  DisassociateAddress .

     

    [Nondefault VPC] You must use  DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (``InvalidIPAddress.InUse`` ).

     

    After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an ``AuthFailure`` error if the address is already allocated to another AWS account.

     

    [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see  AllocateAddress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress>`_    


    **Request Syntax** 
    ::

      response = classic_address.release(
          AllocationId='string',
          DryRun=True|False
      )
    :type AllocationId: string
    :param AllocationId: 

      [EC2-VPC] The allocation ID. Required for EC2-VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_addresses` to update the attributes of the ClassicAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      classic_address.reload()
    :returns: None

===========
DhcpOptions
===========



.. py:class:: EC2.DhcpOptions(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) DhcpOptions::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    dhcp_options = ec2.DhcpOptions('id')

  :type id: string
  :param id: The DhcpOptions's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`dhcp_configurations`

  
  *   :py:attr:`dhcp_options_id`

  
  *   :py:attr:`tags`

  
  These are the resource's available actions:
  
  *   :py:meth:`associate_with_vpc()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The DhcpOptions's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: dhcp_configurations

    

    - *(list) --* 

      One or more DHCP options in the set.

      
      

      - *(dict) --* 

        Describes a DHCP configuration option.

        
        

        - **Key** *(string) --* 

          The name of a DHCP option.

          
        

        - **Values** *(list) --* 

          One or more values for the DHCP option.

          
          

          - *(dict) --* 

            Describes a value for a resource attribute that is a String.

            
            

            - **Value** *(string) --* 

              The attribute value. Note that the value is case-sensitive.

              
        
      
    
  

  .. py:attribute:: dhcp_options_id

    

    - *(string) --* 

      The ID of the set of DHCP options.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the DHCP options set.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: associate_with_vpc(**kwargs)

    

    Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

     

    After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

     

    For more information, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = dhcp_options.associate_with_vpc(
          VpcId='string',
          DryRun=True|False
      )
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = dhcp_options.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = dhcp_options.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_dhcp_options` to update the attributes of the DhcpOptions resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      dhcp_options.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_dhcp_options` to update the attributes of the DhcpOptions resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      dhcp_options.reload()
    :returns: None

=====
Image
=====



.. py:class:: EC2.Image(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Image::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    image = ec2.Image('id')

  :type id: string
  :param id: The Image's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`architecture`

  
  *   :py:attr:`block_device_mappings`

  
  *   :py:attr:`creation_date`

  
  *   :py:attr:`description`

  
  *   :py:attr:`ena_support`

  
  *   :py:attr:`hypervisor`

  
  *   :py:attr:`image_id`

  
  *   :py:attr:`image_location`

  
  *   :py:attr:`image_owner_alias`

  
  *   :py:attr:`image_type`

  
  *   :py:attr:`kernel_id`

  
  *   :py:attr:`name`

  
  *   :py:attr:`owner_id`

  
  *   :py:attr:`platform`

  
  *   :py:attr:`product_codes`

  
  *   :py:attr:`public`

  
  *   :py:attr:`ramdisk_id`

  
  *   :py:attr:`root_device_name`

  
  *   :py:attr:`root_device_type`

  
  *   :py:attr:`sriov_net_support`

  
  *   :py:attr:`state`

  
  *   :py:attr:`state_reason`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`virtualization_type`

  
  These are the resource's available actions:
  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`deregister()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`reset_attribute()`

  
  These are the resource's available waiters:
  
  *   :py:meth:`wait_until_exists()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Image's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: architecture

    

    - *(string) --* 

      The architecture of the image.

      

  .. py:attribute:: block_device_mappings

    

    - *(list) --* 

      Any block device mapping entries.

      
      

      - *(dict) --* 

        Describes a block device mapping.

        
        

        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          
        

        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          
        

        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          
          

          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            
          

          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            
          

          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            
          

          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            
          

          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            
          

          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            
      
        

        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          
    
  

  .. py:attribute:: creation_date

    

    - *(string) --* 

      The date and time the image was created.

      

  .. py:attribute:: description

    

    - *(string) --* 

      The description of the AMI that was provided during image creation.

      

  .. py:attribute:: ena_support

    

    - *(boolean) --* 

      Specifies whether enhanced networking with ENA is enabled.

      

  .. py:attribute:: hypervisor

    

    - *(string) --* 

      The hypervisor type of the image.

      

  .. py:attribute:: image_id

    

    - *(string) --* 

      The ID of the AMI.

      

  .. py:attribute:: image_location

    

    - *(string) --* 

      The location of the AMI.

      

  .. py:attribute:: image_owner_alias

    

    - *(string) --* 

      The AWS account alias (for example, ``amazon`` , ``self`` ) or the AWS account ID of the AMI owner.

      

  .. py:attribute:: image_type

    

    - *(string) --* 

      The type of image.

      

  .. py:attribute:: kernel_id

    

    - *(string) --* 

      The kernel associated with the image, if any. Only applicable for machine images.

      

  .. py:attribute:: name

    

    - *(string) --* 

      The name of the AMI that was provided during image creation.

      

  .. py:attribute:: owner_id

    

    - *(string) --* 

      The AWS account ID of the image owner.

      

  .. py:attribute:: platform

    

    - *(string) --* 

      The value is ``Windows`` for Windows AMIs; otherwise blank.

      

  .. py:attribute:: product_codes

    

    - *(list) --* 

      Any product codes associated with the AMI.

      
      

      - *(dict) --* 

        Describes a product code.

        
        

        - **ProductCodeId** *(string) --* 

          The product code.

          
        

        - **ProductCodeType** *(string) --* 

          The type of product code.

          
    
  

  .. py:attribute:: public

    

    - *(boolean) --* 

      Indicates whether the image has public launch permissions. The value is ``true`` if this image has public launch permissions or ``false`` if it has only implicit and explicit launch permissions.

      

  .. py:attribute:: ramdisk_id

    

    - *(string) --* 

      The RAM disk associated with the image, if any. Only applicable for machine images.

      

  .. py:attribute:: root_device_name

    

    - *(string) --* 

      The device name of the root device (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

      

  .. py:attribute:: root_device_type

    

    - *(string) --* 

      The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.

      

  .. py:attribute:: sriov_net_support

    

    - *(string) --* 

      Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The current state of the AMI. If the state is ``available`` , the image is successfully registered and can be used to launch an instance.

      

  .. py:attribute:: state_reason

    

    - *(dict) --* 

      The reason for the state change.

      
      

      - **Code** *(string) --* 

        The reason code for the state change.

        
      

      - **Message** *(string) --* 

        The message for the state change.

         

         
        * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
         
        * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
         
        * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
         
        * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
         
        * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
         
        * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
         
        * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
         
        * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
         
        * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
         

        
  

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the image.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: virtualization_type

    

    - *(string) --* 

      The type of virtualization of the AMI.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = image.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: deregister(**kwargs)

    

    Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

     

    When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage>`_    


    **Request Syntax** 
    ::

      response = image.deregister(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_attribute(**kwargs)

    

    Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute>`_    


    **Request Syntax** 
    ::

      response = image.describe_attribute(
          Attribute='description'|'kernel'|'ramdisk'|'launchPermission'|'productCodes'|'blockDeviceMapping'|'sriovNetSupport',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The AMI attribute.

       

       **Note** : Depending on your account privileges, the ``blockDeviceMapping`` attribute may return a ``Client.AuthFailure`` error. If this happens, use  DescribeImages to get information about the block device mapping for the AMI.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'VirtualName': 'string',
                    'Ebs': {
                        'Encrypted': True|False,
                        'DeleteOnTermination': True|False,
                        'Iops': 123,
                        'SnapshotId': 'string',
                        'VolumeSize': 123,
                        'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                    },
                    'NoDevice': 'string'
                },
            ],
            'ImageId': 'string',
            'LaunchPermissions': [
                {
                    'Group': 'all',
                    'UserId': 'string'
                },
            ],
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'Description': {
                'Value': 'string'
            },
            'KernelId': {
                'Value': 'string'
            },
            'RamdiskId': {
                'Value': 'string'
            },
            'SriovNetSupport': {
                'Value': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes an image attribute.

        
        

        - **BlockDeviceMappings** *(list) --* 

          One or more block device mapping entries.

          
          

          - *(dict) --* 

            Describes a block device mapping.

            
            

            - **DeviceName** *(string) --* 

              The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

              
            

            - **VirtualName** *(string) --* 

              The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

               

              Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

              
            

            - **Ebs** *(dict) --* 

              Parameters used to automatically set up EBS volumes when the instance is launched.

              
              

              - **Encrypted** *(boolean) --* 

                Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                
              

              - **DeleteOnTermination** *(boolean) --* 

                Indicates whether the EBS volume is deleted on instance termination.

                
              

              - **Iops** *(integer) --* 

                The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

                 

                Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

                 

                Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

                
              

              - **SnapshotId** *(string) --* 

                The ID of the snapshot.

                
              

              - **VolumeSize** *(integer) --* 

                The size of the volume, in GiB.

                 

                Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                 

                Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                
              

              - **VolumeType** *(string) --* 

                The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

                 

                Default: ``standard``  

                
          
            

            - **NoDevice** *(string) --* 

              Suppresses the specified device included in the block device mapping of the AMI.

              
        
      
        

        - **ImageId** *(string) --* 

          The ID of the AMI.

          
        

        - **LaunchPermissions** *(list) --* 

          One or more launch permissions.

          
          

          - *(dict) --* 

            Describes a launch permission.

            
            

            - **Group** *(string) --* 

              The name of the group.

              
            

            - **UserId** *(string) --* 

              The AWS account ID.

              
        
      
        

        - **ProductCodes** *(list) --* 

          One or more product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **Description** *(dict) --* 

          A description for the AMI.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **KernelId** *(dict) --* 

          The kernel ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **RamdiskId** *(dict) --* 

          The RAM disk ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **SriovNetSupport** *(dict) --* 

          Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_images` to update the attributes of the Image resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      image.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.

     

    .. note::

       

      AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.

       

     

    .. note::

       

      The SriovNetSupport enhanced networking attribute cannot be changed using this command. Instead, enable SriovNetSupport on an instance and create an AMI from the instance. This will result in an image with SriovNetSupport enabled.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute>`_    


    **Request Syntax** 
    ::

      response = image.modify_attribute(
          Attribute='string',
          Description={
              'Value': 'string'
          },
          LaunchPermission={
              'Add': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ],
              'Remove': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ]
          },
          OperationType='add'|'remove',
          ProductCodes=[
              'string',
          ],
          UserGroups=[
              'string',
          ],
          UserIds=[
              'string',
          ],
          Value='string',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The name of the attribute to modify.

      

    
    :type Description: dict
    :param Description: 

      A description for the AMI.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type LaunchPermission: dict
    :param LaunchPermission: 

      A launch permission modification.

      

    
      - **Add** *(list) --* 

        The AWS account ID to add to the list of launch permissions for the AMI.

        

      
        - *(dict) --* 

          Describes a launch permission.

          

        
          - **Group** *(string) --* 

            The name of the group.

            

          
          - **UserId** *(string) --* 

            The AWS account ID.

            

          
        
    
      - **Remove** *(list) --* 

        The AWS account ID to remove from the list of launch permissions for the AMI.

        

      
        - *(dict) --* 

          Describes a launch permission.

          

        
          - **Group** *(string) --* 

            The name of the group.

            

          
          - **UserId** *(string) --* 

            The AWS account ID.

            

          
        
    
    
    :type OperationType: string
    :param OperationType: 

      The operation type.

      

    
    :type ProductCodes: list
    :param ProductCodes: 

      One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the ``productCodes`` attribute.

      

    
      - *(string) --* 

      
  
    :type UserGroups: list
    :param UserGroups: 

      One or more user groups. This is only valid when modifying the ``launchPermission`` attribute.

      

    
      - *(string) --* 

      
  
    :type UserIds: list
    :param UserIds: 

      One or more AWS account IDs. This is only valid when modifying the ``launchPermission`` attribute.

      

    
      - *(string) --* 

      
  
    :type Value: string
    :param Value: 

      The value of the attribute being modified. This is only valid when modifying the ``description`` attribute.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_images` to update the attributes of the Image resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      image.reload()
    :returns: None

  .. py:method:: reset_attribute(**kwargs)

    

    Resets an attribute of an AMI to its default value.

     

    .. note::

       

      The productCodes attribute can't be reset.

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute>`_    


    **Request Syntax** 
    ::

      response = image.reset_attribute(
          Attribute='launchPermission',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset (currently you can only reset the launch permission attribute).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None
  .. rst-class:: admonition-title
  
  Waiters
  
  Waiters provide an interface to wait for a resource to reach a specific state.
  For more information about waiters refer to the :ref:`Resources Introduction Guide<waiters_intro>`.
  

  .. py:method:: wait_until_exists(**kwargs)

    Waits until this Image is exists. This method calls :py:meth:`EC2.Waiter.image_exists.wait` which polls. :py:meth:`EC2.Client.describe_images` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages>`_    


    **Request Syntax** 
    ::

      image.wait_until_exists(
          ExecutableUsers=[
              'string',
          ],
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          Owners=[
              'string',
          ],
          DryRun=True|False
      )
    :type ExecutableUsers: list
    :param ExecutableUsers: 

      Scopes the images by users with explicit launch permissions. Specify an AWS account ID, ``self`` (the sender of the request), or ``all`` (public AMIs).

      

    
      - *(string) --* 

      
  
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``architecture`` - The image architecture (``i386`` | ``x86_64`` ). 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` ). 
       
      * ``block-device-mapping.snapshot-id`` - The ID of the snapshot used for the EBS volume. 
       
      * ``block-device-mapping.volume-size`` - The volume size of the EBS volume, in GiB. 
       
      * ``block-device-mapping.volume-type`` - The volume type of the EBS volume (``gp2`` | ``io1`` | ``st1`` | ``sc1`` | ``standard`` ). 
       
      * ``description`` - The description of the image (provided during image creation). 
       
      * ``ena-support`` - A Boolean that indicates whether enhanced networking with ENA is enabled. 
       
      * ``hypervisor`` - The hypervisor type (``ovm`` | ``xen`` ). 
       
      * ``image-id`` - The ID of the image. 
       
      * ``image-type`` - The image type (``machine`` | ``kernel`` | ``ramdisk`` ). 
       
      * ``is-public`` - A Boolean that indicates whether the image is public. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``manifest-location`` - The location of the image manifest. 
       
      * ``name`` - The name of the AMI (provided during image creation). 
       
      * ``owner-alias`` - String value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The AWS account ID of the image owner. 
       
      * ``platform`` - The platform. To only list Windows-based AMIs, use ``windows`` . 
       
      * ``product-code`` - The product code. 
       
      * ``product-code.type`` - The type of the product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``root-device-name`` - The name of the root device volume (for example, ``/dev/sda1`` ). 
       
      * ``root-device-type`` - The type of the root device volume (``ebs`` | ``instance-store`` ). 
       
      * ``state`` - The state of the image (``available`` | ``pending`` | ``failed`` ). 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - The message for the state change. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``virtualization-type`` - The virtualization type (``paravirtual`` | ``hvm`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type Owners: list
    :param Owners: 

      Filters the images by the owner. Specify an AWS account ID, ``self`` (owner is the sender of the request), or an AWS owner alias (valid values are ``amazon`` | ``aws-marketplace`` | ``microsoft`` ). Omitting this option returns all images for which you have launch permissions, regardless of ownership.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :returns: None

========
Instance
========



.. py:class:: EC2.Instance(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Instance::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    instance = ec2.Instance('id')

  :type id: string
  :param id: The Instance's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`ami_launch_index`

  
  *   :py:attr:`architecture`

  
  *   :py:attr:`block_device_mappings`

  
  *   :py:attr:`client_token`

  
  *   :py:attr:`ebs_optimized`

  
  *   :py:attr:`elastic_gpu_associations`

  
  *   :py:attr:`ena_support`

  
  *   :py:attr:`hypervisor`

  
  *   :py:attr:`iam_instance_profile`

  
  *   :py:attr:`image_id`

  
  *   :py:attr:`instance_id`

  
  *   :py:attr:`instance_lifecycle`

  
  *   :py:attr:`instance_type`

  
  *   :py:attr:`kernel_id`

  
  *   :py:attr:`key_name`

  
  *   :py:attr:`launch_time`

  
  *   :py:attr:`monitoring`

  
  *   :py:attr:`network_interfaces_attribute`

  
  *   :py:attr:`placement`

  
  *   :py:attr:`platform`

  
  *   :py:attr:`private_dns_name`

  
  *   :py:attr:`private_ip_address`

  
  *   :py:attr:`product_codes`

  
  *   :py:attr:`public_dns_name`

  
  *   :py:attr:`public_ip_address`

  
  *   :py:attr:`ramdisk_id`

  
  *   :py:attr:`root_device_name`

  
  *   :py:attr:`root_device_type`

  
  *   :py:attr:`security_groups`

  
  *   :py:attr:`source_dest_check`

  
  *   :py:attr:`spot_instance_request_id`

  
  *   :py:attr:`sriov_net_support`

  
  *   :py:attr:`state`

  
  *   :py:attr:`state_reason`

  
  *   :py:attr:`state_transition_reason`

  
  *   :py:attr:`subnet_id`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`virtualization_type`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`classic_address`

  
  *   :py:attr:`image`

  
  *   :py:attr:`key_pair`

  
  *   :py:attr:`network_interfaces`

  
  *   :py:attr:`placement_group`

  
  *   :py:attr:`subnet`

  
  *   :py:attr:`vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`attach_classic_link_vpc()`

  
  *   :py:meth:`attach_volume()`

  
  *   :py:meth:`console_output()`

  
  *   :py:meth:`create_image()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete_tags()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`detach_classic_link_vpc()`

  
  *   :py:meth:`detach_volume()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`monitor()`

  
  *   :py:meth:`password_data()`

  
  *   :py:meth:`reboot()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`report_status()`

  
  *   :py:meth:`reset_attribute()`

  
  *   :py:meth:`reset_kernel()`

  
  *   :py:meth:`reset_ramdisk()`

  
  *   :py:meth:`reset_source_dest_check()`

  
  *   :py:meth:`start()`

  
  *   :py:meth:`stop()`

  
  *   :py:meth:`terminate()`

  
  *   :py:meth:`unmonitor()`

  
  These are the resource's available collections:
  
  *   :py:attr:`volumes`

  
  *   :py:attr:`vpc_addresses`

  
  These are the resource's available waiters:
  
  *   :py:meth:`wait_until_exists()`

  
  *   :py:meth:`wait_until_running()`

  
  *   :py:meth:`wait_until_stopped()`

  
  *   :py:meth:`wait_until_terminated()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Instance's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: ami_launch_index

    

    - *(integer) --* 

      The AMI launch index, which can be used to find this instance in the launch group.

      

  .. py:attribute:: architecture

    

    - *(string) --* 

      The architecture of the image.

      

  .. py:attribute:: block_device_mappings

    

    - *(list) --* 

      Any block device mapping entries for the instance.

      
      

      - *(dict) --* 

        Describes a block device mapping.

        
        

        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          
        

        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          
          

          - **AttachTime** *(datetime) --* 

            The time stamp when the attachment initiated.

            
          

          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the volume is deleted on instance termination.

            
          

          - **Status** *(string) --* 

            The attachment state.

            
          

          - **VolumeId** *(string) --* 

            The ID of the EBS volume.

            
      
    
  

  .. py:attribute:: client_token

    

    - *(string) --* 

      The idempotency token you provided when you launched the instance, if applicable.

      

  .. py:attribute:: ebs_optimized

    

    - *(boolean) --* 

      Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

      

  .. py:attribute:: elastic_gpu_associations

    

    - *(list) --* 

      The Elastic GPU associated with the instance.

      
      

      - *(dict) --* 

        Describes the association between an instance and an Elastic GPU.

        
        

        - **ElasticGpuId** *(string) --* 

          The ID of the Elastic GPU.

          
        

        - **ElasticGpuAssociationId** *(string) --* 

          The ID of the association.

          
        

        - **ElasticGpuAssociationState** *(string) --* 

          The state of the association between the instance and the Elastic GPU.

          
        

        - **ElasticGpuAssociationTime** *(string) --* 

          The time the Elastic GPU was associated with the instance.

          
    
  

  .. py:attribute:: ena_support

    

    - *(boolean) --* 

      Specifies whether enhanced networking with ENA is enabled.

      

  .. py:attribute:: hypervisor

    

    - *(string) --* 

      The hypervisor type of the instance.

      

  .. py:attribute:: iam_instance_profile

    

    - *(dict) --* 

      The IAM instance profile associated with the instance, if applicable.

      
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        
      

      - **Id** *(string) --* 

        The ID of the instance profile.

        
  

  .. py:attribute:: image_id

    

    - *(string) --* 

      The ID of the AMI used to launch the instance.

      

  .. py:attribute:: instance_id

    

    - *(string) --* 

      The ID of the instance.

      

  .. py:attribute:: instance_lifecycle

    

    - *(string) --* 

      Indicates whether this is a Spot instance or a Scheduled Instance.

      

  .. py:attribute:: instance_type

    

    - *(string) --* 

      The instance type.

      

  .. py:attribute:: kernel_id

    

    - *(string) --* 

      The kernel associated with this instance, if applicable.

      

  .. py:attribute:: key_name

    

    - *(string) --* 

      The name of the key pair, if this instance was launched with an associated key pair.

      

  .. py:attribute:: launch_time

    

    - *(datetime) --* 

      The time the instance was launched.

      

  .. py:attribute:: monitoring

    

    - *(dict) --* 

      The monitoring for the instance.

      
      

      - **State** *(string) --* 

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        
  

  .. py:attribute:: network_interfaces_attribute

    

    - *(list) --* 

      [EC2-VPC] One or more network interfaces for the instance.

      
      

      - *(dict) --* 

        Describes a network interface.

        
        

        - **Association** *(dict) --* 

          The association information for an Elastic IPv4 associated with the network interface.

          
          

          - **IpOwnerId** *(string) --* 

            The ID of the owner of the Elastic IP address.

            
          

          - **PublicDnsName** *(string) --* 

            The public DNS name.

            
          

          - **PublicIp** *(string) --* 

            The public IP address or Elastic IP address bound to the network interface.

            
      
        

        - **Attachment** *(dict) --* 

          The network interface attachment.

          
          

          - **AttachTime** *(datetime) --* 

            The time stamp when the attachment initiated.

            
          

          - **AttachmentId** *(string) --* 

            The ID of the network interface attachment.

            
          

          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the network interface is deleted when the instance is terminated.

            
          

          - **DeviceIndex** *(integer) --* 

            The index of the device on the instance for the network interface attachment.

            
          

          - **Status** *(string) --* 

            The attachment state.

            
      
        

        - **Description** *(string) --* 

          The description.

          
        

        - **Groups** *(list) --* 

          One or more security groups.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **Ipv6Addresses** *(list) --* 

          One or more IPv6 addresses associated with the network interface.

          
          

          - *(dict) --* 

            Describes an IPv6 address.

            
            

            - **Ipv6Address** *(string) --* 

              The IPv6 address.

              
        
      
        

        - **MacAddress** *(string) --* 

          The MAC address.

          
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
        

        - **OwnerId** *(string) --* 

          The ID of the AWS account that created the network interface.

          
        

        - **PrivateDnsName** *(string) --* 

          The private DNS name.

          
        

        - **PrivateIpAddress** *(string) --* 

          The IPv4 address of the network interface within the subnet.

          
        

        - **PrivateIpAddresses** *(list) --* 

          One or more private IPv4 addresses associated with the network interface.

          
          

          - *(dict) --* 

            Describes a private IPv4 address.

            
            

            - **Association** *(dict) --* 

              The association information for an Elastic IP address for the network interface.

              
              

              - **IpOwnerId** *(string) --* 

                The ID of the owner of the Elastic IP address.

                
              

              - **PublicDnsName** *(string) --* 

                The public DNS name.

                
              

              - **PublicIp** *(string) --* 

                The public IP address or Elastic IP address bound to the network interface.

                
          
            

            - **Primary** *(boolean) --* 

              Indicates whether this IPv4 address is the primary private IP address of the network interface.

              
            

            - **PrivateDnsName** *(string) --* 

              The private IPv4 DNS name.

              
            

            - **PrivateIpAddress** *(string) --* 

              The private IPv4 address of the network interface.

              
        
      
        

        - **SourceDestCheck** *(boolean) --* 

          Indicates whether to validate network traffic to or from this network interface.

          
        

        - **Status** *(string) --* 

          The status of the network interface.

          
        

        - **SubnetId** *(string) --* 

          The ID of the subnet.

          
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
    
  

  .. py:attribute:: placement

    

    - *(dict) --* 

      The location where the instance launched, if applicable.

      
      

      - **AvailabilityZone** *(string) --* 

        The Availability Zone of the instance.

        
      

      - **Affinity** *(string) --* 

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

        
      

      - **GroupName** *(string) --* 

        The name of the placement group the instance is in (for cluster compute instances).

        
      

      - **HostId** *(string) --* 

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

        
      

      - **Tenancy** *(string) --* 

        The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

        
      

      - **SpreadDomain** *(string) --* 

        Reserved for future use.

        
  

  .. py:attribute:: platform

    

    - *(string) --* 

      The value is ``Windows`` for Windows instances; otherwise blank.

      

  .. py:attribute:: private_dns_name

    

    - *(string) --* 

      (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the ``running`` state. 

       

      [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

      

  .. py:attribute:: private_ip_address

    

    - *(string) --* 

      The private IPv4 address assigned to the instance.

      

  .. py:attribute:: product_codes

    

    - *(list) --* 

      The product codes attached to this instance, if applicable.

      
      

      - *(dict) --* 

        Describes a product code.

        
        

        - **ProductCodeId** *(string) --* 

          The product code.

          
        

        - **ProductCodeType** *(string) --* 

          The type of product code.

          
    
  

  .. py:attribute:: public_dns_name

    

    - *(string) --* 

      (IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the ``running`` state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

      

  .. py:attribute:: public_ip_address

    

    - *(string) --* 

      The public IPv4 address assigned to the instance, if applicable.

      

  .. py:attribute:: ramdisk_id

    

    - *(string) --* 

      The RAM disk associated with this instance, if applicable.

      

  .. py:attribute:: root_device_name

    

    - *(string) --* 

      The root device name (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

      

  .. py:attribute:: root_device_type

    

    - *(string) --* 

      The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

      

  .. py:attribute:: security_groups

    

    - *(list) --* 

      One or more security groups for the instance.

      
      

      - *(dict) --* 

        Describes a security group.

        
        

        - **GroupName** *(string) --* 

          The name of the security group.

          
        

        - **GroupId** *(string) --* 

          The ID of the security group.

          
    
  

  .. py:attribute:: source_dest_check

    

    - *(boolean) --* 

      Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

  .. py:attribute:: spot_instance_request_id

    

    - *(string) --* 

      If the request is a Spot instance request, the ID of the request.

      

  .. py:attribute:: sriov_net_support

    

    - *(string) --* 

      Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      

  .. py:attribute:: state

    

    - *(dict) --* 

      The current state of the instance.

      
      

      - **Code** *(integer) --* 

        The low byte represents the state. The high byte is an opaque internal value and should be ignored.

         

         
        * ``0`` : ``pending``   
         
        * ``16`` : ``running``   
         
        * ``32`` : ``shutting-down``   
         
        * ``48`` : ``terminated``   
         
        * ``64`` : ``stopping``   
         
        * ``80`` : ``stopped``   
         

        
      

      - **Name** *(string) --* 

        The current state of the instance.

        
  

  .. py:attribute:: state_reason

    

    - *(dict) --* 

      The reason for the most recent state transition.

      
      

      - **Code** *(string) --* 

        The reason code for the state change.

        
      

      - **Message** *(string) --* 

        The message for the state change.

         

         
        * ``Server.InsufficientInstanceCapacity`` : There was insufficient instance capacity to satisfy the launch request. 
         
        * ``Server.InternalError`` : An internal error occurred during instance launch, resulting in termination. 
         
        * ``Server.ScheduledStop`` : The instance was stopped due to a scheduled retirement. 
         
        * ``Server.SpotInstanceTermination`` : A Spot instance was terminated due to an increase in the market price. 
         
        * ``Client.InternalError`` : A client error caused the instance to terminate on launch. 
         
        * ``Client.InstanceInitiatedShutdown`` : The instance was shut down using the ``shutdown -h`` command from the instance. 
         
        * ``Client.UserInitiatedShutdown`` : The instance was shut down using the Amazon EC2 API. 
         
        * ``Client.VolumeLimitExceeded`` : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. 
         
        * ``Client.InvalidSnapshot.NotFound`` : The specified snapshot was not found. 
         

        
  

  .. py:attribute:: state_transition_reason

    

    - *(string) --* 

      The reason for the most recent state transition. This might be an empty string.

      

  .. py:attribute:: subnet_id

    

    - *(string) --* 

      [EC2-VPC] The ID of the subnet in which the instance is running.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the instance.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: virtualization_type

    

    - *(string) --* 

      The virtualization type of the instance.

      

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      [EC2-VPC] The ID of the VPC in which the instance is running.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: classic_address

    (:py:class:`ClassicAddress`) The related classic_address if set, otherwise ``None``.

  .. py:attribute:: image

    (:py:class:`Image`) The related image if set, otherwise ``None``.

  .. py:attribute:: key_pair

    (:py:class:`KeyPairInfo`) The related key_pair if set, otherwise ``None``.

  .. py:attribute:: network_interfaces

    (:py:class:`NetworkInterface`) The related network_interfaces if set, otherwise ``None``.

  .. py:attribute:: placement_group

    (:py:class:`PlacementGroup`) The related placement_group if set, otherwise ``None``.

  .. py:attribute:: subnet

    (:py:class:`Subnet`) The related subnet if set, otherwise ``None``.

  .. py:attribute:: vpc

    (:py:class:`Vpc`) The related vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: attach_classic_link_vpc(**kwargs)

    

    Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the ``running`` state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

     

    After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

     

    Linking your instance to a VPC is sometimes referred to as *attaching* your instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = instance.attach_classic_link_vpc(
          DryRun=True|False,
          Groups=[
              'string',
          ],
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: **[REQUIRED]** 

      The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

      

    
      - *(string) --* 

      
  
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of a ClassicLink-enabled VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: attach_volume(**kwargs)

    

    Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

     

    Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For a list of supported device names, see `Attaching an EBS Volume to an Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ . Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see `Amazon EC2 Instance Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    If a volume has an AWS Marketplace product code:

     

     
    * The volume can be attached only to a stopped instance. 
     
    * AWS Marketplace product codes are copied from the volume to the instance. 
     
    * You must be subscribed to the product. 
     
    * The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance. 
     

     

    For an overview of the AWS Marketplace, see `Introducing AWS Marketplace <https://aws.amazon.com/marketplace/help/200900000>`_ .

     

    For more information about EBS volumes, see `Attaching Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume>`_    


    **Request Syntax** 
    ::

      response = instance.attach_volume(
          Device='string',
          VolumeId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: **[REQUIRED]** 

      The device name to expose to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

  .. py:method:: console_output(**kwargs)

    

    Gets the console output for the specified instance.

     

    Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.

     

    Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.

     

    For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.

     

    For Windows instances, the instance console output includes output from the EC2Config service.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput>`_    


    **Request Syntax** 
    ::

      response = instance.console_output(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceId': 'string',
            'Output': 'string',
            'Timestamp': datetime(2015, 1, 1)
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of GetConsoleOutput.

        
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **Output** *(string) --* 

          The console output, Base64-encoded. If using a command line tool, the tool decodes the output for you.

          
        

        - **Timestamp** *(datetime) --* 

          The time the output was last updated.

          
    

  .. py:method:: create_image(**kwargs)

    

    Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

     

    If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

     

    For more information, see `Creating Amazon EBS-Backed Linux AMIs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage>`_    


    **Request Syntax** 
    ::

      image = instance.create_image(
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          Description='string',
          DryRun=True|False,
          Name='string',
          NoReboot=True|False
      )
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      Information about one or more block device mappings.

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type Description: string
    :param Description: 

      A description for the new image.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      A name for the new image.

       

      Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

      

    
    :type NoReboot: boolean
    :param NoReboot: 

      By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

      

    
    
    :rtype: :py:class:`ec2.Image`
    :returns: Image resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = instance.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete_tags(**kwargs)

        
    Deletes the specified set of tags from the specified set of resources. This call is designed to follow a ``DescribeTags`` request.
    
     
    
    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .
    
    
    
    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags>`_
    
    
    **Request Syntax** 
    ::
    
      response = instance.delete_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 
    
      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .
    
      
    
    
    :type Tags: list
    :param Tags: 
    
      One or more tags to delete. If you omit the ``value`` parameter, we delete the tag regardless of its value. If you specify this parameter with an empty string as the value, we delete the key only if its value is an empty string.
    
      
    
    
      - *(dict) --* 
    
        Describes a tag.
    
        
    
      
        - **Key** *(string) --* 
    
          The key of the tag.
    
           
    
          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  
    
          
    
        
        - **Value** *(string) --* 
    
          The value of the tag.
    
           
    
          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
    
          
    
        
      
    
    
    :returns: None


  .. py:method:: describe_attribute(**kwargs)

    

    Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: ``instanceType`` | ``kernel`` | ``ramdisk`` | ``userData`` | ``disableApiTermination`` | ``instanceInitiatedShutdownBehavior`` | ``rootDeviceName`` | ``blockDeviceMapping`` | ``productCodes`` | ``sourceDestCheck`` | ``groupSet`` | ``ebsOptimized`` | ``sriovNetSupport``  

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.describe_attribute(
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          DryRun=True|False,
          
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The instance attribute.

       

      Note: The ``enaSupport`` attribute is not supported at this time.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'Ebs': {
                        'AttachTime': datetime(2015, 1, 1),
                        'DeleteOnTermination': True|False,
                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                        'VolumeId': 'string'
                    }
                },
            ],
            'DisableApiTermination': {
                'Value': True|False
            },
            'EnaSupport': {
                'Value': True|False
            },
            'EbsOptimized': {
                'Value': True|False
            },
            'InstanceId': 'string',
            'InstanceInitiatedShutdownBehavior': {
                'Value': 'string'
            },
            'InstanceType': {
                'Value': 'string'
            },
            'KernelId': {
                'Value': 'string'
            },
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'RamdiskId': {
                'Value': 'string'
            },
            'RootDeviceName': {
                'Value': 'string'
            },
            'SourceDestCheck': {
                'Value': True|False
            },
            'SriovNetSupport': {
                'Value': 'string'
            },
            'UserData': {
                'Value': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes an instance attribute.

        
        

        - **Groups** *(list) --* 

          The security groups associated with the instance.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **BlockDeviceMappings** *(list) --* 

          The block device mapping of the instance.

          
          

          - *(dict) --* 

            Describes a block device mapping.

            
            

            - **DeviceName** *(string) --* 

              The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

              
            

            - **Ebs** *(dict) --* 

              Parameters used to automatically set up EBS volumes when the instance is launched.

              
              

              - **AttachTime** *(datetime) --* 

                The time stamp when the attachment initiated.

                
              

              - **DeleteOnTermination** *(boolean) --* 

                Indicates whether the volume is deleted on instance termination.

                
              

              - **Status** *(string) --* 

                The attachment state.

                
              

              - **VolumeId** *(string) --* 

                The ID of the EBS volume.

                
          
        
      
        

        - **DisableApiTermination** *(dict) --* 

          If the value is ``true`` , you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EnaSupport** *(dict) --* 

          Indicates whether enhanced networking with ENA is enabled.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EbsOptimized** *(dict) --* 

          Indicates whether the instance is optimized for EBS I/O.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **InstanceInitiatedShutdownBehavior** *(dict) --* 

          Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **InstanceType** *(dict) --* 

          The instance type.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **KernelId** *(dict) --* 

          The kernel ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **RamdiskId** *(dict) --* 

          The RAM disk ID.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **RootDeviceName** *(dict) --* 

          The name of the root device (for example, ``/dev/sda1`` or ``/dev/xvda`` ).

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **SourceDestCheck** *(dict) --* 

          Indicates whether source/destination checking is enabled. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **SriovNetSupport** *(dict) --* 

          Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **UserData** *(dict) --* 

          The user data.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
    

  .. py:method:: detach_classic_link_vpc(**kwargs)

    

    Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = instance.detach_classic_link_vpc(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC to which the instance is linked.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DetachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: detach_volume(**kwargs)

    

    Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the ``busy`` state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

     

    When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

     

    For more information, see `Detaching an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume>`_    


    **Request Syntax** 
    ::

      response = instance.detach_volume(
          Device='string',
          Force=True|False,
          VolumeId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: 

      The device name.

      

    
    :type Force: boolean
    :param Force: 

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      

    
    :type VolumeId: string
    :param VolumeId: **[REQUIRED]** 

      The ID of the volume.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_instances` to update the attributes of the Instance resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      instance.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

     

    To modify some attributes, the instance must be stopped. For more information, see `Modifying Attributes of a Stopped Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.modify_attribute(
          SourceDestCheck={
              'Value': True|False
          },
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'Ebs': {
                      'DeleteOnTermination': True|False,
                      'VolumeId': 'string'
                  },
                  'NoDevice': 'string',
                  'VirtualName': 'string'
              },
          ],
          DisableApiTermination={
              'Value': True|False
          },
          DryRun=True|False,
          EbsOptimized={
              'Value': True|False
          },
          EnaSupport={
              'Value': True|False
          },
          Groups=[
              'string',
          ],
          InstanceInitiatedShutdownBehavior={
              'Value': 'string'
          },
          InstanceType={
              'Value': 'string'
          },
          Kernel={
              'Value': 'string'
          },
          Ramdisk={
              'Value': 'string'
          },
          SriovNetSupport={
              'Value': 'string'
          },
          UserData={
              'Value': b'bytes'
          },
          Value='string'
      )
    :type SourceDestCheck: dict
    :param SourceDestCheck: 

      Specifies whether source/destination checking is enabled. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type Attribute: string
    :param Attribute: 

      The name of the attribute.

      

    
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      Modifies the ``DeleteOnTermination`` attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for ``DeleteOnTermination`` , the default is ``true`` and the volume is deleted when the instance is terminated.

       

      To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see `Updating the Block Device Mapping when Launching an Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
      - *(dict) --* 

        Describes a block device mapping entry.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the volume is deleted on instance termination.

            

          
          - **VolumeId** *(string) --* 

            The ID of the EBS volume.

            

          
        
        - **NoDevice** *(string) --* 

          suppress the specified device included in the block device mapping.

          

        
        - **VirtualName** *(string) --* 

          The virtual device name.

          

        
      
  
    :type DisableApiTermination: dict
    :param DisableApiTermination: 

      If the value is ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EbsOptimized: dict
    :param EbsOptimized: 

      Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type EnaSupport: dict
    :param EnaSupport: 

      Set to ``true`` to enable enhanced networking with ENA for the instance.

       

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type Groups: list
    :param Groups: 

      [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

      

    
      - *(string) --* 

      
  
    :type InstanceInitiatedShutdownBehavior: dict
    :param InstanceInitiatedShutdownBehavior: 

      Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type InstanceType: dict
    :param InstanceType: 

      Changes the instance type to the specified value. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ . If the instance type is not valid, the error returned is ``InvalidInstanceAttributeValue`` .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type Kernel: dict
    :param Kernel: 

      Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html>`_ .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type Ramdisk: dict
    :param Ramdisk: 

      Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html>`_ .

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type SriovNetSupport: dict
    :param SriovNetSupport: 

      Set to ``simple`` to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

       

      There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

       

      This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type UserData: dict
    :param UserData: 

      Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

      

    
      - **Value** *(bytes) --* 

      
    
    :type Value: string
    :param Value: 

      A new value for the attribute. Use only with the ``kernel`` , ``ramdisk`` , ``userData`` , ``disableApiTermination`` , or ``instanceInitiatedShutdownBehavior`` attribute.

      

    
    
    :returns: None

  .. py:method:: monitor(**kwargs)

    

    Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    To disable detailed monitoring, see .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_    


    **Request Syntax** 
    ::

      response = instance.monitor(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceMonitorings': [
                {
                    'InstanceId': 'string',
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of MonitorInstances.

        
        

        - **InstanceMonitorings** *(list) --* 

          The monitoring information.

          
          

          - *(dict) --* 

            Describes the monitoring of an instance.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Monitoring** *(dict) --* 

              The monitoring for the instance.

              
              

              - **State** *(string) --* 

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                
          
        
      
    

  .. py:method:: password_data(**kwargs)

    

    Retrieves the encrypted administrator password for an instance running Windows.

     

    The Windows password is generated at boot if the ``EC2Config`` service plugin, ``Ec2SetPassword`` , is enabled. This usually only happens the first time an AMI is launched, and then ``Ec2SetPassword`` is automatically disabled. The password is not generated for rebundled AMIs unless ``Ec2SetPassword`` is enabled before bundling.

     

    The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

     

    Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData>`_    


    **Request Syntax** 
    ::

      response = instance.password_data(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceId': 'string',
            'PasswordData': 'string',
            'Timestamp': datetime(2015, 1, 1)
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of GetPasswordData.

        
        

        - **InstanceId** *(string) --* 

          The ID of the Windows instance.

          
        

        - **PasswordData** *(string) --* 

          The password of the instance.

          
        

        - **Timestamp** *(datetime) --* 

          The time the data was last updated.

          
    

  .. py:method:: reboot(**kwargs)

    

    Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

     

    If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

     

    For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_    


    **Request Syntax** 
    ::

      response = instance.reboot(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_instances` to update the attributes of the Instance resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      instance.reload()
    :returns: None

  .. py:method:: report_status(**kwargs)

    

    Submits feedback about the status of an instance. The instance must be in the ``running`` state. If your experience with the instance differs from the instance status returned by  DescribeInstanceStatus , use  ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

     

    Use of this action does not change the value returned by  DescribeInstanceStatus .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus>`_    


    **Request Syntax** 
    ::

      response = instance.report_status(
          Description='string',
          DryRun=True|False,
          EndTime=datetime(2015, 1, 1),
          ReasonCodes=[
              'instance-stuck-in-state'|'unresponsive'|'not-accepting-credentials'|'password-not-available'|'performance-network'|'performance-instance-store'|'performance-ebs-volume'|'performance-other'|'other',
          ],
          StartTime=datetime(2015, 1, 1),
          Status='ok'|'impaired'
      )
    :type Description: string
    :param Description: 

      Descriptive text about the health state of your instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EndTime: datetime
    :param EndTime: 

      The time at which the reported instance health state ended.

      

    
    :type ReasonCodes: list
    :param ReasonCodes: **[REQUIRED]** 

      One or more reason codes that describes the health state of your instance.

       

       
      * ``instance-stuck-in-state`` : My instance is stuck in a state. 
       
      * ``unresponsive`` : My instance is unresponsive. 
       
      * ``not-accepting-credentials`` : My instance is not accepting my credentials. 
       
      * ``password-not-available`` : A password is not available for my instance. 
       
      * ``performance-network`` : My instance is experiencing performance problems which I believe are network related. 
       
      * ``performance-instance-store`` : My instance is experiencing performance problems which I believe are related to the instance stores. 
       
      * ``performance-ebs-volume`` : My instance is experiencing performance problems which I believe are related to an EBS volume. 
       
      * ``performance-other`` : My instance is experiencing performance problems. 
       
      * ``other`` : [explain using the description parameter] 
       

      

    
      - *(string) --* 

      
  
    :type StartTime: datetime
    :param StartTime: 

      The time at which the reported instance health state began.

      

    
    :type Status: string
    :param Status: **[REQUIRED]** 

      The status of all instances listed.

      

    
    
    :returns: None

  .. py:method:: reset_attribute(**kwargs)

    

    Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk`` , the instance must be in a stopped state. To reset the ``sourceDestCheck`` , the instance can be either running or stopped.

     

    The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true`` , which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.reset_attribute(
          Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
          DryRun=True|False,
          
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset.

       

      .. warning::

         

        You can only reset the following attributes: ``kernel`` | ``ramdisk`` | ``sourceDestCheck`` . To change an instance attribute, use  ModifyInstanceAttribute .

         

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reset_kernel(**kwargs)

    

    Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk`` , the instance must be in a stopped state. To reset the ``sourceDestCheck`` , the instance can be either running or stopped.

     

    The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true`` , which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.reset_kernel(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reset_ramdisk(**kwargs)

    

    Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk`` , the instance must be in a stopped state. To reset the ``sourceDestCheck`` , the instance can be either running or stopped.

     

    The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true`` , which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.reset_ramdisk(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reset_source_dest_check(**kwargs)

    

    Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk`` , the instance must be in a stopped state. To reset the ``sourceDestCheck`` , the instance can be either running or stopped.

     

    The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true`` , which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute>`_    


    **Request Syntax** 
    ::

      response = instance.reset_source_dest_check(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: start(**kwargs)

    

    Starts an Amazon EBS-backed AMI that you've previously stopped.

     

    Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

     

    Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

     

    Performing this operation on an instance that uses an instance store as its root device returns an error.

     

    For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_    


    **Request Syntax** 
    ::

      response = instance.start(
          AdditionalInfo='string',
          DryRun=True|False
      )
    :type AdditionalInfo: string
    :param AdditionalInfo: 

      Reserved.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'StartingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of StartInstances.

        
        

        - **StartingInstances** *(list) --* 

          Information about one or more started instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: stop(**kwargs)

    

    Stops an Amazon EBS-backed instance.

     

    We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

     

    You can't start or stop Spot instances, and you can't stop instance store-backed instances.

     

    When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

     

    Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_    


    **Request Syntax** 
    ::

      response = instance.stop(
          DryRun=True|False,
          Force=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Force: boolean
    :param Force: 

      Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

       

      Default: ``false``  

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'StoppingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of StopInstances.

        
        

        - **StoppingInstances** *(list) --* 

          Information about one or more stopped instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: terminate(**kwargs)

    

    Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

     

    If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

     

    Terminated instances remain visible after termination (for approximately one hour).

     

    By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

     

    You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_    


    **Request Syntax** 
    ::

      response = instance.terminate(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'TerminatingInstances': [
                {
                    'CurrentState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'InstanceId': 'string',
                    'PreviousState': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of TerminateInstances.

        
        

        - **TerminatingInstances** *(list) --* 

          Information about one or more terminated instances.

          
          

          - *(dict) --* 

            Describes an instance state change.

            
            

            - **CurrentState** *(dict) --* 

              The current state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **PreviousState** *(dict) --* 

              The previous state of the instance.

              
              

              - **Code** *(integer) --* 

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                 

                 
                * ``0`` : ``pending``   
                 
                * ``16`` : ``running``   
                 
                * ``32`` : ``shutting-down``   
                 
                * ``48`` : ``terminated``   
                 
                * ``64`` : ``stopping``   
                 
                * ``80`` : ``stopped``   
                 

                
              

              - **Name** *(string) --* 

                The current state of the instance.

                
          
        
      
    

  .. py:method:: unmonitor(**kwargs)

    

    Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_    


    **Request Syntax** 
    ::

      response = instance.unmonitor(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'InstanceMonitorings': [
                {
                    'InstanceId': 'string',
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of UnmonitorInstances.

        
        

        - **InstanceMonitorings** *(list) --* 

          The monitoring information.

          
          

          - *(dict) --* 

            Describes the monitoring of an instance.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Monitoring** *(dict) --* 

              The monitoring for the instance.

              
              

              - **State** *(string) --* 

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                
          
        
      
    
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: volumes

    A collection of Volume resources

    .. py:method:: all()

      Creates an iterable of all Volume resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = instance.volumes.all()
        
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Volume resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = instance.volumes.filter(
            VolumeIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type VolumeIds: list
      :param VolumeIds: 

        One or more volume IDs.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of volume results returned by ``DescribeVolumes`` in paginated output. When this parameter is used, ``DescribeVolumes`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeVolumes`` request with the returned ``NextToken`` value. This value can be between 5 and 500; if ``MaxResults`` is given a value larger than 500, only 500 results are returned. If this parameter is not used, then ``DescribeVolumes`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

        

      
      :type NextToken: string
      :param NextToken: 

        The ``NextToken`` value returned from a previous paginated ``DescribeVolumes`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

        

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Volume resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = instance.volumes.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Volume resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes>`_      


      **Request Syntax** 
      ::

        volume_iterator = instance.volumes.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Volume`)
      :returns: A list of Volume resources
      

  .. py:attribute:: vpc_addresses

    A collection of VpcAddress resources

    .. py:method:: all()

      Creates an iterable of all VpcAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = instance.vpc_addresses.all()
        
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all VpcAddress resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = instance.vpc_addresses.filter(
            PublicIps=[
                'string',
            ],
            AllocationIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type PublicIps: list
      :param PublicIps: 

        [EC2-Classic] One or more Elastic IP addresses.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type AllocationIds: list
      :param AllocationIds: 

        [EC2-VPC] One or more allocation IDs.

         

        Default: Describes all your Elastic IP addresses.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of VpcAddress resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = instance.vpc_addresses.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all VpcAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses>`_      


      **Request Syntax** 
      ::

        vpc_address_iterator = instance.vpc_addresses.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.VpcAddress`)
      :returns: A list of VpcAddress resources
      
  .. rst-class:: admonition-title
  
  Waiters
  
  Waiters provide an interface to wait for a resource to reach a specific state.
  For more information about waiters refer to the :ref:`Resources Introduction Guide<waiters_intro>`.
  

  .. py:method:: wait_until_exists(**kwargs)

    Waits until this Instance is exists. This method calls :py:meth:`EC2.Waiter.instance_exists.wait` which polls. :py:meth:`EC2.Client.describe_instances` every 5 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      instance.wait_until_exists(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    :returns: None

  .. py:method:: wait_until_running(**kwargs)

    Waits until this Instance is running. This method calls :py:meth:`EC2.Waiter.instance_running.wait` which polls. :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      instance.wait_until_running(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    :returns: None

  .. py:method:: wait_until_stopped(**kwargs)

    Waits until this Instance is stopped. This method calls :py:meth:`EC2.Waiter.instance_stopped.wait` which polls. :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      instance.wait_until_stopped(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    :returns: None

  .. py:method:: wait_until_terminated(**kwargs)

    Waits until this Instance is terminated. This method calls :py:meth:`EC2.Waiter.instance_terminated.wait` which polls. :py:meth:`EC2.Client.describe_instances` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_    


    **Request Syntax** 
    ::

      instance.wait_until_terminated(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          MaxResults=123,
          NextToken='string'
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``affinity`` - The affinity setting for an instance running on a Dedicated Host (``default`` | ``host`` ). 
       
      * ``architecture`` - The instance architecture (``i386`` | ``x86_64`` ). 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``block-device-mapping.attach-time`` - The attach time for an EBS volume mapped to the instance, for example, ``2010-09-15T17:15:20.000Z`` . 
       
      * ``block-device-mapping.delete-on-termination`` - A Boolean that indicates whether the EBS volume is deleted on instance termination. 
       
      * ``block-device-mapping.device-name`` - The device name for the EBS volume (for example, ``/dev/sdh`` or ``xvdh`` ). 
       
      * ``block-device-mapping.status`` - The status for the EBS volume (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``block-device-mapping.volume-id`` - The volume ID of the EBS volume. 
       
      * ``client-token`` - The idempotency token you provided when you launched the instance. 
       
      * ``dns-name`` - The public DNS name of the instance. 
       
      * ``group-id`` - The ID of the security group for the instance. EC2-Classic only. 
       
      * ``group-name`` - The name of the security group for the instance. EC2-Classic only. 
       
      * ``host-id`` - The ID of the Dedicated Host on which the instance is running, if applicable. 
       
      * ``hypervisor`` - The hypervisor type of the instance (``ovm`` | ``xen`` ). 
       
      * ``iam-instance-profile.arn`` - The instance profile associated with the instance. Specified as an ARN. 
       
      * ``image-id`` - The ID of the image used to launch the instance. 
       
      * ``instance-id`` - The ID of the instance. 
       
      * ``instance-lifecycle`` - Indicates whether this is a Spot Instance or a Scheduled Instance (``spot`` | ``scheduled`` ). 
       
      * ``instance-state-code`` - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). 
       
      * ``instance-state-name`` - The state of the instance (``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped`` ). 
       
      * ``instance-type`` - The type of instance (for example, ``t2.micro`` ). 
       
      * ``instance.group-id`` - The ID of the security group for the instance.  
       
      * ``instance.group-name`` - The name of the security group for the instance.  
       
      * ``ip-address`` - The public IPv4 address of the instance. 
       
      * ``kernel-id`` - The kernel ID. 
       
      * ``key-name`` - The name of the key pair used when the instance was launched. 
       
      * ``launch-index`` - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).  
       
      * ``launch-time`` - The time when the instance was launched. 
       
      * ``monitoring-state`` - Indicates whether detailed monitoring is enabled (``disabled`` | ``enabled`` ). 
       
      * ``network-interface.addresses.private-ip-address`` - The private IPv4 address associated with the network interface. 
       
      * ``network-interface.addresses.primary`` - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address. 
       
      * ``network-interface.addresses.association.public-ip`` - The ID of the association of an Elastic IP address (IPv4) with a network interface. 
       
      * ``network-interface.addresses.association.ip-owner-id`` - The owner ID of the private IPv4 address associated with the network interface. 
       
      * ``network-interface.association.public-ip`` - The address of the Elastic IP address (IPv4) bound to the network interface. 
       
      * ``network-interface.association.ip-owner-id`` - The owner of the Elastic IP address (IPv4) associated with the network interface. 
       
      * ``network-interface.association.allocation-id`` - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface. 
       
      * ``network-interface.association.association-id`` - The association ID returned when the network interface was associated with an IPv4 address. 
       
      * ``network-interface.attachment.attachment-id`` - The ID of the interface attachment. 
       
      * ``network-interface.attachment.instance-id`` - The ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.instance-owner-id`` - The owner ID of the instance to which the network interface is attached. 
       
      * ``network-interface.attachment.device-index`` - The device index to which the network interface is attached. 
       
      * ``network-interface.attachment.status`` - The status of the attachment (``attaching`` | ``attached`` | ``detaching`` | ``detached`` ). 
       
      * ``network-interface.attachment.attach-time`` - The time that the network interface was attached to an instance. 
       
      * ``network-interface.attachment.delete-on-termination`` - Specifies whether the attachment is deleted when an instance is terminated. 
       
      * ``network-interface.availability-zone`` - The Availability Zone for the network interface. 
       
      * ``network-interface.description`` - The description of the network interface. 
       
      * ``network-interface.group-id`` - The ID of a security group associated with the network interface. 
       
      * ``network-interface.group-name`` - The name of a security group associated with the network interface. 
       
      * ``network-interface.ipv6-addresses.ipv6-address`` - The IPv6 address associated with the network interface. 
       
      * ``network-interface.mac-address`` - The MAC address of the network interface. 
       
      * ``network-interface.network-interface-id`` - The ID of the network interface. 
       
      * ``network-interface.owner-id`` - The ID of the owner of the network interface. 
       
      * ``network-interface.private-dns-name`` - The private DNS name of the network interface. 
       
      * ``network-interface.requester-id`` - The requester ID for the network interface. 
       
      * ``network-interface.requester-managed`` - Indicates whether the network interface is being managed by AWS. 
       
      * ``network-interface.status`` - The status of the network interface (``available`` ) | ``in-use`` ). 
       
      * ``network-interface.source-dest-check`` - Whether the network interface performs source/destination checking. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the network interface to perform network address translation (NAT) in your VPC. 
       
      * ``network-interface.subnet-id`` - The ID of the subnet for the network interface. 
       
      * ``network-interface.vpc-id`` - The ID of the VPC for the network interface. 
       
      * ``owner-id`` - The AWS account ID of the instance owner. 
       
      * ``placement-group-name`` - The name of the placement group for the instance. 
       
      * ``platform`` - The platform. Use ``windows`` if you have Windows instances; otherwise, leave blank. 
       
      * ``private-dns-name`` - The private IPv4 DNS name of the instance. 
       
      * ``private-ip-address`` - The private IPv4 address of the instance. 
       
      * ``product-code`` - The product code associated with the AMI used to launch the instance. 
       
      * ``product-code.type`` - The type of product code (``devpay`` | ``marketplace`` ). 
       
      * ``ramdisk-id`` - The RAM disk ID. 
       
      * ``reason`` - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. 
       
      * ``requester-id`` - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). 
       
      * ``reservation-id`` - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. 
       
      * ``root-device-name`` - The name of the root device for the instance (for example, ``/dev/sda1`` or ``/dev/xvda`` ). 
       
      * ``root-device-type`` - The type of root device that the instance uses (``ebs`` | ``instance-store`` ). 
       
      * ``source-dest-check`` - Indicates whether the instance performs source/destination checking. A value of ``true`` means that checking is enabled, and ``false`` means checking is disabled. The value must be ``false`` for the instance to perform network address translation (NAT) in your VPC.  
       
      * ``spot-instance-request-id`` - The ID of the Spot instance request. 
       
      * ``state-reason-code`` - The reason code for the state change. 
       
      * ``state-reason-message`` - A message that describes the state change. 
       
      * ``subnet-id`` - The ID of the subnet for the instance. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``tenancy`` - The tenancy of an instance (``dedicated`` | ``default`` | ``host`` ). 
       
      * ``virtualization-type`` - The virtualization type of the instance (``paravirtual`` | ``hvm`` ). 
       
      * ``vpc-id`` - The ID of the VPC that the instance is running in. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to request the next page of results.

      

    
    :returns: None

===============
InternetGateway
===============



.. py:class:: EC2.InternetGateway(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) InternetGateway::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    internet_gateway = ec2.InternetGateway('id')

  :type id: string
  :param id: The InternetGateway's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`attachments`

  
  *   :py:attr:`internet_gateway_id`

  
  *   :py:attr:`tags`

  
  These are the resource's available actions:
  
  *   :py:meth:`attach_to_vpc()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`detach_from_vpc()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The InternetGateway's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: attachments

    

    - *(list) --* 

      Any VPCs attached to the Internet gateway.

      
      

      - *(dict) --* 

        Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.

        
        

        - **State** *(string) --* 

          The current state of the attachment.

          
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
    
  

  .. py:attribute:: internet_gateway_id

    

    - *(string) --* 

      The ID of the Internet gateway.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the Internet gateway.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: attach_to_vpc(**kwargs)

    

    Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the `Amazon Virtual Private Cloud User Guide <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = internet_gateway.attach_to_vpc(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :returns: None

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = internet_gateway.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway>`_    


    **Request Syntax** 
    ::

      response = internet_gateway.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: detach_from_vpc(**kwargs)

    

    Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = internet_gateway.detach_from_vpc(
          DryRun=True|False,
          VpcId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type VpcId: string
    :param VpcId: **[REQUIRED]** 

      The ID of the VPC.

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_internet_gateways` to update the attributes of the InternetGateway resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      internet_gateway.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_internet_gateways` to update the attributes of the InternetGateway resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      internet_gateway.reload()
    :returns: None

=======
KeyPair
=======



.. py:class:: EC2.KeyPair(name)

  A resource representing an Amazon Elastic Compute Cloud (EC2) KeyPair::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    key_pair = ec2.KeyPair('name')

  :type name: string
  :param name: The KeyPair's name identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`name`

  
  These are the resource's available attributes:
  
  *   :py:attr:`key_fingerprint`

  
  *   :py:attr:`key_material`

  
  *   :py:attr:`key_name`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: name

    *(string)* The KeyPair's name identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: key_fingerprint

    

    - *(string) --* 

      The SHA-1 digest of the DER encoded private key.

      

  .. py:attribute:: key_material

    

    - *(string) --* 

      An unencrypted PEM encoded RSA private key.

      

  .. py:attribute:: key_name

    

    - *(string) --* 

      The name of the key pair.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Deletes the specified key pair, by removing the public key from Amazon EC2.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair>`_    


    **Request Syntax** 
    ::

      response = key_pair.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


===========
KeyPairInfo
===========



.. py:class:: EC2.KeyPairInfo(name)

  A resource representing an Amazon Elastic Compute Cloud (EC2) KeyPairInfo::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    key_pair_info = ec2.KeyPairInfo('name')

  :type name: string
  :param name: The KeyPairInfo's name identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`name`

  
  These are the resource's available attributes:
  
  *   :py:attr:`key_fingerprint`

  
  *   :py:attr:`key_name`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: name

    *(string)* The KeyPairInfo's name identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: key_fingerprint

    

    - *(string) --* 

      If you used  CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used  ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.

      

  .. py:attribute:: key_name

    

    - *(string) --* 

      The name of the key pair.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Deletes the specified key pair, by removing the public key from Amazon EC2.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair>`_    


    **Request Syntax** 
    ::

      response = key_pair_info.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_key_pairs` to update the attributes of the KeyPairInfo resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      key_pair_info.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_key_pairs` to update the attributes of the KeyPairInfo resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      key_pair_info.reload()
    :returns: None

==========
NetworkAcl
==========



.. py:class:: EC2.NetworkAcl(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkAcl::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    network_acl = ec2.NetworkAcl('id')

  :type id: string
  :param id: The NetworkAcl's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`associations`

  
  *   :py:attr:`entries`

  
  *   :py:attr:`is_default`

  
  *   :py:attr:`network_acl_id`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`create_entry()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`delete_entry()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`replace_association()`

  
  *   :py:meth:`replace_entry()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The NetworkAcl's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: associations

    

    - *(list) --* 

      Any associations between the network ACL and one or more subnets

      
      

      - *(dict) --* 

        Describes an association between a network ACL and a subnet.

        
        

        - **NetworkAclAssociationId** *(string) --* 

          The ID of the association between a network ACL and a subnet.

          
        

        - **NetworkAclId** *(string) --* 

          The ID of the network ACL.

          
        

        - **SubnetId** *(string) --* 

          The ID of the subnet.

          
    
  

  .. py:attribute:: entries

    

    - *(list) --* 

      One or more entries (rules) in the network ACL.

      
      

      - *(dict) --* 

        Describes an entry in a network ACL.

        
        

        - **CidrBlock** *(string) --* 

          The IPv4 network range to allow or deny, in CIDR notation.

          
        

        - **Egress** *(boolean) --* 

          Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

          
        

        - **IcmpTypeCode** *(dict) --* 

          ICMP protocol: The ICMP type and code.

          
          

          - **Code** *(integer) --* 

            The ICMP code. A value of -1 means all codes for the specified ICMP type.

            
          

          - **Type** *(integer) --* 

            The ICMP type. A value of -1 means all types.

            
      
        

        - **Ipv6CidrBlock** *(string) --* 

          The IPv6 network range to allow or deny, in CIDR notation.

          
        

        - **PortRange** *(dict) --* 

          TCP or UDP protocols: The range of ports the rule applies to.

          
          

          - **From** *(integer) --* 

            The first port in the range.

            
          

          - **To** *(integer) --* 

            The last port in the range.

            
      
        

        - **Protocol** *(string) --* 

          The protocol. A value of ``-1`` means all protocols.

          
        

        - **RuleAction** *(string) --* 

          Indicates whether to allow or deny the traffic that matches the rule.

          
        

        - **RuleNumber** *(integer) --* 

          The rule number for the entry. ACL entries are processed in ascending order by rule number.

          
    
  

  .. py:attribute:: is_default

    

    - *(boolean) --* 

      Indicates whether this is the default network ACL for the VPC.

      

  .. py:attribute:: network_acl_id

    

    - *(string) --* 

      The ID of the network ACL.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the network ACL.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      The ID of the VPC for the network ACL.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: vpc

    (:py:class:`Vpc`) The related vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: create_entry(**kwargs)

    

    Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

     

    We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

     

    After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = network_acl.create_entry(
          CidrBlock='string',
          DryRun=True|False,
          Egress=True|False,
          IcmpTypeCode={
              'Code': 123,
              'Type': 123
          },
          Ipv6CidrBlock='string',
          PortRange={
              'From': 123,
              'To': 123
          },
          Protocol='string',
          RuleAction='allow'|'deny',
          RuleNumber=123
      )
    :type CidrBlock: string
    :param CidrBlock: 

      The IPv4 network range to allow or deny, in CIDR notation (for example ``172.16.0.0/24`` ).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

      

    
    :type IcmpTypeCode: dict
    :param IcmpTypeCode: 

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      

    
      - **Code** *(integer) --* 

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

        

      
      - **Type** *(integer) --* 

        The ICMP type. A value of -1 means all types.

        

      
    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range to allow or deny, in CIDR notation (for example ``2001:db8:1234:1a00::/64`` ).

      

    
    :type PortRange: dict
    :param PortRange: 

      TCP or UDP protocols: The range of ports the rule applies to.

      

    
      - **From** *(integer) --* 

        The first port in the range.

        

      
      - **To** *(integer) --* 

        The last port in the range.

        

      
    
    :type Protocol: string
    :param Protocol: **[REQUIRED]** 

      The protocol. A value of ``-1`` or ``all`` means all protocols. If you specify ``all`` , ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , or ``icmp`` , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

      

    
    :type RuleAction: string
    :param RuleAction: **[REQUIRED]** 

      Indicates whether to allow or deny the traffic that matches the rule.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

       

      Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

      

    
    
    :returns: None

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = network_acl.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl>`_    


    **Request Syntax** 
    ::

      response = network_acl.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: delete_entry(**kwargs)

    

    Deletes the specified ingress or egress entry (rule) from the specified network ACL.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = network_acl.delete_entry(
          DryRun=True|False,
          Egress=True|False,
          RuleNumber=123
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether the rule is an egress rule.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number of the entry to delete.

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_network_acls` to update the attributes of the NetworkAcl resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_acl.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_network_acls` to update the attributes of the NetworkAcl resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_acl.reload()
    :returns: None

  .. py:method:: replace_association(**kwargs)

    

    Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation>`_    


    **Request Syntax** 
    ::

      response = network_acl.replace_association(
          AssociationId='string',
          DryRun=True|False,
          
      )
    :type AssociationId: string
    :param AssociationId: **[REQUIRED]** 

      The ID of the current association between the original network ACL and the subnet.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NewAssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of ReplaceNetworkAclAssociation.

        
        

        - **NewAssociationId** *(string) --* 

          The ID of the new association.

          
    

  .. py:method:: replace_entry(**kwargs)

    

    Replaces an entry (rule) in a network ACL. For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry>`_    


    **Request Syntax** 
    ::

      response = network_acl.replace_entry(
          CidrBlock='string',
          DryRun=True|False,
          Egress=True|False,
          IcmpTypeCode={
              'Code': 123,
              'Type': 123
          },
          Ipv6CidrBlock='string',
          PortRange={
              'From': 123,
              'To': 123
          },
          Protocol='string',
          RuleAction='allow'|'deny',
          RuleNumber=123
      )
    :type CidrBlock: string
    :param CidrBlock: 

      The IPv4 network range to allow or deny, in CIDR notation (for example ``172.16.0.0/24`` ).

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Egress: boolean
    :param Egress: **[REQUIRED]** 

      Indicates whether to replace the egress rule.

       

      Default: If no value is specified, we replace the ingress rule.

      

    
    :type IcmpTypeCode: dict
    :param IcmpTypeCode: 

      ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.

      

    
      - **Code** *(integer) --* 

        The ICMP code. A value of -1 means all codes for the specified ICMP type.

        

      
      - **Type** *(integer) --* 

        The ICMP type. A value of -1 means all types.

        

      
    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range to allow or deny, in CIDR notation (for example ``2001:bd8:1234:1a00::/64`` ).

      

    
    :type PortRange: dict
    :param PortRange: 

      TCP or UDP protocols: The range of ports the rule applies to. Required if specifying TCP (6) or UDP (17) for the protocol.

      

    
      - **From** *(integer) --* 

        The first port in the range.

        

      
      - **To** *(integer) --* 

        The last port in the range.

        

      
    
    :type Protocol: string
    :param Protocol: **[REQUIRED]** 

      The IP protocol. You can specify ``all`` or ``-1`` to mean all protocols. If you specify ``all`` , ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , or ``icmp`` , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol ``58`` (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

      

    
    :type RuleAction: string
    :param RuleAction: **[REQUIRED]** 

      Indicates whether to allow or deny the traffic that matches the rule.

      

    
    :type RuleNumber: integer
    :param RuleNumber: **[REQUIRED]** 

      The rule number of the entry to replace.

      

    
    
    :returns: None

================
NetworkInterface
================



.. py:class:: EC2.NetworkInterface(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkInterface::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    network_interface = ec2.NetworkInterface('id')

  :type id: string
  :param id: The NetworkInterface's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`association_attribute`

  
  *   :py:attr:`attachment`

  
  *   :py:attr:`availability_zone`

  
  *   :py:attr:`description`

  
  *   :py:attr:`groups`

  
  *   :py:attr:`interface_type`

  
  *   :py:attr:`ipv6_addresses`

  
  *   :py:attr:`mac_address`

  
  *   :py:attr:`network_interface_id`

  
  *   :py:attr:`owner_id`

  
  *   :py:attr:`private_dns_name`

  
  *   :py:attr:`private_ip_address`

  
  *   :py:attr:`private_ip_addresses`

  
  *   :py:attr:`requester_id`

  
  *   :py:attr:`requester_managed`

  
  *   :py:attr:`source_dest_check`

  
  *   :py:attr:`status`

  
  *   :py:attr:`subnet_id`

  
  *   :py:attr:`tag_set`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`association`

  
  *   :py:attr:`subnet`

  
  *   :py:attr:`vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`assign_private_ip_addresses()`

  
  *   :py:meth:`attach()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`detach()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`reset_attribute()`

  
  *   :py:meth:`unassign_private_ip_addresses()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The NetworkInterface's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: association_attribute

    

    - *(dict) --* 

      The association information for an Elastic IP address (IPv4) associated with the network interface.

      
      

      - **AllocationId** *(string) --* 

        The allocation ID.

        
      

      - **AssociationId** *(string) --* 

        The association ID.

        
      

      - **IpOwnerId** *(string) --* 

        The ID of the Elastic IP address owner.

        
      

      - **PublicDnsName** *(string) --* 

        The public DNS name.

        
      

      - **PublicIp** *(string) --* 

        The address of the Elastic IP address bound to the network interface.

        
  

  .. py:attribute:: attachment

    

    - *(dict) --* 

      The network interface attachment.

      
      

      - **AttachTime** *(datetime) --* 

        The timestamp indicating when the attachment initiated.

        
      

      - **AttachmentId** *(string) --* 

        The ID of the network interface attachment.

        
      

      - **DeleteOnTermination** *(boolean) --* 

        Indicates whether the network interface is deleted when the instance is terminated.

        
      

      - **DeviceIndex** *(integer) --* 

        The device index of the network interface attachment on the instance.

        
      

      - **InstanceId** *(string) --* 

        The ID of the instance.

        
      

      - **InstanceOwnerId** *(string) --* 

        The AWS account ID of the owner of the instance.

        
      

      - **Status** *(string) --* 

        The attachment state.

        
  

  .. py:attribute:: availability_zone

    

    - *(string) --* 

      The Availability Zone.

      

  .. py:attribute:: description

    

    - *(string) --* 

      A description.

      

  .. py:attribute:: groups

    

    - *(list) --* 

      Any security groups for the network interface.

      
      

      - *(dict) --* 

        Describes a security group.

        
        

        - **GroupName** *(string) --* 

          The name of the security group.

          
        

        - **GroupId** *(string) --* 

          The ID of the security group.

          
    
  

  .. py:attribute:: interface_type

    

    - *(string) --* 

      The type of interface.

      

  .. py:attribute:: ipv6_addresses

    

    - *(list) --* 

      The IPv6 addresses associated with the network interface.

      
      

      - *(dict) --* 

        Describes an IPv6 address associated with a network interface.

        
        

        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          
    
  

  .. py:attribute:: mac_address

    

    - *(string) --* 

      The MAC address.

      

  .. py:attribute:: network_interface_id

    

    - *(string) --* 

      The ID of the network interface.

      

  .. py:attribute:: owner_id

    

    - *(string) --* 

      The AWS account ID of the owner of the network interface.

      

  .. py:attribute:: private_dns_name

    

    - *(string) --* 

      The private DNS name.

      

  .. py:attribute:: private_ip_address

    

    - *(string) --* 

      The IPv4 address of the network interface within the subnet.

      

  .. py:attribute:: private_ip_addresses

    

    - *(list) --* 

      The private IPv4 addresses associated with the network interface.

      
      

      - *(dict) --* 

        Describes the private IPv4 address of a network interface.

        
        

        - **Association** *(dict) --* 

          The association information for an Elastic IP address (IPv4) associated with the network interface.

          
          

          - **AllocationId** *(string) --* 

            The allocation ID.

            
          

          - **AssociationId** *(string) --* 

            The association ID.

            
          

          - **IpOwnerId** *(string) --* 

            The ID of the Elastic IP address owner.

            
          

          - **PublicDnsName** *(string) --* 

            The public DNS name.

            
          

          - **PublicIp** *(string) --* 

            The address of the Elastic IP address bound to the network interface.

            
      
        

        - **Primary** *(boolean) --* 

          Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

          
        

        - **PrivateDnsName** *(string) --* 

          The private DNS name.

          
        

        - **PrivateIpAddress** *(string) --* 

          The private IPv4 address.

          
    
  

  .. py:attribute:: requester_id

    

    - *(string) --* 

      The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).

      

  .. py:attribute:: requester_managed

    

    - *(boolean) --* 

      Indicates whether the network interface is being managed by AWS.

      

  .. py:attribute:: source_dest_check

    

    - *(boolean) --* 

      Indicates whether traffic to or from the instance is validated.

      

  .. py:attribute:: status

    

    - *(string) --* 

      The status of the network interface.

      

  .. py:attribute:: subnet_id

    

    - *(string) --* 

      The ID of the subnet.

      

  .. py:attribute:: tag_set

    

    - *(list) --* 

      Any tags assigned to the network interface.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      The ID of the VPC.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: association

    (:py:class:`NetworkInterfaceAssociation`) The related association if set, otherwise ``None``.

  .. py:attribute:: subnet

    (:py:class:`Subnet`) The related subnet if set, otherwise ``None``.

  .. py:attribute:: vpc

    (:py:class:`Vpc`) The related vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: assign_private_ip_addresses(**kwargs)

    

    Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about Elastic IP addresses, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    AssignPrivateIpAddresses is available only in EC2-VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses>`_    


    **Request Syntax** 
    ::

      response = network_interface.assign_private_ip_addresses(
          AllowReassignment=True|False,
          PrivateIpAddresses=[
              'string',
          ],
          SecondaryPrivateIpAddressCount=123
      )
    :type AllowReassignment: boolean
    :param AllowReassignment: 

      Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: 

      One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.

       

      If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

      

    
      - *(string) --* 

      
  
    :type SecondaryPrivateIpAddressCount: integer
    :param SecondaryPrivateIpAddressCount: 

      The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.

      

    
    
    :returns: None

  .. py:method:: attach(**kwargs)

    

    Attaches a network interface to an instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = network_interface.attach(
          DeviceIndex=123,
          DryRun=True|False,
          InstanceId='string',
          
      )
    :type DeviceIndex: integer
    :param DeviceIndex: **[REQUIRED]** 

      The index of the device for the network interface attachment.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachmentId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachNetworkInterface.

        
        

        - **AttachmentId** *(string) --* 

          The ID of the network interface attachment.

          
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = network_interface.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified network interface. You must detach the network interface before you can delete it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = network_interface.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_attribute(**kwargs)

    

    Describes a network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = network_interface.describe_attribute(
          Attribute='description'|'groupSet'|'sourceDestCheck'|'attachment',
          DryRun=True|False,
          
      )
    :type Attribute: string
    :param Attribute: 

      The attribute of the network interface. This parameter is required.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Attachment': {
                'AttachTime': datetime(2015, 1, 1),
                'AttachmentId': 'string',
                'DeleteOnTermination': True|False,
                'DeviceIndex': 123,
                'InstanceId': 'string',
                'InstanceOwnerId': 'string',
                'Status': 'attaching'|'attached'|'detaching'|'detached'
            },
            'Description': {
                'Value': 'string'
            },
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'NetworkInterfaceId': 'string',
            'SourceDestCheck': {
                'Value': True|False
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeNetworkInterfaceAttribute.

        
        

        - **Attachment** *(dict) --* 

          The attachment (if any) of the network interface.

          
          

          - **AttachTime** *(datetime) --* 

            The timestamp indicating when the attachment initiated.

            
          

          - **AttachmentId** *(string) --* 

            The ID of the network interface attachment.

            
          

          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the network interface is deleted when the instance is terminated.

            
          

          - **DeviceIndex** *(integer) --* 

            The device index of the network interface attachment on the instance.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **InstanceOwnerId** *(string) --* 

            The AWS account ID of the owner of the instance.

            
          

          - **Status** *(string) --* 

            The attachment state.

            
      
        

        - **Description** *(dict) --* 

          The description of the network interface.

          
          

          - **Value** *(string) --* 

            The attribute value. Note that the value is case-sensitive.

            
      
        

        - **Groups** *(list) --* 

          The security groups associated with the network interface.

          
          

          - *(dict) --* 

            Describes a security group.

            
            

            - **GroupName** *(string) --* 

              The name of the security group.

              
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
        
      
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
        

        - **SourceDestCheck** *(dict) --* 

          Indicates whether source/destination checking is enabled.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
    

  .. py:method:: detach(**kwargs)

    

    Detaches a network interface from an instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface>`_    


    **Request Syntax** 
    ::

      response = network_interface.detach(
          DryRun=True|False,
          Force=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Force: boolean
    :param Force: 

      Specifies whether to force a detachment.

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_network_interfaces` to update the attributes of the NetworkInterface resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_interface.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Modifies the specified network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = network_interface.modify_attribute(
          Attachment={
              'AttachmentId': 'string',
              'DeleteOnTermination': True|False
          },
          Description={
              'Value': 'string'
          },
          DryRun=True|False,
          Groups=[
              'string',
          ],
          SourceDestCheck={
              'Value': True|False
          }
      )
    :type Attachment: dict
    :param Attachment: 

      Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

      

    
      - **AttachmentId** *(string) --* 

        The ID of the network interface attachment.

        

      
      - **DeleteOnTermination** *(boolean) --* 

        Indicates whether the network interface is deleted when the instance is terminated.

        

      
    
    :type Description: dict
    :param Description: 

      A description for the network interface.

      

    
      - **Value** *(string) --* 

        The attribute value. Note that the value is case-sensitive.

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: 

      Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

      

    
      - *(string) --* 

      
  
    :type SourceDestCheck: dict
    :param SourceDestCheck: 

      Indicates whether source/destination checking is enabled. A value of ``true`` means checking is enabled, and ``false`` means checking is disabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT Instances <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_network_interfaces` to update the attributes of the NetworkInterface resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_interface.reload()
    :returns: None

  .. py:method:: reset_attribute(**kwargs)

    

    Resets a network interface attribute. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute>`_    


    **Request Syntax** 
    ::

      response = network_interface.reset_attribute(
          DryRun=True|False,
          SourceDestCheck='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SourceDestCheck: string
    :param SourceDestCheck: 

      The source/destination checking attribute. Resets the value to ``true`` .

      

    
    
    :returns: None

  .. py:method:: unassign_private_ip_addresses(**kwargs)

    

    Unassigns one or more secondary private IP addresses from a network interface.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses>`_    


    **Request Syntax** 
    ::

      response = network_interface.unassign_private_ip_addresses(
          PrivateIpAddresses=[
              'string',
          ]
      )
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: **[REQUIRED]** 

      The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

      

    
      - *(string) --* 

      
  
    
    :returns: None

===========================
NetworkInterfaceAssociation
===========================



.. py:class:: EC2.NetworkInterfaceAssociation(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkInterfaceAssociation::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    network_interface_association = ec2.NetworkInterfaceAssociation('id')

  :type id: string
  :param id: The NetworkInterfaceAssociation's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`ip_owner_id`

  
  *   :py:attr:`public_dns_name`

  
  *   :py:attr:`public_ip`

  
  These are the resource's available references:
  
  *   :py:attr:`address`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The NetworkInterfaceAssociation's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: ip_owner_id

    

    - *(string) --* 

      The ID of the owner of the Elastic IP address.

      

  .. py:attribute:: public_dns_name

    

    - *(string) --* 

      The public DNS name.

      

  .. py:attribute:: public_ip

    

    - *(string) --* 

      The public IP address or Elastic IP address bound to the network interface.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: address

    (:py:class:`VpcAddress`) The related address if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Disassociates an Elastic IP address from the instance or network interface it's associated with.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress>`_    


    **Request Syntax** 
    ::

      response = network_interface_association.delete(
          PublicIp='string',
          DryRun=True|False
      )
    :type PublicIp: string
    :param PublicIp: 

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_network_interfaces` to update the attributes of the NetworkInterfaceAssociation resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_interface_association.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_network_interfaces` to update the attributes of the NetworkInterfaceAssociation resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      network_interface_association.reload()
    :returns: None

==============
PlacementGroup
==============



.. py:class:: EC2.PlacementGroup(name)

  A resource representing an Amazon Elastic Compute Cloud (EC2) PlacementGroup::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    placement_group = ec2.PlacementGroup('name')

  :type name: string
  :param name: The PlacementGroup's name identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`name`

  
  These are the resource's available attributes:
  
  *   :py:attr:`group_name`

  
  *   :py:attr:`state`

  
  *   :py:attr:`strategy`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  These are the resource's available collections:
  
  *   :py:attr:`instances`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: name

    *(string)* The PlacementGroup's name identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: group_name

    

    - *(string) --* 

      The name of the placement group.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The state of the placement group.

      

  .. py:attribute:: strategy

    

    - *(string) --* 

      The placement strategy.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see `Cluster Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup>`_    


    **Request Syntax** 
    ::

      response = placement_group.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_placement_groups` to update the attributes of the PlacementGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      placement_group.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_placement_groups` to update the attributes of the PlacementGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      placement_group.reload()
    :returns: None
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: instances

    A collection of Instance resources

    .. py:method:: all()

      Creates an iterable of all Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = placement_group.instances.all()
        
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: create_tags(**kwargs)

      

      Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

       

      For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.create_tags(
            DryRun=True|False,
            Tags=[
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Tags: list
      :param Tags: **[REQUIRED]** 

        One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

        

      
        - *(dict) --* 

          Describes a tag.

          

        
          - **Key** *(string) --* 

            The key of the tag.

             

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

            

          
          - **Value** *(string) --* 

            The value of the tag.

             

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

            

          
        
    
      
      :returns: None

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = placement_group.instances.filter(
            InstanceIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type InstanceIds: list
      :param InstanceIds: 

        One or more instance IDs.

         

        Default: Describes all your instances.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

        

      
      :type NextToken: string
      :param NextToken: 

        The token to request the next page of results.

        

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = placement_group.instances.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: monitor(**kwargs)

      

      Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      To disable detailed monitoring, see .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.monitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of MonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = placement_group.instances.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: reboot(**kwargs)

      

      Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

       

      If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

       

      For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.reboot(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :returns: None

    .. py:method:: start(**kwargs)

      

      Starts an Amazon EBS-backed AMI that you've previously stopped.

       

      Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Performing this operation on an instance that uses an instance store as its root device returns an error.

       

      For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.start(
            AdditionalInfo='string',
            DryRun=True|False
        )
      :type AdditionalInfo: string
      :param AdditionalInfo: 

        Reserved.

        

      
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StartingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StartInstances.

          
          

          - **StartingInstances** *(list) --* 

            Information about one or more started instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: stop(**kwargs)

      

      Stops an Amazon EBS-backed instance.

       

      We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      You can't start or stop Spot instances, and you can't stop instance store-backed instances.

       

      When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.stop(
            DryRun=True|False,
            Force=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Force: boolean
      :param Force: 

        Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

         

        Default: ``false``  

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StoppingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StopInstances.

          
          

          - **StoppingInstances** *(list) --* 

            Information about one or more stopped instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: terminate(**kwargs)

      

      Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

       

      If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

       

      Terminated instances remain visible after termination (for approximately one hour).

       

      By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

       

      You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.terminate(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'TerminatingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of TerminateInstances.

          
          

          - **TerminatingInstances** *(list) --* 

            Information about one or more terminated instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: unmonitor(**kwargs)

      

      Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_      


      **Request Syntax** 
      ::

        response = placement_group.instances.unmonitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of UnmonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

=====
Route
=====



.. py:class:: EC2.Route(route_table_id,destination_cidr_block)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Route::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    route = ec2.Route('route_table_id','destination_cidr_block')

  :type route_table_id: string
  :param route_table_id: The Route's route_table_id identifier. This **must** be set.
  :type destination_cidr_block: string
  :param destination_cidr_block: The Route's destination_cidr_block identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`route_table_id`

  
  *   :py:attr:`destination_cidr_block`

  
  These are the resource's available attributes:
  
  *   :py:attr:`destination_ipv6_cidr_block`

  
  *   :py:attr:`destination_prefix_list_id`

  
  *   :py:attr:`egress_only_internet_gateway_id`

  
  *   :py:attr:`gateway_id`

  
  *   :py:attr:`instance_id`

  
  *   :py:attr:`instance_owner_id`

  
  *   :py:attr:`nat_gateway_id`

  
  *   :py:attr:`network_interface_id`

  
  *   :py:attr:`origin`

  
  *   :py:attr:`state`

  
  *   :py:attr:`vpc_peering_connection_id`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`replace()`

  
  These are the resource's available sub-resources:
  
  *   :py:meth:`RouteTable()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: route_table_id

    *(string)* The Route's route_table_id identifier. This **must** be set.

  .. py:attribute:: destination_cidr_block

    *(string)* The Route's destination_cidr_block identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: destination_ipv6_cidr_block

    

    - *(string) --* 

      The IPv6 CIDR block used for the destination match.

      

  .. py:attribute:: destination_prefix_list_id

    

    - *(string) --* 

      The prefix of the AWS service.

      

  .. py:attribute:: egress_only_internet_gateway_id

    

    - *(string) --* 

      The ID of the egress-only Internet gateway.

      

  .. py:attribute:: gateway_id

    

    - *(string) --* 

      The ID of a gateway attached to your VPC.

      

  .. py:attribute:: instance_id

    

    - *(string) --* 

      The ID of a NAT instance in your VPC.

      

  .. py:attribute:: instance_owner_id

    

    - *(string) --* 

      The AWS account ID of the owner of the instance.

      

  .. py:attribute:: nat_gateway_id

    

    - *(string) --* 

      The ID of a NAT gateway.

      

  .. py:attribute:: network_interface_id

    

    - *(string) --* 

      The ID of the network interface.

      

  .. py:attribute:: origin

    

    - *(string) --* 

      Describes how the route was created.

       

       
      * ``CreateRouteTable`` - The route was automatically created when the route table was created. 
       
      * ``CreateRoute`` - The route was manually added to the route table. 
       
      * ``EnableVgwRoutePropagation`` - The route was propagated by route propagation. 
       

      

  .. py:attribute:: state

    

    - *(string) --* 

      The state of the route. The ``blackhole`` state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

      

  .. py:attribute:: vpc_peering_connection_id

    

    - *(string) --* 

      The ID of the VPC peering connection.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Deletes the specified route from the specified route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute>`_    


    **Request Syntax** 
    ::

      response = route.delete(
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          
      )
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: replace(**kwargs)

    

    Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute>`_    


    **Request Syntax** 
    ::

      response = route.replace(
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          EgressOnlyInternetGatewayId='string',
          GatewayId='string',
          InstanceId='string',
          NatGatewayId='string',
          NetworkInterfaceId='string',
          VpcPeeringConnectionId='string'
      )
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayId: string
    :param EgressOnlyInternetGatewayId: 

      [IPv6 traffic only] The ID of an egress-only Internet gateway.

      

    
    :type GatewayId: string
    :param GatewayId: 

      The ID of an Internet gateway or virtual private gateway.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of a NAT instance in your VPC.

      

    
    :type NatGatewayId: string
    :param NatGatewayId: 

      [IPv4 traffic only] The ID of a NAT gateway.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      The ID of a network interface.

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: 

      The ID of a VPC peering connection.

      

    
    
    :returns: None
  .. rst-class:: admonition-title
  
  Sub-resources
  
  Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child.
  For more information about sub-resources refer to the :ref:`Resources Introduction Guide<subresources_intro>`.
  

  .. py:method:: RouteTable()

    Creates a RouteTable resource.::

      route_table = route.RouteTable()

    
    :rtype: :py:class:`EC2.RouteTable`
    :returns: A RouteTable resource
    

==========
RouteTable
==========



.. py:class:: EC2.RouteTable(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) RouteTable::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    route_table = ec2.RouteTable('id')

  :type id: string
  :param id: The RouteTable's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`associations_attribute`

  
  *   :py:attr:`propagating_vgws`

  
  *   :py:attr:`route_table_id`

  
  *   :py:attr:`routes_attribute`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`associations`

  
  *   :py:attr:`routes`

  
  *   :py:attr:`vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`associate_with_subnet()`

  
  *   :py:meth:`create_route()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The RouteTable's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: associations_attribute

    

    - *(list) --* 

      The associations between the route table and one or more subnets.

      
      

      - *(dict) --* 

        Describes an association between a route table and a subnet.

        
        

        - **Main** *(boolean) --* 

          Indicates whether this is the main route table.

          
        

        - **RouteTableAssociationId** *(string) --* 

          The ID of the association between a route table and a subnet.

          
        

        - **RouteTableId** *(string) --* 

          The ID of the route table.

          
        

        - **SubnetId** *(string) --* 

          The ID of the subnet. A subnet ID is not returned for an implicit association.

          
    
  

  .. py:attribute:: propagating_vgws

    

    - *(list) --* 

      Any virtual private gateway (VGW) propagating routes.

      
      

      - *(dict) --* 

        Describes a virtual private gateway propagating route.

        
        

        - **GatewayId** *(string) --* 

          The ID of the virtual private gateway (VGW).

          
    
  

  .. py:attribute:: route_table_id

    

    - *(string) --* 

      The ID of the route table.

      

  .. py:attribute:: routes_attribute

    

    - *(list) --* 

      The routes in the route table.

      
      

      - *(dict) --* 

        Describes a route in a route table.

        
        

        - **DestinationCidrBlock** *(string) --* 

          The IPv4 CIDR block used for the destination match.

          
        

        - **DestinationIpv6CidrBlock** *(string) --* 

          The IPv6 CIDR block used for the destination match.

          
        

        - **DestinationPrefixListId** *(string) --* 

          The prefix of the AWS service.

          
        

        - **EgressOnlyInternetGatewayId** *(string) --* 

          The ID of the egress-only Internet gateway.

          
        

        - **GatewayId** *(string) --* 

          The ID of a gateway attached to your VPC.

          
        

        - **InstanceId** *(string) --* 

          The ID of a NAT instance in your VPC.

          
        

        - **InstanceOwnerId** *(string) --* 

          The AWS account ID of the owner of the instance.

          
        

        - **NatGatewayId** *(string) --* 

          The ID of a NAT gateway.

          
        

        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          
        

        - **Origin** *(string) --* 

          Describes how the route was created.

           

           
          * ``CreateRouteTable`` - The route was automatically created when the route table was created. 
           
          * ``CreateRoute`` - The route was manually added to the route table. 
           
          * ``EnableVgwRoutePropagation`` - The route was propagated by route propagation. 
           

          
        

        - **State** *(string) --* 

          The state of the route. The ``blackhole`` state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

          
        

        - **VpcPeeringConnectionId** *(string) --* 

          The ID of the VPC peering connection.

          
    
  

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the route table.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      The ID of the VPC.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: associations

    (:py:class:`RouteTableAssociation`) The related associations if set, otherwise ``None``.

  .. py:attribute:: routes

    (:py:class:`Route`) The related routes if set, otherwise ``None``.

  .. py:attribute:: vpc

    (:py:class:`Vpc`) The related vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: associate_with_subnet(**kwargs)

    

    Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable>`_    


    **Request Syntax** 
    ::

      route_table_association = route_table.associate_with_subnet(
          DryRun=True|False,
          SubnetId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type SubnetId: string
    :param SubnetId: **[REQUIRED]** 

      The ID of the subnet.

      

    
    
    :rtype: :py:class:`ec2.RouteTableAssociation`
    :returns: RouteTableAssociation resource
    

  .. py:method:: create_route(**kwargs)

    

    Creates a route in a route table within a VPC.

     

    You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.

     

    When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address ``192.0.2.3`` , and the route table includes the following two IPv4 routes:

     

     
    * ``192.0.2.0/24`` (goes to some target A) 
     
    * ``192.0.2.0/28`` (goes to some target B) 
     

     

    Both routes apply to the traffic destined for ``192.0.2.3`` . However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute>`_    


    **Request Syntax** 
    ::

      route = route_table.create_route(
          DestinationCidrBlock='string',
          DestinationIpv6CidrBlock='string',
          DryRun=True|False,
          EgressOnlyInternetGatewayId='string',
          GatewayId='string',
          InstanceId='string',
          NatGatewayId='string',
          NetworkInterfaceId='string',
          VpcPeeringConnectionId='string'
      )
    :type DestinationCidrBlock: string
    :param DestinationCidrBlock: 

      The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match.

      

    
    :type DestinationIpv6CidrBlock: string
    :param DestinationIpv6CidrBlock: 

      The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EgressOnlyInternetGatewayId: string
    :param EgressOnlyInternetGatewayId: 

      [IPv6 traffic only] The ID of an egress-only Internet gateway.

      

    
    :type GatewayId: string
    :param GatewayId: 

      The ID of an Internet gateway or virtual private gateway attached to your VPC.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

      

    
    :type NatGatewayId: string
    :param NatGatewayId: 

      [IPv4 traffic only] The ID of a NAT gateway.

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      The ID of a network interface.

      

    
    :type VpcPeeringConnectionId: string
    :param VpcPeeringConnectionId: 

      The ID of a VPC peering connection.

      

    
    
    :rtype: :py:class:`ec2.Route`
    :returns: Route resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = route_table.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable>`_    


    **Request Syntax** 
    ::

      response = route_table.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_route_tables` to update the attributes of the RouteTable resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      route_table.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_route_tables` to update the attributes of the RouteTable resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      route_table.reload()
    :returns: None

=====================
RouteTableAssociation
=====================



.. py:class:: EC2.RouteTableAssociation(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) RouteTableAssociation::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    route_table_association = ec2.RouteTableAssociation('id')

  :type id: string
  :param id: The RouteTableAssociation's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`main`

  
  *   :py:attr:`route_table_association_id`

  
  *   :py:attr:`route_table_id`

  
  *   :py:attr:`subnet_id`

  
  These are the resource's available references:
  
  *   :py:attr:`route_table`

  
  *   :py:attr:`subnet`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`replace_subnet()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The RouteTableAssociation's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: main

    

    - *(boolean) --* 

      Indicates whether this is the main route table.

      

  .. py:attribute:: route_table_association_id

    

    - *(string) --* 

      The ID of the association between a route table and a subnet.

      

  .. py:attribute:: route_table_id

    

    - *(string) --* 

      The ID of the route table.

      

  .. py:attribute:: subnet_id

    

    - *(string) --* 

      The ID of the subnet. A subnet ID is not returned for an implicit association.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: route_table

    (:py:class:`RouteTable`) The related route_table if set, otherwise ``None``.

  .. py:attribute:: subnet

    (:py:class:`Subnet`) The related subnet if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Disassociates a subnet from a route table.

     

    After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable>`_    


    **Request Syntax** 
    ::

      response = route_table_association.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: replace_subnet(**kwargs)

    

    Changes the route table associated with a given subnet in a VPC. After the operation completes, the subnet uses the routes in the new route table it's associated with. For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    You can also use ReplaceRouteTableAssociation to change which table is the main route table in the VPC. You just specify the main route table's association ID and the route table to be the new main route table.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation>`_    


    **Request Syntax** 
    ::

      route_table_association = route_table_association.replace_subnet(
          DryRun=True|False,
          RouteTableId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type RouteTableId: string
    :param RouteTableId: **[REQUIRED]** 

      The ID of the new route table to associate with the subnet.

      

    
    
    :rtype: :py:class:`ec2.RouteTableAssociation`
    :returns: RouteTableAssociation resource
    

=============
SecurityGroup
=============



.. py:class:: EC2.SecurityGroup(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) SecurityGroup::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    security_group = ec2.SecurityGroup('id')

  :type id: string
  :param id: The SecurityGroup's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`description`

  
  *   :py:attr:`group_id`

  
  *   :py:attr:`group_name`

  
  *   :py:attr:`ip_permissions`

  
  *   :py:attr:`ip_permissions_egress`

  
  *   :py:attr:`owner_id`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available actions:
  
  *   :py:meth:`authorize_egress()`

  
  *   :py:meth:`authorize_ingress()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`revoke_egress()`

  
  *   :py:meth:`revoke_ingress()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The SecurityGroup's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: description

    

    - *(string) --* 

      A description of the security group.

      

  .. py:attribute:: group_id

    

    - *(string) --* 

      The ID of the security group.

      

  .. py:attribute:: group_name

    

    - *(string) --* 

      The name of the security group.

      

  .. py:attribute:: ip_permissions

    

    - *(list) --* 

      One or more inbound rules associated with the security group.

      
      

      - *(dict) --* 

        Describes a security group rule.

        
        

        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          
        

        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          
        

        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          
          

          - *(dict) --* 

            Describes an IPv4 range.

            
            

            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              
        
      
        

        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          
          

          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            
            

            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              
        
      
        

        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          
          

          - *(dict) --* 

            The ID of the prefix.

            
            

            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              
        
      
        

        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          
        

        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          
          

          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
            

            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              
            

            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              
            

            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              
            

            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              
        
      
    
  

  .. py:attribute:: ip_permissions_egress

    

    - *(list) --* 

      [EC2-VPC] One or more outbound rules associated with the security group.

      
      

      - *(dict) --* 

        Describes a security group rule.

        
        

        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          
        

        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          
        

        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          
          

          - *(dict) --* 

            Describes an IPv4 range.

            
            

            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              
        
      
        

        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          
          

          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            
            

            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              
        
      
        

        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          
          

          - *(dict) --* 

            The ID of the prefix.

            
            

            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              
        
      
        

        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          
        

        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          
          

          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            
            

            - **GroupId** *(string) --* 

              The ID of the security group.

              
            

            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              
            

            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              
            

            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              
            

            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              
            

            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              
        
      
    
  

  .. py:attribute:: owner_id

    

    - *(string) --* 

      The AWS account ID of the owner of the security group.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the security group.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      [EC2-VPC] The ID of the VPC for the security group.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: authorize_egress(**kwargs)

    

    [EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* . For more information about security group limits, see `Amazon VPC Limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html>`_ .

     

    Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

     

    Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress>`_    


    **Request Syntax** 
    ::

      response = security_group.authorize_egress(
          DryRun=True|False,
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          CidrIp='string',
          FromPort=123,
          IpProtocol='string',
          ToPort=123,
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IPv4 address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    
    :returns: None

  .. py:method:: authorize_ingress(**kwargs)

    

    Adds one or more ingress rules to a security group.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

     

    [EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the *source groups* ) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.

     

    [EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the *source groups* ) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see `Amazon VPC Limits <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress>`_    


    **Request Syntax** 
    ::

      response = security_group.authorize_ingress(
          CidrIp='string',
          FromPort=123,
          GroupName='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          IpProtocol='string',
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string',
          ToPort=123,
          DryRun=True|False
      )
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type number, use ``-1`` to specify all types.

      

    
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. Can be used to specify multiple rules in a single command.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). (VPC only) Use ``-1`` to specify all protocols. If you specify ``-1`` , or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For protocol ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      [EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code number, use ``-1`` to specify all codes.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = security_group.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes a security group.

     

    If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with ``InvalidGroup.InUse`` in EC2-Classic or ``DependencyViolation`` in EC2-VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup>`_    


    **Request Syntax** 
    ::

      response = security_group.delete(
          GroupName='string',
          DryRun=True|False
      )
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_security_groups` to update the attributes of the SecurityGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      security_group.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_security_groups` to update the attributes of the SecurityGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      security_group.reload()
    :returns: None

  .. py:method:: revoke_egress(**kwargs)

    

    [EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.

     

    Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress>`_    


    **Request Syntax** 
    ::

      response = security_group.revoke_egress(
          DryRun=True|False,
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          CidrIp='string',
          FromPort=123,
          IpProtocol='string',
          ToPort=123,
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string'
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      The name of a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      The AWS account number for a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

      

    
    
    :returns: None

  .. py:method:: revoke_ingress(**kwargs)

    

    Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.

     

    .. note::

       

      [EC2-Classic security groups only] If the values you specify do not match the existing rule's values, no error is returned. Use  DescribeSecurityGroups to verify that the rule has been removed.

       

     

    Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

     

    Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress>`_    


    **Request Syntax** 
    ::

      response = security_group.revoke_ingress(
          CidrIp='string',
          FromPort=123,
          GroupName='string',
          IpPermissions=[
              {
                  'FromPort': 123,
                  'IpProtocol': 'string',
                  'IpRanges': [
                      {
                          'CidrIp': 'string'
                      },
                  ],
                  'Ipv6Ranges': [
                      {
                          'CidrIpv6': 'string'
                      },
                  ],
                  'PrefixListIds': [
                      {
                          'PrefixListId': 'string'
                      },
                  ],
                  'ToPort': 123,
                  'UserIdGroupPairs': [
                      {
                          'GroupId': 'string',
                          'GroupName': 'string',
                          'PeeringStatus': 'string',
                          'UserId': 'string',
                          'VpcId': 'string',
                          'VpcPeeringConnectionId': 'string'
                      },
                  ]
              },
          ],
          IpProtocol='string',
          SourceSecurityGroupName='string',
          SourceSecurityGroupOwnerId='string',
          ToPort=123,
          DryRun=True|False
      )
    :type CidrIp: string
    :param CidrIp: 

      The CIDR IP address range. You can't specify this parameter when specifying a source security group.

      

    
    :type FromPort: integer
    :param FromPort: 

      The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use ``-1`` to specify all ICMP types.

      

    
    :type GroupName: string
    :param GroupName: 

      [EC2-Classic, default VPC] The name of the security group.

      

    
    :type IpPermissions: list
    :param IpPermissions: 

      A set of IP permissions. You can't specify a source security group and a CIDR IP address range.

      

    
      - *(dict) --* 

        Describes a security group rule.

        

      
        - **FromPort** *(integer) --* 

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of ``-1`` indicates all ICMP/ICMPv6 types.

          

        
        - **IpProtocol** *(string) --* 

          The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). 

           

          [EC2-VPC only] Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp`` , ``udp`` , ``icmp`` , or ``58`` (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For ``tcp`` , ``udp`` , and ``icmp`` , you must specify a port range. For ``58`` (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. 

          

        
        - **IpRanges** *(list) --* 

          One or more IPv4 ranges.

          

        
          - *(dict) --* 

            Describes an IPv4 range.

            

          
            - **CidrIp** *(string) --* 

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.

              

            
          
      
        - **Ipv6Ranges** *(list) --* 

          [EC2-VPC only] One or more IPv6 ranges.

          

        
          - *(dict) --* 

            [EC2-VPC only] Describes an IPv6 range.

            

          
            - **CidrIpv6** *(string) --* 

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.

              

            
          
      
        - **PrefixListIds** *(list) --* 

          (Valid for  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupEgress and  DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an  AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

          

        
          - *(dict) --* 

            The ID of the prefix.

            

          
            - **PrefixListId** *(string) --* 

              The ID of the prefix.

              

            
          
      
        - **ToPort** *(integer) --* 

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of ``-1`` indicates all ICMP/ICMPv6 codes for the specified ICMP type.

          

        
        - **UserIdGroupPairs** *(list) --* 

          One or more security group and AWS account ID pairs.

          

        
          - *(dict) --* 

            Describes a security group and AWS account ID pair.

            

          
            - **GroupId** *(string) --* 

              The ID of the security group.

              

            
            - **GroupName** *(string) --* 

              The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.

              

            
            - **PeeringStatus** *(string) --* 

              The status of a VPC peering connection, if applicable.

              

            
            - **UserId** *(string) --* 

              The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.

               

              [EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.

              

            
            - **VpcId** *(string) --* 

              The ID of the VPC for the referenced security group, if applicable.

              

            
            - **VpcPeeringConnectionId** *(string) --* 

              The ID of the VPC peering connection, if applicable.

              

            
          
      
      
  
    :type IpProtocol: string
    :param IpProtocol: 

      The IP protocol name (``tcp`` , ``udp`` , ``icmp`` ) or number (see `Protocol Numbers <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>`_ ). Use ``-1`` to specify all.

      

    
    :type SourceSecurityGroupName: string
    :param SourceSecurityGroupName: 

      [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

      

    
    :type SourceSecurityGroupOwnerId: string
    :param SourceSecurityGroupOwnerId: 

      [EC2-Classic] The AWS account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

      

    
    :type ToPort: integer
    :param ToPort: 

      The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use ``-1`` to specify all ICMP codes for the ICMP type.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

========
Snapshot
========



.. py:class:: EC2.Snapshot(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Snapshot::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    snapshot = ec2.Snapshot('id')

  :type id: string
  :param id: The Snapshot's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`data_encryption_key_id`

  
  *   :py:attr:`description`

  
  *   :py:attr:`encrypted`

  
  *   :py:attr:`kms_key_id`

  
  *   :py:attr:`owner_alias`

  
  *   :py:attr:`owner_id`

  
  *   :py:attr:`progress`

  
  *   :py:attr:`snapshot_id`

  
  *   :py:attr:`start_time`

  
  *   :py:attr:`state`

  
  *   :py:attr:`state_message`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`volume_id`

  
  *   :py:attr:`volume_size`

  
  These are the resource's available references:
  
  *   :py:attr:`volume`

  
  These are the resource's available actions:
  
  *   :py:meth:`copy()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`reset_attribute()`

  
  These are the resource's available waiters:
  
  *   :py:meth:`wait_until_completed()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Snapshot's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: data_encryption_key_id

    

    - *(string) --* 

      The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the  DescribeSnapshots API operation.

      

  .. py:attribute:: description

    

    - *(string) --* 

      The description for the snapshot.

      

  .. py:attribute:: encrypted

    

    - *(boolean) --* 

      Indicates whether the snapshot is encrypted.

      

  .. py:attribute:: kms_key_id

    

    - *(string) --* 

      The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.

      

  .. py:attribute:: owner_alias

    

    - *(string) --* 

      Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 

      

  .. py:attribute:: owner_id

    

    - *(string) --* 

      The AWS account ID of the EBS snapshot owner.

      

  .. py:attribute:: progress

    

    - *(string) --* 

      The progress of the snapshot, as a percentage.

      

  .. py:attribute:: snapshot_id

    

    - *(string) --* 

      The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

      

  .. py:attribute:: start_time

    

    - *(datetime) --* 

      The time stamp when the snapshot was initiated.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The snapshot state.

      

  .. py:attribute:: state_message

    

    - *(string) --* 

      Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the  DescribeSnapshots API operation.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the snapshot.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: volume_id

    

    - *(string) --* 

      The ID of the volume that was used to create the snapshot. Snapshots created by the  CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

      

  .. py:attribute:: volume_size

    

    - *(integer) --* 

      The size of the volume, in GiB.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: volume

    (:py:class:`Volume`) The related volume if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: copy(**kwargs)

    

    Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.

     

    Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the ``Encrypted`` flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the ``KmsKeyId`` parameter. 

     

    .. note::

       

      To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.

       

     

    .. note::

       

      Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

       

     

    For more information, see `Copying an Amazon EBS Snapshot <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot>`_    


    **Request Syntax** 
    ::

      response = snapshot.copy(
          Description='string',
          Encrypted=True|False,
          KmsKeyId='string',
          SourceRegion='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: 

      A description for the EBS snapshot.

      

    
    :type DestinationRegion: string
    :param DestinationRegion: 

      The destination region to use in the ``PresignedUrl`` parameter of a snapshot copy operation. This parameter is only valid for specifying the destination region in a ``PresignedUrl`` parameter, where it is required.

       

      .. note::

         

         ``CopySnapshot`` sends the snapshot copy to the regional endpoint that you send the HTTP request to, such as ``ec2.us-east-1.amazonaws.com`` (in the AWS CLI, this is specified with the ``--region`` parameter or the default region in your AWS configuration file).

         

            Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required



    
    :type Encrypted: boolean
    :param Encrypted: 

      Specifies whether the destination snapshot should be encrypted. You can encrypt a copy of an unencrypted snapshot using this flag, but you cannot use it to create an unencrypted copy from an encrypted snapshot. Your default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with ``KmsKeyId`` . For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

    
    :type KmsKeyId: string
    :param KmsKeyId: 

      The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when creating the snapshot copy. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the ``arn:aws:kms`` namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the ``key`` namespace, and then the CMK ID. For example, arn:aws:kms:*us-east-1* :*012345678910* :key/*abcd1234-a123-456a-a12b-a123b4cd56ef* . The specified CMK must exist in the region that the snapshot is being copied to. If a ``KmsKeyId`` is specified, the ``Encrypted`` flag must also be set.

      

    
    :type PresignedUrl: string
    :param PresignedUrl: 

      The pre-signed URL that facilitates copying an encrypted snapshot. This parameter is only required when copying an encrypted snapshot with the Amazon EC2 Query API; it is available as an optional parameter in all other cases. The ``PresignedUrl`` should use the snapshot source endpoint, the ``CopySnapshot`` action, and include the ``SourceRegion`` , ``SourceSnapshotId`` , and ``DestinationRegion`` parameters. The ``PresignedUrl`` must be signed using AWS Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in `Authenticating Requests by Using Query Parameters (AWS Signature Version 4) <http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html>`_ in the *Amazon Simple Storage Service API Reference* . An invalid or improperly signed ``PresignedUrl`` will cause the copy operation to fail asynchronously, and the snapshot will move to an ``error`` state.

            Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required



    
    :type SourceRegion: string
    :param SourceRegion: **[REQUIRED]** 

      The ID of the region that contains the snapshot to be copied.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SnapshotId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of CopySnapshot.

        
        

        - **SnapshotId** *(string) --* 

          The ID of the new snapshot.

          
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = snapshot.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified snapshot.

     

    When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

     

    You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

     

    For more information, see `Deleting an Amazon EBS Snapshot <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot>`_    


    **Request Syntax** 
    ::

      response = snapshot.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_attribute(**kwargs)

    

    Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

     

    For more information about EBS snapshots, see `Amazon EBS Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = snapshot.describe_attribute(
          Attribute='productCodes'|'createVolumePermission',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The snapshot attribute you would like to view.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'CreateVolumePermissions': [
                {
                    'Group': 'all',
                    'UserId': 'string'
                },
            ],
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'SnapshotId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeSnapshotAttribute.

        
        

        - **CreateVolumePermissions** *(list) --* 

          A list of permissions for creating volumes from the snapshot.

          
          

          - *(dict) --* 

            Describes the user or group to be added or removed from the permissions for a volume.

            
            

            - **Group** *(string) --* 

              The specific group that is to be added or removed from a volume's list of create volume permissions.

              
            

            - **UserId** *(string) --* 

              The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

              
        
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **SnapshotId** *(string) --* 

          The ID of the EBS snapshot.

          
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_snapshots` to update the attributes of the Snapshot resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      snapshot.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.

     

    .. note::

       

      Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.

       

     

    For more information on modifying snapshot permissions, see `Sharing Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = snapshot.modify_attribute(
          Attribute='productCodes'|'createVolumePermission',
          CreateVolumePermission={
              'Add': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ],
              'Remove': [
                  {
                      'Group': 'all',
                      'UserId': 'string'
                  },
              ]
          },
          GroupNames=[
              'string',
          ],
          OperationType='add'|'remove',
          UserIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The snapshot attribute to modify.

       

      .. note::

         

        Only volume creation permissions may be modified at the customer level.

         

      

    
    :type CreateVolumePermission: dict
    :param CreateVolumePermission: 

      A JSON representation of the snapshot attribute modification.

      

    
      - **Add** *(list) --* 

        Adds a specific AWS account ID or group to a volume's list of create volume permissions.

        

      
        - *(dict) --* 

          Describes the user or group to be added or removed from the permissions for a volume.

          

        
          - **Group** *(string) --* 

            The specific group that is to be added or removed from a volume's list of create volume permissions.

            

          
          - **UserId** *(string) --* 

            The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

            

          
        
    
      - **Remove** *(list) --* 

        Removes a specific AWS account ID or group from a volume's list of create volume permissions.

        

      
        - *(dict) --* 

          Describes the user or group to be added or removed from the permissions for a volume.

          

        
          - **Group** *(string) --* 

            The specific group that is to be added or removed from a volume's list of create volume permissions.

            

          
          - **UserId** *(string) --* 

            The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

            

          
        
    
    
    :type GroupNames: list
    :param GroupNames: 

      The group to modify for the snapshot.

      

    
      - *(string) --* 

      
  
    :type OperationType: string
    :param OperationType: 

      The type of operation to perform to the attribute.

      

    
    :type UserIds: list
    :param UserIds: 

      The account ID to modify for the snapshot.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_snapshots` to update the attributes of the Snapshot resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      snapshot.reload()
    :returns: None

  .. py:method:: reset_attribute(**kwargs)

    

    Resets permission settings for the specified snapshot.

     

    For more information on modifying snapshot permissions, see `Sharing Snapshots <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute>`_    


    **Request Syntax** 
    ::

      response = snapshot.reset_attribute(
          Attribute='productCodes'|'createVolumePermission',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None
  .. rst-class:: admonition-title
  
  Waiters
  
  Waiters provide an interface to wait for a resource to reach a specific state.
  For more information about waiters refer to the :ref:`Resources Introduction Guide<waiters_intro>`.
  

  .. py:method:: wait_until_completed(**kwargs)

    Waits until this Snapshot is completed. This method calls :py:meth:`EC2.Waiter.snapshot_completed.wait` which polls. :py:meth:`EC2.Client.describe_snapshots` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_    


    **Request Syntax** 
    ::

      snapshot.wait_until_completed(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          OwnerIds=[
              'string',
          ],
          RestorableByUserIds=[
              'string',
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``description`` - A description of the snapshot. 
       
      * ``owner-alias`` - Value from an Amazon-maintained list (``amazon`` | ``aws-marketplace`` | ``microsoft`` ) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. 
       
      * ``owner-id`` - The ID of the AWS account that owns the snapshot. 
       
      * ``progress`` - The progress of the snapshot, as a percentage (for example, 80%). 
       
      * ``snapshot-id`` - The snapshot ID. 
       
      * ``start-time`` - The time stamp when the snapshot was initiated. 
       
      * ``status`` - The status of the snapshot (``pending`` | ``completed`` | ``error`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``volume-id`` - The ID of the volume the snapshot is for. 
       
      * ``volume-size`` - The size of the volume, in GiB. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of snapshot results returned by ``DescribeSnapshots`` in paginated output. When this parameter is used, ``DescribeSnapshots`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeSnapshots`` request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeSnapshots`` returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value returned from a previous paginated ``DescribeSnapshots`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

      

    
    :type OwnerIds: list
    :param OwnerIds: 

      Returns the snapshots owned by the specified owner. Multiple owners can be specified.

      

    
      - *(string) --* 

      
  
    :type RestorableByUserIds: list
    :param RestorableByUserIds: 

      One or more AWS accounts IDs that can create volumes from the snapshot.

      

    
      - *(string) --* 

      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :returns: None

======
Subnet
======



.. py:class:: EC2.Subnet(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Subnet::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    subnet = ec2.Subnet('id')

  :type id: string
  :param id: The Subnet's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`assign_ipv6_address_on_creation`

  
  *   :py:attr:`availability_zone`

  
  *   :py:attr:`available_ip_address_count`

  
  *   :py:attr:`cidr_block`

  
  *   :py:attr:`default_for_az`

  
  *   :py:attr:`ipv6_cidr_block_association_set`

  
  *   :py:attr:`map_public_ip_on_launch`

  
  *   :py:attr:`state`

  
  *   :py:attr:`subnet_id`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`create_instances()`

  
  *   :py:meth:`create_network_interface()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  These are the resource's available collections:
  
  *   :py:attr:`instances`

  
  *   :py:attr:`network_interfaces`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Subnet's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: assign_ipv6_address_on_creation

    

    - *(boolean) --* 

      Indicates whether a network interface created in this subnet (including a network interface created by  RunInstances ) receives an IPv6 address.

      

  .. py:attribute:: availability_zone

    

    - *(string) --* 

      The Availability Zone of the subnet.

      

  .. py:attribute:: available_ip_address_count

    

    - *(integer) --* 

      The number of unused private IPv4 addresses in the subnet. Note that the IPv4 addresses for any stopped instances are considered unavailable.

      

  .. py:attribute:: cidr_block

    

    - *(string) --* 

      The IPv4 CIDR block assigned to the subnet.

      

  .. py:attribute:: default_for_az

    

    - *(boolean) --* 

      Indicates whether this is the default subnet for the Availability Zone.

      

  .. py:attribute:: ipv6_cidr_block_association_set

    

    - *(list) --* 

      Information about the IPv6 CIDR blocks associated with the subnet.

      
      

      - *(dict) --* 

        Describes an IPv6 CIDR block associated with a subnet.

        
        

        - **AssociationId** *(string) --* 

          The association ID for the CIDR block.

          
        

        - **Ipv6CidrBlock** *(string) --* 

          The IPv6 CIDR block.

          
        

        - **Ipv6CidrBlockState** *(dict) --* 

          Information about the state of the CIDR block.

          
          

          - **State** *(string) --* 

            The state of a CIDR block.

            
          

          - **StatusMessage** *(string) --* 

            A message about the status of the CIDR block, if applicable.

            
      
    
  

  .. py:attribute:: map_public_ip_on_launch

    

    - *(boolean) --* 

      Indicates whether instances launched in this subnet receive a public IPv4 address.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The current state of the subnet.

      

  .. py:attribute:: subnet_id

    

    - *(string) --* 

      The ID of the subnet.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the subnet.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      The ID of the VPC the subnet is in.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: vpc

    (:py:class:`Vpc`) The related vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: create_instances(**kwargs)

    

    Launches the specified number of instances using an AMI for which you have permissions. 

     

    You can specify a number of options, or leave the default options. The following rules apply:

     

     
    * [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request. 
     
    * [EC2-Classic] If don't specify an Availability Zone, we choose one for you. 
     
    * Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see `Instance Types Available Only in a VPC <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types>`_ . 
     
    * [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet. 
     
    * Not all instance types support IPv6 addresses. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ . 
     
    * If you don't specify a security group ID, we use the default security group. For more information, see `Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ . 
     
    * If any of the AMIs have a product code attached for which the user has not subscribed, the request fails. 
     

     

    To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.

     

    An instance is ready for you to use when it's in the ``running`` state. You can check the state of your instance using  DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see  CreateTags and `Tagging Your Amazon EC2 Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ .

     

    Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see `Key Pairs <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For troubleshooting, see `What To Do If An Instance Immediately Terminates <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html>`_ , and `Troubleshooting Connecting to Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances>`_    


    **Request Syntax** 
    ::

      instance = subnet.create_instances(
          BlockDeviceMappings=[
              {
                  'DeviceName': 'string',
                  'VirtualName': 'string',
                  'Ebs': {
                      'Encrypted': True|False,
                      'DeleteOnTermination': True|False,
                      'Iops': 123,
                      'SnapshotId': 'string',
                      'VolumeSize': 123,
                      'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
                  },
                  'NoDevice': 'string'
              },
          ],
          ImageId='string',
          InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          KernelId='string',
          KeyName='string',
          MaxCount=123,
          MinCount=123,
          Monitoring={
              'Enabled': True|False
          },
          Placement={
              'AvailabilityZone': 'string',
              'Affinity': 'string',
              'GroupName': 'string',
              'HostId': 'string',
              'Tenancy': 'default'|'dedicated'|'host',
              'SpreadDomain': 'string'
          },
          RamdiskId='string',
          SecurityGroupIds=[
              'string',
          ],
          SecurityGroups=[
              'string',
          ],
          UserData='string',
          AdditionalInfo='string',
          ClientToken='string',
          DisableApiTermination=True|False,
          DryRun=True|False,
          EbsOptimized=True|False,
          IamInstanceProfile={
              'Arn': 'string',
              'Name': 'string'
          },
          InstanceInitiatedShutdownBehavior='stop'|'terminate',
          NetworkInterfaces=[
              {
                  'AssociatePublicIpAddress': True|False,
                  'DeleteOnTermination': True|False,
                  'Description': 'string',
                  'DeviceIndex': 123,
                  'Groups': [
                      'string',
                  ],
                  'Ipv6AddressCount': 123,
                  'Ipv6Addresses': [
                      {
                          'Ipv6Address': 'string'
                      },
                  ],
                  'NetworkInterfaceId': 'string',
                  'PrivateIpAddress': 'string',
                  'PrivateIpAddresses': [
                      {
                          'Primary': True|False,
                          'PrivateIpAddress': 'string'
                      },
                  ],
                  'SecondaryPrivateIpAddressCount': 123,
                  'SubnetId': 'string'
              },
          ],
          PrivateIpAddress='string',
          ElasticGpuSpecification=[
              {
                  'Type': 'string'
              },
          ],
          TagSpecifications=[
              {
                  'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
                  'Tags': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ]
      )
    :type BlockDeviceMappings: list
    :param BlockDeviceMappings: 

      The block device mapping.

       

      .. warning::

         

        Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.

         

      

    
      - *(dict) --* 

        Describes a block device mapping.

        

      
        - **DeviceName** *(string) --* 

          The device name exposed to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

          

        
        - **VirtualName** *(string) --* 

          The virtual device name (``ephemeral`` N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0`` and ``ephemeral1`` .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

           

          Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

          

        
        - **Ebs** *(dict) --* 

          Parameters used to automatically set up EBS volumes when the instance is launched.

          

        
          - **Encrypted** *(boolean) --* 

            Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

            

          
          - **DeleteOnTermination** *(boolean) --* 

            Indicates whether the EBS volume is deleted on instance termination.

            

          
          - **Iops** *(integer) --* 

            The number of I/O operations per second (IOPS) that the volume supports. For ``io1`` , this represents the number of IOPS that are provisioned for the volume. For ``gp2`` , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

             

            Constraint: Range is 100-20000 IOPS for ``io1`` volumes and 100-10000 IOPS for ``gp2`` volumes.

             

            Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

            

          
          - **SnapshotId** *(string) --* 

            The ID of the snapshot.

            

          
          - **VolumeSize** *(integer) --* 

            The size of the volume, in GiB.

             

            Constraints: 1-16384 for General Purpose SSD (``gp2`` ), 4-16384 for Provisioned IOPS SSD (``io1`` ), 500-16384 for Throughput Optimized HDD (``st1`` ), 500-16384 for Cold HDD (``sc1`` ), and 1-1024 for Magnetic (``standard`` ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

             

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            

          
          - **VolumeType** *(string) --* 

            The volume type: ``gp2`` , ``io1`` , ``st1`` , ``sc1`` , or ``standard`` .

             

            Default: ``standard``  

            

          
        
        - **NoDevice** *(string) --* 

          Suppresses the specified device included in the block device mapping of the AMI.

          

        
      
  
    :type ImageId: string
    :param ImageId: **[REQUIRED]** 

      The ID of the AMI, which you can get by calling  DescribeImages .

      

    
    :type InstanceType: string
    :param InstanceType: 

      The instance type. For more information, see `Instance Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      Default: ``m1.small``  

      

    
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type KernelId: string
    :param KernelId: 

      The ID of the kernel.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type KeyName: string
    :param KeyName: 

      The name of the key pair. You can create a key pair using  CreateKeyPair or  ImportKeyPair .

       

      .. warning::

         

        If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

         

      

    
    :type MaxCount: integer
    :param MaxCount: **[REQUIRED]** 

      The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above ``MinCount`` .

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 FAQ.

      

    
    :type MinCount: integer
    :param MinCount: **[REQUIRED]** 

      The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

       

      Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see `How many instances can I run in Amazon EC2 <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2>`_ in the Amazon EC2 General FAQ.

      

    
    :type Monitoring: dict
    :param Monitoring: 

      The monitoring for the instance.

      

    
      - **Enabled** *(boolean) --* **[REQUIRED]** 

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        

      
    
    :type Placement: dict
    :param Placement: 

      The placement for the instance.

      

    
      - **AvailabilityZone** *(string) --* 

        The Availability Zone of the instance.

        

      
      - **Affinity** *(string) --* 

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the  ImportInstance command.

        

      
      - **GroupName** *(string) --* 

        The name of the placement group the instance is in (for cluster compute instances).

        

      
      - **HostId** *(string) --* 

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the  ImportInstance command.

        

      
      - **Tenancy** *(string) --* 

        The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of ``dedicated`` runs on single-tenant hardware. The ``host`` tenancy is not supported for the  ImportInstance command.

        

      
      - **SpreadDomain** *(string) --* 

        Reserved for future use.

        

      
    
    :type RamdiskId: string
    :param RamdiskId: 

      The ID of the RAM disk.

       

      .. warning::

         

        We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see `PV-GRUB <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

         

      

    
    :type SecurityGroupIds: list
    :param SecurityGroupIds: 

      One or more security group IDs. You can create a security group using  CreateSecurityGroup .

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type SecurityGroups: list
    :param SecurityGroups: 

      [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.

       

      Default: Amazon EC2 uses the default security group.

      

    
      - *(string) --* 

      
  
    :type UserData: string
    :param UserData: 

      The user data to make available to the instance. For more information, see `Running Commands on Your Linux Instance at Launch <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html>`_ (Linux) and `Adding User Data <http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data>`_ (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

            **This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.**


    
    :type AdditionalInfo: string
    :param AdditionalInfo: 

      Reserved.

      

    
    :type ClientToken: string
    :param ClientToken: 

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see `Ensuring Idempotency <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`_ .

       

      Constraints: Maximum 64 ASCII characters

      

    
    :type DisableApiTermination: boolean
    :param DisableApiTermination: 

      If you set this parameter to ``true`` , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to ``false`` after launch, use  ModifyInstanceAttribute . Alternatively, if you set ``InstanceInitiatedShutdownBehavior`` to ``terminate`` , you can terminate the instance by running the shutdown command from the instance.

       

      Default: ``false``  

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type EbsOptimized: boolean
    :param EbsOptimized: 

      Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

       

      Default: ``false``  

      

    
    :type IamInstanceProfile: dict
    :param IamInstanceProfile: 

      The IAM instance profile.

      

    
      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the instance profile.

        

      
      - **Name** *(string) --* 

        The name of the instance profile.

        

      
    
    :type InstanceInitiatedShutdownBehavior: string
    :param InstanceInitiatedShutdownBehavior: 

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

       

      Default: ``stop``  

      

    
    :type NetworkInterfaces: list
    :param NetworkInterfaces: 

      One or more network interfaces.

      

    
      - *(dict) --* 

        Describes a network interface.

        

      
        - **AssociatePublicIpAddress** *(boolean) --* 

          Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is ``true`` .

          

        
        - **DeleteOnTermination** *(boolean) --* 

          If set to ``true`` , the interface is deleted when the instance is terminated. You can specify ``true`` only if creating a new network interface when launching an instance.

          

        
        - **Description** *(string) --* 

          The description of the network interface. Applies only if creating a network interface when launching an instance.

          

        
        - **DeviceIndex** *(integer) --* 

          The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a  RunInstances request, you must provide the device index.

          

        
        - **Groups** *(list) --* 

          The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

          

        
          - *(string) --* 

          
      
        - **Ipv6AddressCount** *(integer) --* 

          A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

          

        
        - **Ipv6Addresses** *(list) --* 

          One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

          

        
          - *(dict) --* 

            Describes an IPv6 address.

            

          
            - **Ipv6Address** *(string) --* 

              The IPv6 address.

              

            
          
      
        - **NetworkInterfaceId** *(string) --* 

          The ID of the network interface.

          

        
        - **PrivateIpAddress** *(string) --* 

          The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **PrivateIpAddresses** *(list) --* 

          One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
          - *(dict) --* 

            Describes a secondary private IPv4 address for a network interface.

            

          
            - **Primary** *(boolean) --* 

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              

            
            - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

              The private IPv4 addresses.

              

            
          
      
        - **SecondaryPrivateIpAddressCount** *(integer) --* 

          The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a  RunInstances request.

          

        
        - **SubnetId** *(string) --* 

          The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

       

      Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

      

    
    :type ElasticGpuSpecification: list
    :param ElasticGpuSpecification: 

      An Elastic GPU to associate with the instance.

      

    
      - *(dict) --* 

        A specification for an Elastic GPU.

        

      
        - **Type** *(string) --* **[REQUIRED]** 

          The type of Elastic GPU.

          

        
      
  
    :type TagSpecifications: list
    :param TagSpecifications: 

      The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.

      

    
      - *(dict) --* 

        The tags to apply to a resource when the resource is being created.

        

      
        - **ResourceType** *(string) --* 

          The type of resource to tag. Currently, the resource types that support tagging on creation are ``instance`` and ``volume`` . 

          

        
        - **Tags** *(list) --* 

          The tags to apply to the resource.

          

        
          - *(dict) --* 

            Describes a tag.

            

          
            - **Key** *(string) --* 

              The key of the tag.

               

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

              

            
            - **Value** *(string) --* 

              The value of the tag.

               

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

              

            
          
      
      
  
    
    :rtype: list(:py:class:`ec2.Instance`)
    :returns: A list of Instance resources
    

  .. py:method:: create_network_interface(**kwargs)

    

    Creates a network interface in the specified subnet.

     

    For more information about network interfaces, see `Elastic Network Interfaces <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface>`_    


    **Request Syntax** 
    ::

      network_interface = subnet.create_network_interface(
          Description='string',
          DryRun=True|False,
          Groups=[
              'string',
          ],
          Ipv6AddressCount=123,
          Ipv6Addresses=[
              {
                  'Ipv6Address': 'string'
              },
          ],
          PrivateIpAddress='string',
          PrivateIpAddresses=[
              {
                  'Primary': True|False,
                  'PrivateIpAddress': 'string'
              },
          ],
          SecondaryPrivateIpAddressCount=123,
          
      )
    :type Description: string
    :param Description: 

      A description for the network interface.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: 

      The IDs of one or more security groups.

      

    
      - *(string) --* 

      
  
    :type Ipv6AddressCount: integer
    :param Ipv6AddressCount: 

      The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the ``AssignIpv6AddressOnCreation`` attribute set to ``true`` , you can specify ``0`` to override this setting.

      

    
    :type Ipv6Addresses: list
    :param Ipv6Addresses: 

      One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

      

    
      - *(dict) --* 

        Describes an IPv6 address.

        

      
        - **Ipv6Address** *(string) --* 

          The IPv6 address.

          

        
      
  
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in ``privateIpAddresses`` as primary (only one IP address can be designated as primary).

      

    
    :type PrivateIpAddresses: list
    :param PrivateIpAddresses: 

      One or more private IPv4 addresses.

      

    
      - *(dict) --* 

        Describes a secondary private IPv4 address for a network interface.

        

      
        - **Primary** *(boolean) --* 

          Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          

        
        - **PrivateIpAddress** *(string) --* **[REQUIRED]** 

          The private IPv4 addresses.

          

        
      
  
    :type SecondaryPrivateIpAddressCount: integer
    :param SecondaryPrivateIpAddressCount: 

      The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using ``privateIpAddresses`` .

       

      The number of IP addresses you can assign to a network interface varies by instance type. For more information, see `IP Addresses Per ENI Per Instance Type <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI>`_ in the *Amazon Virtual Private Cloud User Guide* .

      

    
    
    :rtype: :py:class:`ec2.NetworkInterface`
    :returns: NetworkInterface resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = subnet.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet>`_    


    **Request Syntax** 
    ::

      response = subnet.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_subnets` to update the attributes of the Subnet resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      subnet.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_subnets` to update the attributes of the Subnet resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      subnet.reload()
    :returns: None
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: instances

    A collection of Instance resources

    .. py:method:: all()

      Creates an iterable of all Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = subnet.instances.all()
        
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: create_tags(**kwargs)

      

      Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

       

      For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.create_tags(
            DryRun=True|False,
            Tags=[
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Tags: list
      :param Tags: **[REQUIRED]** 

        One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

        

      
        - *(dict) --* 

          Describes a tag.

          

        
          - **Key** *(string) --* 

            The key of the tag.

             

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

            

          
          - **Value** *(string) --* 

            The value of the tag.

             

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

            

          
        
    
      
      :returns: None

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = subnet.instances.filter(
            InstanceIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type InstanceIds: list
      :param InstanceIds: 

        One or more instance IDs.

         

        Default: Describes all your instances.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

        

      
      :type NextToken: string
      :param NextToken: 

        The token to request the next page of results.

        

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = subnet.instances.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: monitor(**kwargs)

      

      Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      To disable detailed monitoring, see .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.monitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of MonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = subnet.instances.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: reboot(**kwargs)

      

      Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

       

      If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

       

      For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.reboot(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :returns: None

    .. py:method:: start(**kwargs)

      

      Starts an Amazon EBS-backed AMI that you've previously stopped.

       

      Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Performing this operation on an instance that uses an instance store as its root device returns an error.

       

      For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.start(
            AdditionalInfo='string',
            DryRun=True|False
        )
      :type AdditionalInfo: string
      :param AdditionalInfo: 

        Reserved.

        

      
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StartingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StartInstances.

          
          

          - **StartingInstances** *(list) --* 

            Information about one or more started instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: stop(**kwargs)

      

      Stops an Amazon EBS-backed instance.

       

      We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      You can't start or stop Spot instances, and you can't stop instance store-backed instances.

       

      When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.stop(
            DryRun=True|False,
            Force=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Force: boolean
      :param Force: 

        Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

         

        Default: ``false``  

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StoppingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StopInstances.

          
          

          - **StoppingInstances** *(list) --* 

            Information about one or more stopped instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: terminate(**kwargs)

      

      Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

       

      If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

       

      Terminated instances remain visible after termination (for approximately one hour).

       

      By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

       

      You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.terminate(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'TerminatingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of TerminateInstances.

          
          

          - **TerminatingInstances** *(list) --* 

            Information about one or more terminated instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: unmonitor(**kwargs)

      

      Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_      


      **Request Syntax** 
      ::

        response = subnet.instances.unmonitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of UnmonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

  .. py:attribute:: network_interfaces

    A collection of NetworkInterface resources

    .. py:method:: all()

      Creates an iterable of all NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = subnet.network_interfaces.all()
        
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = subnet.network_interfaces.filter(
            DryRun=True|False,
            NetworkInterfaceIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type NetworkInterfaceIds: list
      :param NetworkInterfaceIds: 

        One or more network interface IDs.

         

        Default: Describes all your network interfaces.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = subnet.network_interfaces.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = subnet.network_interfaces.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

===
Tag
===



.. py:class:: EC2.Tag(resource_id,key,value)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Tag::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    tag = ec2.Tag('resource_id','key','value')

  :type resource_id: string
  :param resource_id: The Tag's resource_id identifier. This **must** be set.
  :type key: string
  :param key: The Tag's key identifier. This **must** be set.
  :type value: string
  :param value: The Tag's value identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`resource_id`

  
  *   :py:attr:`key`

  
  *   :py:attr:`value`

  
  These are the resource's available attributes:
  
  *   :py:attr:`resource_type`

  
  These are the resource's available actions:
  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: resource_id

    *(string)* The Tag's resource_id identifier. This **must** be set.

  .. py:attribute:: key

    *(string)* The Tag's key identifier. This **must** be set.

  .. py:attribute:: value

    *(string)* The Tag's value identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: resource_type

    

    - *(string) --* 

      The resource type.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: delete(**kwargs)

    

    Deletes the specified set of tags from the specified set of resources. This call is designed to follow a ``DescribeTags`` request.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags>`_    


    **Request Syntax** 
    ::

      response = tag.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_tags` to update the attributes of the Tag resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      tag.load()
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_tags` to update the attributes of the Tag resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      tag.reload()
    :returns: None

======
Volume
======



.. py:class:: EC2.Volume(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Volume::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    volume = ec2.Volume('id')

  :type id: string
  :param id: The Volume's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`attachments`

  
  *   :py:attr:`availability_zone`

  
  *   :py:attr:`create_time`

  
  *   :py:attr:`encrypted`

  
  *   :py:attr:`iops`

  
  *   :py:attr:`kms_key_id`

  
  *   :py:attr:`size`

  
  *   :py:attr:`snapshot_id`

  
  *   :py:attr:`state`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`volume_id`

  
  *   :py:attr:`volume_type`

  
  These are the resource's available actions:
  
  *   :py:meth:`attach_to_instance()`

  
  *   :py:meth:`create_snapshot()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`describe_status()`

  
  *   :py:meth:`detach_from_instance()`

  
  *   :py:meth:`enable_io()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`reload()`

  
  These are the resource's available collections:
  
  *   :py:attr:`snapshots`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Volume's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: attachments

    

    - *(list) --* 

      Information about the volume attachments.

      
      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    
  

  .. py:attribute:: availability_zone

    

    - *(string) --* 

      The Availability Zone for the volume.

      

  .. py:attribute:: create_time

    

    - *(datetime) --* 

      The time stamp when volume creation was initiated.

      

  .. py:attribute:: encrypted

    

    - *(boolean) --* 

      Indicates whether the volume will be encrypted.

      

  .. py:attribute:: iops

    

    - *(integer) --* 

      The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see `Amazon EBS Volume Types <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for ``gp2`` volumes.

       

      Condition: This parameter is required for requests to create ``io1`` volumes; it is not used in requests to create ``gp2`` , ``st1`` , ``sc1`` , or ``standard`` volumes.

      

  .. py:attribute:: kms_key_id

    

    - *(string) --* 

      The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

      

  .. py:attribute:: size

    

    - *(integer) --* 

      The size of the volume, in GiBs.

      

  .. py:attribute:: snapshot_id

    

    - *(string) --* 

      The snapshot from which the volume was created, if applicable.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The volume state.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the volume.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: volume_id

    

    - *(string) --* 

      The ID of the volume.

      

  .. py:attribute:: volume_type

    

    - *(string) --* 

      The volume type. This can be ``gp2`` for General Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

      
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: attach_to_instance(**kwargs)

    

    Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

     

    Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    For a list of supported device names, see `Attaching an EBS Volume to an Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ . Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see `Amazon EC2 Instance Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    If a volume has an AWS Marketplace product code:

     

     
    * The volume can be attached only to a stopped instance. 
     
    * AWS Marketplace product codes are copied from the volume to the instance. 
     
    * You must be subscribed to the product. 
     
    * The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance. 
     

     

    For an overview of the AWS Marketplace, see `Introducing AWS Marketplace <https://aws.amazon.com/marketplace/help/200900000>`_ .

     

    For more information about EBS volumes, see `Attaching Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume>`_    


    **Request Syntax** 
    ::

      response = volume.attach_to_instance(
          Device='string',
          InstanceId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: **[REQUIRED]** 

      The device name to expose to the instance (for example, ``/dev/sdh`` or ``xvdh`` ).

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

  .. py:method:: create_snapshot(**kwargs)

    

    Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

     

    When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

     

    You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is ``pending`` .

     

    To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

     

    Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

     

    For more information, see `Amazon Elastic Block Store <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html>`_ and `Amazon EBS Encryption <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot>`_    


    **Request Syntax** 
    ::

      snapshot = volume.create_snapshot(
          Description='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: 

      A description for the snapshot.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.Snapshot`
    :returns: Snapshot resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = volume.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified EBS volume. The volume must be in the ``available`` state (not attached to an instance).

     

    .. note::

       

      The volume may remain in the ``deleting`` state for several minutes.

       

     

    For more information, see `Deleting an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume>`_    


    **Request Syntax** 
    ::

      response = volume.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_attribute(**kwargs)

    

    Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

     

    For more information about EBS volumes, see `Amazon EBS Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute>`_    


    **Request Syntax** 
    ::

      response = volume.describe_attribute(
          Attribute='autoEnableIO'|'productCodes',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: 

      The attribute of the volume. This parameter is required.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AutoEnableIO': {
                'Value': True|False
            },
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'VolumeId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumeAttribute.

        
        

        - **AutoEnableIO** *(dict) --* 

          The state of ``autoEnableIO`` attribute.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **ProductCodes** *(list) --* 

          A list of product codes.

          
          

          - *(dict) --* 

            Describes a product code.

            
            

            - **ProductCodeId** *(string) --* 

              The product code.

              
            

            - **ProductCodeType** *(string) --* 

              The type of product code.

              
        
      
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
    

  .. py:method:: describe_status(**kwargs)

    

    Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

     

    The ``DescribeVolumeStatus`` operation provides the following information about the specified volumes:

     

     *Status* : Reflects the current status of the volume. The possible values are ``ok`` , ``impaired`` , ``warning`` , or ``insufficient-data`` . If all checks pass, the overall status of the volume is ``ok`` . If the check fails, the overall status is ``impaired`` . If the status is ``insufficient-data`` , then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information on volume status, see `Monitoring the Status of Your Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html>`_ .

     

     *Events* : Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an ``impaired`` status, then the volume event might be ``potential-data-inconsistency`` . This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.

     

     *Actions* : Reflect the actions you may have to take in response to an event. For example, if the status of the volume is ``impaired`` and the volume event shows ``potential-data-inconsistency`` , then the action shows ``enable-volume-io`` . This means that you may want to enable the I/O operations for the volume by calling the  EnableVolumeIO action and then check the volume for data consistency.

     

    .. note::

       

      Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the ``error`` state (for example, when a volume is incapable of accepting I/O.)

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus>`_    


    **Request Syntax** 
    ::

      response = volume.describe_status(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          MaxResults=123,
          NextToken='string',
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``action.code`` - The action code for the event (for example, ``enable-volume-io`` ). 
       
      * ``action.description`` - A description of the action. 
       
      * ``action.event-id`` - The event ID associated with the action. 
       
      * ``availability-zone`` - The Availability Zone of the instance. 
       
      * ``event.description`` - A description of the event. 
       
      * ``event.event-id`` - The event ID. 
       
      * ``event.event-type`` - The event type (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``io-performance:degraded`` | ``io-performance:severely-degraded`` | ``io-performance:stalled`` ). 
       
      * ``event.not-after`` - The latest end time for the event. 
       
      * ``event.not-before`` - The earliest start time for the event. 
       
      * ``volume-status.details-name`` - The cause for ``volume-status.status`` (``io-enabled`` | ``io-performance`` ). 
       
      * ``volume-status.details-status`` - The status of ``volume-status.details-name`` (for ``io-enabled`` : ``passed`` | ``failed`` ; for ``io-performance`` : ``normal`` | ``degraded`` | ``severely-degraded`` | ``stalled`` ). 
       
      * ``volume-status.status`` - The status of the volume (``ok`` | ``impaired`` | ``warning`` | ``insufficient-data`` ). 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type MaxResults: integer
    :param MaxResults: 

      The maximum number of volume results returned by ``DescribeVolumeStatus`` in paginated output. When this parameter is used, the request only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeVolumeStatus`` returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

      

    
    :type NextToken: string
    :param NextToken: 

      The ``NextToken`` value to include in a future ``DescribeVolumeStatus`` request. When the results of the request exceed ``MaxResults`` , this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NextToken': 'string',
            'VolumeStatuses': [
                {
                    'Actions': [
                        {
                            'Code': 'string',
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string'
                        },
                    ],
                    'AvailabilityZone': 'string',
                    'Events': [
                        {
                            'Description': 'string',
                            'EventId': 'string',
                            'EventType': 'string',
                            'NotAfter': datetime(2015, 1, 1),
                            'NotBefore': datetime(2015, 1, 1)
                        },
                    ],
                    'VolumeId': 'string',
                    'VolumeStatus': {
                        'Details': [
                            {
                                'Name': 'io-enabled'|'io-performance',
                                'Status': 'string'
                            },
                        ],
                        'Status': 'ok'|'impaired'|'insufficient-data'
                    }
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVolumeStatus.

        
        

        - **NextToken** *(string) --* 

          The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

          
        

        - **VolumeStatuses** *(list) --* 

          A list of volumes.

          
          

          - *(dict) --* 

            Describes the volume status.

            
            

            - **Actions** *(list) --* 

              The details of the operation.

              
              

              - *(dict) --* 

                Describes a volume status operation code.

                
                

                - **Code** *(string) --* 

                  The code identifying the operation, for example, ``enable-volume-io`` .

                  
                

                - **Description** *(string) --* 

                  A description of the operation.

                  
                

                - **EventId** *(string) --* 

                  The ID of the event associated with this operation.

                  
                

                - **EventType** *(string) --* 

                  The event type associated with this operation.

                  
            
          
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone of the volume.

              
            

            - **Events** *(list) --* 

              A list of events associated with the volume.

              
              

              - *(dict) --* 

                Describes a volume status event.

                
                

                - **Description** *(string) --* 

                  A description of the event.

                  
                

                - **EventId** *(string) --* 

                  The ID of this event.

                  
                

                - **EventType** *(string) --* 

                  The type of this event.

                  
                

                - **NotAfter** *(datetime) --* 

                  The latest end time of the event.

                  
                

                - **NotBefore** *(datetime) --* 

                  The earliest start time of the event.

                  
            
          
            

            - **VolumeId** *(string) --* 

              The volume ID.

              
            

            - **VolumeStatus** *(dict) --* 

              The volume status.

              
              

              - **Details** *(list) --* 

                The details of the volume status.

                
                

                - *(dict) --* 

                  Describes a volume status.

                  
                  

                  - **Name** *(string) --* 

                    The name of the volume status.

                    
                  

                  - **Status** *(string) --* 

                    The intended status of the volume status.

                    
              
            
              

              - **Status** *(string) --* 

                The status of the volume.

                
          
        
      
    

  .. py:method:: detach_from_instance(**kwargs)

    

    Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the ``busy`` state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

     

    When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

     

    For more information, see `Detaching an Amazon EBS Volume <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume>`_    


    **Request Syntax** 
    ::

      response = volume.detach_from_instance(
          Device='string',
          Force=True|False,
          InstanceId='string',
          DryRun=True|False
      )
    :type Device: string
    :param Device: 

      The device name.

      

    
    :type Force: boolean
    :param Force: 

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      

    
    :type InstanceId: string
    :param InstanceId: 

      The ID of the instance.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes volume attachment details.

        
        

        - **AttachTime** *(datetime) --* 

          The time stamp when the attachment initiated.

          
        

        - **Device** *(string) --* 

          The device name.

          
        

        - **InstanceId** *(string) --* 

          The ID of the instance.

          
        

        - **State** *(string) --* 

          The attachment state of the volume.

          
        

        - **VolumeId** *(string) --* 

          The ID of the volume.

          
        

        - **DeleteOnTermination** *(boolean) --* 

          Indicates whether the EBS volume is deleted on instance termination.

          
    

  .. py:method:: enable_io(**kwargs)

    

    Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO>`_    


    **Request Syntax** 
    ::

      response = volume.enable_io(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_volumes` to update the attributes of the Volume resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      volume.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Modifies a volume attribute.

     

    By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

     

    You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute>`_    


    **Request Syntax** 
    ::

      response = volume.modify_attribute(
          AutoEnableIO={
              'Value': True|False
          },
          DryRun=True|False
      )
    :type AutoEnableIO: dict
    :param AutoEnableIO: 

      Indicates whether the volume should be auto-enabled for I/O operations.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_volumes` to update the attributes of the Volume resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      volume.reload()
    :returns: None
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: snapshots

    A collection of Snapshot resources

    .. py:method:: all()

      Creates an iterable of all Snapshot resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = volume.snapshots.all()
        
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Snapshot resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = volume.snapshots.filter(
            MaxResults=123,
            NextToken='string',
            OwnerIds=[
                'string',
            ],
            RestorableByUserIds=[
                'string',
            ],
            SnapshotIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of snapshot results returned by ``DescribeSnapshots`` in paginated output. When this parameter is used, ``DescribeSnapshots`` only returns ``MaxResults`` results in a single page along with a ``NextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeSnapshots`` request with the returned ``NextToken`` value. This value can be between 5 and 1000; if ``MaxResults`` is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then ``DescribeSnapshots`` returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

        

      
      :type NextToken: string
      :param NextToken: 

        The ``NextToken`` value returned from a previous paginated ``DescribeSnapshots`` request where ``MaxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``NextToken`` value. This value is ``null`` when there are no more results to return.

        

      
      :type OwnerIds: list
      :param OwnerIds: 

        Returns the snapshots owned by the specified owner. Multiple owners can be specified.

        

      
        - *(string) --* 

        
    
      :type RestorableByUserIds: list
      :param RestorableByUserIds: 

        One or more AWS accounts IDs that can create volumes from the snapshot.

        

      
        - *(string) --* 

        
    
      :type SnapshotIds: list
      :param SnapshotIds: 

        One or more snapshot IDs.

         

        Default: Describes snapshots for which you have launch permissions.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Snapshot resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = volume.snapshots.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Snapshot resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots>`_      


      **Request Syntax** 
      ::

        snapshot_iterator = volume.snapshots.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Snapshot`)
      :returns: A list of Snapshot resources
      

===
Vpc
===



.. py:class:: EC2.Vpc(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) Vpc::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    vpc = ec2.Vpc('id')

  :type id: string
  :param id: The Vpc's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`cidr_block`

  
  *   :py:attr:`dhcp_options_id`

  
  *   :py:attr:`instance_tenancy`

  
  *   :py:attr:`ipv6_cidr_block_association_set`

  
  *   :py:attr:`is_default`

  
  *   :py:attr:`state`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_id`

  
  These are the resource's available references:
  
  *   :py:attr:`dhcp_options`

  
  These are the resource's available actions:
  
  *   :py:meth:`associate_dhcp_options()`

  
  *   :py:meth:`attach_classic_link_instance()`

  
  *   :py:meth:`attach_internet_gateway()`

  
  *   :py:meth:`create_network_acl()`

  
  *   :py:meth:`create_route_table()`

  
  *   :py:meth:`create_security_group()`

  
  *   :py:meth:`create_subnet()`

  
  *   :py:meth:`create_tags()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`describe_attribute()`

  
  *   :py:meth:`detach_classic_link_instance()`

  
  *   :py:meth:`detach_internet_gateway()`

  
  *   :py:meth:`disable_classic_link()`

  
  *   :py:meth:`enable_classic_link()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`modify_attribute()`

  
  *   :py:meth:`reload()`

  
  *   :py:meth:`request_vpc_peering_connection()`

  
  These are the resource's available collections:
  
  *   :py:attr:`accepted_vpc_peering_connections`

  
  *   :py:attr:`instances`

  
  *   :py:attr:`internet_gateways`

  
  *   :py:attr:`network_acls`

  
  *   :py:attr:`network_interfaces`

  
  *   :py:attr:`requested_vpc_peering_connections`

  
  *   :py:attr:`route_tables`

  
  *   :py:attr:`security_groups`

  
  *   :py:attr:`subnets`

  
  These are the resource's available waiters:
  
  *   :py:meth:`wait_until_available()`

  
  *   :py:meth:`wait_until_exists()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The Vpc's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: cidr_block

    

    - *(string) --* 

      The IPv4 CIDR block for the VPC.

      

  .. py:attribute:: dhcp_options_id

    

    - *(string) --* 

      The ID of the set of DHCP options you've associated with the VPC (or ``default`` if the default options are associated with the VPC).

      

  .. py:attribute:: instance_tenancy

    

    - *(string) --* 

      The allowed tenancy of instances launched into the VPC.

      

  .. py:attribute:: ipv6_cidr_block_association_set

    

    - *(list) --* 

      Information about the IPv6 CIDR blocks associated with the VPC.

      
      

      - *(dict) --* 

        Describes an IPv6 CIDR block associated with a VPC.

        
        

        - **AssociationId** *(string) --* 

          The association ID for the IPv6 CIDR block.

          
        

        - **Ipv6CidrBlock** *(string) --* 

          The IPv6 CIDR block.

          
        

        - **Ipv6CidrBlockState** *(dict) --* 

          Information about the state of the CIDR block.

          
          

          - **State** *(string) --* 

            The state of the CIDR block.

            
          

          - **StatusMessage** *(string) --* 

            A message about the status of the CIDR block, if applicable.

            
      
    
  

  .. py:attribute:: is_default

    

    - *(boolean) --* 

      Indicates whether the VPC is the default VPC.

      

  .. py:attribute:: state

    

    - *(string) --* 

      The current state of the VPC.

      

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the VPC.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_id

    

    - *(string) --* 

      The ID of the VPC.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: dhcp_options

    (:py:class:`DhcpOptions`) The related dhcp_options if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: associate_dhcp_options(**kwargs)

    

    Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

     

    After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

     

    For more information, see `DHCP Options Sets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions>`_    


    **Request Syntax** 
    ::

      response = vpc.associate_dhcp_options(
          DhcpOptionsId='string',
          DryRun=True|False
      )
    :type DhcpOptionsId: string
    :param DhcpOptionsId: **[REQUIRED]** 

      The ID of the DHCP options set, or ``default`` to associate no DHCP options with the VPC.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: attach_classic_link_instance(**kwargs)

    

    Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the ``running`` state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

     

    After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

     

    Linking your instance to a VPC is sometimes referred to as *attaching* your instance.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = vpc.attach_classic_link_instance(
          DryRun=True|False,
          Groups=[
              'string',
          ],
          InstanceId='string',
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Groups: list
    :param Groups: **[REQUIRED]** 

      The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

      

    
      - *(string) --* 

      
  
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AttachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: attach_internet_gateway(**kwargs)

    

    Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the `Amazon Virtual Private Cloud User Guide <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/>`_ .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = vpc.attach_internet_gateway(
          DryRun=True|False,
          InternetGatewayId='string',
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayId: string
    :param InternetGatewayId: **[REQUIRED]** 

      The ID of the Internet gateway.

      

    
    
    :returns: None

  .. py:method:: create_network_acl(**kwargs)

    

    Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

     

    For more information about network ACLs, see `Network ACLs <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl>`_    


    **Request Syntax** 
    ::

      network_acl = vpc.create_network_acl(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.NetworkAcl`
    :returns: NetworkAcl resource
    

  .. py:method:: create_route_table(**kwargs)

    

    Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

     

    For more information about route tables, see `Route Tables <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable>`_    


    **Request Syntax** 
    ::

      route_table = vpc.create_route_table(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.RouteTable`
    :returns: RouteTable resource
    

  .. py:method:: create_security_group(**kwargs)

    

    Creates a security group.

     

    A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see `Amazon EC2 Security Groups <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html>`_ in the *Amazon Elastic Compute Cloud User Guide* and `Security Groups for Your VPC <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

     

    .. warning::

       

      EC2-Classic: You can have up to 500 security groups.

       

      EC2-VPC: You can create up to 500 security groups per VPC.

       

     

    When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

     

    You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

     

    You can add or remove rules from your security groups using  AuthorizeSecurityGroupIngress ,  AuthorizeSecurityGroupEgress ,  RevokeSecurityGroupIngress , and  RevokeSecurityGroupEgress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup>`_    


    **Request Syntax** 
    ::

      security_group = vpc.create_security_group(
          Description='string',
          GroupName='string',
          DryRun=True|False
      )
    :type Description: string
    :param Description: **[REQUIRED]** 

      A description for the security group. This is informational only.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type GroupName: string
    :param GroupName: **[REQUIRED]** 

      The name of the security group.

       

      Constraints: Up to 255 characters in length

       

      Constraints for EC2-Classic: ASCII characters

       

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.SecurityGroup`
    :returns: SecurityGroup resource
    

  .. py:method:: create_subnet(**kwargs)

    

    Creates a subnet in an existing VPC.

     

    When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).

     

    If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length. 

     

    .. warning::

       

      AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

       

     

    If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

     

    If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

     

    For more information about subnets, see `Your VPC and Subnets <http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html>`_ in the *Amazon Virtual Private Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet>`_    


    **Request Syntax** 
    ::

      subnet = vpc.create_subnet(
          AvailabilityZone='string',
          CidrBlock='string',
          Ipv6CidrBlock='string',
          DryRun=True|False
      )
    :type AvailabilityZone: string
    :param AvailabilityZone: 

      The Availability Zone for the subnet.

       

      Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.

      

    
    :type CidrBlock: string
    :param CidrBlock: **[REQUIRED]** 

      The IPv4 network range for the subnet, in CIDR notation. For example, ``10.0.0.0/24`` .

      

    
    :type Ipv6CidrBlock: string
    :param Ipv6CidrBlock: 

      The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: :py:class:`ec2.Subnet`
    :returns: Subnet resource
    

  .. py:method:: create_tags(**kwargs)

    

    Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

     

    For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_    


    **Request Syntax** 
    ::

      tag = vpc.create_tags(
          DryRun=True|False,
          Tags=[
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type Tags: list
    :param Tags: **[REQUIRED]** 

      One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

      

    
      - *(dict) --* 

        Describes a tag.

        

      
        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          

        
        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          

        
      
  
    
    :rtype: list(:py:class:`ec2.Tag`)
    :returns: A list of Tag resources
    

  .. py:method:: delete(**kwargs)

    

    Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc>`_    


    **Request Syntax** 
    ::

      response = vpc.delete(
          DryRun=True|False
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: describe_attribute(**kwargs)

    

    Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute>`_    


    **Request Syntax** 
    ::

      response = vpc.describe_attribute(
          Attribute='enableDnsSupport'|'enableDnsHostnames',
          DryRun=True|False
      )
    :type Attribute: string
    :param Attribute: **[REQUIRED]** 

      The VPC attribute.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcId': 'string',
            'EnableDnsHostnames': {
                'Value': True|False
            },
            'EnableDnsSupport': {
                'Value': True|False
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DescribeVpcAttribute.

        
        

        - **VpcId** *(string) --* 

          The ID of the VPC.

          
        

        - **EnableDnsHostnames** *(dict) --* 

          Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is ``true`` , instances in the VPC get DNS hostnames; otherwise, they do not.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
        

        - **EnableDnsSupport** *(dict) --* 

          Indicates whether DNS resolution is enabled for the VPC. If this attribute is ``true`` , the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

          
          

          - **Value** *(boolean) --* 

            The attribute value. The valid values are ``true`` or ``false`` .

            
      
    

  .. py:method:: detach_classic_link_instance(**kwargs)

    

    Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc>`_    


    **Request Syntax** 
    ::

      response = vpc.detach_classic_link_instance(
          DryRun=True|False,
          InstanceId='string',
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance to unlink from the VPC.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DetachClassicLinkVpc.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: detach_internet_gateway(**kwargs)

    

    Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway>`_    


    **Request Syntax** 
    ::

      response = vpc.detach_internet_gateway(
          DryRun=True|False,
          InternetGatewayId='string',
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type InternetGatewayId: string
    :param InternetGatewayId: **[REQUIRED]** 

      The ID of the Internet gateway.

      

    
    
    :returns: None

  .. py:method:: disable_classic_link(**kwargs)

    

    Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink>`_    


    **Request Syntax** 
    ::

      response = vpc.disable_classic_link(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DisableVpcClassicLink.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: enable_classic_link(**kwargs)

    

    Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC's route tables have existing routes for address ranges within the ``10.0.0.0/8`` IP address range, excluding local routes for VPCs in the ``10.0.0.0/16`` and ``10.1.0.0/16`` IP address ranges. For more information, see `ClassicLink <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink>`_    


    **Request Syntax** 
    ::

      response = vpc.enable_classic_link(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of EnableVpcClassicLink.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_vpcs` to update the attributes of the Vpc resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc.load()
    :returns: None

  .. py:method:: modify_attribute(**kwargs)

    

    Modifies the specified attribute of the specified VPC.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute>`_    


    **Request Syntax** 
    ::

      response = vpc.modify_attribute(
          EnableDnsHostnames={
              'Value': True|False
          },
          EnableDnsSupport={
              'Value': True|False
          },
          
      )
    :type EnableDnsHostnames: dict
    :param EnableDnsHostnames: 

      Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

       

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    :type EnableDnsSupport: dict
    :param EnableDnsSupport: 

      Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" will succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

       

      You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

      

    
      - **Value** *(boolean) --* 

        The attribute value. The valid values are ``true`` or ``false`` .

        

      
    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_vpcs` to update the attributes of the Vpc resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc.reload()
    :returns: None

  .. py:method:: request_vpc_peering_connection(**kwargs)

    

    Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.

     

    The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

     

    If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to ``failed`` .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      vpc_peering_connection = vpc.request_vpc_peering_connection(
          DryRun=True|False,
          PeerOwnerId='string',
          PeerVpcId='string',
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type PeerOwnerId: string
    :param PeerOwnerId: 

      The AWS account ID of the owner of the peer VPC.

       

      Default: Your AWS account ID

      

    
    :type PeerVpcId: string
    :param PeerVpcId: 

      The ID of the VPC with which you are creating the VPC peering connection.

      

    
    
    :rtype: :py:class:`ec2.VpcPeeringConnection`
    :returns: VpcPeeringConnection resource
    
  .. rst-class:: admonition-title
  
  Collections
  
  Collections provide an interface to iterate over and manipulate groups of resources. 
  For more information about collections refer to the :ref:`Resources Introduction Guide<guide_collections>`.
  

  .. py:attribute:: accepted_vpc_peering_connections

    A collection of VpcPeeringConnection resources

    .. py:method:: all()

      Creates an iterable of all VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.all()
        
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.filter(
            DryRun=True|False,
            VpcPeeringConnectionIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type VpcPeeringConnectionIds: list
      :param VpcPeeringConnectionIds: 

        One or more VPC peering connection IDs.

         

        Default: Describes all your VPC peering connections.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

  .. py:attribute:: instances

    A collection of Instance resources

    .. py:method:: all()

      Creates an iterable of all Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = vpc.instances.all()
        
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: create_tags(**kwargs)

      

      Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

       

      For more information about tags, see `Tagging Your Resources <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html>`_ in the *Amazon Elastic Compute Cloud User Guide* . For more information about creating IAM policies that control users' access to resources based on tags, see `Supported Resource-Level Permissions for Amazon EC2 API Actions <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.create_tags(
            DryRun=True|False,
            Tags=[
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Tags: list
      :param Tags: **[REQUIRED]** 

        One or more tags. The ``value`` parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. 

        

      
        - *(dict) --* 

          Describes a tag.

          

        
          - **Key** *(string) --* 

            The key of the tag.

             

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

            

          
          - **Value** *(string) --* 

            The value of the tag.

             

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

            

          
        
    
      
      :returns: None

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = vpc.instances.filter(
            InstanceIds=[
                'string',
            ],
            DryRun=True|False,
            MaxResults=123,
            NextToken='string'
        )
      :type InstanceIds: list
      :param InstanceIds: 

        One or more instance IDs.

         

        Default: Describes all your instances.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type MaxResults: integer
      :param MaxResults: 

        The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ``NextToken`` value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.

        

      
      :type NextToken: string
      :param NextToken: 

        The token to request the next page of results.

        

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Instance resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = vpc.instances.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: monitor(**kwargs)

      

      Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      To disable detailed monitoring, see .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.monitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of MonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances>`_      


      **Request Syntax** 
      ::

        instance_iterator = vpc.instances.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Instance`)
      :returns: A list of Instance resources
      

    .. py:method:: reboot(**kwargs)

      

      Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

       

      If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.

       

      For more information about troubleshooting, see `Getting Console Output and Rebooting Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.reboot(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :returns: None

    .. py:method:: start(**kwargs)

      

      Starts an Amazon EBS-backed AMI that you've previously stopped.

       

      Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Performing this operation on an instance that uses an instance store as its root device returns an error.

       

      For more information, see `Stopping Instances <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.start(
            AdditionalInfo='string',
            DryRun=True|False
        )
      :type AdditionalInfo: string
      :param AdditionalInfo: 

        Reserved.

        

      
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StartingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StartInstances.

          
          

          - **StartingInstances** *(list) --* 

            Information about one or more started instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: stop(**kwargs)

      

      Stops an Amazon EBS-backed instance.

       

      We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

       

      You can't start or stop Spot instances, and you can't stop instance store-backed instances.

       

      When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

       

      Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see `Troubleshooting Stopping Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.stop(
            DryRun=True|False,
            Force=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type Force: boolean
      :param Force: 

        Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

         

        Default: ``false``  

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'StoppingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of StopInstances.

          
          

          - **StoppingInstances** *(list) --* 

            Information about one or more stopped instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: terminate(**kwargs)

      

      Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. 

       

      If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

       

      Terminated instances remain visible after termination (for approximately one hour).

       

      By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

       

      You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the ``DeleteOnTermination`` block device mapping parameter set to ``true`` are automatically deleted. For more information about the differences between stopping and terminating instances, see `Instance Lifecycle <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

       

      For more information about troubleshooting, see `Troubleshooting Terminating Your Instance <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.terminate(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'TerminatingInstances': [
                  {
                      'CurrentState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      },
                      'InstanceId': 'string',
                      'PreviousState': {
                          'Code': 123,
                          'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of TerminateInstances.

          
          

          - **TerminatingInstances** *(list) --* 

            Information about one or more terminated instances.

            
            

            - *(dict) --* 

              Describes an instance state change.

              
              

              - **CurrentState** *(dict) --* 

                The current state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **PreviousState** *(dict) --* 

                The previous state of the instance.

                
                

                - **Code** *(integer) --* 

                  The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                   

                   
                  * ``0`` : ``pending``   
                   
                  * ``16`` : ``running``   
                   
                  * ``32`` : ``shutting-down``   
                   
                  * ``48`` : ``terminated``   
                   
                  * ``64`` : ``stopping``   
                   
                  * ``80`` : ``stopped``   
                   

                  
                

                - **Name** *(string) --* 

                  The current state of the instance.

                  
            
          
        
      

    .. py:method:: unmonitor(**kwargs)

      

      Disables detailed monitoring for a running instance. For more information, see `Monitoring Your Instances and Volumes <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

      

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances>`_      


      **Request Syntax** 
      ::

        response = vpc.instances.unmonitor(
            DryRun=True|False
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: dict
      :returns: 
        
        **Response Syntax** 

        
        ::

          {
              'InstanceMonitorings': [
                  {
                      'InstanceId': 'string',
                      'Monitoring': {
                          'State': 'disabled'|'disabling'|'enabled'|'pending'
                      }
                  },
              ]
          }
        **Response Structure** 

        

        - *(dict) --* 

          Contains the output of UnmonitorInstances.

          
          

          - **InstanceMonitorings** *(list) --* 

            The monitoring information.

            
            

            - *(dict) --* 

              Describes the monitoring of an instance.

              
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
              

              - **Monitoring** *(dict) --* 

                The monitoring for the instance.

                
                

                - **State** *(string) --* 

                  Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

                  
            
          
        
      

  .. py:attribute:: internet_gateways

    A collection of InternetGateway resources

    .. py:method:: all()

      Creates an iterable of all InternetGateway resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = vpc.internet_gateways.all()
        
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all InternetGateway resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = vpc.internet_gateways.filter(
            DryRun=True|False,
            InternetGatewayIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type InternetGatewayIds: list
      :param InternetGatewayIds: 

        One or more Internet gateway IDs.

         

        Default: Describes all your Internet gateways.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of InternetGateway resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = vpc.internet_gateways.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all InternetGateway resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways>`_      


      **Request Syntax** 
      ::

        internet_gateway_iterator = vpc.internet_gateways.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.InternetGateway`)
      :returns: A list of InternetGateway resources
      

  .. py:attribute:: network_acls

    A collection of NetworkAcl resources

    .. py:method:: all()

      Creates an iterable of all NetworkAcl resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = vpc.network_acls.all()
        
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all NetworkAcl resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = vpc.network_acls.filter(
            DryRun=True|False,
            NetworkAclIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type NetworkAclIds: list
      :param NetworkAclIds: 

        One or more network ACL IDs.

         

        Default: Describes all your network ACLs.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of NetworkAcl resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = vpc.network_acls.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all NetworkAcl resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls>`_      


      **Request Syntax** 
      ::

        network_acl_iterator = vpc.network_acls.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.NetworkAcl`)
      :returns: A list of NetworkAcl resources
      

  .. py:attribute:: network_interfaces

    A collection of NetworkInterface resources

    .. py:method:: all()

      Creates an iterable of all NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = vpc.network_interfaces.all()
        
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = vpc.network_interfaces.filter(
            DryRun=True|False,
            NetworkInterfaceIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type NetworkInterfaceIds: list
      :param NetworkInterfaceIds: 

        One or more network interface IDs.

         

        Default: Describes all your network interfaces.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = vpc.network_interfaces.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces>`_      


      **Request Syntax** 
      ::

        network_interface_iterator = vpc.network_interfaces.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.NetworkInterface`)
      :returns: A list of NetworkInterface resources
      

  .. py:attribute:: requested_vpc_peering_connections

    A collection of VpcPeeringConnection resources

    .. py:method:: all()

      Creates an iterable of all VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.all()
        
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.filter(
            DryRun=True|False,
            VpcPeeringConnectionIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type VpcPeeringConnectionIds: list
      :param VpcPeeringConnectionIds: 

        One or more VPC peering connection IDs.

         

        Default: Describes all your VPC peering connections.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_      


      **Request Syntax** 
      ::

        vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.VpcPeeringConnection`)
      :returns: A list of VpcPeeringConnection resources
      

  .. py:attribute:: route_tables

    A collection of RouteTable resources

    .. py:method:: all()

      Creates an iterable of all RouteTable resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = vpc.route_tables.all()
        
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all RouteTable resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = vpc.route_tables.filter(
            DryRun=True|False,
            RouteTableIds=[
                'string',
            ]
        )
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      :type RouteTableIds: list
      :param RouteTableIds: 

        One or more route table IDs.

         

        Default: Describes all your route tables.

        

      
        - *(string) --* 

        
    
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of RouteTable resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = vpc.route_tables.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all RouteTable resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables>`_      


      **Request Syntax** 
      ::

        route_table_iterator = vpc.route_tables.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.RouteTable`)
      :returns: A list of RouteTable resources
      

  .. py:attribute:: security_groups

    A collection of SecurityGroup resources

    .. py:method:: all()

      Creates an iterable of all SecurityGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = vpc.security_groups.all()
        
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all SecurityGroup resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = vpc.security_groups.filter(
            GroupIds=[
                'string',
            ],
            GroupNames=[
                'string',
            ],
            DryRun=True|False
        )
      :type GroupIds: list
      :param GroupIds: 

        One or more security group IDs. Required for security groups in a nondefault VPC.

         

        Default: Describes all your security groups.

        

      
        - *(string) --* 

        
    
      :type GroupNames: list
      :param GroupNames: 

        [EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the ``group-name`` filter to describe security groups by name.

         

        Default: Describes all your security groups.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of SecurityGroup resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = vpc.security_groups.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all SecurityGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups>`_      


      **Request Syntax** 
      ::

        security_group_iterator = vpc.security_groups.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.SecurityGroup`)
      :returns: A list of SecurityGroup resources
      

  .. py:attribute:: subnets

    A collection of Subnet resources

    .. py:method:: all()

      Creates an iterable of all Subnet resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = vpc.subnets.all()
        
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: filter(**kwargs)

      Creates an iterable of all Subnet resources in the collection filtered by kwargs passed to method.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = vpc.subnets.filter(
            SubnetIds=[
                'string',
            ],
            DryRun=True|False
        )
      :type SubnetIds: list
      :param SubnetIds: 

        One or more subnet IDs.

         

        Default: Describes all your subnets.

        

      
        - *(string) --* 

        
    
      :type DryRun: boolean
      :param DryRun: 

        Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

        

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: limit(**kwargs)

      Creates an iterable up to a specified amount of Subnet resources in the collection.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = vpc.subnets.limit(
            count=123
        )
      :type count: integer
      :param count: The limit to the number of resources in the iterable.

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      

    .. py:method:: page_size(**kwargs)

      Creates an iterable of all Subnet resources in the collection, but limits the number of items returned by each service call by the specified amount.

      See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets>`_      


      **Request Syntax** 
      ::

        subnet_iterator = vpc.subnets.page_size(
            count=123
        )
      :type count: integer
      :param count: The number of items returned by each service call

      
      
      :rtype: list(:py:class:`ec2.Subnet`)
      :returns: A list of Subnet resources
      
  .. rst-class:: admonition-title
  
  Waiters
  
  Waiters provide an interface to wait for a resource to reach a specific state.
  For more information about waiters refer to the :ref:`Resources Introduction Guide<waiters_intro>`.
  

  .. py:method:: wait_until_available(**kwargs)

    Waits until this Vpc is available. This method calls :py:meth:`EC2.Waiter.vpc_available.wait` which polls. :py:meth:`EC2.Client.describe_vpcs` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_    


    **Request Syntax** 
    ::

      vpc.wait_until_available(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
       
      * ``isDefault`` - Indicates whether the VPC is the default VPC. 
       
      * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :returns: None

  .. py:method:: wait_until_exists(**kwargs)

    Waits until this Vpc is exists. This method calls :py:meth:`EC2.Waiter.vpc_exists.wait` which polls. :py:meth:`EC2.Client.describe_vpcs` every 1 seconds until a successful state is reached. An error is returned after 5 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs>`_    


    **Request Syntax** 
    ::

      vpc.wait_until_exists(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``cidr`` - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, ``/28`` ). 
       
      * ``dhcp-options-id`` - The ID of a set of DHCP options. 
       
      * ``ipv6-cidr-block-association.ipv6-cidr-block`` - An IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.association-id`` - The association ID for an IPv6 CIDR block associated with the VPC. 
       
      * ``ipv6-cidr-block-association.state`` - The state of an IPv6 CIDR block associated with the VPC. 
       
      * ``isDefault`` - Indicates whether the VPC is the default VPC. 
       
      * ``state`` - The state of the VPC (``pending`` | ``available`` ). 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-id`` - The ID of the VPC. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :returns: None

====================
VpcPeeringConnection
====================



.. py:class:: EC2.VpcPeeringConnection(id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) VpcPeeringConnection::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    vpc_peering_connection = ec2.VpcPeeringConnection('id')

  :type id: string
  :param id: The VpcPeeringConnection's id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`accepter_vpc_info`

  
  *   :py:attr:`expiration_time`

  
  *   :py:attr:`requester_vpc_info`

  
  *   :py:attr:`status`

  
  *   :py:attr:`tags`

  
  *   :py:attr:`vpc_peering_connection_id`

  
  These are the resource's available references:
  
  *   :py:attr:`accepter_vpc`

  
  *   :py:attr:`requester_vpc`

  
  These are the resource's available actions:
  
  *   :py:meth:`accept()`

  
  *   :py:meth:`delete()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`reject()`

  
  *   :py:meth:`reload()`

  
  These are the resource's available waiters:
  
  *   :py:meth:`wait_until_exists()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: id

    *(string)* The VpcPeeringConnection's id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: accepter_vpc_info

    

    - *(dict) --* 

      Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

      
      

      - **CidrBlock** *(string) --* 

        The IPv4 CIDR block for the VPC.

        
      

      - **Ipv6CidrBlockSet** *(list) --* 

        The IPv6 CIDR block for the VPC.

        
        

        - *(dict) --* 

          Describes an IPv6 CIDR block.

          
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
      
    
      

      - **OwnerId** *(string) --* 

        The AWS account ID of the VPC owner.

        
      

      - **PeeringOptions** *(dict) --* 

        Information about the VPC peering connection options for the accepter or requester VPC.

        
        

        - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

          Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          
        

        - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

          Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          
        

        - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

          Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          
    
      

      - **VpcId** *(string) --* 

        The ID of the VPC.

        
  

  .. py:attribute:: expiration_time

    

    - *(datetime) --* 

      The time that an unaccepted VPC peering connection will expire.

      

  .. py:attribute:: requester_vpc_info

    

    - *(dict) --* 

      Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

      
      

      - **CidrBlock** *(string) --* 

        The IPv4 CIDR block for the VPC.

        
      

      - **Ipv6CidrBlockSet** *(list) --* 

        The IPv6 CIDR block for the VPC.

        
        

        - *(dict) --* 

          Describes an IPv6 CIDR block.

          
          

          - **Ipv6CidrBlock** *(string) --* 

            The IPv6 CIDR block.

            
      
    
      

      - **OwnerId** *(string) --* 

        The AWS account ID of the VPC owner.

        
      

      - **PeeringOptions** *(dict) --* 

        Information about the VPC peering connection options for the accepter or requester VPC.

        
        

        - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

          Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          
        

        - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

          Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          
        

        - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

          Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          
    
      

      - **VpcId** *(string) --* 

        The ID of the VPC.

        
  

  .. py:attribute:: status

    

    - *(dict) --* 

      The status of the VPC peering connection.

      
      

      - **Code** *(string) --* 

        The status of the VPC peering connection.

        
      

      - **Message** *(string) --* 

        A message that provides more information about the status, if applicable.

        
  

  .. py:attribute:: tags

    

    - *(list) --* 

      Any tags assigned to the resource.

      
      

      - *(dict) --* 

        Describes a tag.

        
        

        - **Key** *(string) --* 

          The key of the tag.

           

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

          
        

        - **Value** *(string) --* 

          The value of the tag.

           

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

          
    
  

  .. py:attribute:: vpc_peering_connection_id

    

    - *(string) --* 

      The ID of the VPC peering connection.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: accepter_vpc

    (:py:class:`Vpc`) The related accepter_vpc if set, otherwise ``None``.

  .. py:attribute:: requester_vpc

    (:py:class:`Vpc`) The related requester_vpc if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: accept(**kwargs)

    

    Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the ``pending-acceptance`` state, and you must be the owner of the peer VPC. Use  DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = vpc_peering_connection.accept(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VpcPeeringConnection': {
                'AccepterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'ExpirationTime': datetime(2015, 1, 1),
                'RequesterVpcInfo': {
                    'CidrBlock': 'string',
                    'Ipv6CidrBlockSet': [
                        {
                            'Ipv6CidrBlock': 'string'
                        },
                    ],
                    'OwnerId': 'string',
                    'PeeringOptions': {
                        'AllowDnsResolutionFromRemoteVpc': True|False,
                        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                    },
                    'VpcId': 'string'
                },
                'Status': {
                    'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                    'Message': 'string'
                },
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'VpcPeeringConnectionId': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AcceptVpcPeeringConnection.

        
        

        - **VpcPeeringConnection** *(dict) --* 

          Information about the VPC peering connection.

          
          

          - **AccepterVpcInfo** *(dict) --* 

            Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **ExpirationTime** *(datetime) --* 

            The time that an unaccepted VPC peering connection will expire.

            
          

          - **RequesterVpcInfo** *(dict) --* 

            Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

            
            

            - **CidrBlock** *(string) --* 

              The IPv4 CIDR block for the VPC.

              
            

            - **Ipv6CidrBlockSet** *(list) --* 

              The IPv6 CIDR block for the VPC.

              
              

              - *(dict) --* 

                Describes an IPv6 CIDR block.

                
                

                - **Ipv6CidrBlock** *(string) --* 

                  The IPv6 CIDR block.

                  
            
          
            

            - **OwnerId** *(string) --* 

              The AWS account ID of the VPC owner.

              
            

            - **PeeringOptions** *(dict) --* 

              Information about the VPC peering connection options for the accepter or requester VPC.

              
              

              - **AllowDnsResolutionFromRemoteVpc** *(boolean) --* 

                Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

                
              

              - **AllowEgressFromLocalClassicLinkToRemoteVpc** *(boolean) --* 

                Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

                
              

              - **AllowEgressFromLocalVpcToRemoteClassicLink** *(boolean) --* 

                Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

                
          
            

            - **VpcId** *(string) --* 

              The ID of the VPC.

              
        
          

          - **Status** *(dict) --* 

            The status of the VPC peering connection.

            
            

            - **Code** *(string) --* 

              The status of the VPC peering connection.

              
            

            - **Message** *(string) --* 

              A message that provides more information about the status, if applicable.

              
        
          

          - **Tags** *(list) --* 

            Any tags assigned to the resource.

            
            

            - *(dict) --* 

              Describes a tag.

              
              

              - **Key** *(string) --* 

                The key of the tag.

                 

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``  

                
              

              - **Value** *(string) --* 

                The value of the tag.

                 

                Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

                
          
        
          

          - **VpcPeeringConnectionId** *(string) --* 

            The ID of the VPC peering connection.

            
      
    

  .. py:method:: delete(**kwargs)

    

    Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the ``active`` state. The owner of the requester VPC can delete a VPC peering connection in the ``pending-acceptance`` state. 

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = vpc_peering_connection.delete(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of DeleteVpcPeeringConnection.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_vpc_peering_connections` to update the attributes of the VpcPeeringConnection resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc_peering_connection.load()
    :returns: None

  .. py:method:: reject(**kwargs)

    

    Rejects a VPC peering connection request. The VPC peering connection must be in the ``pending-acceptance`` state. Use the  DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use  DeleteVpcPeeringConnection .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection>`_    


    **Request Syntax** 
    ::

      response = vpc_peering_connection.reject(
          DryRun=True|False,
          
      )
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Return': True|False
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of RejectVpcPeeringConnection.

        
        

        - **Return** *(boolean) --* 

          Returns ``true`` if the request succeeds; otherwise, it returns an error.

          
    

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_vpc_peering_connections` to update the attributes of the VpcPeeringConnection resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc_peering_connection.reload()
    :returns: None
  .. rst-class:: admonition-title
  
  Waiters
  
  Waiters provide an interface to wait for a resource to reach a specific state.
  For more information about waiters refer to the :ref:`Resources Introduction Guide<waiters_intro>`.
  

  .. py:method:: wait_until_exists(**kwargs)

    Waits until this VpcPeeringConnection is exists. This method calls :py:meth:`EC2.Waiter.vpc_peering_connection_exists.wait` which polls. :py:meth:`EC2.Client.describe_vpc_peering_connections` every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections>`_    


    **Request Syntax** 
    ::

      vpc_peering_connection.wait_until_exists(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          DryRun=True|False,
          
      )
    :type Filters: list
    :param Filters: 

      One or more filters.

       

       
      * ``accepter-vpc-info.cidr-block`` - The IPv4 CIDR block of the peer VPC. 
       
      * ``accepter-vpc-info.owner-id`` - The AWS account ID of the owner of the peer VPC. 
       
      * ``accepter-vpc-info.vpc-id`` - The ID of the peer VPC. 
       
      * ``expiration-time`` - The expiration date and time for the VPC peering connection. 
       
      * ``requester-vpc-info.cidr-block`` - The IPv4 CIDR block of the requester's VPC. 
       
      * ``requester-vpc-info.owner-id`` - The AWS account ID of the owner of the requester VPC. 
       
      * ``requester-vpc-info.vpc-id`` - The ID of the requester VPC. 
       
      * ``status-code`` - The status of the VPC peering connection (``pending-acceptance`` | ``failed`` | ``expired`` | ``provisioning`` | ``active`` | ``deleted`` | ``rejected`` ). 
       
      * ``status-message`` - A message that provides more information about the status of the VPC peering connection, if applicable. 
       
      * ``tag`` :*key* =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify ``tag:Purpose`` for the filter name and ``X`` for the filter value. 
       
      * ``tag-key`` - The key of a tag assigned to the resource. This filter is independent of the ``tag-value`` filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the ``tag`` :*key* =*value* filter. 
       
      * ``tag-value`` - The value of a tag assigned to the resource. This filter is independent of the ``tag-key`` filter. 
       
      * ``vpc-peering-connection-id`` - The ID of the VPC peering connection. 
       

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          One or more filter values. Filter values are case-sensitive.

          

        
          - *(string) --* 

          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :returns: None

==========
VpcAddress
==========



.. py:class:: EC2.VpcAddress(allocation_id)

  A resource representing an Amazon Elastic Compute Cloud (EC2) VpcAddress::

    
    import boto3
    
    ec2 = boto3.resource('ec2')
    vpc_address = ec2.VpcAddress('allocation_id')

  :type allocation_id: string
  :param allocation_id: The VpcAddress's allocation_id identifier. This **must** be set.
  
  These are the resource's available identifiers:
  
  *   :py:attr:`allocation_id`

  
  These are the resource's available attributes:
  
  *   :py:attr:`association_id`

  
  *   :py:attr:`domain`

  
  *   :py:attr:`instance_id`

  
  *   :py:attr:`network_interface_id`

  
  *   :py:attr:`network_interface_owner_id`

  
  *   :py:attr:`private_ip_address`

  
  *   :py:attr:`public_ip`

  
  These are the resource's available references:
  
  *   :py:attr:`association`

  
  These are the resource's available actions:
  
  *   :py:meth:`associate()`

  
  *   :py:meth:`get_available_subresources()`

  
  *   :py:meth:`load()`

  
  *   :py:meth:`release()`

  
  *   :py:meth:`reload()`

  
  .. rst-class:: admonition-title
  
  Identifiers
  
  Identifiers are properties of a resource that are set upon instantation of the resource.
  For more information about identifiers refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: allocation_id

    *(string)* The VpcAddress's allocation_id identifier. This **must** be set.
  .. rst-class:: admonition-title
  
  Attributes
  
  Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.
  For more information about attributes refer to the :ref:`Resources Introduction Guide<identifiers_attributes_intro>`.
  

  .. py:attribute:: association_id

    

    - *(string) --* 

      The ID representing the association of the address with an instance in a VPC.

      

  .. py:attribute:: domain

    

    - *(string) --* 

      Indicates whether this Elastic IP address is for use with instances in EC2-Classic (``standard`` ) or instances in a VPC (``vpc`` ).

      

  .. py:attribute:: instance_id

    

    - *(string) --* 

      The ID of the instance that the address is associated with (if any).

      

  .. py:attribute:: network_interface_id

    

    - *(string) --* 

      The ID of the network interface.

      

  .. py:attribute:: network_interface_owner_id

    

    - *(string) --* 

      The ID of the AWS account that owns the network interface.

      

  .. py:attribute:: private_ip_address

    

    - *(string) --* 

      The private IP address associated with the Elastic IP address.

      

  .. py:attribute:: public_ip

    

    - *(string) --* 

      The Elastic IP address.

      
  .. rst-class:: admonition-title
  
  References
  
  References are related resource instances that have a belongs-to relationship.
  For more information about references refer to the :ref:`Resources Introduction Guide<references_intro>`.
  

  .. py:attribute:: association

    (:py:class:`NetworkInterfaceAssociation`) The related association if set, otherwise ``None``.
  .. rst-class:: admonition-title
  
  Actions
  
  Actions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.
  For more information about actions refer to the :ref:`Resources Introduction Guide<actions_intro>`.
  

  .. py:method:: associate(**kwargs)

    

    Associates an Elastic IP address with an instance or a network interface.

     

    An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see `Elastic IP Addresses <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`_ in the *Amazon Elastic Compute Cloud User Guide* .

     

    [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

     

    [VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

     

    .. warning::

       

      This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the *Elastic IP Addresses* section of `Amazon EC2 Pricing <http://aws.amazon.com/ec2/pricing/>`_ .

       

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress>`_    


    **Request Syntax** 
    ::

      response = vpc_address.associate(
          InstanceId='string',
          PublicIp='string',
          AllowReassociation=True|False,
          DryRun=True|False,
          NetworkInterfaceId='string',
          PrivateIpAddress='string'
      )
    :type InstanceId: string
    :param InstanceId: 

      The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

      

    
    :type PublicIp: string
    :param PublicIp: 

      The Elastic IP address. This is required for EC2-Classic.

      

    
    :type AllowReassociation: boolean
    :param AllowReassociation: 

      [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    :type NetworkInterfaceId: string
    :param NetworkInterfaceId: 

      [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

      

    
    :type PrivateIpAddress: string
    :param PrivateIpAddress: 

      [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'AssociationId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Contains the output of AssociateAddress.

        
        

        - **AssociationId** *(string) --* 

          [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

          
    

  .. py:method:: get_available_subresources()

        
    Returns a list of all the available sub-resources for this
    Resource.
    
    :returns: A list containing the name of each sub-resource for this
        resource
    :rtype: list of str


  .. py:method:: load()

    Calls :py:meth:`EC2.Client.describe_addresses` to update the attributes of the VpcAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc_address.load()
    :returns: None

  .. py:method:: release(**kwargs)

    

    Releases the specified Elastic IP address.

     

    [EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use  DisassociateAddress .

     

    [Nondefault VPC] You must use  DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (``InvalidIPAddress.InUse`` ).

     

    After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an ``AuthFailure`` error if the address is already allocated to another AWS account.

     

    [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see  AllocateAddress .

    

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress>`_    


    **Request Syntax** 
    ::

      response = vpc_address.release(
          PublicIp='string',
          DryRun=True|False
      )
    :type PublicIp: string
    :param PublicIp: 

      [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

      

    
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation`` . Otherwise, it is ``UnauthorizedOperation`` .

      

    
    
    :returns: None

  .. py:method:: reload()

    Calls :py:meth:`EC2.Client.describe_addresses` to update the attributes of the VpcAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/None>`_    


    **Request Syntax** 

    ::

      vpc_address.reload()
    :returns: None