Method: projects.settings.value.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างค่าการตั้งค่า
แสดงผล google.rpc.Status
พร้อม google.rpc.Code.NOT_FOUND
หากไม่มีการตั้งค่า แสดงผล google.rpc.Status
พร้อม google.rpc.Code.ALREADY_EXISTS
หากมีค่าการตั้งค่าอยู่แล้วในทรัพยากรระบบคลาวด์ที่ระบุ แสดงผล google.rpc.Status
พร้อม google.rpc.Code.FAILED_PRECONDITION
หากการตั้งค่าประกอบด้วยสถานะอ่านอย่างเดียว
คำขอ HTTP
POST https://resourcesettings.googleapis.com/v1alpha1/{settingValue.name=projects/*/settings/*/value}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
settingValue.name |
string
ชื่อทรัพยากรของการตั้งค่า ต้องอยู่ในรูปแบบใดรูปแบบหนึ่งต่อไปนี้
projects/{project_number}/settings/{setting_name}/value
folders/{folder_id}/settings/{setting_name}/value
organizations/{organization_id}/settings/{setting_name}/value
เช่น "/projects/123/settings/gcp-enableMyFeature/value"
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ SettingValue
เนื้อหาการตอบกลับ
หากทําสําเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ SettingValue
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/cloud-platform
โปรดดูข้อมูลเพิ่มเติมที่ภาพรวมการตรวจสอบสิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-05-25 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2023-05-25 UTC"],[[["Creates a new setting value for a specific Cloud resource, identified by its name."],["Returns errors if the setting doesn't exist, the value already exists, or the setting is read-only."],["Requires providing the `SettingValue` object in the request body, specifying the desired value."],["Uses the `cloud-platform` OAuth scope for authorization."],["Provides links for gRPC Transcoding, SettingValue definition, and Authentication Overview for additional context."]]],["This outlines creating a setting value via a POST request to a specified URL. The request requires a `settingValue.name` path parameter, formatted according to project, folder, or organization. The request body contains a `SettingValue` instance, and a successful response returns a new `SettingValue` instance. Potential errors include `NOT_FOUND` (setting doesn't exist), `ALREADY_EXISTS`, or `FAILED_PRECONDITION` (read-only setting). The operation requires the `cloud-platform` OAuth scope.\n"]]