Method: projects.locations.products.patch
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat perubahan pada resource Produk. Hanya kolom displayName
, description
, dan labels
yang dapat diperbarui saat ini.
Jika label diperbarui, perubahan tidak akan tercermin dalam kueri hingga waktu indeks berikutnya.
Kemungkinan error:
- Menampilkan NOT_FOUND jika Produk tidak ada.
- Menampilkan INVALID_ARGUMENT jika displayName ada di updateMask, tetapi tidak ada di permintaan atau lebih dari 4.096 karakter.
- Menampilkan INVALID_ARGUMENT jika deskripsi ada di updateMask, tetapi lebih dari 4.096 karakter.
- Menampilkan INVALID_ARGUMENT jika productCategory ada di updateMask.
Permintaan HTTP
PATCH https://vision.googleapis.com/v1/{product.name=projects/*/locations/*/products/*}
URL menggunakan sintaks gRPC Transcoding.
Parameter jalur
Parameter |
product.name |
string
Nama resource produk. Formatnya adalah: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID . Kolom ini diabaikan saat membuat produk.
|
Parameter kueri
Parameter |
updateMask |
string (FieldMask format)
FieldMask yang menentukan kolom yang akan diperbarui. Jika updateMask tidak ditentukan, semua kolom yang dapat diubah akan diperbarui. Jalur penyamaran yang valid mencakup productLabels , displayName , dan description .
Daftar dipisahkan koma yang berisi nama-nama kolom yang sepenuhnya valid. Contoh: "user.displayName,photo" .
|
Isi permintaan
Isi permintaan memuat instance Product
.
Isi respons
Jika berhasil, isi respons akan berisi instance Product
.
Cakupan Otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
Untuk mengetahui informasi selengkapnya, lihat Ringkasan Autentikasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-30 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-30 UTC."],[],[],null,["# Method: projects.locations.products.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nMakes changes to a Product resource. Only the `displayName`, `description`, and `labels` fields can be updated right now.\n\nIf labels are updated, the change will not be reflected in queries until the next index time.\n\nPossible errors:\n\n- Returns NOT_FOUND if the Product does not exist.\n- Returns INVALID_ARGUMENT if displayName is present in updateMask but is missing from the request or longer than 4096 characters.\n- Returns INVALID_ARGUMENT if description is present in updateMask but is longer than 4096 characters.\n- Returns INVALID_ARGUMENT if productCategory is present in updateMask.\n\n### HTTP request\n\n`PATCH https://vision.googleapis.com/v1/{product.name=projects/*/locations/*/products/*}`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Product](/vision/product-search/docs/reference/rest/v1/projects.locations.products#Product).\n\n### Response body\n\nIf successful, the response body contains an instance of [Product](/vision/product-search/docs/reference/rest/v1/projects.locations.products#Product).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/cloud-vision`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]