Skip to main content
Astra Automation
此產品有較新版本可以使用。
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

列出與使用者相關聯之群組的角色繫結

GET /accounts/{account_id}/core/v1/users/{user_id}/groups/{group_id}/roleBindings

傳回集合中所有符合資源的 JSON 陣列。如果在請求中指定了個別欄位,則項目 JSON 陣列將按指定順序包含每個相符資源所請求的欄位。

參數

Name 類型 必要 說明

account_id

字串

路徑

True

包含帳戶資源的 ID

  • 範例:{{.Account}}

user_id

字串

路徑

True

包含使用者資源的 ID

群組 ID

字串

路徑

True

包含群組資源的 ID

包括

字串

查詢

錯誤

指示列出集合時應傳回哪些欄位。

URL 範例:「include=id」、「include=id,name」

OpenAPI 範例:"id"

  • 範例:accountID、userID、role

限制

字串

查詢

錯誤

表示列出集合時要傳回的資源數量上限。

URL 範例:「limit=2」

OpenAPI 範例:「2」

篩選器

字串

查詢

錯誤

指示在列出集合時,為了傳回資源而應符合哪些欄位。

支援的運算子包括:

  • eq - 等式

  • lt/gt - 小於/大於

  • lte/gte - 小於或等於/大於或等於

URL 範例:「filter=field%20eq%20%27value%27」

OpenAPI 範例:"field eq 'value'"

訂單者

字串

查詢

錯誤

指示列出集合時資源的排序順序。

URL 範例:「orderBy=name」、「orderBy=name%20desc」

OpenAPI 範例:"name desc"

跳過

字串

查詢

錯誤

表示列出集合時要跳過的資源數量。

URL 範例:「skip=1」

OpenAPI 範例:「1」

字串

查詢

錯誤

指出中繼資料物件是否應傳回資源總數。

URL 範例:「count=true」

OpenAPI 範例:"true"

繼續

查詢

錯誤

指示要從哪個權杖繼續列出。

URL 範例:「continue=

OpenAPI 範例:""</continue>

回應

Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
Name 類型 必要 說明

項目

array[任何: "roleBinding_1.1_get_response_body"、array[]]

True

中繼資料

"type_astra_metadata_list"

True

範例回應
{
  "type": "application/astra-roleBindings",
  "version": "1.1",
  "items": [
    [
      "9fd87309-067f-48c9-a331-527796c14cf3",
      "4c27d25a-9edb-4e85-9438-48dc8e917231",
      "viewer"
    ],
    [
      "9fd87309-067f-48c9-a331-527796c14cf3",
      "dc40a13f-e9b3-4cf5-900f-58de32174390",
      "owner"
    ],
    [
      "9fd87309-067f-48c9-a331-527796c14cf3",
      "c38abd8d-7dae-4659-8382-2e74a58738ba",
      "owner"
    ]
  ],
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

回應

Status: 401, Unauthorized
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例回應
{
  "type": "https://astra.netapp.io/problems/3",
  "title": "Missing bearer token",
  "detail": "The request is missing the required bearer token.",
  "status": "401"
}

回應

Status: 400, Bad request
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

invalidParams

陣列["invalidParams"]

錯誤

無效查詢參數清單

範例回應
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

回應

Status: 403, Forbidden
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例回應
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

錯誤

Status: 404, Not found
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例錯誤回應
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

定義

請參閱定義

type_astra_label

Name 類型 必要 說明

姓名

字串

True

字串

True

type_astra_metadata_update

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。

Name 類型 必要 說明

標籤

陣列["type_astra_label"]

錯誤

建立時間戳記

字串

錯誤

修改時間戳記

字串

錯誤

建立者

字串

錯誤

modifiedBy

字串

錯誤

roleBinding_1.1_get_response_body

Name 類型 必要 說明

類型

字串

True

資源的媒體類型。定義的值為:

  • "應用程式/astra-roleBinding"

版本

字串

True

資源版本。定義的值為:

  • "1.0"

  • "1.1"

ID

字串

True

資源的全域唯一識別碼。定義的值為:

  • 符合 UUIDv4 架構

principalType

字串

True

表示此繫結所關聯的主體類型的 JSON 字串。定義的值為:

  • "使用者"

  • "group" 對於 principalType "user",必須提供非空的用戶 ID。對於 principalType "group",必須提供非空的群組 ID。

userID

字串

True

包含使用者資源 ID 的 JSON 字串。定義的值為:

  • 遵循 Astra Identifier Schema。如果在建立時未指定,則將使用 nil UUID。建立時只能指定 userID 或 groupID。

groupID

字串

True

包含群組資源 ID 的 JSON 字串。定義的值為:

  • 遵循 Astra Identifier Schema。如果在建立時未指定,則將使用 nil UUID。建立時只能指定 userID 或 groupID。

accountID

字串

True

包含帳戶資源 ID 的 JSON 字串。建立帳戶時,此 ID 必須與請求 URI 中的帳戶 ID 相符。定義的值為:

  • 符合 Astra 識別符架構

角色

字串

True

包含四個已定義角色之一的 JSON 字串。定義的值為:

  • 「viewer」

  • 「成員」

  • "admin"

  • "擁有者"

roleConstraints

陣列[string]

錯誤

指定角色指派範圍的 JSON 字串 JSON 陣列。定義的值為:

  • 符合 Astra 角色限制架構。如果在建立時未指定,則該值將設定為大小為 1 的陣列,其中包含字串 "*",表示「完整範圍」。如果在更新時未指定,則該值將保持不變。空陣列表示「無範圍」。範例: *

    = 允許存取任何資源:"roleConstraints": ["*"]

*

+ = 拒絕存取所有資源:"roleConstraints": []

*

+ = 僅允許存取特定命名空間資源:"roleConstraints": [ "namespaces:id='6fa2f917-f730-41b8-9c15-17f531843b31'" ]

*

+ = 允許存取特定命名空間及其下的所有命名空間:"roleConstraints": [ "namespaces:id='6fa2f917-f730-41b8-9c15-17f531843b31'.*"]

*

+ = 允許存取任何雲端中任何叢集中所有標記為「dev」的命名空間及其下的所有資源:"roleConstraints": [ "namespaces:kubernetesLabels='dev.example.com/appname=dev'.*" ]

*

+ = 僅允許存取所有命名空間資源:"roleConstraints": [ "namespaces:*" ]

*

+ = 允許存取所有命名空間資源及其下的所有資源:"roleConstraints": [ "namespaces:." ]

中繼資料

"type_astra_metadata_update"

True

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。

type_astra_metadata_list

Name 類型 必要 說明

繼續

字串

錯誤

數字

錯誤

標籤

陣列["type_astra_label"]

錯誤

建立時間戳記

字串

錯誤

修改時間戳記

字串

錯誤

建立者

字串

錯誤

modifiedBy

字串

錯誤

invalidParams

Name 類型 必要 說明

姓名

字串

True

無效查詢參數的名稱

原因

字串

True

查詢參數無效的原因

Close
Try it out

Sign in with your NetApp Cloud Central credentials.

Try this API

Parameters

Headers

Body

Code

Response