WorkSpaces / Client / rebuild_workspaces

rebuild_workspaces#

WorkSpaces.Client.rebuild_workspaces(**kwargs)#

Rebuilds the specified WorkSpace.

You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, UNHEALTHY, STOPPED, or REBOOTING.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see Rebuild a WorkSpace.

This operation is asynchronous and returns before the WorkSpaces have been completely rebuilt.

See also: AWS API Documentation

Request Syntax

response = client.rebuild_workspaces(
    RebuildWorkspaceRequests=[
        {
            'WorkspaceId': 'string'
        },
    ]
)
Parameters:

RebuildWorkspaceRequests (list) –

[REQUIRED]

The WorkSpace to rebuild. You can specify a single WorkSpace.

  • (dict) –

    Describes the information used to rebuild a WorkSpace.

    • WorkspaceId (string) – [REQUIRED]

      The identifier of the WorkSpace.

Return type:

dict

Returns:

Response Syntax

{
    'FailedRequests': [
        {
            'WorkspaceId': 'string',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • FailedRequests (list) –

      Information about the WorkSpace that could not be rebuilt.

      • (dict) –

        Describes a WorkSpace that could not be rebooted. ( RebootWorkspaces), rebuilt ( RebuildWorkspaces), restored ( RestoreWorkspace), terminated ( TerminateWorkspaces), started ( StartWorkspaces), or stopped ( StopWorkspaces).

        • WorkspaceId (string) –

          The identifier of the WorkSpace.

        • ErrorCode (string) –

          The error code that is returned if the WorkSpace cannot be rebooted.

        • ErrorMessage (string) –

          The text of the error message that is returned if the WorkSpace cannot be rebooted.

Exceptions

  • WorkSpaces.Client.exceptions.OperationNotSupportedException