:doc:`DocDBElastic <../../docdb-elastic>` / Client / apply_pending_maintenance_action

********************************
apply_pending_maintenance_action
********************************



.. py:method:: DocDBElastic.Client.apply_pending_maintenance_action(**kwargs)

  

  The type of pending maintenance action to be applied to the resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/docdb-elastic-2022-11-28/ApplyPendingMaintenanceAction>`_  


  **Request Syntax**
  ::

    response = client.apply_pending_maintenance_action(
        applyAction='string',
        applyOn='string',
        optInType='IMMEDIATE'|'NEXT_MAINTENANCE'|'APPLY_ON'|'UNDO_OPT_IN',
        resourceArn='string'
    )
    
  :type applyAction: string
  :param applyAction: **[REQUIRED]** 

    The pending maintenance action to apply to the resource.

     

    Valid actions are:

     

    
    * ``ENGINE_UPDATE``
     
    * ``ENGINE_UPGRADE``
     
    * ``SECURITY_UPDATE``
     
    * ``OS_UPDATE``
     
    * ``MASTER_USER_PASSWORD_UPDATE``
    

    

  
  :type applyOn: string
  :param applyOn: 

    A specific date to apply the pending maintenance action. Required if opt-in-type is ``APPLY_ON``. Format: ``yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm``

    

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

    A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type ``IMMEDIATE`` can't be undone.

    

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

    The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.

    

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

    
    ::

      {
          'resourcePendingMaintenanceAction': {
              'pendingMaintenanceActionDetails': [
                  {
                      'action': 'string',
                      'autoAppliedAfterDate': 'string',
                      'currentApplyDate': 'string',
                      'description': 'string',
                      'forcedApplyDate': 'string',
                      'optInStatus': 'string'
                  },
              ],
              'resourceArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **resourcePendingMaintenanceAction** *(dict) --* 

        The output of the pending maintenance action being applied.

        
        

        - **pendingMaintenanceActionDetails** *(list) --* 

          Provides information about a pending maintenance action for a resource.

          
          

          - *(dict) --* 

            Retrieves the details of maintenance actions that are pending.

            
            

            - **action** *(string) --* 

              Displays the specific action of a pending maintenance action.

              
            

            - **autoAppliedAfterDate** *(string) --* 

              Displays the date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date. If this date is specified, any ``NEXT_MAINTENANCE`` ``optInType`` requests are ignored.

              
            

            - **currentApplyDate** *(string) --* 

              Displays the effective date when the pending maintenance action is applied to the resource.

              
            

            - **description** *(string) --* 

              Displays a description providing more detail about the maintenance action.

              
            

            - **forcedApplyDate** *(string) --* 

              Displays the date when the maintenance action is automatically applied. The maintenance action is applied to the resource on this date regardless of the maintenance window for the resource. If this date is specified, any ``IMMEDIATE`` ``optInType`` requests are ignored.

              
            

            - **optInStatus** *(string) --* 

              Displays the type of ``optInType`` request that has been received for the resource.

              
        
      
        

        - **resourceArn** *(string) --* 

          The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.

          
    
  
  **Exceptions**
  
  *   :py:class:`DocDBElastic.Client.exceptions.ThrottlingException`

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

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

  
  *   :py:class:`DocDBElastic.Client.exceptions.InternalServerException`

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

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

  