Environment
- class jelastic.api.environment.Environment(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
ClientAbstract
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment
Ref: https://docs.jelastic.com/api/#!/environment
- property Billing: _Billing
Service provides information about consumed resources by OS nodes of the platform environments or consumed resources that grouped by account.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Billing
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Billing
- property Binder: _Binder
With the platform, you can set your own external domain name for your projects instead of using the default hosting provider domain name. Binding can be done in two ways: by adding a CNAME record or by setting A Records. A CNAME specifies an alias for a canonical name record in a Domain Name System (DNS) database. If you don’t have your own Public IP, your URL is an alias for a single canonical name that is associated with a common platform IP address in the DNS database. In this case, it’s recommended to set your own custom domain by adding a CNAME record. A Record is an entry in your DNS zone file that maps each domain name to an IP address. When you type www.mycustomsite.com, the browser goes to the nameserver for mycustomsite.com and asks for the A Record. This record must point to an IP address - it will be the IP address of your web server. Setting your own custom external domain name using A Record is more appropriate if you have a personal Public IP address. Also, you can bind Custom SSL to your custom domain.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Binder
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Binder
- property Build: _Build
This service provides methods to manage Java project deployment from the version control system (VCS) repositories. The process requires a dedicated Maven build automation node that will build and deploy Java projects. With Maven, you can add any public or private project directly from your VCS repository (Git or SVN) using the appropriate link type: http, https, git (or svn). After the addition, Java projects can be deployed to the appropriate application servers.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Build
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Build
- property Control: _Control
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Control
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Control
- property Deployment: _Deployment
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Deployment
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Deployment
- property Export: _Export
This service provides API methods for exporting environments on the accounts as downloadable manifests for future imports. Learn more in the documentation.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Export
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Export
- property File: _File
The File Manager API service gives you access to the container’s home directory and your environment’s configuration files. You can read, write, create, delete, and adjust your application files and settings.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.File
Ref: https://docs.jelastic.com/api/private/#!/api/environment.File
- property Group: _Group
Categorize environments in the account with the help of the group management API. Such user-defined groups can filter the environment list, allowing a clear-cut view of the projects. Learn more in the documentation.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Group
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Group
- property JError: _JError
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.JError
Ref: https://docs.jelastic.com/api/private/#!/api/environment.JError
- property Node: _Node
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Node
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Node
- property NodeGroup: _NodeGroup
The nodeGroup API service is used to manage data (parameters) and custom options of the environment layers.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.NodeGroup
Ref: https://docs.jelastic.com/api/private/#!/api/environment.NodeGroup
- property Security: _Security
This service is responsible for managing the environment firewall feature. You can get a rules list, manage specific rules, and enable/disable firewalls for environments. Learn more in the documentation.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Security
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Security
- property System: _System
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.System
Ref: https://docs.jelastic.com/api/private/#!/api/environment.System
- property Tracking: _Tracking
This service is responsible for the monitoring of actions performed by the user. Learn more in the documentation.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Tracking
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Tracking
- property Trigger: _Trigger
This service implements the environment’s trigger handling and management functionality. There are two types of triggers:
auto-scaling - custom conditions for nodes’ addition (scale out) and removal (scale in) based on the load, which allows implementing automatic horizontal scaling. Learn more in the documentation. load alert - custom conditions for email notifications based on the nodes’ load, i.e. a particular resource type is above/below the stated value for the designated period.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Trigger
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Trigger
- property Vcs: _Vcs
This service is the tool for managing your VCS (version control system) projects. Configure periodic automatic deployment of the committed changes, and you can work with GIT/SVN repository only. Just commit the updated code to your VCS project. The platform will detect changes and automatically push them to the assigned environment. In contrast to the GIT hooks, the auto-deploy feature does not require configuration on the GIT side and works with SVN.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Vcs
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Vcs
- property Windows: _Windows
Service provides a flexible structure to manage Environment, obtain statistic information etc.
>>> from jelastic import Jelastic >>> jelastic = Jelastic('https://app.xapp.cloudmydc.com', token='d6f4e314a5b5fefd164995169f28ae32d987704f') >>> jelastic.environment.Windows
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Windows
- class jelastic.api.environment._Billing(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Service provides information about consumed resources by OS nodes of the platform environments or consumed resources that grouped by account.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Billing
- AddStats(resource_name: str, uid: int, start_date: date, end_date: date, env_name: str, node_id: int, value: float, note: str | None = None, value_group: str | None = None, ruk: str | None = None)[source]
- EnvResources(start_time: datetime, end_time: datetime, ruk: str | None = None)[source]
Calculate resources usage of one environment for the given period.
- EnvsResources(start_time: datetime, end_time: datetime, target_app_id: str, checksum: str, ruk: str | None = None)[source]
Calculate environments resources for the given period.
The method is protected by checksum validation. the checksum is calculated as MD5 function from a string of concatenation appid, starttime, endtime, targetAppid and privateApiKey. Checksum is compared with result MD5 function.
- EnvsResourcesByAccount(start_time: datetime, end_time: datetime, uid: int, checksum: str, ruk: str | None = None)[source]
Calculate environments resources for the given period.
- GetOptions(target_env_name: str, node_group: str, ruk: str | None = None)[source]
Gets billing options for nodeGroup.
- SetOptions(target_env_name: str, node_group: str, options: dict, node_id: int | None = None, ruk: str | None = None)[source]
Sets billing options for the node group (layer) to help the platform identify installed license types.
- Parameters:
target_env_name – target environment name with the required node group (layer).
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
options – JSON object with the required billing options.
node_id – unique identifier of the node that will be used to identify the target node group (overrides the nodeGroup parameter if both are specified).
- class jelastic.api.environment._Export(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
This service provides API methods for exporting environments on the accounts as downloadable manifests for future imports. Learn more in the documentation.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Export
- Create(settings: dict, ruk: str | None = None)[source]
Creates a manifest file based on the existing environment (a JSON file with the topology and other settings) and stores it within the corresponding environment.
- Parameters:
settings – JSON object with export settings: {“config”: true, “data”: true}
- Delete(id: str, ruk: str | None = None)[source]
Deletes a manifest file from the corresponding environment.
- Parameters:
id – unique identifier of the manifest file.
- DeleteExportedData(env_name: str, file_name: str, ruk: str | None = None)[source]
Deletes the exported data.
- Parameters:
env_name – target environment name.
file_name – filename to be removed.
- class jelastic.api.environment._JError(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Ref: https://docs.jelastic.com/api/private/#!/api/environment.JError
- class jelastic.api.environment._Node(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Node
- class jelastic.api.environment._Binder(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
With the platform, you can set your own external domain name for your projects instead of using the default hosting provider domain name. Binding can be done in two ways: by adding a CNAME record or by setting A Records.
A CNAME specifies an alias for a canonical name record in a Domain Name System (DNS) database. If you don’t have your own Public IP, your URL is an alias for a single canonical name that is associated with a common platform IP address in the DNS database. In this case, it’s recommended to set your own custom domain by adding a CNAME record.
A Record is an entry in your DNS zone file that maps each domain name to an IP address. When you type www.mycustomsite.com, the browser goes to the nameserver for mycustomsite.com and asks for the A Record. This record must point to an IP address - it will be the IP address of your web server. Setting your own custom external domain name using A Record is more appropriate if you have a personal Public IP address.
Also, you can bind Custom SSL to your custom domain.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Binder
- AddDomains(env_name: str, domains: list[str] | None = None, node_group: str | None = None, node_id: int | None = None, subdomain: str | None = None, ruk: str | None = None)[source]
param domains: a comma- or semicolon-separated list of domains (e.g. domain1,domain2 or domain1;domain2). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container). param subdomain: defines whether the layer/node subdomain should be attached via “-” (false) or “.” (true, by default).
- AddSSLCert(env_name: str, key: str, cert: str, interm: str | None = None, ruk: str | None = None)[source]
param key: private key (can be either key body or link to download it). param cert: domain certificate (can be either certificate body or link to download it). param interm: intermediate certificate (CA) (can be either intermediate body or link to download it).
- BindExtDomain(env_name: str, extdomain: str, cert_id: int | None = None, ruk: str | None = None)[source]
- BindExtDomains(env_name: str, extdomains: list[str] | None = None, cert_id: int | None = None, ruk: str | None = None)[source]
param extdomain: a comma-separated list of external domains to be bound to the environment. param cert_id: unique identifier of the SSL certificate.
- BindSSL(env_name: str, cert_key: str, cert: str, intermediate: str, ruk: str | None = None)[source]
- BindSSLCert(env_name: str, cert_id: int, entry_point: str | None = None, ext_domains: list[str] | None = None, ruk: str | None = None)[source]
param cert_id: unique identifier of the SSL certificate. param entry_point: entry point can be either “ENV” (for all environments domains, by default) or “SLB” (for environment domains specified in the extDomains parameter). param ext_domains: a comma-separated list of external domains to be bound with the SSL certificate.
- CheckDomain(env_name: str, domain: str, region: str | None = None, ruk: str | None = None)[source]
param domain: domain name to be checked. param region: unique name of a region to be checked.
- CheckExtDomain(env_name: str, extdomains: str, ruk: str | None = None)[source]
param extdomains: external domain name to be checked.
- DetachExtIp(env_name: str, nodeid: int, ip: str, ruk: str | None = None)[source]
param nodeid: unique identifier of the target node (container). param ip: IP address that should be removed from the node.
- EditSSLCert(env_name: str, id: int, key: str | None = None, cert: str | None = None, interm: str | None = None, ruk: str | None = None)[source]
param id: unique identifier of the target SSL certificate. param key: private key (can be either key body or link to download it). param cert: domain certificate (can be either certificate body or link to download it). param interm: intermediate certificate (CA) (can be intermediate body or link to download it); if set to “*”, “null”, or “none”, the intermediate certificate will be removed from the platform database.
- GetDomainInfo(env_name: str, domain: str, ruk: str | None = None)[source]
Returns environment appid if environment found by domain.
param domain: domain of the environment for search
- GetDomains(env_name: str, node_group: str | None = None, node_id: int | None = None, in_short: bool | None = None, ruk: str | None = None)[source]
param node_group: unique identifier of the target node group (layer) for filtering, e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container) for filtering. It has priority over the nodeGroup parameter. param in_short: defines whether domains should be presented in the short (true, by default) or extended (false) form.
- ManageNodeDnsState(env_name: str, node_id: int | None = None, enabled: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_id: unique identifier of the target node (container). param enabled: defines whether to enable (true) or disable (false) DNS records for the target node.
- MoveExtIps(env_name: str, source_node_id: int, target_node_id: int, ips: list[str] | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param source_node_id: unique identifier of the source node (from the source environment). param target_node_id: unique identifier of the target node (could be from the same or different environment on the account). param ips: a comma- or semicolon-separated list of IP addresses that should be transferred (use “*” to move all the source node external IP addresses).
- RemoveDomains(env_name: str, domains: list[str] | None = None, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param domains: a comma- or semicolon-separated list of domains (e.g. domain1,domain2 or domain1;domain2); provide “*” to remove all custom domains. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- RemoveExtDomains(env_name: str, extdomain: str, ruk: str | None = None)[source]
param env_name: target environment name. param extdomain: external domain name to be detached.
- RemoveSSLCerts(env_name: str, ids: list[str] | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param ids: a comma-separated list of certificate IDs (e.g. id1,id2,id3); provide “*” to remove all certificates.
- SetExtIpCount(env_name: str, type: str, count: int, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param type: external IP address type (“ipv4” or “ipv6”). param count: number of IPs to add per container - requires the multiple IPs feature enabled on the account. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- SwapExtDomains(env_name: str, targetappid: str, ruk: str | None = None)[source]
param env_name: target environment name. param targetappid: Target (second) environment name.
- SwapExtIps(env_name: str, source_node_id: int, target_node_id: int, source_ip: str | None = None, target_ip: str | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param source_node_id: unique identifier of the source node (from the source environment). param target_node_id: unique identifier of the target node (could be from the same or different environment on the account). param source_ip: source IP address that should be swapped (if not specified, all external IPs from source node are transferred to the target). param target_ip: target IP address that should be swapped (if not specified, all external IPs from target node are transferred to the source).
- class jelastic.api.environment._Deployment(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
The Deployment API methods implement extensive Deployment Manager functionality, including application installation (from archive packages and remote Git/SVN repositories) and management (update, rename, context undeploy, etc.). If working with Java projects from the VCS repository, a special Maven build node is used for the source’s compilation, which requires separate API methods.
Based on this, three method types can be distinguished the below-listed methods can be conditionally divided into three groups:
for Maven build node - AddBuildProject, EditBuildProject, GetBuildProjectInfo, RemoveBuildProject, GetBuildProjects, BuildProject, BuildDeployProject, DeployProject, Update for Deployment Manager - Deploy, DeployArchive, AddRepo, EditRepo, GetRepos, RemoveRepo for already deployed projects - EditProject, GetProjectInfo, RenameContext, Undeploy, Update
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Deployment
- AddBuildProject(env_name: str, node_id: int, name: str, repo: str, deployment: dict | None = None, settings: dict | None = None, hooks: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param name: project name. param repo: unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]} param deployment: JSON object with deployment data: param settings: JSON object with additional deployment settings: param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}.
- AddRepo(name: str, url: str, type: str | None = None, branch: str | None = None, key_id: int | None = None, login: str | None = None, password: str | None = None, description: str | None = None, ruk: str | None = None)[source]
param name: project name. param url: URL to the repository with the project sources. param type: VCS repository type (“GIT” or “SVN”). param branch: remote repository branch (master by default). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the GetSSHKeys method. param login: login for authentication in VCS. param password: password or token for authentication in VCS. param description: custom description for the project.
- BuildDeployProject(env_name: str, node_id: int, project: str, skip_update: bool | None = None, delay: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param project: unique identifier or name of the project. param skip_update: defines whether to update (false) or not (true) the project from the VCS source files. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (i.e. when deployment is performed on servers one-by-one to ensure uptime).
- BuildProject(env_name: str, node_id: int, project: str, skip_upload: bool | None = None, skip_update: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param project: unique identifier or name of the project. param skip_update: defines whether to update (false) or not (true) the project from the VCS source files. param skip_upload: defines whether to add built project to the Deployment Manager (false) or not (true).
- Deploy(env_name: str, repo: str, context: str, node_group: str | None = None, build_node_id: int | None = None, settings: dict | None = None, hooks: str | None = None, delay: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param repo: unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]} param context: target context name of the deployed project. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param build_node_id: unique identifier of a Maven build node (for Java-based projects only). param settings: JSON object with the deployment settings: param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (i.e. when deployment is performed on servers one-by-one to ensure uptime).
- DeployArchive(env_name: str, file_url: str, file_name: str, node_group: str | None = None, context: str | None = None, zdt: bool | None = None, hooks: str | None = None, delay: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param file_url: URL to the archive file. param file_name: archive file name from the Deployment Manager storage. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param context: custom context name for the deployed project (ROOT by default). param zdt: defines whether to use zero-downtime deployment for PHP (true) or not (false). param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (i.e. when deployment is performed on servers one-by-one to ensure uptime).
- DeployProject(env_name: str, node_id: int, project: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param project: unique identifier or name of the project.
- EditBuildProject(env_name: str, node_id: int, project: str, name: str | None = None, repo: str | None = None, deployment: dict | None = None, settings: dict | None = None, hooks: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param project: unique identifier or name of the project param name:New project name. param repo: unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]} param deployment: JSON object with deployment data: param settings: JSON object with additional deployment settings: param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}.
- EditProject(env_name: str, node_group: str, context: str, new_context: str | None = None, repo: str | None = None, settings: dict | None = None, hooks: str | None = None, delay: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param context: target context name of the deployed project. param new_context: new context name for the project (could be the same as Context). param repo: unique identifier of a repository in the Deployment Manager (e.g. 1 or {“id”:1}) or JSON object with repository access details {“url”:”…”, [“login”:”…”], [“password”:”…”], [“branch”:”…”], [“type”:”GIT/SVN”], [“keyId”:1]} param deployment: JSON object with deployment data: param settings: JSON object with additional deployment settings: param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime).
- EditRepo(id: int, name: str | None = None, type: str | None = None, url: str | None = None, branch: str | None = None, key_id: int | None = None, login: str | None = None, password: str | None = None, description: str | None = None, ruk: str | None = None)[source]
param id : unique identifier of the repository to be edited. param name: project name. param url: URL to the repository with the project sources. param type: VCS repository type (“GIT” or “SVN”). param branch: remote repository branch (master by default). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the GetSSHKeys method. param login: login for authentication in VCS. param password: password or token for authentication in VCS. param description: custom description for the project.
- GetBuildProjectInfo(env_name: str, node_id: int, project: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the build node. param project: unique identifier or name of the project
- GetBuildProjects(env_name: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the build node.
- GetDeployments(env_name: str, node_group: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetHooks(env_name: str, node_group: str | None = None, node_id: int | None = None, context: str | None = None, project: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container). param context: target context name of the deployed project. param project: unique identifier or name of the project.
- GetProjectInfo(env_name: str, context: str, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param context: target context name of the deployed project. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetRepos(id: int | None = None, ruk: str | None = None)[source]
param id: unique identifier of the repository.
- RemoveBuildProject(env_name: str, node_id: str, project: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_id: unique identifier of the target node (container). param project: unique identifier or name of the project.
- RenameContext(env_name: str, node_group: str, old_context: str, new_context: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param old_context: target context name of the deployed project. param new_context: new context name for the project (could be the same as Context).
- Undeploy(env_name: str, node_group: str, context: str, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param context: target context name of the deployed project.
- Update(env_name: str, node_group: str | None = None, node_id: int | None = None, context: str | None = None, project: str | None = None, delay: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name (with a build node). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container). param context: target context name of the deployed project. param project: unique identifier or name of the project. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime).
- class jelastic.api.environment._Build(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
- This service provides methods to manage Java project deployment from the version control system (VCS) repositories. The process requires a dedicated Maven build automation node that will build and deploy Java projects. With Maven, you can add any public or private project directly from your VCS repository (Git or SVN) using the appropriate link type: http, https, git (or svn). After the addition, Java projects can be deployed to the appropriate application servers.
resources that grouped by account.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Build
- AddProject(autoupdate: bool, auto_resolve_conflict: bool, env_name: str, node_id: int, name: str, type: str, path: str, key_id: int | None = None, login: str | None = None, password: str | None = None, target_env: str | None = None, context: str | None = None, branch: str | None = None, interval: str | None = None, delay: int | None = None, deploy_now: bool | None = None, hooks: str | None = None, work_dir: str | None = None, target_node_group: str | None = None, is_sequential: bool | None = None, ruk: str | None = None)[source]
- AddProjectWithCreds(autoupdate: bool, auto_resolve_conflict: bool, env_name: str, node_id: int, name: str, type: str, path: str, target_env: str | None = None, login: str | None = None, password: str | None = None, context: str | None = None, branch: str | None = None, interval: str | None = None, delay: int | None = None, deploy_now: bool | None = None, hooks: str | None = None, work_dir: str | None = None, ruk: str | None = None)[source]
param autoupdate: defines whether to enable (true) or disable (false) automatic project updates (only upon code changes in the remote repository); auto-update frequency is set with the interval parameter. param auto_resolve_conflict: defines whether to automatically resolve (true) or not (false) merge conflicts (by updating the contradictory files to the repository version, i.e. locally made changes are discarded). param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param name: project name. param type: VCS repository type (“GIT” or “SVN”). param path: URL to the repository (including protocol). param target_env: target environment name (with a Java application server). param login: login for authentication in VCS. param password: password or token for authentication in VCS. param context: custom context name for the deployed project (ROOT by default). param branch: remote repository branch (master by default). param interval: delay (in minutes) for automatic project updates. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime). param deploy_now: defines whether to just create (false) or create and immediately deploy (true) the project. param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param work_dir: relative path to the repository subdirectory with application source code.
- AddProjectWithKey(autoupdate: bool, auto_resolve_conflict: bool, env_name: str, node_id: int, name: str, type: str, path: str, target_env: str | None = None, key_id: int | None = None, context: str | None = None, branch: str | None = None, interval: str | None = None, delay: int | None = None, deploy_now: bool | None = None, hooks: str | None = None, work_dir: str | None = None, ruk: str | None = None)[source]
param autoupdate: Defines whether to enable (true) or disable (false) automatic project updates (only upon code changes in the remote repository); auto-update frequency is set with the interval parameter. param auto_resolve_conflict: defines whether to automatically resolve (true) or not (false) merge conflicts (by updating the contradictory files to the repository version, i.e. locally made changes are discarded). param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param name: project name. param type: VCS repository type (“GIT” or “SVN”). param path: URL to the repository (including protocol). param target_env: target environment name (with a Java application server). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the Management > Account > GetSSHKeys method. param context: custom context name for the deployed project (ROOT by default). param branch: remote repository branch (master by default). param interval: delay (in minutes) for automatic project updates. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime). param deploy_now: defines whether to just create (false) or create and immediately deploy (true) the project. param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param work_dir: relative path to the repository subdirectory with application source code.
- BuildDeploy(env_name: str, project_name: str, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param project_name: project name.
- BuildDeployProject(env_name: str, node_id: int, project_id: str, delay: int | None = None, update: bool | None = None, is_sequential: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_id: unique identifier of the build node. param project_id: unique identifier of the added project that should be built and deployed. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime). param update: defines whether to update (true) or not (false) the project before deployment. param is_sequential: defines whether to deploy project on application servers one-by-one to ensure uptime (true) or simultaneously (false).
- BuildProject(env_name: str, node_id: int, project_id: str, update: bool | None = None, skip_publish: bool | None = None, asyncs: bool | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param project_id: unique identifier of the added project that should be built. param update: defines whether to update (true) or not (false) the project before building. param skip_publish: defines whether to add built project to the Deployment Manager (false) or not (true). param asyncs: defines whether to build projects asynchronously (true) or not (false).
- DeployProject(env_name: str, node_id: int, project_id: str, delay: int | None = None, is_sequential: bool | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param project_id: unique identifier of the built project that should be deployed. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime). param is_sequential: defines whether to use sequential (true) or simultaneous (false) deployment type; the former can ensure uptime, and the latter is faster.
- EditProject(env_name: str, node_id: int, project_id: int, name: str, type: str, path: str, key_id: int | None = None, login: str | None = None, password: str | None = None, env: str | None = None, context: str | None = None, branch: str | None = None, autoupdate: bool | None = None, interval: str | None = None, auto_resolve_conflict: bool | None = None, delay: int | None = None, hooks: str | None = None, work_dir: str | None = None, target_node_group: str | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param project_id: unique identifier of the project. param name: project name. param type: VCS repository type (“GIT” or “SVN”). param path: URL to the repository (including protocol). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the Management > Account > GetSSHKeys method. param login: login for authentication in VCS. param password: password or token for authentication in VCS. param env: target environment name (with a Java application server). param context: custom context name for the deployed project (ROOT by default). param branch: remote repository branch (master by default). param autoupdate: defines whether to enable (true) or disable (false) automatic project updates (only upon code changes in the remote repository); auto-update frequency is set with the interval parameter. param interval: delay (in minutes) for automatic project updates. param auto_resolve_conflict: defines whether to automatically resolve (true) or not (false) merge conflicts (by updating the contradictory files to the repository version, i.e. locally made changes are discarded). param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime). param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param work_dir: relative path to the repository subdirectory with application source code. param target_node_group: target node group (layer) with Java application servers.
- GetProjectInfo(env_name: str, node_id: int, project_id: int | None = None, project_name: str | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param node_id: unique identifier of the build node. param project_id: unique identifier of the project. param project_name: project name.
- GetProjects(env_name: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param node_group: unique identifier of the node group with a build node. param node_id: unique identifier of the build node.
- RemoveProject(env_name: str, nodeid: int, projectid: int, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param nodeid: unique identifier of the build node. param projectid: unique identifier of the project.
- Update(env_name: str, node_id: int, project_id: int | None = None, context: str | None = None, ruk: str | None = None)[source]
param env_name: source environment name (with a build node). param nodeid: unique identifier of the build node. param projectid: unique identifier of the project. param context: custom context name for the deployed project (ROOT by default).
- class jelastic.api.environment._Control(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Control
- AddBackend(env_name: str, backend_node_id: int, balancer_node_id: int, ruk: str | None = None)[source]
- AddBackends(env_name: str, backend_node_id: str, balancer_node_id: str, ruk: str | None = None)[source]
- AddBalancerNode(env_name: str, node_type: str, cloud_lets: int | None = None, exp_ip: bool | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: str | None = None, start_service: bool | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddBuildNode(env_name: str, node_type: str, cloud_lets: int | None = None, node_id: int | None = None, exp_ip: bool | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, tag: str | None = None, metadata: str | None = None, start_service: bool | None = None, engine: str | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, disk_limit: int | None = None, ruk: str | None = None)[source]
- AddCacheNode(env_name: str, node_type: str, cloud_lets: int | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: str | None = None, start_service: bool | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddComputeNode(env_name: str, node_type: str, cloud_lets: int | None = None, is_master: int | None = None, exp_ip: bool | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: bool | None = None, start_service: bool | None = None, engine: str | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddContainerEnvVars(env_name: str, vars: dict, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
vars – JSON object with a list of container environment variables, e.g. {“var1”:”value1”, “var2”:”value2”}
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container).
- AddContainerVolumeByGroup(env_name: str, node_group: str, path: str, ruk: str | None = None)[source]
- AddContainerVolumes(env_name: str, volumes: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
volumes – an array of data volumes to be added, e.g. /data/volume or [“/data/volume”,”/data/volume2”, …]
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container).
- AddContext(env_name: str, name: str, file_name: str, type: str, node_group: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
name – context name for the application
- AddDBNode(env_name: str, node_type: str, cloud_lets: int | None = None, exp_ip: bool | None = None, password: str | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: bool | None = None, start_service: bool | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddDockerNode(env_name: str, node_type: str, metadata: dict, cloud_lets: int | None = None, exp_ip: bool | None = None, password: str | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, start_service: bool | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddEndpoint(env_name: str, node_id: int, private_port: int, protocol: str, name: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
private_port – local port on the container to connect to via endpoint.
protocol – connection protocol (“TCP” or “UDP”).
name – custom endpoint name.
- AddEnvPolicy(target_app_id: str, policy: str, ruk: str | None = None)[source]
- Parameters:
target_app_id – target application identifier of the environment for adding policy.
policy – a comma-separated list of policy. For example: “policy1,policy2”.
- AddEnvProperty(properties: str, ruk: str | None = None)[source]
- Parameters:
properties – JSON object with environment properties. For example: {“customProperty1”:”value1”,”customProperty2”:”value2”}
- AddExtraNode(env_name: str, node_type: str, cloud_lets: int | None = None, exp_ip: bool | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: bool | None = None, start_service: bool | None = None, exp_ipv6_count: int | None = None, exp_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddNode(env_name: str, node_type: str, cloud_lets: int | None = None, ext_ip: str | None = None, password: str | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, metadata: str | None = None, node_group: str | None = None, start_service: bool | None = None, disk_limit: int | None = None, tag: str | None = None, engine: str | None = None, exit_ipv4: int | None = None, exit_ipv6: int | None = None, node_group_data: str | None = None, options: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – name of the selected environment
node_type – node type (tomcat7, mysql5, etc)
password – password for specific nodes
flexible_cloud_lets – flexible cloudlets number
fixed_cloud_lets – fixed cloudlets number
display_name – alias for your environment
metadata – docker node metadata
node_group – node group (cp,bl, etc)
start_service – exec docker run
disk_limit – node disk limitation
engine
exit_ipv4 – IPv4 count
exit_ipv6 – IPv6 count
- Params tag:
docker tag
- AddPortRedirect(env_name: str, node_id: int, src_port: int, dst_port: int, protocol: str, comments: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
src_port – source port on the container.
dst_port – destination port on the container.
protocol – transport protocol (“TCP” or “UDP”).
comments – custom comment for the redirect.
- AddStorageNode(env_name: str, node_type: str, cloud_lets: int | None = None, ext_ip: str | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: str | None = None, start_service: bool | None = None, ext_ipv6_count: int | None = None, ext_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddVdsNode(env_name: str, node_type: str, cloud_lets: int | None = None, ext_ip: str | None = None, password: str | None = None, flexible_cloud_lets: int | None = None, fixed_cloud_lets: int | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, tag: str | None = None, metadata: str | None = None, start_service: bool | None = None, ext_ipv6_count: int | None = None, ext_ip_count: int | None = None, node_group_data: str | None = None, ruk: str | None = None)[source]
- AddVmNode(env_name: str, node_type: str, options: str, ext_ip: str | None = None, display_name: str | None = None, node_group: str | None = None, disk_limit: int | None = None, ext_ipv6_count: int | None = None, ext_ip_count: int | None = None, node_group_data: str | None = None, password: str | None = None, ruk: str | None = None)[source]
- ApplyEnvProperty(env_name: str, properties: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
properties – JSON object with environment properties. For example: {“customProperty1”:”value1”,”customProperty2”:”value2”}
- ApplySoftwarePackageAction(env_name: str, keywords: str, node_type: str | None = None, action: str | None = None, password: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
- ChangeLimitsInner(env_name: str, uid: int, limit_type: str | None = None, ruk: str | None = None)[source]
- ChangeTopology(env_name: str, env: dict, nodes: dict, action_key: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
env – JSON object with environment settings:
nodes – JSON object with a list of environment nodes and their settings:
action_key – name of the action and domain name.
- CheckDependencies(env_name: str, node_id: int | None = None, filter: str | None = None, ruk: str | None = None)[source]
- CheckExtIpCount(exp_ipv6: int, exp_ipv4: int | None = None, hardware_node_group: str | None = None, ruk: str | None = None)[source]
- CheckMigrationPossibility(env_name: str, hardware_node_group: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
hardware_node_group – unique identifier of the target region (host group).
- ClearLog(env_name: str, node_id: int, path: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
path – path to the target log file.
- CloneEnv(src_env_name: str, dit_env_name: str, use_external_mounts: bool | None = None, ruk: str | None = None)[source]
- Parameters:
src_env_name – source environment name (one that is going to be cloned).
dit_env_name – destination (cloned) environment name.
use_external_mounts – defines whether to copy external mounts on the clone (true) or not (false).
- CloneNode(env_name: str, count: int, node_group: str, node_id: int | None = None, ruk: str | None = None)[source]
- ConfirmTransferRequest(key: str, ruk: str | None = None)[source]
- Parameters:
key – disposable confirmation key
- CreateEnv(env_name: str, settings: dict, owner_uid: int | None = None, hardware_node_group: str | None = None, env_groups: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – domain of the environment
settings – settings of the environment
owner_uid – unique identifier of the environment’s owner
- CreateEnvironment(env: dict, nodes: dict, action_key: str | None = None, owner_uid: int | None = None, env_groups: str | None = None, ruk: str | None = None)[source]
- Parameters:
env – JSON object with environment settings:
nodes – JSON object with a list of environment nodes and their settings:
action_key – name of the action and domain name.
owner_uid – unique identifier of the environment owner (if installing as collaborator on another user account).
env_groups – target group name or JSON array of group names.
- DeleteEnv(env_name: str, password: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
password – current user password or environment name to confirm environment deletion (depending on the ‘environment.delete.confirm.type’ quota).
- DeleteExportedFiles(env_name: str, file_name: str, ruk: str | None = None)[source]
- Parameters:
env_name – application identifier of the environment
file_name – settings for export
- DeployApp(env_name: str, file_url: str, file_name: str, context: str | None = None, atomic_deploy: bool | None = None, delay: int | None = None, node_group: str | None = None, hooks: str | None = None, is_sequential: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
file_url – URL to the application archive to be deployed.
file_name – name of the application archive from the Deployment Manager to be deployed.
context – custom context for the application (ROOT by default).
atomic_deploy – defines whether to use zero-downtime deployment for PHP (true) or not (false).
delay – delay (in seconds) between two consecutive deployments when using the sequential deployment type (I.e. when deployment is performed on servers one-by-one to ensure uptime).
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
hooks – JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}.
is_sequential – defines whether to deploy the project on application servers one-by-one to ensure uptime (true) or simultaneously (false).
- DetachEnvGroup(env_name: str, env_group: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
env_group – target group name or JSON array of group names.
- EditEndpoint(env_name: str, id: int, name: str, private_port: int, protocol: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
id – unique identifier of the target endpoint.
name – custom endpoint name.
private_port – local port on the container to connect to via endpoint.
protocol – transport protocol (“TCP” or “UDP”).
- EditEnvSettings(env_name: str, settings: dict, ruk: str | None = None)[source]
- Parameters:
settings – {“engine”:string,”sslstate”:boolean}
- EditNodeGroup(env_name: str, node_group: dict, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – JSON object with node group (layer) settings:
- EditRegistryCredentials(filter: dict, user: str | None = None, password: str | None = None, ruk: str | None = None)[source]
- Parameters:
filter – JSON object to list parameters that need to be updated:
user – new username to access remote registry.
password – new password to access remote registry.
- ExecCmd(env_name: str, node_type: str, command_list: list[dict], say_yes: bool = True, ruk: str | None = None)[source]
- ExecCmdByGroup(env_name: str, node_group: str, command_list: list[dict], say_yes: bool = True, asynchronous: bool = False, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
command_list – JSON object with a list of commands to execute on the layer:
say_yes – defines whether to automatically confirm any operation if prompted (true) or not (false).
Async – defines whether to run provided commands simultaneously (true) or one-by-one (false).
- ExecCmdById(env_name: str, node_id: int, command_list: list[dict], say_yes: bool = True, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
command_list – JSON object with a list of commands to execute on the node:
say_yes – defines whether to automatically confirm any operation if prompted (true) or not (false).
- ExecCmdByType(env_name: str, node_type: str, command_list: list[dict], say_yes: bool = True, ruk: str | None = None)[source]
- ExecCmdInner(env_name: str, target_app_id: str, command_list: list[dict], node_type: str | None = None, node_id: int | None = None, user_name: str | None = None, node_group: str | None = None, asynchronous: bool | None = None, say_yes: bool = True, ruk: str | None = None)[source]
- ExportEnv(env_name: str, settings: str, ruk: str | None = None)[source]
- Parameters:
env_name – application identifier of the environment
settings – settings for export
- GetActiveEnvs(env_name: str, domain: str, start_time: datetime, end_time: datetime, checksum: str, ruk: str | None = None)[source]
- GetAllSumStatByUid(duration: int | None = None, end_time: datetime | None = None, ruk: str | None = None)[source]
- Parameters:
duration – period (in seconds) to show statistics for.
end_time – end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).
- GetBasicEnvsInfo(owner_uid: int | None = None, ruk: str | None = None)[source]
- Parameters:
owner_uid – unique identifier of the target user account.
- GetContainerEntryPoint(env_name: str, node_id: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
- GetContainerEnvVars(env_name: str, node_id: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
- GetContainerEnvVarsByGroup(env_name: str, node_group: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetContainerManifest(image: str, registry: str | None = None, user_name: str | None = None, password: str | None = None, ignore_format: bool | None = None, ruk: str | None = None)[source]
- Parameters:
image – container’s Docker image and tag, e.g. “alpine:latest”.
registry – custom remote registry, where the container image is stored (Docker Hub by default).
user_name – username for authentication at the remote registry.
password – password for authentication at the remote registry.
ignore_format – defines whether to ignore image format (true) or not (false).
- GetContainerNodeTags(env_name: str, node_id: int, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Parameters:
node_id – unique identifier of the target node (container).
- GetContainerRunCmd(env_name: str, node_id: int, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Parameters:
node_id – unique identifier of the target node (container).
- GetContainerRunConfig(env_name: str, node_id: int, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Parameters:
node_id – unique identifier of the target node (container).
- GetContainerTags(image: str, registry: str | None = None, user_name: str | None = None, password: str | None = None, ruk: str | None = None)[source]
- Params image:
container’s Docker image and tag, e.g. “alpine:latest”.
- Parameters:
registry – custom remote registry, where the container image is stored (Docker Hub by default).
user_name – username for authentication at the remote registry.
password – password for authentication at the remote registry.
- GetContainerVolumesByGroup(env_name: str, node_group: str, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Parameters:
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetContainerVolumesById(env_name: str, node_id: int, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Parameters:
node_id – unique identifier of the target node (container).
- GetEndpoints(env_name: str, node_id: int | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
- GetEngineList(type: str | None = None, ruk: str | None = None)[source]
- Parameters:
type – type of the engine (java/php/ruby/js)
- GetEnvInfo(env_name: str, lazy: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
lazy – defines whether to load only the main environment metadata, e.g. name, alias, domain, etc., (true) or all the environment information (false).
- GetEnvProperty(env_name: str, property_keys: list[str] | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
property_keys – a comma-separated list of property keys (all properties if “null” or “empty”). For example: “customProperty1,customProperty2”.
- GetEnvs(lazy: bool | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
- Parameters:
lazy – defines whether to load only the main environment metadata, e.g. name, alias, domain, etc., (true) or all the environment information (false).
owner_uid – unique identifier of the target user account.
- GetLogsList(env_name: str, node_id: int, path: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
- Params path:
custom path to the log files (/var/log by default).
- GetNodeGroups(env_name: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
- GetNodeSSHKey(env_name: str, node_id: int, uid: int, skip_node_type_check: bool | None = None, ruk: str | None = None)[source]
- Parameters:
node_id – unique identifier of the software node.
skip_node_type_check – ignore ‘jelastic.ssh.nodetype.restriction.list’
- GetNodeTags(env_name: str, node_id: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
- GetRegionsInner(group_name: str, is_enabled: bool | None = None, ruk: str | None = None)[source]
- Parameters:
group_name – unique identifier of the target user group.
is_enabled – defines whether to include only active regions (true) or not (false).
- GetRegistryInfo(env_name: str, node_group: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetSSHAccessInfo(node_id: int, ruk: str | None = None)[source]
- Parameters:
node_id – unique identifier of the target node (container).
- Parameters:
uid – identifier of the target user
- GetSoftwarePackages(env_name: str, node_type: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_type – unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetStats(env_name: str, duration: int, interval: int, end_time: datetime | None = None, node_id: int | None = None, node_type: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
duration – period (in seconds) to show statistics for.
interval – interval (in seconds) to divide the stated period (duration).
end_time – end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).
- Node_id:
unique identifier of the target node (container).
- Node_type:
unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. Required if nodeid is not specified.
- Node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- GetSumStat(env_name: str, duration: int, end_time: datetime | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
end_time – end time (UTC) in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00” (duration must be passed).
- Params duration:
period (in seconds) to show statistics for.
- GetTemplateManifest(node_type: str, tag: str, ruk: str | None = None)[source]
- Parameters:
node_type – unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.
tag – target tag for the template.
- GetTemplates(type: str | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
- Parameters:
type – filter the list by the template type (ALL,NATIVE,CARTRIDGE,DOCKERIZED)
owneer_uid – filter the list by the templates available for the specific user.
- InstallPackageByGroup(env_name: str, node_group: str, package_name: str, ruk: str | None = None)[source]
- Parameters:
env_name – environment name or appid
node_group – node group (cp, bl, nosql, sql)
- InstallPackageById(env_name: str, package_name: str, node_id: int | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – environment name or appid
- Node_id:
id of node
- InstallSoftwarePackage(env_name: str, keyword: str, node_type: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
- LinkDockerNodes(env_name: str, source_node_id: int, target_node_id: int, alias: str, is_auto_restart: bool | None = None, group_alias: str | None = None, ruk: str | None = None)[source]
- ManageEnvAttributes(target_app_id: str, attributes: str, ruk: str | None = None)[source]
- Parameters:
target_app_id – target environment name.
attributes – JSON object with required attributes. For example: “{‘key1’: ‘value1’, ‘key2’: null}”.
- Migrate(env_name: str, hardware_node_group: str | None = None, is_on_line: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
hardware_node_group – unique identifier of the target user region (host group).
is_on_line – defines whether to perform online migration (true) or offline (false).
- ReadLog(env_name: str, node_id: int, path: str, From: int | None = None, count: int | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_id – unique identifier of the target node (container).
path – path to the required log file.
From – index number of a symbol to start returning log file data from (all preceding symbols are skipped); from start of the file if not specified.
count – number of symbols to return (all subsequent symbols are skipped); till the end of the file if not specified.
- RedeployContainerById(env_name: str, node_id: int, tag: str, use_existing_volumes: bool | None = None, login: str | None = None, password: str | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_id – unique identifier of the target node (container).
tag – target tag for the container redeploy.
use_existing_volumes – defines whether to keep existing volumes data (true) or erase any custom data (false).
login – new username to access remote registry.
password – new password to access remote registry.
manage_dns_state – defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.
- RedeployContainers(env_name: str, tag: str, node_group: str | None = None, node_id: int | None = None, use_existing_volumes: bool | None = None, login: str | None = None, password: str | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
tag – target tag for the container redeploy.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container).
use_existing_volumes – defines whether to keep existing volumes data (true) or erase any custom data (false).
login – new username to access remote registry
password – new password to access remote registry.
manage_dns_state – defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.
- RedeployContainersByGroup(env_name: str, node_group: str, tag: str, is_sequential: bool | None = None, use_existing_volumes: bool | None = None, delay: int | None = None, login: str | None = None, password: str | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Params node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- Params tag:
target tag for the container redeploy.
- Params is_sequential:
defines whether to redeploy containers one-by-one to ensure uptime (true) or simultaneously (false).
- Params use_existing_volumes:
defines whether to keep existing volumes data (true) or erase any custom data (false).
- Params delay:
delay (in seconds) between two consecutive redeploys when using the sequential restart type (I.e. when redeploy is performed on servers one-by-one to ensure uptime).
- Params login:
new username to access remote registry.
- Params password:
new password to access remote registry.
- Params manage_dns_state:
defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.
- RemoveApp(env_name: str, context: str, node_group: str | None = None, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Params context:
application context to be removed.
- Params node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- RemoveContainerEnvVars(env_name: str, vars: list[str], node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
- Params env_name:
target environment name.
- Params vars:
JSON array with a list of container environment variables, e.g. [“var1”, “var2”].
- Params node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- Params node_id:
unique identifier of the target node (container).
- RemoveContainerVolumeByGroup(env_name: str, node_group: str, path: str, ruk: str | None = None)[source]
- RemoveContainerVolumes(env_name: str, volumes: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
- Params env_name:
target environment name
- Parameters:
volumes – JSON array of data volumes to be removed, e.g. /data/volume or [“/data/volume”,”/data/volume2”, …].
- Params node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.e
- Params node_id:
unique identifier of the target node (container).
- RemoveDockerVolumeByGroup(env_name: str, node_group: str, path: str, ruk: str | None = None)[source]
- RemoveEndpoint(env_name: str, id: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
id – unique identifier of the target endpoint.
- RemoveEnvPolicy(target_app_id: str, policy: list[str], ruk: str | None = None)[source]
- Parameters:
target_app_id – target application identifier of the environment for removing policy.
policy – comma-separated list of policy. For example: “policy1,policy2”.
- RemoveEnvProperty(env_name: str, property_keys: list[str], ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
property_keys – comma-separated list of property keys. For example: “customProperty1,customProperty2”.
- RemoveLog(env_name: str, node_id: int, path: str, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_id – unique identifier of the target node (container).
path – path to the required log file.
- RenameApp(env_name: str, old_context: str, new_context: str, node_group: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
old_context – current context name of the application.
new_context – new context name for the application.
- Node_group:
unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- ResetContainerPassword(env_name: str, node_id: int, password: str | None = None, ruk: str | None = None)[source]
- ResetContainerPasswordById(env_name: str, node_id: int, password: str | None = None, ruk: str | None = None)[source]
- ResetContainerPasswordByType(env_name: str, node_type: str, password: str | None = None, ruk: str | None = None)[source]
- ResetContainersPasswordByGroup(env_name: str, node_group: str, password: str | None = None, ruk: str | None = None)[source]
- ResetNodePassword(env_name: str, node_group: str | None = None, node_id: int | None = None, password: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container)
password – a new OS password for user container(s).
- ResetNodePasswordById(env_name: str, node_id: int, password: str | None = None, ruk: str | None = None)[source]
- ResetNodePasswordByType(env_name: str, node_type: str, password: str | None = None, ruk: str | None = None)[source]
- ResetServicePassword(env_name: str, node_group: str | None = None, node_id: int | None = None, password: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container)
password – a new OS password for user container(s) service..
- RestartContainer(env_name: str, node_id: int, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartContainerById(env_name: str, node_id: int, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartContainerByType(env_name: str, node_type: str, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartContainersByGroup(env_name: str, node_group: str, delay: int | None = None, is_sequential: bool | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartNodeById(env_name: str, node_id: int, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartNodes(env_name: str, node_group: str | None = None, node_id: int | None = None, delay: int | None = None, is_sequential: bool = False, manage_dns_state: bool = False, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container).
delay – delay (in seconds) between two consecutive restarts when using the sequential restart type (I.e. when restart is performed on servers one-by-one to ensure uptime).
is_sequential – defines whether to restart containers one-by-one to ensure uptime (true) or simultaneously (false).
manage_dns_state – defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.
- RestartNodesByGroup(env_name: str, node_group: str, delay: int | None = None, is_sequential: bool | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartNodesByType(env_name: str, node_type: str, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- RestartServices(env_name: str, node_group: str | None = None, node_id: int | None = None, delay: int | None = None, is_sequential: bool | None = None, manage_dns_state: bool | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
node_id – unique identifier of the target node (container).
delay – delay (in seconds) between two consecutive restarts when using the sequential restart type (I.e. when restart is performed on servers one-by-one to ensure uptime).
is_sequential – defines whether to restart containers one-by-one to ensure uptime (true) or simultaneously (false).
manage_dns_state – defines whether to exclude a target node from DNS for the duration of the operation (true) or not (false, by default). This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.
- RestoreDump(env_name: str, node_type: str, db_name: str, password: str, dump_url: str, user: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_type – unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack.
db_name – target database name.
password – password to access database.
dump_url – URL to the database dump file.
user – username to access database.
- SendTransferRequest(env_name: str, email: str, ruk: str | None = None)[source]
- Parameters:
env_name – application identifier of the environment
email – email of the user which is going to be an owner
- SetCloudletsCount(env_name: str, node_type: str, flexible_cloudlets: int, fixed_cloudlets: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_type – unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. Required if nodeid is not specified.
flexible_cloudlets – a number of dynamic (flexible) cloudlets to be set for the layer.
fixed_cloudlets – a number of reserved (fixed) cloudlets to be set for the layer.
- SetCloudletsCountByGroup(env_name: str, node_group: str, flexible_cloudlets: int, fixed_cloudlets: int, delay: int | None = None, ruk: str | None = None)[source]
- SetCloudletsCountById(env_name: str, node_id: int, flexible_cloudlets: int, fixed_cloudlets: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_id – unique identifier of the target node (container). If not defined, the cloudlet count will be set for all compute Nodes of the environment.
flexible_cloudlets – a number of dynamic cloudlets to be set.
fixed_cloudlets – a number of reserved cloudlets to be set.
- SetCloudletsCountByType(env_name: str, node_type: str, flexible_cloudlets: int, fixed_cloudlets: int, ruk: str | None = None)[source]
- SetContainerEntryPoint(env_name: str, node_id: int, data: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
data – Entry point data, e.g. “/bin/sh -c”
- SetContainerEnvVars(env_name: str, node_id: int, var: dict, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
var – JSON object with a list of container environment variables, e.g {“var1”:”value1”, “var2”:”value2”}.
- SetContainerEnvVarsByGroup(env_name: str, node_group: str, data: dict, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer
data – JSON object with a list of container environment variables, e.g. {“var1”:”value1”, “var2”:”value2”}.
- SetContainerRunCmd(env_name: str, node_id: int, data: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
data – run command data, e.g. “service tomcat start”
- SetDockerEntryPoint(env_name: str, node_id: int, data: str | None = None, ruk: str | None = None)[source]
- Parameters:
data – entry point
- SetDockerEnvVars(env_name: str, node_id: int, data: str, ruk: str | None = None)[source]
- Parameters:
data – list of container environment variables in json format
- SetDockerRunCmd(env_name: str, node_id: int, data: str | None = None, ruk: str | None = None)[source]
- Parameters:
data – run command
- SetDockerVolumesFrom(env_name: str, node_id: int, data: str, ruk: str | None = None)[source]
- Parameters:
data – json array of volumes e.g. [{“readOnly”:false,”sourceNodeId”:80579}]
- SetEnvDisplayName(env_name: str, display_name: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
dispplay_name – new display name of the environment
- SetNodeDisplayName(env_name: str, node_id: int | None = None, display_name: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_id – unique identifier of the target node (container).
display_name – new display name of the node.t
- SetNodeGroupDisplayName(env_name: str, node_group: str | None = None, display_name: str | None = None, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name.
node_group – unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
display_name – new display name of the node.t
- SkipMessage(env_name: str, node_id: int, id: int, ruk: str | None = None)[source]
- Parameters:
env_name – target environment name
node_id – unique identifier of the target node (container).
id – unique identifier of the target message.
- UninstallSoftwarePackage(env_name: str, keyword: str, node_type: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
- class jelastic.api.environment._File(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
The File Manager API service gives you access to the container’s home directory and your environment’s configuration files. You can read, write, create, delete, and adjust your application files and settings.
- AddFavorite(env_name: str, path: str, node_group: str | None = None, node_id: int | None = None, keyword: str | None = None, filter: str | None = None, is_dir: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file or directory for quick access. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container). param keyword: custom name of the favorite shortcut. param filter: regex expression to filter a list of files displayed via the shortcut (up to 255 characters). param is_dir: defines whether shortcut points to the directory (true) or file (false).
- AddMountPointByGroup(env_name: str, node_group: str, path: str, source_path: str, protocol: str | None = None, source_host: str | None = None, source_node_id: int | None = None, name: str | None = None, read_only: bool | None = None, source_address_type: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param path: absolute path to the local folder where remote data will be shown at param source_path: absolute path to the files on your remote node/server where the data is physically stored. param source_host: host or IP address of the remote server where the data is physically stored. param source_node_id: unique identifier of the remote node where the data is physically stored. param name: custom name for the mount point (local folder name is used if not specified). param read_only: defines access rights for the mounted files - read only (true) or read and write (false). param source_address_type: source address type (“IP” or 0 | “DOMAIN” or 1 | “NODE_GROUP” or 2).
- AddMountPointById(env_name: str, node_id: int, path: str, source_path: str, protocol: str | None = None, source_host: str | None = None, source_node_id: int | None = None, name: str | None = None, read_only: bool | None = None, source_address_type: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_id : unique identifier of the target node (container). param path: absolute path to the local folder where remote data will be shown at param source_path: absolute path to the files on your remote node/server where the data is physically stored. param source_host: host or IP address of the remote server where the data is physically stored. param source_node_id: unique identifier of the remote node where the data is physically stored. param name: custom name for the mount point (local folder name is used if not specified). param read_only: defines access rights for the mounted files - read only (true) or read and write (false). param source_address_type: source address type (“IP” or 0 | “DOMAIN” or 1 | “NODE_GROUP” or 2).
- Append(env_name: str, path: str, body: str | None = None, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file, where the text should be added. param body: text that should be added to the file. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container).
- CheckCrossMount(env_name: str, node_id: int, source_node_id: int, ruk: str | None = None)[source]
param env_name: target environment name. param node_id : unique identifier of the target node (container). param source_node_id: unique identifier of the remote node where the data is physically stored.
- CloneMountPoints(env_name: str, node_id: int, source_node_id: int, mount_points: str | None = None, ruk: str | None = None)[source]
- Copy(env_name: str, src: str, dest: str, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param src: absolute path to the source file that should be copied. param dest: absolute path to the destination, where the file copy should be placed. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container).
- Create(env_name: str, path: str, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, isdir: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file that should be created. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param isdir: defines whether to create directory (true) or file (false). param node_id: unique identifier of the target node (container).
- Delete(env_name: str, path: str, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file that should be created. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container).
- GetExportedList(env_name: str, node_id: int, path: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_id: unique identifier of the target node (container). param path: absolute path to the file that should be created.
- GetFavorites(env_name: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- GetList(env_name: str, path: str | None = None, node_type: str | None = None, node_group: str | None = None, node_id: int | None = None, filter: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container). param filter: regex expression to filter the list of returned files (up to 255 characters).
- GetMountPoints(env_name: str, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- Read(env_name: str, path: str, node_type: str | None = None, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- RemoveExport(env_name: str, node_id: int, path: str, client_node_id: int, client_path: str, ruk: str | None = None)[source]
param env_name: target environment name. param node_id: unique identifier of the target node (container). param path: absolute path to the directory with files. param client_node_id: unique identifier of the remote client node. param client_path: absolute path to the directory on the remote client node through which local files can be accessed.
- RemoveFavorite(env_name: str, path: str, node_type: str | None = None, node_group: str | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param node_id: unique identifier of the target node (container).
- RemoveMountPointByGroup(env_name: str, path: str, node_group: str, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- RemoveMountPointById(env_name: str, path: str, node_id: str, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_id: unique identifier of the target node (container).
- Rename(env_name: str, old_path: str, new_path: str, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param old_path: absolute path to the file to be renamed. param new_path: absolute path with the new filename. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container).
- ReplaceInBody(env_name: str, path: str, pattern: str, replacement: str, nth: int | None = None, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file that should be created. param pattern: regex expression (in a SED-compatible format) to locate text for replacement. param replacement: replacement text (in a plain text format). param nth: maximum number of entries for replacement. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container).
- UnpackById(env_name: str, path: str, node_id: str, source_path: str, dest_path: str, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_id: unique identifier of the target node (container). param source_path: absolute path to the target archive file. param dest_path: absolute path to extract files to.
- UnpackByType(env_name: str, path: str, node_type: str, source_path: str, dest_path: str, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the directory with files. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param source_path: absolute path to the target archive file. param dest_path: absolute path to extract files to.
- Upload(env_name: str, source_path: str, dest_path: str, node_type: str | None = None, node_group: str | None = None, master_only: bool | None = None, node_id: int | None = None, overwrite: bool | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param source_path: URL of the target file to be uploaded. param dest_path: absolute path (on the target container) to save uploaded file at. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container). param overwrite: defines whether to overwrite (true) or skip (false) file if it already exists at the destination directory.
- Write(env_name: str, path: str, body: str | None = None, node_type: str | None = None, node_group: str | None = None, master_only: bool = False, node_id: int | None = None, is_append_mode: bool = False, ruk: str | None = None)[source]
param env_name: target environment name. param path: absolute path to the file that should be created. param body: text that should be written to the file. param node_type: unique identifier of the target node type (software stack), e.g. “tomcat11” for the Tomcat 11 stack. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param master_only: defines whether to execute the command on the master/primary node only (true) or on all nodes in the layer (false). param node_id: unique identifier of the target node (container). param is_append_mode: defines whether to overwrite the file content (false) or append the existing text (false)
- class jelastic.api.environment._Group(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Categorize environments in the account with the help of the group management API. Such user-defined groups can filter the environment list, allowing a clear-cut view of the projects.
- AttachEnv(env_name: str, env_group: list[str], target_appid: str | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param env_group: a comma-separated list of the target environment group names. param target_appid: if specified, redefines the target environment. For example, to the environment shared via the collaboration feature. param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- CreateGroup(env_name: str, env_group: list[str] | None = None, data: dict | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param env_group: a comma-separated list of the target environment group names. param data : JSON object with the new group settings: param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- DetachEnv(env_name: str, env_group: list[str], target_appid: str | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param env_group: a comma-separated list of the target environment group names. param target_appid: if specified, redefines the target environment. For example, to the environment shared via the collaboration feature. param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- EditGroup(env_name: str, src_group_name: str, dst_group_name: str | None = None, data: dict | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param src_group_name: target environment group name. param dst_group_name: New environment group name (renames srcGroupName). param data : JSON object with the new group settings: param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- GetGroups(env_name: str, target_appid: str | None = None, owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param target_appid: if specified, redefines the target environment. For example, to the environment shared via the collaboration feature. param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- RemoveGroup(env_name: str, env_group: list[str], owner_uid: int | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param env_group: a comma-separated list of the target environment group names. param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- SetEnv(env_name: str, env_group: list[str], target_appid: str | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param env_group: a comma-separated list of the target environment group names. param target_appid: if specified, redefines the target environment. For example, to the environment shared via the collaboration feature.
- SetIsolationEnabled(env_name: str, group_name: str, enabled: bool, owner_uid: list[int] | None = None, ruk: str | None = None)[source]
param env_name: source environment name. param group_name: target environment group name. param enabled: defines whether isolate (true) or not (false) environments within the group. param owner_uid: unique identifier of the target account’s owner. Required if the operation is performed by the collaboration member on the shared account.
- class jelastic.api.environment._NodeGroup(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
The nodeGroup API service is used to manage data (parameters) and custom options of the environment layers.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.NodeGroup
- ApplyData(env_name: str, node_group: str, data: dict, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param data: JSON object with the node group data (parameters), e.g. {“redeployContainerDelay”:20, “customProperty”:”value”}.
- Get(env_name: str, node_group: str, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- SetSLBAccessEnabled(env_name: str, node_group: str, enabled: bool, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param enabled: defines whether allow (true) or deny (false) access to the layer via Shared Load Balancer.
- class jelastic.api.environment._Security(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
This service is responsible for managing the environment firewall feature. You can get a rules list, manage specific rules, and enable/disable firewalls for environments. Learn more in the documentation.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Security
- AddRule(env_name: str, rule: dict, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param rule: JSON object with a new firewall rule: param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- AddRules(env_name: str, rules: str, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param rule: JSON object with a new firewall rule: param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- EditRule(env_name: str, rule: dict, ruk: str | None = None)[source]
param env_name: target environment name. param rule: JSON object with a new firewall rule:
- GetRules(env_name: str, node_group: str | None = None, direction: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param direction: filters returned list to show just inbound (INPUT or IN) or outbound (OUTPUT or OUT) rules
- RemoveRule(env_name: str, id: int, ruk: str | None = None)[source]
param env_name: target environment name param id: Unique identifier of the target firewall rule.
- RemoveRules(env_name: str, ids: list[int], ruk: str | None = None)[source]
param env_name: target environment name param id: Unique identifier of the target firewall rule.
- SetFirewallEnabled(env_name: str, enabled: bool, ruk: str | None = None)[source]
param env_name: target environment name param enabled: defines whether to enable (true) or disable (false) the environment firewall feature.
- SetRuleEnabled(env_name: str, id: int, enabled: bool, ruk: str | None = None)[source]
param env_name: target environment name param id: Unique identifier of the target firewall param enabled: defines whether to enable (true) or disable (false) the environment firewall feature.
- SetRules(env_name: str, rules: str, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param rule: JSON object with an array of firewall rules to be set instead of the existing ones. param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- class jelastic.api.environment._System(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Ref: https://docs.jelastic.com/api/private/#!/api/environment.System
- DeleteOldEnvs(updatedon: str, status: str, debug: bool, checksum: str, ruk: str | None = None)[source]
- GetAPIDescriptions(is_public_only: bool | None = None, is_token: bool | None = None, ruk: str | None = None)[source]
- GetAllAPIDescriptions(is_public_only: bool | None = None, is_token: bool | None = None, ruk: str | None = None)[source]
- GetIpsByType(checksum: str, node_type: str, hnip: str | None = None, ruk: str | None = None)[source]
- RegisterEnvContainer(env_name: str, node_type: str, ip_address: str, env_id: str, ct_id: str, passwd: str, hn_ip_address: str, ruk: str | None = None)[source]
- ReloadConfiguration(reseller_id: int | None = None, changed_placeholders: str | None = None, ruk: str | None = None)[source]
- class jelastic.api.environment._Tracking(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
This service is responsible for the monitoring of actions performed by the user. Learn more in the documentation.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Tracking
- GetAction(id: int | None = None, ruk: str | None = None)[source]
param id: unique identifier of the target action. An error occurs if the specified action does not exist or does not belong to the current user.
- GetActions(start_time: datetime, end_time: list[datetime] | None = None, ruk: str | None = None)[source]
- GetAllServiceName(add_services_wildcard: bool | None = None, type: str | None = None, ruk: str | None = None)[source]
- GetEnvActions(start_time: datetime, end_time: list[datetime] | None = None, offset: int | None = None, count: int | None = None, ruk: str | None = None)[source]
- GetUidActions(count: int | None = None, start_time: datetime | None = None, end_time: datetime | None = None, action_types: str | None = None, ruk: str | None = None)[source]
param count: returns the specified number of actions from the response (10 by default). param start_time: start time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param end_time: end time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param action_types: a comma-separated list of action types to return (supported values: PUBLIC, SYSTEM).
- GetUidActionsAdmin(uid: int, start_row: int, start_time: datetime, end_time: datetime, result_count: int | None = None, servicename: str | None = None, order_field: str | None = None, order_direction: str | None = None, search_text: str | None = None, ruk: str | None = None)[source]
param start_row: returns information starting from the specified row in the response (starts with 0, by default). param start_time: start time in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param end_time: end time in the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param servicename: name of the service and corresponding method, e.g. “AccountService.SetQuota”. param order_field: oder results by the field name. param order_direction: order direction “asc” or “desc”. param search_text: optional parameter for filtering by the specified text.
- SearchActions(session: str, search: dict, ruk: str | None = None)[source]
param session: user session or personal access token. param search: JSON object with the search parameters:
- class jelastic.api.environment._Trigger(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
This service implements the environment’s trigger handling and management functionality. There are two types of triggers:
auto-scaling - custom conditions for nodes’ addition (scale out) and removal (scale in) based on the load, which allows implementing automatic horizontal scaling. Learn more in the documentation. load alert - custom conditions for email notifications based on the nodes’ load, i.e. a particular resource type is above/below the stated value for the designated period.
- AddAutoScalingTrigger(env_name: str, data: dict, ruk: str | None = None)[source]
param env_name: target environment name. param data: JSON object with trigger’s configuration.
- AddLoadAlertTrigger(env_name: str, data: dict, ruk: str | None = None)[source]
param env_name: target environment name. param data: JSON object with trigger’s configuration.
- AddTrigger(env_name: str, data: dict, ruk: str | None = None)[source]
param env_name: target environment name. param data: JSON object with trigger’s configuration.
- AutoScalingHistory(env_name: str, start_row: int, result_count: int, trigger_id: int | None = None, action_types: list[str] | None = None, start_time: datetime | None = None, end_time: datetime | None = None, order_field: str | None = None, order_direction: str | None = None, skip_results: str | None = None, node_group: str | None = None, resource_types: list[str] | None = None, trigger_log_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param start_row: returns information starting from the specified row in the response (starts with 0, by default). param result_count: returns the specified number of rows from the response (10 by default). param trigger_id: unique identifier of the target auto-scaling trigger. param action_types: a semicolon-separated list of triggers’ action types (for filtering). (supported values: ADDNODE, REMOVENODE). param start_time: start time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param end_time: end time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param order_field: sorts results by the specified field. param order_direction: sorts results in the ascending (ASC) or descending (DESC) order. param skip_results: skips results with matching text (for filtering). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param resource_type: a semicolon-separated list of triggers’ resource types (for filtering). param trigger_log_id: unique identifier of the target log file.
- DeleteAutoScalingTrigger(env_name: str, id: int, ruk: str | None = None)[source]
param env_name: target environment name. param id : unique identifier of the target auto-scaling trigger
- DeleteLoadAlertTrigger(env_name: str, id: int, ruk: str | None = None)[source]
param env_name: target environment name. param id : unique identifier of the target load alert trigger.
- EditAutoScalingTrigger(env_name: str, id: int, data: str, ruk: str | None = None)[source]
param env_name: target environment name. param id : unique identifier of the target load alert trigger. param data : JSON object with trigger’s configuration.
- EditLoadAlertTrigger(env_name: str, id: int, data: str, ruk: str | None = None)[source]
param env_name: target environment name. param id : unique identifier of the target load alert trigger. param data : JSON object with trigger’s configuration.
- GetAutoScalingTriggers(env_name: str, action_types: list[str] | None = None, ruk: str | None = None)[source]
param env_name: target environment name param action_types: a semicolon-separated list of the trigger action types (for filtering).
- GetLoadAlertTriggers(env_name: str, action_types: list[str] | None = None, ruk: str | None = None)[source]
param env_name: target environment name param action_types: a semicolon-separated list of the trigger action types (for filtering).
- GetTriggerLogs(env_name: str, start_row: int, result_count: int, trigger_id: list[int] | None = None, action_types: list[str] | None = None, start_time: datetime | None = None, end_time: datetime | None = None, order_field: str | None = None, order_direction: str | None = None, skip_results: str | None = None, node_group: str | None = None, resource_types: list[str] | None = None, trigger_log_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param start_row: returns information starting from the specified row in the response (starts with 0, by default). param result_count: returns the specified number of rows from the response (10 by default). param trigger_id: unique identifier of the target auto-scaling trigger. param action_types: a semicolon-separated list of triggers’ action types (for filtering). (supported values: ADDNODE, REMOVENODE). param start_time: start time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param end_time: end time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param order_field: sorts results by the specified field. param order_direction: sorts results in the ascending (ASC) or descending (DESC) order. param skip_results: skips results with matching text (for filtering). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param resource_type: a semicolon-separated list of triggers’ resource types (for filtering). param trigger_log_id: unique identifier of the target log file.
- GetTriggers(env_name: str, action_types: list[str] | None = None, ruk: str | None = None)[source]
param env_name: target environment name param action_types: a semicolon-separated list of the trigger action types (for filtering).
- LoadAlertHistory(env_name: str, start_row: int, result_count: int, trigger_id: int | None = None, action_types: list[str] | None = None, start_time: datetime | None = None, end_time: datetime | None = None, order_field: str | None = None, order_direction: str | None = None, skip_results: str | None = None, node_group: str | None = None, resource_types: list[str] | None = None, trigger_log_id: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param start_row: returns information starting from the specified row in the response (starts with 0, by default). param result_count: returns the specified number of rows from the response (10 by default). param trigger_id: unique identifier of the target auto-scaling trigger. param action_types: a semicolon-separated list of triggers’ action types (for filtering). (supported values: ADDNODE, REMOVENODE). param start_time: start time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param end_time: end time (UTC) of a period for which actions should be shown. In the format “yyyy-MM-dd hh:mm:ss”, e.g. “2022-11-16 00:00:00”. param order_field: sorts results by the specified field. param order_direction: sorts results in the ascending (ASC) or descending (DESC) order. param skip_results: skips results with matching text (for filtering). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param resource_type: a semicolon-separated list of triggers’ resource types (for filtering). param trigger_log_id: unique identifier of the target log file.
- class jelastic.api.environment._Vcs(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
This service is the tool for managing your VCS (version control system) projects. Configure periodic automatic deployment of the committed changes, and you can work with GIT/SVN repository only. Just commit the updated code to your VCS project. The platform will detect changes and automatically push them to the assigned environment. In contrast to the GIT hooks, the auto-deploy feature does not require configuration on the GIT side and works with SVN.
Ref: https://docs.jelastic.com/api/private/#!/api/environment.Vcs
- CreateProject(env_name: str, type: str, context: str, url: str, branch: str | None = None, key_id: int | None = None, login: str | None = None, password: str | None = None, auto_update: bool | None = None, interval: str | None = None, auto_resolve_conflict: bool | None = None, zdt: bool | None = None, update_now: bool | None = None, node_group: str | None = None, hooks: str | None = None, delay: int | None = None, repo_hash: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param type: VCS repository type (“GIT” or “SVN”). param context: custom context name for the deployed project (ROOT by default). param url: URL to the repository (including protocol). param branch: remote repository branch (master by default). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the Management > Account > GetSSHKeys method. param login: login for authentication in VCS. param password: password or token for authentication in VCS. param auto_update: defines whether to enable (true) or disable (false) automatic project updates (only upon code changes in the remote repository); auto-update frequency is set with the interval parameter. param interval: delay (in minutes) for automatic project updates. param auto_resolve_conflict: defines whether to automatically resolve (true) or not (false) merge conflicts (by updating the contradictory files to the repository version, i.e. locally made changes are discarded). param zdt: defines whether to use zero-downtime deployment for PHP (true) or not (false). param update_now: defines whether to deploy your project immediately after its creation (true) or postpone this operation (false). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (i.e. when deployment is performed on servers one-by-one to ensure uptime). param repo_hash: target repository hash.
- DeleteProject(env_name: str, context: str, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param context: custom context name for the deployed project (ROOT by default). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- EditProject(env_name: str, type: str, oldcontext: str, newcontext: str, url: str, branch: str, auto_update: bool, auto_resolve_conflict: bool, zdt: bool, key_id: int | None = None, login: str | None = None, password: str | None = None, interval: str | None = None, node_group: str | None = None, hooks: list[str] | None = None, delay: int | None = None, repo_hash: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param type: VCS repository type (“GIT” or “SVN”). param oldcontext: context name of the existing project. param newcontext: new context name for the edited project. param url: URL to the repository (including protocol). param branch: remote repository branch (master by default). param key_id: unique identifier of a private SSH key on the account. It can be found in the dashboard (account Settings > SSH Keys > Private Keys) or fetched with the Management > Account > GetSSHKeys method. param login: login for authentication in VCS. param password: password or token for authentication in VCS. param auto_update: defines whether to enable (true) or disable (false) automatic project updates (only upon code changes in the remote repository); auto-update frequency is set with the interval parameter. param interval: delay (in minutes) for automatic project updates. param auto_resolve_conflict: defines whether to automatically resolve (true) or not (false) merge conflicts (by updating the contradictory files to the repository version, i.e. locally made changes are discarded). param zdt: defines whether to use zero-downtime deployment for PHP (true) or not (false). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param hooks: JSON object with custom scripts (actual content) to be executed before and after the build/deployment operations. For example: {“preDeploy”:”script”, “postDeploy”:”script”, “preBuild”:”script”, “postBuild”:”script”}. param delay: delay (in seconds) between two consecutive deployments when using the sequential deployment type (i.e. when deployment is performed on servers one-by-one to ensure uptime). param repo_hash: target repository hash.
- GetProject(env_name: str, context: str | None = None, node_group: str | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param context: custom context name for the deployed project (ROOT by default). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer.
- Update(env_name: str, context: str, node_group: str | None = None, delay: int | None = None, ruk: str | None = None)[source]
param env_name: target environment name. param context: custom context name for the deployed project (ROOT by default). param node_group: unique identifier of the target node group (layer), e.g. “cp” for the default application server layer. param delay: delay (in seconds) between two consecutive restarts when using the sequential restart type (i.e. when restart is performed on servers one-by-one to ensure uptime).
- class jelastic.api.environment._Windows(session: Session, token: str, debug: bool = False, ruk: str | None = None)[source]
Bases:
Environment
Service provides a flexible structure to manage Environment, obtain statistic information etc.
- AddDomain(name: str, username: str, password: str, dns_server: str | None = None, ruk: str | None = None)[source]
param password: password of the domain user