catalog_workspace.

create_or_update

create_or_update(workspace: CatalogWorkspace) -> UpsertOutcome

Create a new workspace or overwrite an existing workspace with the same id.

Parameters

nametypedescription
workspaceCatalogWorkspaceCatalog Workspace object to be created or updated.

Returns

typedescription
UpsertOutcomeCREATED if the workspace did not exist yet, UPDATED if it did.

Example

# Create workspace
sdk.catalog_workspace.create_or_update(
    CatalogWorkspace(
        workspace_id="123",
        name="Test demo",
        parent_id="demo"
    )
)