:doc:`Lightsail <../../lightsail>` / Client / get_auto_snapshots

******************
get_auto_snapshots
******************



.. py:method:: Lightsail.Client.get_auto_snapshots(**kwargs)

  

  Returns the available automatic snapshots for an instance or disk. For more information, see the `Amazon Lightsail Developer Guide <https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-automatic-snapshots>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetAutoSnapshots>`_  


  **Request Syntax**
  ::

    response = client.get_auto_snapshots(
        resourceName='string'
    )
    
  :type resourceName: string
  :param resourceName: **[REQUIRED]** 

    The name of the source instance or disk from which to get automatic snapshot information.

    

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

    
    ::

      {
          'resourceName': 'string',
          'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
          'autoSnapshots': [
              {
                  'date': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'status': 'Success'|'Failed'|'InProgress'|'NotFound',
                  'fromAttachedDisks': [
                      {
                          'path': 'string',
                          'sizeInGb': 123
                      },
                  ]
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **resourceName** *(string) --* 

        The name of the source instance or disk for the automatic snapshots.

        
      

      - **resourceType** *(string) --* 

        The resource type of the automatic snapshot. The possible values are ``Instance``, and ``Disk``.

        
      

      - **autoSnapshots** *(list) --* 

        An array of objects that describe the automatic snapshots that are available for the specified source instance or disk.

        
        

        - *(dict) --* 

          Describes an automatic snapshot.

          
          

          - **date** *(string) --* 

            The date of the automatic snapshot in ``YYYY-MM-DD`` format.

            
          

          - **createdAt** *(datetime) --* 

            The timestamp when the automatic snapshot was created.

            
          

          - **status** *(string) --* 

            The status of the automatic snapshot.

            
          

          - **fromAttachedDisks** *(list) --* 

            An array of objects that describe the block storage disks attached to the instance when the automatic snapshot was created.

            
            

            - *(dict) --* 

              Describes a block storage disk that is attached to an instance, and is included in an automatic snapshot.

              
              

              - **path** *(string) --* 

                The path of the disk ( ``/dev/xvdf``).

                
              

              - **sizeInGb** *(integer) --* 

                The size of the disk in GB.

                
          
        
      
    
  
  **Exceptions**
  
  *   :py:class:`Lightsail.Client.exceptions.ServiceException`

  
  *   :py:class:`Lightsail.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Lightsail.Client.exceptions.NotFoundException`

  
  *   :py:class:`Lightsail.Client.exceptions.OperationFailureException`

  
  *   :py:class:`Lightsail.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Lightsail.Client.exceptions.UnauthenticatedException`

  
  *   :py:class:`Lightsail.Client.exceptions.RegionSetupInProgressException`

  