scripts_put_containers: Edit a container

View source: R/generated_client.R

scripts_put_containersR Documentation

Edit a container

Description

Edit a container

Usage

scripts_put_containers(
  id,
  required_resources,
  docker_image_name,
  name = NULL,
  parent_id = NULL,
  user_context = NULL,
  params = NULL,
  arguments = NULL,
  schedule = NULL,
  notifications = NULL,
  repo_http_uri = NULL,
  repo_ref = NULL,
  remote_host_credential_id = NULL,
  git_credential_id = NULL,
  docker_command = NULL,
  docker_image_tag = NULL,
  instance_type = NULL,
  cancel_timeout = NULL,
  time_zone = NULL,
  partition_label = NULL,
  target_project_id = NULL,
  running_as_id = NULL
)

Arguments

id

integer required. The ID for the script.

required_resources

list required. A list containing the following elements:

  • cpu integer, The number of CPU shares to allocate for the container. Each core has 1000 shares. Must be at least 2 shares.

  • memory integer, The amount of RAM to allocate for the container (in MB). Must be at least 4 MB.

  • diskSpace number, The amount of disk space, in GB, to allocate for the container. This space will be used to hold the git repo configured for the container and anything your container writes to /tmp or /data. Fractional values (e.g. 0.25) are supported.

docker_image_name

string required. The name of the docker image to pull from DockerHub.

name

string optional. The name of the container.

parent_id

integer optional. The ID of the parent job that will trigger this script

user_context

string optional. "runner" or "author", who to execute the script as when run as a template.

params

array optional. An array containing the following fields:

  • name string, The variable's name as used within your code.

  • label string, The label to present to users when asking them for the value.

  • description string, A short sentence or fragment describing this parameter to the end user.

  • type string, The type of parameter. Valid options: string, multi_line_string, integer, float, bool, file, table, database, credential_aws, credential_redshift, or credential_custom

  • required boolean, Whether this param is required.

  • value string, The value you would like to set this param to. Setting this value makes this parameter a fixed param.

  • default string, If an argument for this parameter is not defined, it will use this default value. Use true, True, t, y, yes, or 1 for true bool's or false, False, f, n, no, or 0 for false bool's. Cannot be used for parameters that are required or a credential type.

  • allowedValues array, The possible values this parameter can take, effectively making this an enumerable parameter. Allowed values is an array of hashes of the following format: 'label: 'Import', 'value': 'import''

arguments

list optional. Parameter-value pairs to use when running this script. Only settable if this script has defined parameters.

schedule

list optional. A list containing the following elements:

  • scheduled boolean, If the item is scheduled.

  • scheduledDays array, Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

  • scheduledHours array, Hours of the day it is scheduled on.

  • scheduledMinutes array, Minutes of the day it is scheduled on.

  • scheduledRunsPerHour integer, Deprecated in favor of scheduled minutes.

  • scheduledDaysOfMonth array, Days of the month it is scheduled on, mutually exclusive with scheduledDays.

notifications

list optional. A list containing the following elements:

  • urls array, URLs to receive a POST request at job completion

  • successEmailSubject string, Custom subject line for success e-mail.

  • successEmailBody string, Custom body text for success e-mail, written in Markdown.

  • successEmailAddresses array, Addresses to notify by e-mail when the job completes successfully.

  • successEmailFromName string, Name from which success emails are sent; defaults to "Civis."

  • successEmailReplyTo string, Address for replies to success emails; defaults to the author of the job.

  • failureEmailAddresses array, Addresses to notify by e-mail when the job fails.

  • stallWarningMinutes integer, Stall warning emails will be sent after this amount of minutes.

  • successOn boolean, If success email notifications are on.

  • failureOn boolean, If failure email notifications are on.

repo_http_uri

string optional. The location of a github repo to clone into the container, e.g. github.com/my-user/my-repo.git.

repo_ref

string optional. The tag or branch of the github repo to clone into the container.

remote_host_credential_id

integer optional. The id of the database credentials to pass into the environment of the container.

git_credential_id

integer optional. The id of the git credential to be used when checking out the specified git repo. If not supplied, the first git credential you've submitted will be used. Unnecessary if no git repo is specified or the git repo is public.

docker_command

string optional. The command to run on the container. Will be run via sh as: ["sh", "-c", dockerCommand]. Defaults to the Docker image's ENTRYPOINT/CMD.

docker_image_tag

string optional. The tag of the docker image to pull from DockerHub.

instance_type

string optional. The EC2 instance type to deploy to. Only available for jobs running on kubernetes.

cancel_timeout

integer optional. The amount of time (in seconds) to wait before forcibly terminating the script. When the script is cancelled, it is first sent a TERM signal. If the script is still running after the timeout, it is sent a KILL signal. Defaults to 0.

time_zone

string optional. The time zone of this script.

partition_label

string optional. The partition label used to run this object.

target_project_id

integer optional. Target project to which script outputs will be added.

running_as_id

integer optional. The ID of the runner of this script.

Value

A list containing the following elements:

id

integer, The ID for the script.

fromTemplateAliases

array, An array containing the following fields:

  • id integer, The id of the Alias object.

  • objectId integer, The id of the object

  • alias string, The alias of the object

name

string, The name of the container.

type

string, The type of the script (e.g Container)

createdAt

string, The time this script was created.

updatedAt

string, The time the script was last updated.

author

list, A list containing the following elements:

  • id integer, The ID of this user.

  • name string, This user's name.

  • username string, This user's username.

  • initials string, This user's initials.

  • online boolean, Whether this user is online.

