Method: projects.assets.create

建立資產。

可建立的素材資源類型如下:* FOLDER:不得在 asset 中指定任何欄位。* IMAGE:如要建立 COG 支援的資產,請改用 ImportExternalImage。詳情請參閱 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