:doc:`ControlTower <../../controltower>` / Client / get_control_operation

*********************
get_control_operation
*********************



.. py:method:: ControlTower.Client.get_control_operation(**kwargs)

  

  Returns the status of a particular ``EnableControl`` or ``DisableControl`` operation. Displays a message in case of error. Details for an operation are available for 90 days. For usage examples, see the `Controls Reference Guide <https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/controltower-2018-05-10/GetControlOperation>`_  


  **Request Syntax**
  ::

    response = client.get_control_operation(
        operationIdentifier='string'
    )
    
  :type operationIdentifier: string
  :param operationIdentifier: **[REQUIRED]** 

    The ID of the asynchronous operation, which is used to track status. The operation is available for 90 days.

    

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

    
    ::

      {
          'controlOperation': {
              'operationType': 'ENABLE_CONTROL'|'DISABLE_CONTROL'|'UPDATE_ENABLED_CONTROL'|'RESET_ENABLED_CONTROL',
              'startTime': datetime(2015, 1, 1),
              'endTime': datetime(2015, 1, 1),
              'status': 'SUCCEEDED'|'FAILED'|'IN_PROGRESS',
              'statusMessage': 'string',
              'operationIdentifier': 'string',
              'controlIdentifier': 'string',
              'targetIdentifier': 'string',
              'enabledControlIdentifier': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **controlOperation** *(dict) --* 

        An operation performed by the control.

        
        

        - **operationType** *(string) --* 

          One of ``ENABLE_CONTROL`` or ``DISABLE_CONTROL``.

          
        

        - **startTime** *(datetime) --* 

          The time that the operation began.

          
        

        - **endTime** *(datetime) --* 

          The time that the operation finished.

          
        

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

          One of ``IN_PROGRESS``, ``SUCEEDED``, or ``FAILED``.

          
        

        - **statusMessage** *(string) --* 

          If the operation result is ``FAILED``, this string contains a message explaining why the operation failed.

          
        

        - **operationIdentifier** *(string) --* 

          The identifier of the specified operation.

          
        

        - **controlIdentifier** *(string) --* 

          The ``controlIdentifier`` of the control for the operation.

          
        

        - **targetIdentifier** *(string) --* 

          The target upon which the control operation is working.

          
        

        - **enabledControlIdentifier** *(string) --* 

          The ``controlIdentifier`` of the enabled control.

          
    
  
  **Exceptions**
  
  *   :py:class:`ControlTower.Client.exceptions.ValidationException`

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

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

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

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

  