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 ที่ระบุ

  • earthengine.assets.get

เนื้อหาของคำขอ

เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้

การแสดง 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