:doc:`WorkSpaces <../../workspaces>` / Client / modify_workspace_state

**********************
modify_workspace_state
**********************



.. py:method:: WorkSpaces.Client.modify_workspace_state(**kwargs)

  

  Sets the state of the specified WorkSpace.

   

  To maintain a WorkSpace without being interrupted, set the WorkSpace state to ``ADMIN_MAINTENANCE``. WorkSpaces in this state do not respond to requests to reboot, stop, start, rebuild, or restore. An AutoStop WorkSpace in this state is not stopped. Users cannot log into a WorkSpace in the ``ADMIN_MAINTENANCE`` state.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState>`_  


  **Request Syntax**
  ::

    response = client.modify_workspace_state(
        WorkspaceId='string',
        WorkspaceState='AVAILABLE'|'ADMIN_MAINTENANCE'
    )
    
  :type WorkspaceId: string
  :param WorkspaceId: **[REQUIRED]** 

    The identifier of the WorkSpace.

    

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

    The WorkSpace state.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.InvalidParameterValuesException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.InvalidResourceStateException`

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

  
  *   :py:class:`WorkSpaces.Client.exceptions.OperationNotSupportedException`

  