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

*************************
create_standby_workspaces
*************************



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

  

  Creates a standby WorkSpace in a secondary Region.

  

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


  **Request Syntax**
  ::

    response = client.create_standby_workspaces(
        PrimaryRegion='string',
        StandbyWorkspaces=[
            {
                'PrimaryWorkspaceId': 'string',
                'VolumeEncryptionKey': 'string',
                'DirectoryId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'DataReplication': 'NO_REPLICATION'|'PRIMARY_AS_SOURCE'
            },
        ]
    )
    
  :type PrimaryRegion: string
  :param PrimaryRegion: **[REQUIRED]** 

    The Region of the primary WorkSpace.

    

  
  :type StandbyWorkspaces: list
  :param StandbyWorkspaces: **[REQUIRED]** 

    Information about the standby WorkSpace to be created.

    

  
    - *(dict) --* 

      Describes a standby WorkSpace.

      

    
      - **PrimaryWorkspaceId** *(string) --* **[REQUIRED]** 

        The identifier of the standby WorkSpace.

        

      
      - **VolumeEncryptionKey** *(string) --* 

        The volume encryption key of the standby WorkSpace.

        

      
      - **DirectoryId** *(string) --* **[REQUIRED]** 

        The identifier of the directory for the standby WorkSpace.

        

      
      - **Tags** *(list) --* 

        The tags associated with the standby WorkSpace.

        

      
        - *(dict) --* 

          Describes a tag.

          

        
          - **Key** *(string) --* **[REQUIRED]** 

            The key of the tag.

            

          
          - **Value** *(string) --* 

            The value of the tag.

            

          
        
    
      - **DataReplication** *(string) --* 

        Indicates whether data replication is enabled, and if enabled, the type of data replication.

        

      
    

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

    
    ::

      {
          'FailedStandbyRequests': [
              {
                  'StandbyWorkspaceRequest': {
                      'PrimaryWorkspaceId': 'string',
                      'VolumeEncryptionKey': 'string',
                      'DirectoryId': 'string',
                      'Tags': [
                          {
                              'Key': 'string',
                              'Value': 'string'
                          },
                      ],
                      'DataReplication': 'NO_REPLICATION'|'PRIMARY_AS_SOURCE'
                  },
                  'ErrorCode': 'string',
                  'ErrorMessage': 'string'
              },
          ],
          'PendingStandbyRequests': [
              {
                  'UserName': 'string',
                  'DirectoryId': 'string',
                  'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'STARTING'|'REBUILDING'|'RESTORING'|'MAINTENANCE'|'ADMIN_MAINTENANCE'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'UPDATING'|'STOPPING'|'STOPPED'|'ERROR',
                  'WorkspaceId': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **FailedStandbyRequests** *(list) --* 

        Information about the standby WorkSpace that could not be created.

        
        

        - *(dict) --* 

          Describes the standby WorkSpace that could not be created.

          
          

          - **StandbyWorkspaceRequest** *(dict) --* 

            Information about the standby WorkSpace that could not be created.

            
            

            - **PrimaryWorkspaceId** *(string) --* 

              The identifier of the standby WorkSpace.

              
            

            - **VolumeEncryptionKey** *(string) --* 

              The volume encryption key of the standby WorkSpace.

              
            

            - **DirectoryId** *(string) --* 

              The identifier of the directory for the standby WorkSpace.

              
            

            - **Tags** *(list) --* 

              The tags associated with the standby WorkSpace.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                  
            
          
            

            - **DataReplication** *(string) --* 

              Indicates whether data replication is enabled, and if enabled, the type of data replication.

              
        
          

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

            The error code that is returned if the standby WorkSpace could not be created.

            
          

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

            The text of the error message that is returned if the standby WorkSpace could not be created.

            
      
    
      

      - **PendingStandbyRequests** *(list) --* 

        Information about the standby WorkSpace that was created.

        
        

        - *(dict) --* 

          Information about the standby WorkSpace.

          
          

          - **UserName** *(string) --* 

            Describes the standby WorkSpace that was created.

             

            Because this operation is asynchronous, the identifier returned is not immediately available for use with other operations. For example, if you call `DescribeWorkspaces <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html>`__ before the WorkSpace is created, the information returned can be incomplete.

            
          

          - **DirectoryId** *(string) --* 

            The identifier of the directory for the standby WorkSpace.

            
          

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

            The operational state of the standby WorkSpace.

            
          

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

            The identifier of the standby 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.ResourceNotFoundException`

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

  