client.services.post_clone
A method of the Services endpoint.
- post_clone(id: int) Response
Clone this Service
API URL:
POST /services/{id}/cloneimport civis client = civis.APIClient() response = client.services.post_clone(...)
- Parameters:
- idint
- Returns:
civis.Response- idint
The ID for this Service.
- namestr
The name of this Service.
- descriptionstr
The description of this Service.
- user
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- user
- typestr
The type of this Service
- docker_image_namestr
The name of the docker image to pull from DockerHub.
- docker_image_tagstr
The tag of the docker image to pull from DockerHub (default: latest).
- schedule
civis.Response - runtime_planstr
Only affects the service when deployed. On Demand means that the service will be turned on when viewed and automatically turned off after periods of inactivity. Specific Times means the service will be on when scheduled. Always On means the deployed service will always be on.
- recurrencesList[
civis.Response] List of day-hour combinations this item is scheduled for
- scheduled_daysList[int]
Days it is scheduled on, based on numeric value starting at 0 for Sunday
- scheduled_hoursList[int]
Hours it is scheduled on
- recurrencesList[
- schedule
time_zone : str
- replicasint
The number of Service replicas to deploy. When maxReplicas is set, this field defines the minimum number of replicas to deploy.
- max_replicasint
The maximum number of Service replicas to deploy. Defining this field enables autoscaling.
- instance_typestr
The EC2 instance type to deploy to.
- memoryint
The amount of memory allocated to each replica of the Service.
- cpuint
The amount of cpu allocated to each replica of the the Service.
created_at : str (time)
updated_at : str (time)
- credentialsList[
civis.Response] The credentials attached to the service. Accepts a list of credential IDs and returns a list of id, name pairs.
- idint
The ID of the credential.
- namestr
The name of the credential.
- credentialsList[
- permission_set_idint
The ID of the associated permission set, if any.
- git_repo_urlstr
The url for the git repo where the Service code lives.
- git_repo_refstr
The git reference to use when pulling code from the repo.
- git_path_dirstr
The path to the Service code within the git repo. If unspecified, the root directory will be used.
- report_idint
The ID of the associated report.
- current_deployment
civis.Response - deployment_idint
The ID for this deployment.
- user_idint
The ID of the owner.
- hoststr
Domain of the deployment.
- namestr
Name of the deployment.
- docker_image_namestr
The name of the docker image to pull from DockerHub.
- docker_image_tagstr
The tag of the docker image to pull from DockerHub (default: latest).
- display_urlstr
A signed URL for viewing the deployed item.
- instance_typestr
The EC2 instance type requested for the deployment.
- memoryint
The memory allocated to the deployment, in MB.
- cpuint
The cpu allocated to the deployment, in millicores.
- statestr
The state of the deployment. One of pending, running, terminated or sleeping.
- state_messagestr
A detailed description of the state.
- max_memory_usagefloat (float)
If the deployment has finished, the maximum amount of memory used during the deployment, in MB.
- max_cpu_usagefloat (float)
If the deployment has finished, the maximum amount of cpu used during the deployment, in millicores.
created_at : str (time)
updated_at : str (time)
- service_idint
The ID of owning Service
- current_deployment
- current_urlstr
The URL that the service is hosted at.
- environment_variables
civis.Response Environment Variables to be passed into the Service.
- environment_variables
- notifications
civis.Response - failure_email_addressesList[str]
Addresses to notify by e-mail when the service fails.
- failure_onbool
If failure email notifications are on
- notifications
- partition_labelstr
The partition label used to run this object.
- my_permission_levelstr
Your permission level on the object. One of “read”, “write”, or “manage”.
- archivedbool
The archival status of the requested item(s).
- hiddenbool
The hidden status of the item.