ee.data.createAsset
Creates an asset from a JSON value. To create an empty image collection or folder, pass in a "value" object with a "type" key whose value is one of ee.data.AssetType.* (i.e. "ImageCollection" or "Folder").
Returns a description of the saved asset, including a generated ID, or null if a callback is specified.
Usage | Returns |
---|
ee.data.createAsset(value, path, force, properties, callback) | Object |
Argument | Type | Details |
---|
value | Object | An object describing the asset to create. |
path | String, optional | An optional desired ID, including full path. |
force | Boolean, optional | Force overwrite. |
properties | Object, optional | The keys and values of the properties to set |
callback | Function, optional | An optional callback. If not supplied, the call is made synchronously. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["Generates an Earth Engine asset from a JSON object, enabling the creation of image collections, folders, or other asset types."],["Allows specification of an asset ID, optional overwriting, and custom properties during asset creation."],["Returns asset details including a generated ID or utilizes a callback function for asynchronous operations."],["Supports creating empty image collections and folders by providing a JSON value with the specific \"type\" key."]]],["The function `ee.data.createAsset` creates an asset from a JSON value. It accepts a `value` object describing the asset and an optional `path` for the asset ID. The `force` argument allows overwriting, and `properties` sets asset metadata. A `callback` enables asynchronous operation. Without a callback, it returns an object describing the asset, including the ID. An empty image collection or folder can be created by using the values from ee.data.AssetType.\n"]]