Environment
Warning
The functions are not fully tested yet. Use with caution. Please report any issues to the GitHub repository.
environment_create
environment_create(workspace_id: str, display_name: str, description: str = None, await_lro: bool = None, timeout: int = 60 * 5, preview: bool = True) -> requests.Response
Create an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to create the environment in. |
required |
display_name
|
str
|
The display name of the environment. |
required |
description
|
str | None
|
The description of the environment. |
None
|
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. |
environment_get
environment_get(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Get an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get the environment from. |
required |
environment_id
|
str
|
The id of the environment 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. |
environment_list
environment_list(workspace_id: str, continuation_token: str = None, preview: bool = True) -> requests.Response
List environments for a workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to list environments for. |
required |
continuation_token
|
str | None
|
A token for retrieving the next page of results. |
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. |
environment_update
environment_update(workspace_id: str, environment_id: str, display_name: str = None, description: str = None, preview: bool = True) -> requests.Response
Update an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to update the environment in. |
required |
environment_id
|
str
|
The id of the environment to update. |
required |
display_name
|
str | None
|
The display name of the environment. |
None
|
description
|
str | None
|
The description of the environment. |
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. |
environment_delete
environment_delete(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Delete an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to delete the environment from. |
required |
environment_id
|
str
|
The id of the environment 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. |
environment_get_spark_compute_published_settings
environment_get_spark_compute_published_settings(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Get spark compute published settings for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get the spark compute published settings for. |
required |
environment_id
|
str
|
The id of the environment to get the spark compute published settings 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. |
environment_get_spark_compute_staging_settings
environment_get_spark_compute_staging_settings(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Get spark compute staging settings for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get the spark compute staging settings for. |
required |
environment_id
|
str
|
The id of the environment to get the spark compute staging settings 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. |
environment_update_spark_compute_staging_settings
environment_update_spark_compute_staging_settings(workspace_id: str, environment_id: str, instance_pool_name: str = None, instance_pool_type: str = None, driver_cores: int = None, driver_memory: str = None, executor_cores: int = None, executor_memory: str = None, dynamic_executor_allocation_enabled: bool = None, min_executors: int = None, max_executors: int = None, spark_acls_enable: str = None, spark_admin_acls: str = None, runtime_version: str = None, preview: bool = True) -> requests.Response
Update spark compute staging settings for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to update the spark compute staging settings for. |
required |
environment_id
|
str
|
The id of the environment to update the spark compute staging settings for. |
required |
instance_pool_name
|
str | None
|
The name of the instance pool to use for Spark Compute settings. |
None
|
instance_pool_type
|
str | None
|
The type of the instance pool to use for Spark Compute settings. |
None
|
driver_cores
|
int | None
|
The number of cores to use for the driver. |
None
|
driver_memory
|
str | None
|
The memory to use for the driver. |
None
|
executor_cores
|
int | None
|
The number of cores to use for the executors. |
None
|
executor_memory
|
str | None
|
The memory to use for the executors. |
None
|
dynamic_executor_allocation_enabled
|
bool | None
|
Whether to enable dynamic executor allocation. |
None
|
min_executors
|
int | None
|
The minimum number of executors to use for dynamic executor allocation. |
None
|
max_executors
|
int | None
|
The maximum number of executors to use for dynamic executor allocation. |
None
|
spark_acls_enable
|
str | None
|
Whether to enable Spark ACLs. |
None
|
spark_admin_acls
|
str | None
|
The admin ACLs to use for Spark. |
None
|
runtime_version
|
str | None
|
The runtime version to use for Spark Compute settings. |
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. |
environment_get_published_libraries
environment_get_published_libraries(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Get published libraries for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get the published libraries for. |
required |
environment_id
|
str
|
The id of the environment to get the published libraries 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. |
environment_get_staging_libraries
environment_get_staging_libraries(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Get staging libraries for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to get the staging libraries for. |
required |
environment_id
|
str
|
The id of the environment to get the staging libraries 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. |
environment_delete_staging_library
environment_delete_staging_library(workspace_id: str, environment_id: str, library_to_delete: str, preview: bool = True) -> requests.Response
Delete a staging library for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to delete the staging library from. |
required |
environment_id
|
str
|
The id of the environment to delete the staging library from. |
required |
library_to_delete
|
str
|
The library file to delete. Must include the file extension. |
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. |
environment_upload_staging_library
environment_upload_staging_library(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Upload a staging library for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to upload the staged library to. |
required |
environment_id
|
str
|
The id of the environment to upload the staging library 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. |
environment_publish
environment_publish(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Publish an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to publish the environment for. |
required |
environment_id
|
str
|
The id of the environment to publish. |
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. |
environment_cancel_publish
environment_cancel_publish(workspace_id: str, environment_id: str, preview: bool = True) -> requests.Response
Cancel a publish operation for an environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workspace_id
|
str
|
The id of the workspace to cancel the publish operation for. |
required |
environment_id
|
str
|
The id of the environment to cancel the publish operation 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. |