update_datalab_lifecycle_configuration¶
- DatalabsApi.update_datalab_lifecycle_configuration(id, role_id, content_type=None, operation=None, datalab_lifecycle_configuration_update=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update datalab lifecycle configuration
Updates a lifecycle configuration’s scripts, description or keywords. Configurations for studio datalabs cannot be updated. With operation set, enables or disables a built-in configuration instead, ignoring the contents of the request body though a body must still be sent; one still attached to a datalab cannot be disabled.
- Parameters:
id (str) – Identifier of the lifecycle configuration. (required)
role_id (str) – User role id (required)
content_type (str) – Must be application/json.
operation (str) – Omit to update the configuration. Use enable or disable to change whether a built-in configuration can be attached to datalabs, which ignores the request body and requires system settings permission.
datalab_lifecycle_configuration_update (DatalabLifecycleConfigurationUpdate)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /datalabs/lifecycle-configurations/{id}
Request¶
Replace the startup script and description
{
"Description": "Installs the team's shared Python packages plus pandas",
"OnStartScript": "IyEvYmluL2Jhc2gKcGlwIGluc3RhbGwgLXIgL2hvbWUvZWMyLXVzZXIvcmVxdWlyZW1lbnRzLnR4dAo=",
"Keywords": [
"ml",
"setup",
"pandas"
]
}
Success (HTTP 200)¶
Datalab lifecycle configuration updated successfully
User-created configuration updated
{
"Message": "Successfully updated the Lifecycle Configuration details."
}
operation=enable on a system configuration
{
"Message": "Successfully enabled system LCC - amorphic-glue-sessions."
}
Errors¶
Documented error codes: IPV-1040, GE-1034, GE-1020.
HTTP 400
Missing required request parameters
Only an admin may change a system configuration
{
"Message": "IPV-1040 - Unauthorized to update system LCC."
}
enable/disable used on a user-created configuration
{
"Message": "IPV-1040 - Enabling/disabling is not supported for user created LCCs."
}
Studio configurations cannot be updated
{
"Message": "GE-1034 - Updates for Studio type lifecycle configurations are not supported"
}
System configuration currently attached to datalabs
{
"Message": "IPV-1040 - Cannot update system created LCC since it's currently being used in the datalabs - ml-exploration"
}
HTTP 500
Something went wrong at backend
Request / response example
{
"Message": "GE-1020 - Unable to update LifecycleConfiguration table, please retry or contact administrator"
}