state

string, The status of the script's last run.

finishedAt

string, The time that the script's last run finished.

category

string, The category of the script.

projects

array, An array containing the following fields:

  • id integer, The ID for the project.

  • name string, The name of the project.

parentId

integer, The ID of the parent job that will trigger this script

userContext

string, "runner" or "author", who to execute the script as when run as a template.

params

array, An array containing the following fields:

  • name string, The variable's name as used within your code.

  • label string, The label to present to users when asking them for the value.

  • description string, A short sentence or fragment describing this parameter to the end user.

  • type string, The type of parameter. Valid options: string, multi_line_string, integer, float, bool, file, table, database, credential_aws, credential_redshift, or credential_custom

  • required boolean, Whether this param is required.

  • value string, The value you would like to set this param to. Setting this value makes this parameter a fixed param.

  • default string, If an argument for this parameter is not defined, it will use this default value. Use true, True, t, y, yes, or 1 for true bool's or false, False, f, n, no, or 0 for false bool's. Cannot be used for parameters that are required or a credential type.

  • allowedValues array, The possible values this parameter can take, effectively making this an enumerable parameter. Allowed values is an array of hashes of the following format: 'label: 'Import', 'value': 'import''

arguments

list, Parameter-value pairs to use when running this script. Only settable if this script has defined parameters.

isTemplate

boolean, Whether others scripts use this one as a template.

templateDependentsCount

integer, How many other scripts use this one as a template.

publishedAsTemplateId

integer, The ID of the template that this script is backing.

fromTemplateId

integer, The ID of the template script.

templateScriptName

string, The name of the template script.

links

list, A list containing the following elements:

  • details string, The details link to get more information about the script.

  • runs string, The runs link to get the run information list for this script.

schedule

list, A list containing the following elements:

  • scheduled boolean, If the item is scheduled.

  • scheduledDays array, Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

  • scheduledHours array, Hours of the day it is scheduled on.

  • scheduledMinutes array, Minutes of the day it is scheduled on.

  • scheduledRunsPerHour integer, Deprecated in favor of scheduled minutes.

  • scheduledDaysOfMonth array, Days of the month it is scheduled on, mutually exclusive with scheduledDays.

notifications

list, A list containing the following elements:

  • urls array, URLs to receive a POST request at job completion

  • successEmailSubject string, Custom subject line for success e-mail.

  • successEmailBody string, Custom body text for success e-mail, written in Markdown.

  • successEmailAddresses array, Addresses to notify by e-mail when the job completes successfully.

  • successEmailFromName string, Name from which success emails are sent; defaults to "Civis."

  • successEmailReplyTo string, Address for replies to success emails; defaults to the author of the job.

  • failureEmailAddresses array, Addresses to notify by e-mail when the job fails.

  • stallWarningMinutes integer, Stall warning emails will be sent after this amount of minutes.

  • successOn boolean, If success email notifications are on.

  • failureOn boolean, If failure email notifications are on.

runningAs

list, A list containing the following elements:

  • id integer, The ID of this user.

  • name string, This user's name.

  • username string, This user's username.

  • initials string, This user's initials.

  • online boolean, Whether this user is online.

requiredResources

list, A list containing the following elements:

  • cpu integer, The number of CPU shares to allocate for the container. Each core has 1000 shares. Must be at least 2 shares.

  • memory integer, The amount of RAM to allocate for the container (in MB). Must be at least 4 MB.

  • diskSpace number, The amount of disk space, in GB, to allocate for the container. This space will be used to hold the git repo configured for the container and anything your container writes to /tmp or /data. Fractional values (e.g. 0.25) are supported.

repoHttpUri

string, The location of a github repo to clone into the container, e.g. github.com/my-user/my-repo.git.

repoRef

string, The tag or branch of the github repo to clone into the container.

remoteHostCredentialId

integer, The id of the database credentials to pass into the environment of the container.

gitCredentialId

integer, The id of the git credential to be used when checking out the specified git repo. If not supplied, the first git credential you've submitted will be used. Unnecessary if no git repo is specified or the git repo is public.

dockerCommand

string, The command to run on the container. Will be run via sh as: ["sh", "-c", dockerCommand]. Defaults to the Docker image's ENTRYPOINT/CMD.

dockerImageName

string, The name of the docker image to pull from DockerHub.

dockerImageTag

string, The tag of the docker image to pull from DockerHub.

instanceType

string, The EC2 instance type to deploy to. Only available for jobs running on kubernetes.

cancelTimeout

integer, The amount of time (in seconds) to wait before forcibly terminating the script. When the script is cancelled, it is first sent a TERM signal. If the script is still running after the timeout, it is sent a KILL signal. Defaults to 0.

lastRun

list, A list containing the following elements:

  • id integer,

  • state string,

  • createdAt string, The time that the run was queued.

  • startedAt string, The time that the run started.

  • finishedAt string, The time that the run completed.

  • error string, The error message for this run, if present.

timeZone

string, The time zone of this script.

partitionLabel

string, The partition label used to run this object.

myPermissionLevel

string, Your permission level on the object. One of "read", "write", or "manage".

hidden

boolean, The hidden status of the item.

archived

string, The archival status of the requested item(s).

targetProjectId

integer, Target project to which script outputs will be added.

runningAsId

integer, The ID of the runner of this script.


civis documentation built on April 1, 2023, 12:01 a.m.