anatools.anaclient.editor module¶
Editor Functions
- create_remote_development(self, channelId, organizationId=None, channelVersion=None, instanceType=None)¶
Creates a remote development environment.
This method initiates a remote development session on the specified channel, optionally within a given organization. If no organizationId is provided, it defaults to the organization associated with the current user.
- Parameters
channelId (str) – The ID of the channel to use for creating the remote development session.
channelVersion (str, optional) – The version of the channel to use. If not provided, defaults to the latest version.
organizationId (str, optional) – The ID of the organization where the session will be created. If not provided, defaults to the user’s organization.
instanceType (str, optional) – The type of instance to use for the remote development session. If not provided, defaults to the instance type specified in the channel.
- Returns
A message indicating that the session is being created, along with a link to access the session.
- Return type
str
Notes
This function checks if the user is logged out before proceeding.
Calls ana_api.createRemoteDevelopment to initiate the session.
Displays a warning message indicating that the feature is experimental.
Example Output¶
⚠️ Warning: This feature is very experimental. Use with caution! ⚠️ 🚀 Your environment will be available here shortly: 🔗 <editorUrl> 🌐
- delete_remote_development(self, editorSessionId, organizationId=None)¶
Deletes a remote development session.
This method removes a specific editor session, optionally within a given organization. If no organizationId is provided, it defaults to the organization associated with the current user.
- Parameters
editorSessionId (str) – The ID of the editor session to be deleted.
organizationId (str, optional) – The ID of the organization where the editor session is running. If not provided, defaults to the user’s organization.
- Returns
A dictionary representing the result of the session deletion, or session details upon deletion.
- Return type
dict
Notes
This function checks if the user is logged out before proceeding.
Calls ana_api.deleteRemoteDevelopment to perform the deletion.
- list_remote_development(self, organizationId=None)¶
Shows all the active development sessions in the organization.
- Parameters
organizationId (str) – The ID of the organization to list the active development sessions. If not provided, defaults to the user’s organization
- Returns
List of remote development environments running in the organization.
- Return type
list[dict]
- start_remote_development(self, editorSessionId, organizationId=None)¶
Starts a remote development session.
This method starts a specific editor session, optionally within a given organization. If no organizationId is provided, it defaults to the organization associated with the current user.
- Parameters
editorSessionId (str) – The ID of the editor session to be started.
organizationId (str, optional) – The ID of the organization where the editor session is running. If not provided, defaults to the user’s organization.
- Returns
A dictionary representing the result of the session start operation.
- Return type
dict
Notes
This function checks if the user is logged out before proceeding.
Calls ana_api.startRemoteDevelopment to start the session.
- stop_remote_development(self, editorSessionId, organizationId=None)¶
Stops a remote development session.
This method stops a specific editor session, optionally within a given organization. If no organizationId is provided, it defaults to the organization associated with the current user.
- Parameters
editorSessionId (str) – The ID of the editor session to be stopped.
organizationId (str, optional) – The ID of the organization where the editor session is running. If not provided, defaults to the user’s organization.
- Returns
A dictionary representing the result of the session stop operation.
- Return type
dict
Notes
This function checks if the user is logged out before proceeding.
Calls ana_api.stopRemoteDevelopment to stop the session.