Method: projects.settings.value.create
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יצירת ערך הגדרה.
מחזירה google.rpc.Status
עם google.rpc.Code.NOT_FOUND
אם ההגדרה לא קיימת. הפונקציה מחזירה google.rpc.Status
עם google.rpc.Code.ALREADY_EXISTS
אם ערך ההגדרה כבר קיים במשאב הנתון ב-Cloud. מחזירה 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
מידע נוסף זמין במאמר סקירה כללית על אימות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]