公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Method: projects.assets.create
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
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。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eCreates a new Earth Engine asset within a specified project.\u003c/p\u003e\n"],["\u003cp\u003eSupports creating folders, images, and image collections with specific requirements for each type.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with appropriate IAM permissions or OAuth scopes.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying asset ID and optional overwriting of existing image assets.\u003c/p\u003e\n"],["\u003cp\u003eReturns the newly created EarthEngineAsset upon successful completion.\u003c/p\u003e\n"]]],[],null,["# Method: projects.assets.create\n\nCreates an asset.\n\nThe following asset types are createable: \\* `FOLDER`: No fields in `asset` may be specified. \\* `IMAGE`: To create a COG-backed asset, use `image.importExternal` instead. See \u003chttps://developers.google.com/earth-engine/Earth_Engine_asset_from_cloud_geotiff\u003e for more details. \\* `IMAGE_COLLECTION`: Only the fields `startTime`, `endTime`, and `properties` may be specified.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1alpha/{parent=projects/*}/assets`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent of the asset collection (e.g., \"projects/\\*\"). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `earthengine.assets.create` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `assetId` | `string` The ID of the asset to create. Equivalent to name but without the \"projects/\\*/assets\" (e.g., users/\\[USER\\]/\\[ASSET\\]). |\n| `overwrite` | `boolean` Whether to allow overwriting an image asset. |\n\n### Request body\n\nThe request body contains an instance of [EarthEngineAsset](/earth-engine/reference/rest/v1alpha/projects.assets#EarthEngineAsset).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [EarthEngineAsset](/earth-engine/reference/rest/v1alpha/projects.assets#EarthEngineAsset).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]