Method: projects.assets.copy
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำขอ HTTP
POST https://earthengine.googleapis.com/v1/{sourceName=projects/*/assets/**}:copy
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
sourceName |
string
ชื่อของชิ้นงานที่จะคัดลอก name อยู่ในรูปแบบ "projects/*/assets/**" (เช่น "projects/earthengine-legacy/assets/users/[USER]/[ASSET]"). ชิ้นงานทั้งหมดที่ผู้ใช้เป็นเจ้าของจะอยู่ในโปรเจ็กต์ "earthengine-legacy" (เช่น "projects/earthengine-legacy/assets/users/foo/bar"). ชิ้นงานอื่นๆ ทั้งหมดจะอยู่ภายใต้โปรเจ็กต์ "earthengine-public" (เช่น "projects/earthengine-public/assets/LANDSAT"). (เช่น "assets/users/[USER]/[ASSET]").
การให้สิทธิ์ต้องใช้สิทธิ์ IAM ต่อไปนี้ในทรัพยากร sourceName ที่ระบุ
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"destinationName": string,
"overwrite": boolean
} |
ช่อง |
destinationName |
string
ชื่อปลายทางที่จะคัดลอกชิ้นงานไป name อยู่ในรูปแบบ "projects/*/assets/**" (เช่น "projects/earthengine-legacy/assets/users/[USER]/[ASSET]"). ชิ้นงานทั้งหมดที่ผู้ใช้เป็นเจ้าของจะอยู่ในโปรเจ็กต์ "earthengine-legacy" (เช่น "projects/earthengine-legacy/assets/users/foo/bar"). ชิ้นงานอื่นๆ ทั้งหมดจะอยู่ภายใต้โปรเจ็กต์ "earthengine-public" (เช่น "projects/earthengine-public/assets/LANDSAT").
การให้สิทธิ์ต้องใช้สิทธิ์ IAM ต่อไปนี้ในทรัพยากร destinationName ที่ระบุ
earthengine.assets.create
|
overwrite |
boolean
อนุญาตให้เขียนทับชิ้นงานที่มีอยู่หรือไม่
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ 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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eCopies an existing Earth Engine asset to a new destination.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the source asset name and the desired destination name.\u003c/p\u003e\n"],["\u003cp\u003eOptionally allows overwriting an existing asset at the destination.\u003c/p\u003e\n"],["\u003cp\u003eNeeds appropriate IAM permissions for both source and destination.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePOST\u003c/code\u003e method with the URL \u003ccode\u003ehttps://earthengine.googleapis.com/v1/{sourceName=projects/*/assets/**}:copy\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.assets.copy\n\nCopies an asset.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1/{sourceName=projects/*/assets/**}:copy`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sourceName` | `string` The name of the asset to copy. `name` is of the format \"projects/\\*/assets/\\*\\*\" (e.g., \"projects/earthengine-legacy/assets/users/\\[USER\\]/\\[ASSET\\]\"). All user-owned assets are under the project \"earthengine-legacy\" (e.g., \"projects/earthengine-legacy/assets/users/foo/bar\"). All other assets are under the project \"earthengine-public\" (e.g., \"projects/earthengine-public/assets/LANDSAT\"). (e.g., \"assets/users/\\[USER\\]/\\[ASSET\\]\"). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `sourceName`: - `earthengine.assets.get` |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------|\n| ``` { \"destinationName\": string, \"overwrite\": boolean } ``` |\n\n| Fields ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `destinationName` | `string` The destination name to which to copy the asset. `name` is of the format \"projects/\\*/assets/\\*\\*\" (e.g., \"projects/earthengine-legacy/assets/users/\\[USER\\]/\\[ASSET\\]\"). All user-owned assets are under the project \"earthengine-legacy\" (e.g., \"projects/earthengine-legacy/assets/users/foo/bar\"). All other assets are under the project \"earthengine-public\" (e.g., \"projects/earthengine-public/assets/LANDSAT\"). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `destinationName`: - `earthengine.assets.create` |\n| `overwrite` | `boolean` Whether to allow overwriting an existing asset. |\n\n### Response body\n\nIf successful, the response body contains an instance of [EarthEngineAsset](/earth-engine/reference/rest/v1/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)."]]