メインコンテンツまでスキップ

クラウドロールの更新(V2)

Partially updates a custom Cloud ACL role. Provided policies replace the complete policy set.

PUT/v2/roles/{roleId}
接続エンドポイント

https://api.cloud.zilliz.com

shell
export BASE_URL="https://api.cloud.zilliz.com"
パラメータ
Authorizationstringheader必要

認証トークンは、適切な権限を持つ API キーである必要があります。

値の例: Bearer {{TOKEN}}
roleIdstringpath必要

ロール ID。

値の例: r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
リクエスト・ボディ
projectIdstring

プロジェクトスコープのロールに対するプロジェクト境界のアサーション。

roleNamestring

置き換え後のロール表示名。

descriptionstring

置き換え後の説明。クリアするには空の文字列を送信します。

policiesarray

置き換え後のポリシーセット全体。空の配列は拒否されます。

[]policiesobject

カスタム Cloud ロールにアタッチされたポリシーステートメント。

resourceTypestring必要

ステートメントが対象とする第 2 レベルのリソース。例: serving_clustervolumeproject_memberproject_role

privilegesarray必要

そのリソースに対するアトミックな権限。例: ["view", "create"]

[]privilegesstring
(近日追加予定)
resourcesarray

ステートメントがカバーするインスタンス: すべての場合は *、または明示的な ID(ロールのプロジェクトに対して検証されます)。serving_clusteron_demand_clustervolumeserving_cluster_datavolume_datastorage_integrationmodel_provider_integrationkms_integrationdatadog_integration では必須です。ただし、ステートメントの唯一の権限が create の場合は除きます。on_demand_compute_data を含むその他の場所では省略してください。書き込み時に拒否され、返されることもありません。

[]resourcesstring
(近日追加予定)
scopeobject

将来の使用のために予約されています。このフィールドは省略してください。

Replace Policiesbash
export TOKEN="YOUR_API_KEY"
export roleId="r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

curl --request PUT \
--url "${BASE_URL}/v2/roles/${roleId}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"roleName": "Data Reader",
"policies": [
{
"resourceType": "serving_cluster",
"resources": [
"*"
],
"privileges": [
"view"
]
}
]
}'
レスポンス

成功した結果またはエラーメッセージを返します。

成功したレスポンス。

codeinteger必要

レスポンスコード。

値の例: 0
dataobject必要

Cloud ACL ロール。

roleIdstring必要

ロール ID。

roleNamestring必要

ロールの表示名。

roleTypestring必要

ロールのスコープ。

roleKindstring必要

ロールが事前定義されているか、カスタムであるか。

projectIdstring

プロジェクトスコープのロールのプロジェクト ID。このフィールドは、組織スコープのロールには存在しません。

descriptionstring

ロールの説明。

policiesarray

ロールにアタッチされたポリシーステートメント。

[]policiesobject

カスタム Cloud ロールにアタッチされたポリシーステートメント。

resourceTypestring必要

ステートメントが対象とする第 2 レベルのリソース。例: serving_clustervolumeproject_memberproject_role

privilegesarray必要

そのリソースに対するアトミックな権限。例: ["view", "create"]

[]privilegesstring
(近日追加予定)
resourcesarray

ステートメントがカバーするインスタンス: すべての場合は *、または明示的な ID(ロールのプロジェクトに対して検証されます)。serving_clusteron_demand_clustervolumeserving_cluster_datavolume_datastorage_integrationmodel_provider_integrationkms_integrationdatadog_integration では必須です。ただし、ステートメントの唯一の権限が create の場合は除きます。on_demand_compute_data を含むその他の場所では省略してください。書き込み時に拒否され、返されることもありません。

[]resourcesstring
(近日追加予定)
scopeobject

将来の使用のために予約されています。このフィールドは省略してください。

失敗したレスポンス。

codeinteger必要

レスポンスコード。

messagestring必要

エラーメッセージ。

Successjson
{
"code": 0,
"data": {
"roleId": "r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"roleName": "Data Reader",
"roleType": "project",
"roleKind": "custom",
"projectId": "proj-xxxxxxxx",
"description": "Can read serving clusters",
"policies": [
{
"resourceType": "serving_cluster",
"resources": [
"*"
],
"privileges": [
"view"
]
}
]
}
}
Ctrl I