:doc:`Backup <../../backup>` / Client / update_restore_testing_selection

********************************
update_restore_testing_selection
********************************



.. py:method:: Backup.Client.update_restore_testing_selection(**kwargs)

  

  Updates the specified restore testing selection.

   

  Most elements except the ``RestoreTestingSelectionName`` can be updated with this request.

   

  You can use either protected resource ARNs or conditions, but not both.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRestoreTestingSelection>`_  


  **Request Syntax**
  ::

    response = client.update_restore_testing_selection(
        RestoreTestingPlanName='string',
        RestoreTestingSelection={
            'IamRoleArn': 'string',
            'ProtectedResourceArns': [
                'string',
            ],
            'ProtectedResourceConditions': {
                'StringEquals': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'StringNotEquals': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
            'RestoreMetadataOverrides': {
                'string': 'string'
            },
            'ValidationWindowHours': 123
        },
        RestoreTestingSelectionName='string'
    )
    
  :type RestoreTestingPlanName: string
  :param RestoreTestingPlanName: **[REQUIRED]** 

    The restore testing plan name is required to update the indicated testing plan.

    

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

    To update your restore testing selection, you can use either protected resource ARNs or conditions, but not both. That is, if your selection has ``ProtectedResourceArns``, requesting an update with the parameter ``ProtectedResourceConditions`` will be unsuccessful.

    

  
    - **IamRoleArn** *(string) --* 

      The Amazon Resource Name (ARN) of the IAM role that Backup uses to create the target resource; for example: ``arn:aws:iam::123456789012:role/S3Access``.

      

    
    - **ProtectedResourceArns** *(list) --* 

      You can include a list of specific ARNs, such as ``ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."]`` or you can include a wildcard: ``ProtectedResourceArns: ["*"]``, but not both.

      

    
      - *(string) --* 

      
  
    - **ProtectedResourceConditions** *(dict) --* 

      The conditions that you define for resources in your restore testing plan using tags.

      

    
      - **StringEquals** *(list) --* 

        Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."

        

      
        - *(dict) --* 

          Pair of two related strings. Allowed characters are letters, white space, and numbers that can be represented in UTF-8 and the following characters: ``+ - = . _ : /``

          

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

            The tag key (String). The key can't start with ``aws:``.

             

            Length Constraints: Minimum length of 1. Maximum length of 128.

             

            Pattern: ``^(?![aA]{1}[wW]{1}[sS]{1}:)([\p{L}\p{Z}\p{N}_.:/=+\-@]+)$``

            

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

            The value of the key.

             

            Length Constraints: Maximum length of 256.

             

            Pattern: ``^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$``

            

          
        
    
      - **StringNotEquals** *(list) --* 

        Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."

        

      
        - *(dict) --* 

          Pair of two related strings. Allowed characters are letters, white space, and numbers that can be represented in UTF-8 and the following characters: ``+ - = . _ : /``

          

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

            The tag key (String). The key can't start with ``aws:``.

             

            Length Constraints: Minimum length of 1. Maximum length of 128.

             

            Pattern: ``^(?![aA]{1}[wW]{1}[sS]{1}:)([\p{L}\p{Z}\p{N}_.:/=+\-@]+)$``

            

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

            The value of the key.

             

            Length Constraints: Maximum length of 256.

             

            Pattern: ``^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$``

            

          
        
    
    
    - **RestoreMetadataOverrides** *(dict) --* 

      You can override certain restore metadata keys by including the parameter ``RestoreMetadataOverrides`` in the body of ``RestoreTestingSelection``. Key values are not case sensitive.

       

      See the complete list of `restore testing inferred metadata <https://docs.aws.amazon.com/aws-backup/latest/devguide/restore-testing-inferred-metadata.html>`__.

      

    
      - *(string) --* 

      
        - *(string) --* 

        
  

    - **ValidationWindowHours** *(integer) --* 

      This value represents the time, in hours, data is retained after a restore test so that optional validation can be completed.

       

      Accepted value is an integer between 0 and 168 (the hourly equivalent of seven days).

      

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

    The required restore testing selection name of the restore testing selection you wish to update.

    

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

    
    ::

      {
          'CreationTime': datetime(2015, 1, 1),
          'RestoreTestingPlanArn': 'string',
          'RestoreTestingPlanName': 'string',
          'RestoreTestingSelectionName': 'string',
          'UpdateTime': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CreationTime** *(datetime) --* 

        The time the resource testing selection was updated successfully.

        
      

      - **RestoreTestingPlanArn** *(string) --* 

        Unique string that is the name of the restore testing plan.

        
      

      - **RestoreTestingPlanName** *(string) --* 

        The restore testing plan with which the updated restore testing selection is associated.

        
      

      - **RestoreTestingSelectionName** *(string) --* 

        The returned restore testing selection name.

        
      

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

        The time the update completed for the restore testing selection.

        
  
  **Exceptions**
  
  *   :py:class:`Backup.Client.exceptions.ConflictException`

  
  *   :py:class:`Backup.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`Backup.Client.exceptions.MissingParameterValueException`

  
  *   :py:class:`Backup.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Backup.Client.exceptions.ServiceUnavailableException`

  