:doc:`ResilienceHub <../../resiliencehub>` / Client / update_resiliency_policy

************************
update_resiliency_policy
************************



.. py:method:: ResilienceHub.Client.update_resiliency_policy(**kwargs)

  

  Updates a resiliency policy.

   

  .. note::

    

    Resilience Hub allows you to provide a value of zero for ``rtoInSecs`` and ``rpoInSecs`` of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for ``rtoInSecs`` and ``rpoInSecs``, the estimated workload RTO and estimated workload RPO result will be near zero and the **Compliance status** for your application will be set to **Policy breached**.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/resiliencehub-2020-04-30/UpdateResiliencyPolicy>`_  


  **Request Syntax**
  ::

    response = client.update_resiliency_policy(
        dataLocationConstraint='AnyLocation'|'SameContinent'|'SameCountry',
        policy={
            'string': {
                'rpoInSecs': 123,
                'rtoInSecs': 123
            }
        },
        policyArn='string',
        policyDescription='string',
        policyName='string',
        tier='MissionCritical'|'Critical'|'Important'|'CoreServices'|'NonCritical'|'NotApplicable'
    )
    
  :type dataLocationConstraint: string
  :param dataLocationConstraint: 

    Specifies a high-level geographical location constraint for where your resilience policy data can be stored.

    

  
  :type policy: dict
  :param policy: 

    Resiliency policy to be created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        Defines a failure policy.

        

      
        - **rpoInSecs** *(integer) --* **[REQUIRED]** 

          Recovery Point Objective (RPO) in seconds.

          

        
        - **rtoInSecs** *(integer) --* **[REQUIRED]** 

          Recovery Time Objective (RTO) in seconds.

          

        
      


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

    Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:resiliency-policy/ ``policy-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

    

  
  :type policyDescription: string
  :param policyDescription: 

    Description of the resiliency policy.

    

  
  :type policyName: string
  :param policyName: 

    Name of the resiliency policy.

    

  
  :type tier: string
  :param tier: 

    The tier for this resiliency policy, ranging from the highest severity ( ``MissionCritical``) to lowest ( ``NonCritical``).

    

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

    
    ::

      {
          'policy': {
              'creationTime': datetime(2015, 1, 1),
              'dataLocationConstraint': 'AnyLocation'|'SameContinent'|'SameCountry',
              'estimatedCostTier': 'L1'|'L2'|'L3'|'L4',
              'policy': {
                  'string': {
                      'rpoInSecs': 123,
                      'rtoInSecs': 123
                  }
              },
              'policyArn': 'string',
              'policyDescription': 'string',
              'policyName': 'string',
              'tags': {
                  'string': 'string'
              },
              'tier': 'MissionCritical'|'Critical'|'Important'|'CoreServices'|'NonCritical'|'NotApplicable'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **policy** *(dict) --* 

        The resiliency policy that was updated, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.

        
        

        - **creationTime** *(datetime) --* 

          Date and time when the resiliency policy was created.

          
        

        - **dataLocationConstraint** *(string) --* 

          Specifies a high-level geographical location constraint for where your resilience policy data can be stored.

          
        

        - **estimatedCostTier** *(string) --* 

          Specifies the estimated cost tier of the resiliency policy.

          
        

        - **policy** *(dict) --* 

          The resiliency policy.

          
          

          - *(string) --* 
            

            - *(dict) --* 

              Defines a failure policy.

              
              

              - **rpoInSecs** *(integer) --* 

                Recovery Point Objective (RPO) in seconds.

                
              

              - **rtoInSecs** *(integer) --* 

                Recovery Time Objective (RTO) in seconds.

                
          
      
    
        

        - **policyArn** *(string) --* 

          Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn: ``partition``:resiliencehub: ``region``: ``account``:resiliency-policy/ ``policy-id``. For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference* guide.

          
        

        - **policyDescription** *(string) --* 

          Description of the resiliency policy.

          
        

        - **policyName** *(string) --* 

          The name of the policy

          
        

        - **tags** *(dict) --* 

          Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **tier** *(string) --* 

          The tier for this resiliency policy, ranging from the highest severity ( ``MissionCritical``) to lowest ( ``NonCritical``).

          
    
  
  **Exceptions**
  
  *   :py:class:`ResilienceHub.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`ResilienceHub.Client.exceptions.ConflictException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ThrottlingException`

  
  *   :py:class:`ResilienceHub.Client.exceptions.ValidationException`

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

  