:doc:`StorageGateway <../../storagegateway>` / Client / update_snapshot_schedule

************************
update_snapshot_schedule
************************



.. py:method:: StorageGateway.Client.update_snapshot_schedule(**kwargs)

  

  Updates a snapshot schedule configured for a gateway volume. This operation is only supported in the cached volume and stored volume gateway types.

   

  The default snapshot schedule for volume is once every 24 hours, starting at the creation time of the volume. You can use this API to change the snapshot schedule configured for the volume.

   

  In the request you must identify the gateway volume whose snapshot schedule you want to update, and the schedule information, including when you want the snapshot to begin on a day and the frequency (in hours) of snapshots.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule>`_  


  **Request Syntax**
  ::

    response = client.update_snapshot_schedule(
        VolumeARN='string',
        StartAt=123,
        RecurrenceInHours=123,
        Description='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type VolumeARN: string
  :param VolumeARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the volume. Use the  ListVolumes operation to return a list of gateway volumes.

    

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

    The hour of the day at which the snapshot schedule begins represented as *hh*, where *hh* is the hour (0 to 23). The hour of the day is in the time zone of the gateway.

    

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

    Frequency of snapshots. Specify the number of hours between snapshots.

    

  
  :type Description: string
  :param Description: 

    Optional description of the snapshot that overwrites the existing description.

    

  
  :type Tags: list
  :param Tags: 

    A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value pair.

     

    .. note::

      

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

      

    

  
    - *(dict) --* 

      A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /.

      

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

        Tag key. The key can't start with aws:.

        

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

        Value of the tag key.

        

      
    

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

    
    ::

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

    

    - *(dict) --* 

      A JSON object containing the Amazon Resource Name (ARN) of the updated storage volume.

      
      

      - **VolumeARN** *(string) --* 

        The Amazon Resource Name (ARN) of the volume. Use the  ListVolumes operation to return a list of gateway volumes.

        
  
  **Exceptions**
  
  *   :py:class:`StorageGateway.Client.exceptions.InvalidGatewayRequestException`

  
  *   :py:class:`StorageGateway.Client.exceptions.InternalServerError`

  

  **Examples**

  Updates a snapshot schedule configured for a gateway volume.
  ::

    response = client.update_snapshot_schedule(
        Description='Hourly snapshot',
        RecurrenceInHours=1,
        StartAt=0,
        VolumeARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'VolumeARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  