Binding

ผู้ร่วมงาน members หรือผู้บริหารที่มี role

การแสดง JSON
{
  "role": string,
  "members": [
    string
  ],
  "condition": {
    object (Expr)
  }
}
ช่อง
role

string

บทบาทที่กำหนดให้กับรายการ members หรือหลักการ เช่น roles/viewer, roles/editor หรือ roles/owner

ดูภาพรวมของบทบาทและสิทธิ์ IAM ได้ที่เอกสารประกอบ IAM ดูรายการบทบาทที่กำหนดไว้ล่วงหน้าที่พร้อมใช้งานได้ที่นี่

members[]

string

ระบุผู้ใช้ที่ขอสิทธิ์เข้าถึงทรัพยากร Google Cloud members อาจมีค่าดังต่อไปนี้

  • allUsers: ตัวระบุพิเศษที่แสดงถึงทุกคนที่อยู่บนอินเทอร์เน็ต ไม่ว่าจะมีหรือไม่มีบัญชี Google

  • allAuthenticatedUsers: ตัวระบุพิเศษที่แสดงถึงทุกคนที่ได้รับการตรวจสอบสิทธิ์ด้วยบัญชี Google หรือบัญชีบริการ ไม่รวมข้อมูลประจำตัวที่มาจากผู้ให้บริการข้อมูลประจำตัว (IdP) ภายนอกผ่านการรวมข้อมูลประจำตัว

  • user:{emailid}: อีเมลที่แสดงถึงบัญชี Google ที่เฉพาะเจาะจง เช่น alice@example.com

  • serviceAccount:{emailid}: อีเมลที่แสดงถึงบัญชีบริการของ Google เช่น my-other-app@appspot.gserviceaccount.com

  • serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: ตัวระบุสำหรับบัญชีบริการ Kubernetes เช่น my-project.svc.id.goog[my-namespace/my-kubernetes-sa]

  • group:{emailid}: อีเมลที่แสดงถึงกลุ่ม Google เช่น admins@example.com

  • domain:{domain}: โดเมน G Suite (หลัก) ที่แสดงถึงผู้ใช้ทั้งหมดของโดเมนนั้น เช่น google.com หรือ example.com
  • principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}: ข้อมูลประจำตัวเดียวในพูลข้อมูลประจำตัวของพนักงาน

  • principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{groupId}: ข้อมูลประจำตัวของพนักงานทั้งหมดในกลุ่ม

  • principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attributeName}/{attribute_value}: ข้อมูลประจำตัวของพนักงานทั้งหมดที่มีค่าแอตทริบิวต์ที่เฉพาะเจาะจง

  • principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*: ข้อมูลประจำตัวทั้งหมดในพูลข้อมูลประจำตัวของพนักงาน

  • principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}: ข้อมูลประจำตัวเดียวในพูล Workload Identity

  • principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{groupId}: กลุ่มพูล Workload Identity

  • principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attributeName}/{attribute_value}: ข้อมูลประจำตัวทั้งหมดในพูล Workload Identity ที่มีแอตทริบิวต์หนึ่งๆ

  • principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*: ข้อมูลประจำตัวทั้งหมดในพูล Workload Identity

  • deleted:user:{emailid}?uid={uniqueid}: อีเมล (พร้อมตัวระบุที่ไม่ซ้ำ) ที่แสดงถึงผู้ใช้ที่เพิ่งถูกลบ เช่น alice@example.com?uid=123456789012345678901 หากมีการกู้คืนผู้ใช้ ค่านี้จะเปลี่ยนกลับเป็น user:{emailid} และผู้ใช้ที่กู้คืนจะยังคงมีบทบาทในการเชื่อมโยง

  • deleted:serviceAccount:{emailid}?uid={uniqueid}: อีเมล (พร้อมตัวระบุที่ไม่ซ้ำ) ที่แสดงถึงบัญชีบริการที่เพิ่งถูกลบ เช่น my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901 หากยกเลิกการลบบัญชีบริการ ค่านี้จะเปลี่ยนกลับเป็น serviceAccount:{emailid} และบัญชีบริการที่ยกเลิกการลบจะยังคงมีบทบาท ในการเชื่อมโยง

  • deleted:group:{emailid}?uid={uniqueid}: อีเมล (พร้อมตัวระบุที่ไม่ซ้ำ) ที่แสดงถึงกลุ่ม Google ที่เพิ่งถูกลบ เช่น admins@example.com?uid=123456789012345678901 หากกู้คืนกลุ่ม ค่านี้จะเปลี่ยนกลับเป็น group:{emailid} และกลุ่มที่กู้คืนจะยังคงมีบทบาทในการเชื่อมโยง

  • deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}: ลบข้อมูลประจำตัวเดียวในพูลข้อมูลประจำตัวของพนักงาน เช่น deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value

condition

object (Expr)

เงื่อนไขที่เชื่อมโยงกับการเชื่อมโยงนี้

หากเงื่อนไขประเมินเป็น true การเชื่อมโยงนี้จะมีผลกับคำขอปัจจุบัน

หากเงื่อนไขประเมินเป็น false การเชื่อมโยงนี้จะไม่มีผลกับคำขอปัจจุบัน อย่างไรก็ตาม การเชื่อมโยงบทบาทอื่นอาจให้บทบาทเดียวกันแก่หลักการอย่างน้อย 1 รายในการเชื่อมโยงนี้

ดูว่าทรัพยากรใดรองรับเงื่อนไขในนโยบาย IAM ได้ที่เอกสารประกอบ IAM

Expr

แสดงนิพจน์ข้อความในไวยากรณ์ Common Expression Language (CEL) CEL เป็นภาษาของนิพจน์ที่คล้ายกับภาษา C ไวยากรณ์และความหมายของ CEL มีอยู่ในเอกสารประกอบที่ https://github.com/google/cel-spec

ตัวอย่าง (การเปรียบเทียบ)

title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"

ตัวอย่าง (ความเท่ากัน)

title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"

ตัวอย่าง (ตรรกะ)

title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"

ตัวอย่าง (การดัดแปลงข้อมูล)

title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"

ตัวแปรและฟังก์ชันที่อาจมีการอ้างอิงภายในนิพจน์จะกำหนดโดยบริการที่ประเมินนิพจน์นั้น ดูข้อมูลเพิ่มเติมได้ในเอกสารประกอบของบริการ

การแสดง JSON
{
  "expression": string,
  "title": string,
  "description": string,
  "location": string
}
ช่อง
expression

string

การแสดงข้อความของนิพจน์ในไวยากรณ์ Common Expression Language

title

string

ไม่บังคับ ชื่อของนิพจน์ เช่น สตริงสั้นๆ ที่อธิบายวัตถุประสงค์ของนิพจน์ ซึ่งสามารถใช้ได้ เช่น ใน UI ที่อนุญาตให้ป้อนนิพจน์

description

string

ไม่บังคับ คำอธิบายของนิพจน์ นี่คือข้อความที่ยาวขึ้นซึ่งอธิบายถึงนิพจน์ เช่น เมื่อวางเมาส์เหนือข้อความใน UI

location

string

ไม่บังคับ สตริงที่ระบุตำแหน่งของนิพจน์สำหรับการรายงานข้อผิดพลาด เช่น ชื่อไฟล์และตำแหน่งในไฟล์