Method: projects.locations.assets.create
HTTP 请求
POST https://earthengine.googleapis.com/v1beta/{parent=projects/*/locations/*}/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-03-07。
[null,null,["最后更新时间 (UTC):2025-03-07。"],[[["Creates an Earth Engine asset with the specified properties, including its type (FOLDER, IMAGE, or IMAGE_COLLECTION) and associated data."],["Requires authorization with either the `earthengine` or `cloud-platform` OAuth scope."],["Uses a POST request to the specified URL, with path and query parameters to define the asset's parent and ID."],["Allows for specifying start and end times, properties, and Cloud Storage location (for IMAGE type) within the request body."],["Optionally allows overwriting an existing image asset using the `overwrite` query parameter."]]],["This API endpoint facilitates the creation of assets within a specified project. The `POST` request to the `/assets` endpoint requires the `parent` path parameter, defining the project, and an asset ID. Asset types include `FOLDER`, `IMAGE`, and `IMAGE_COLLECTION`, each with specific field restrictions. `IMAGE` assets must specify `cloudStorageLocation` with a Cloud Storage URI. The `overwrite` query parameter allows replacing existing image assets. Successful creation returns a new `EarthEngineAsset` instance. Authorization requires specific IAM permissions and OAuth scopes.\n"]]