Workspace
Warning
The functions are not fully tested yet. Use with caution. Please report any issues to the GitHub repository.
workspace_create
workspace_create(display_name: str, description: str = None, capacity_id: str = None, preview: bool = True) -> requests.Response
Create a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
display_name
|
str
|
The display name of the workspace. |
required |
description
|
str | None
|
The description of the workspace. |
None
|
capacity_id
|
str | None
|
The capacity id to assign the workspace to. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_get
workspace_get(workspace_id: str, preview: bool = True) -> requests.Response
Get a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_list
workspace_list(continuation_token: str = None, roles: str = None, preview: bool = True) -> requests.Response
List workspaces.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
continuation_token
|
str | None
|
A token for retrieving the next page of results. |
None
|
roles
|
str | None
|
A list of roles. Separate values using a comma. If not provided, all workspaces are returned. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_update
workspace_update(workspace_id: str, display_name: str = None, description: str = None, preview: bool = True) -> requests.Response
Update a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to update. |
required |
display_name
|
str | None
|
The display name of the workspace. |
None
|
description
|
str | None
|
The description of the workspace. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_delete
workspace_delete(workspace_id: str, preview: bool = True) -> requests.Response
Delete a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to delete. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_assign_to_capacity
workspace_assign_to_capacity(workspace_id: str, capacity_id: str, preview: bool = True) -> requests.Response
Assign a workspace to a capacity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to assign to a capacity. |
required |
capacity_id
|
str
|
The id of the capacity to assign the workspace to. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_unassign_from_capacity
workspace_unassign_from_capacity(workspace_id: str, preview: bool = True) -> requests.Response
Unassign a workspace from a capacity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to unassign from a capacity. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_add_role_assignment
workspace_add_role_assignment(workspace_id: str, role: str, principal_id: str, principal_type: str, preview: bool = True) -> requests.Response
Add a role assignment to a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to add a role assignment to. |
required |
role
|
str
|
The role to add to the workspace. |
required |
principal_id
|
str
|
The id of the principal. |
required |
principal_type
|
str
|
The type of the principal. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_get_role_assignment
workspace_get_role_assignment(workspace_id: str, role_assignment_id: str, preview: bool = True) -> requests.Response
Get a role assignment for a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get a role assignment for. |
required |
role_assignment_id
|
str
|
The id of the role assignment to get. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_list_role_assignments
workspace_list_role_assignments(workspace_id: str, preview: bool = True) -> requests.Response
List role assignments for a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to list role assignments for. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_update_role_assignment
workspace_update_role_assignment(workspace_id: str, role_assignment_id: str, preview: bool = True) -> requests.Response
Update a role assignment for a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The workspace ID. |
required |
role_assignment_id
|
str
|
The workspace role assignment ID. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_delete_role_assignment
workspace_delete_role_assignment(workspace_id: str, role_assignment_id: str, preview: bool = True) -> requests.Response
Delete a role assignment from a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to add a role assignment to. |
required |
role_assignment_id
|
str
|
The id of the role assignment to delete. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_deprovision_identity
workspace_deprovision_identity(workspace_id: str, preview: bool = True) -> requests.Response
Deprovision an identity from a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to deprovision an identity from. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |
workspace_provision_identity
workspace_provision_identity(workspace_id: str, await_lro: bool = None, timeout: int = 60 * 5, preview: bool = True) -> requests.Response
Provision an identity to a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The ID of the workspace. |
required |
await_lro
|
bool | None
|
Whether to await the long running operation. |
None
|
timeout
|
int
|
Timeout for the long running operation (seconds). Defaults to 5 minutes. |
60 * 5
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
Response
|
The response from the request. |