CloudObject
represents a new anonymous cloud object.
CloudObject["http://…"], CloudObject["https://…"]
represents a cloud object with a given URI.
CloudObject["user:user/path"]
represents a cloud object of a given user with a given path.
CloudObject["uuid:uuid"]
represents a cloud object identified by a given UUID.
CloudObject["/abspath"]
represents a cloud object of the currently authenticated user at an absolute path.
CloudObject["relpath"]
represents a cloud object of the currently authenticated user at a relative path.
CloudObject["relpath",base]
represents a cloud object with a path relative to the base path base.
Details and Options
- CloudObject creates a reference to a cloud object identified by a URL. The cloud object does not need to exist yet.
- Absolute paths are resolved with respect to $CloudRootDirectory. Relative paths are resolved with respect to CloudDirectory.
- Cloud objects are created in the cloud defined by $CloudBase, except when using CloudObject["http://…"] or CloudObject["https://…"].
- CloudObject[URL["loc"]] is also supported.
- CloudObject allows the following options:
-
Authentication Automatic authentication provided for access to the object 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 the object is cached by a client CloudObjectNameFormat $CloudObjectNameFormat format to use for the name portion of the URL CloudObjectURLType $CloudObjectURLType base type of URL to use (obj, env, ...) EvaluationPrivileges Automatic privileges of evaluations by the object IconRules {} icons for the object in different deployments MetaInformation {} rules giving metainformation Permissions $Permissions permissions for access etc. SourceLink $SourceLink object to be linked as the source - Options[CloudObject[…],…] gives the current options of a previously created CloudObject. SetOptions can be used to reset them.
- DeleteObject[CloudObject[…]] removes a CloudObject.
- If a cloud object directory contains an object named either index.html or index.nb, it will be served when users visit the address of the directory. If both an index.html and index.nb object are present in the directory, the index.html will be used.
- Information of a CloudObject may include the following properties:
-
"UUID" UUID of the cloud object "Path" named object path or None (if anonymous) "DisplayName" display name for cloud object "OwnerCloudUserUUID" cloud user UUID for object owner "OwnerCloudUserID" cloud user ID for object owner "MIMEType" application MIME type "FileType" file type "FileByteCount" file size in bytes "FileHashMD5" MD5 hash "Created" creation date "LastAccessed" access date "LastModified" modification date "Permissions" permission rules "Active" whether the object is active
Examples
open allclose allBasic Examples (3)
Create a reference to a new, unnamed cloud object:
Refer to a named cloud object with an absolute path:
Refer to a named cloud object with a relative path:
Refer to a named object inside a base directory:
Refer to a named cloud object owned by a specific user:
Refer to a named cloud object in a subdirectory of the user's directory in the cloud:
Save a computed value in a cloud object:
Read an expression stored in a cloud object:
An unnamed directory object with index object:
The index page will be served when visiting the directory object:
Options (11)
AutoCopy (2)
Deploy a public notebook to a named cloud object:
Set the AutoCopy option to True:
Use CloudPublish to automatically set the option to True:
CloudObjectNameFormat (1)
Generate a reference to an object using the current $CloudUserUUID:
Generate a reference to an object using the current $CloudUserID:
CloudObjectURLType (1)
SharingList (1)
Share an object with another user:
The user is added to the SharingList option of the CloudObject:
Properties & Relations (2)
Relative paths are resolved with respect to CloudDirectory:
The cloud object is created under the "mydir" directory:
Cloud objects with an absolute path are still created under $CloudRootDirectory:
LocalObject is used for local persistent storage:
Possible Issues (1)
Applying CloudObject itself does not create an actual object in the cloud; it only refers to an object. So accessing the URL immediately will return a Not Found page:
Only by writing content to the cloud object is it actually created in the cloud:
Text
Wolfram Research (2014), CloudObject, Wolfram Language function, https://reference.wolfram.com/language/ref/CloudObject.html (updated 2020).
CMS
Wolfram Language. 2014. "CloudObject." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/CloudObject.html.
APA
Wolfram Language. (2014). CloudObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CloudObject.html