Method: projects.assets.create

建立資產。

您可以建立下列素材資源類型:* FOLDER:您無法指定 asset 中的任何欄位。* IMAGE:如要建立 COG 支援的資產,請改用 image.importExternal。詳情請參閱 https://developers.google.com/earth-engine/Earth_Engine_asset_from_cloud_geotiff。* IMAGE_COLLECTION:只能指定 startTimeendTimeproperties 欄位。

HTTP 要求

POST https://earthengine.googleapis.com/v1alpha/{parent=projects/*}/assets

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

必要欄位。素材資源集合的父項 (例如「projects/*」)。

授權需要指定資源 parent 的下列 IAM 權限:

  • earthengine.assets.create

查詢參數

參數
assetId

string

要建立的素材資源 ID。與名稱相同,但不含「projects/*/assets」(例如 users/[USER]/[ASSET])。

overwrite

boolean

是否允許覆寫圖片素材資源。

要求主體

要求主體包含 EarthEngineAsset 的例項。

回應主體

如果成功,回應主體會包含新建立的 EarthEngineAsset 例項。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/earthengine
  • https://www.googleapis.com/auth/cloud-platform

詳情請參閱 OAuth 2.0 Overview