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

*******************************
associate_workspace_application
*******************************



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

  

  Associates the specified application to the specified WorkSpace.

  

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


  **Request Syntax**
  ::

    response = client.associate_workspace_application(
        WorkspaceId='string',
        ApplicationId='string'
    )
    
  :type WorkspaceId: string
  :param WorkspaceId: **[REQUIRED]** 

    The identifier of the WorkSpace.

    

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

    The identifier of the application.

    

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

    
    ::

      {
          'Association': {
              'AssociatedResourceId': 'string',
              'AssociatedResourceType': 'APPLICATION',
              'Created': datetime(2015, 1, 1),
              'LastUpdatedTime': datetime(2015, 1, 1),
              'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
              'StateReason': {
                  'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                  'ErrorMessage': 'string'
              },
              'WorkspaceId': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Association** *(dict) --* 

        Information about the association between the specified WorkSpace and the specified application.

        
        

        - **AssociatedResourceId** *(string) --* 

          The identifier of the associated resource.

          
        

        - **AssociatedResourceType** *(string) --* 

          The resource types of the associated resource.

          
        

        - **Created** *(datetime) --* 

          The time the association is created.

          
        

        - **LastUpdatedTime** *(datetime) --* 

          The time the association status was last updated.

          
        

        - **State** *(string) --* 

          The status of the WorkSpace resource association.

          
        

        - **StateReason** *(dict) --* 

          The reason the association deployment failed.

          
          

          - **ErrorCode** *(string) --* 

            The error code of the association deployment failure.

            
          

          - **ErrorMessage** *(string) --* 

            The error message of the association deployment failure.

            
      
        

        - **WorkspaceId** *(string) --* 

          The identifier of the WorkSpace.

          
    
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.AccessDeniedException`

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

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

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

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

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

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

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

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

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

  