ポリシーの例
例からバッチ・ポリシーについて学習します。
adminユーザー・グループに、特定のコンパートメント内のすべてのバッチ・リソースの管理を許可します。Allow group admin to manage batch-computing-family in compartment abcadminユーザー・グループに、割り当てられたコンパートメントのバッチ・ジョブ・プールの使用を許可します。Allow group admin to use batch-computing-job-pool in compartment abcadminユーザー・グループに、割り当てられたコンパートメントのバッチ・ジョブの使用を許可します。Allow group admin to use batch-computing-job in compartment abc- ユーザー・グループが、指定されたコンパートメントへのバッチ・ジョブを管理し、指定されたジョブ・プールに属することを許可します。
Allow group user to manage batch-computing-job in compartment abc where target.batch-job-pool.id = '<batch-job-pool identifier>' - バッチがリソース・プリンシパルを使用してコンテナ・イメージをプルし、ログを書き込むことを許可します。これらのポリシーを使用して、Batchがリポジトリおよびロギング・サービスにアクセスできるようにします。
Allow any-user to read repos in tenancy where ALL { request.principal.type = 'batchcontextinfrastructure' } Allow any-user to read object-family in tenancy where ALL { request.principal.type = 'batchcontextinfrastructure' } Allow any-user to manage log-content in compartment <your_compartment> where ALL { request.principal.type = 'batchcontextinfrastructure' } - (オプション)バッチ・ジョブがOCIリソースにアクセスできるようにします:
Allow any-user to read object-family in tenancy where ALL { request.principal.type = 'batchjob' } Allow any-user to read autonomous-databases in tenancy where ALL { request.principal.type = 'batchjob' }