Method: policies.test
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחזירה את ההרשאות שיש למבצע הקריאה במשאב שצוין.
בקשת HTTP
POST https://sasportal.googleapis.com/v1alpha1/policies:test
כתובת ה-URL משתמשת בתחביר של gRPC Transcoding.
גוף הבקשה
גוף הבקשה מכיל נתונים עם המבנה הבא:
ייצוג ב-JSON |
{
"resource": string,
"permissions": [
string
]
} |
שדות |
resource |
string
חובה. המשאב שעבורו מתבקשות ההרשאות.
|
permissions[] |
string
קבוצת ההרשאות לבדיקה עבור resource .
|
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
הודעת תגובה לשיטה policies.test
.
ייצוג ב-JSON |
{
"permissions": [
string
]
} |
שדות |
permissions[] |
string
קבוצת ההרשאות שיש למשתמש ששלח את הקריאה.
|
היקפי הרשאות
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/userinfo.email
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-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"]],["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The core content outlines the process of testing permissions on a specified resource via an HTTP POST request to `https://sasportal.googleapis.com/v1alpha1/policies:test`. The request body, in JSON format, requires a `resource` string and an array of `permissions` strings. The successful response body returns a JSON structure with an array of `permissions` strings, detailing the caller's allowed permissions. This action requires the `https://www.googleapis.com/auth/userinfo.email` OAuth scope.\n"]]