CloudDeploy
CloudDeploy[expr]
deploys expr to a new anonymous cloud object.
CloudDeploy[expr,location]
deploys expr to a cloud object at the specified location relative to the user's current cloud directory.
CloudDeploy[expr,CloudObject[…]]
deploys expr to the specified cloud object.
Details and Options
- CloudDeploy works from both desktop and cloud.
- CloudDeploy returns the CloudObject that was deployed.
- CloudDeploy performs different actions depending on the form of expr:
-
APIFunction[…] create a web API to access using GET or POST requests FormFunction[…] create a form to access from the web FormPage[…] create a page containing a form and result to access from the web AskFunction[…] deploy a program that asks questions during execution NotebookObject[…] output as a notebook in the cloud ExportForm[expr,"fmt"] output expr in the specified format Delayed[obj] set obj to be reevaluated whenever it is accessed on the web Dynamic[obj] set obj to be dynamically autorefreshed on the web ScheduledTask[expr,…] evaluate expr on a schedule ContinuousTask[expr] continuously reevaluate expr AutoRefreshed[obj,…] set obj to be reevaluated on a schedule HTTPResponse[…] give a specific HTTP response on the web HTTPRedirect[…] redirect to another location on the web ExternalBundle[…] deploy a directory or hierarchy of objects EmbedCode[…] output as a web version of embed code GrammarRules[…] deploy as a grammar to be applied URLDispatcher[…] define a dispatcher of relative URLs MailReceiverFunction[…] deploy a mail receiver ChannelReceiverFunction[…] deploy a channel receiver - For other forms of expr, CloudDeploy[expr,…] gives a cloud notebook, equivalent to CloudDeploy[ExportForm[expr,"NB"],…].
- CloudDeploy[expr,URL["loc"]] is equivalent to CloudDeploy[expr,"loc"].
- CloudDeploy[Dynamic[obj,UpdateInterval->dt]] specifies that the web output should be refreshed every dt seconds.
- CloudDeploy allows the following options:
-
AutoCopy False whether to make a copy when opened AutoRemove False whether to schedule the object for deletion CachePersistence Automatic controls the time duration for which an object is cached by a client CloudBase Automatic what cloud to deploy to CloudObjectNameFormat Automatic format to use for the name portion of the URL CloudObjectURLType Automatic base type of URL to use (obj, env, ...) EvaluationPrivileges Automatic privileges of evaluations by the object IconRules Automatic icons to use for the deployed object IncludeDefinitions True whether to automatically include dependencies Magnification Automatic magnification to use for the deployed notebook MetaInformation {} metainformation for the deployed object Permissions Automatic permissions for the deployed object SourceLink Automatic object to be linked as the source - With IncludeDefinitions->True, CloudDeploy[expr,…] automatically deploys all definitions needed to evaluate expr. With IncludeDefinitions->False, the evaluation of expr must explicitly evaluate all definitions that are needed.
- With the default setting MagnificationAutomatic, CloudDeploy ignores any Magnification setting in the source document and uses a 100% magnification in the deployed notebook. With MagnificationInherited, the magnification of the source document is preserved.
- With the default setting Permissions->Automatic, CloudDeploy creates a cloud object with permissions set to $Permissions, which is usually private.
- With the default setting SourceLink->Automatic, CloudDeploy sets the source link for the deployed cloud object to be the cloud object corresponding to the current notebook. If no such cloud object exists, it sets the source link to None.
- To copy an existing local file to the cloud, use CopyFile.
Examples
open allclose allBasic Examples (3)
Deploy a Manipulate expression to a new anonymous cloud object:
Deploy an APIFunction to a new unnamed object:
The resulting API viewed in a web browser, with color set to Blue:
Deploy a FormFunction to a named object:
Scope (6)
Manipulate (1)
Deploy an interactive Manipulate:
Options (4)
Magnification (1)
Properties & Relations (3)
Saving Dependencies (1)
All dependencies of the deployed expression are persisted in the resulting cloud object, by effectively executing CloudPut with IncludeDefinitions set to True:
Deleting Deployments (1)
Apply DeleteFile to the resulting CloudObject to delete a deployment:
Exporting Content (1)
CloudDeploy[ExportForm[expr,"fmt"]] is equivalent to CloudExport[expr,"fmt"]:
Possible Issues (2)
Permissions settings determine access to a deployed cloud object:
The owner of the cloud object can call the APIFunction:
The APIFunction is no longer accessible:
Arbitrary expressions are deployed as notebooks:
Use CloudPut to store the expression directly:
Text
Wolfram Research (2014), CloudDeploy, Wolfram Language function, https://reference.wolfram.com/language/ref/CloudDeploy.html (updated 2019).
CMS
Wolfram Language. 2014. "CloudDeploy." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/CloudDeploy.html.
APA
Wolfram Language. (2014). CloudDeploy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CloudDeploy.html