AWS CodeBuild 的動作、資源和條件索引鍵
AWS CodeBuild (服務字首:codebuild) 提供下列服務特定的操作、資源、動作和條件索引鍵,可用於 IAM 許可政策。
參考資料:
-
了解如何設定此服務。
-
檢視可供此服務使用的 API 操作清單。
-
了解如何使用 IAM 許可政策來保護此服務及其資源。
-
檢視此服務的程式設計服務授權參考
。
主題
AWS CodeBuild 定義的 API 操作
下表將 API 操作映射至其授權的 IAM 動作。只會列出具有指定 API 和動作靜態值的條件金鑰;如需每個動作支援的完整條件金鑰集,請參閱動作表格。
| 作業 | IAM 動作 | 條件鍵 | 可能的值 (s) | 存取層級 |
|---|---|---|---|---|
|
BatchDeleteBuilds |
寫入 |
|||
|
BatchGetBuildBatches |
讀取 |
|||
|
BatchGetBuilds |
讀取 |
|||
|
BatchGetCommandExecutions |
讀取 |
|||
|
BatchGetFleets |
讀取 |
|||
|
BatchGetProjects |
讀取 |
|||
|
BatchGetReportGroups |
讀取 |
|||
|
BatchGetReports |
讀取 |
|||
|
BatchGetSandboxes |
讀取 |
|||
|
CreateFleet |
寫入 |
|||
寫入 |
||||
|
CreateProject |
寫入 |
|||
iam:PassedToService |
codebuild.amazonaws.com |
寫入 |
||
|
CreateReportGroup |
寫入 |
|||
|
CreateWebhook |
寫入 |
|||
|
DeleteBuildBatch |
寫入 |
|||
|
DeleteFleet |
寫入 |
|||
|
DeleteProject |
寫入 |
|||
|
DeleteReport |
寫入 |
|||
|
DeleteReportGroup |
寫入 |
|||
|
DeleteResourcePolicy |
許可管理、寫入 |
|||
|
DeleteSourceCredentials |
寫入 |
|||
|
DeleteWebhook |
寫入 |
|||
|
DescribeCodeCoverages |
讀取 |
|||
|
DescribeTestCases |
讀取 |
|||
|
GetReportGroupTrend |
讀取 |
|||
|
GetResourcePolicy |
讀取 |
|||
|
ImportSourceCredentials |
寫入 |
|||
|
InvalidateProjectCache |
寫入 |
|||
|
ListBuildBatches |
清單 |
|||
|
ListBuildBatchesForProject |
清單 |
|||
|
ListBuilds |
清單 |
|||
|
ListBuildsForProject |
清單 |
|||
|
ListCommandExecutionsForSandbox |
清單 |
|||
|
ListCuratedEnvironmentImages |
清單 |
|||
|
ListFleets |
清單 |
|||
|
ListProjects |
清單 |
|||
|
ListReportGroups |
清單 |
|||
|
ListReports |
清單 |
|||
|
ListReportsForReportGroup |
清單 |
|||
|
ListSandboxes |
清單 |
|||
|
ListSandboxesForProject |
清單 |
|||
|
ListSharedProjects |
清單 |
|||
|
ListSharedReportGroups |
清單 |
|||
|
ListSourceCredentials |
清單 |
|||
|
PutResourcePolicy |
許可管理、寫入 |
|||
|
RetryBuild |
寫入 |
|||
|
RetryBuildBatch |
寫入 |
|||
|
StartBuild |
寫入 |
|||
iam:PassedToService |
codebuild.amazonaws.com |
寫入 |
||
|
StartBuildBatch |
寫入 |
|||
iam:PassedToService |
codebuild.amazonaws.com |
寫入 |
||
|
StartCommandExecution |
寫入 |
|||
|
StartSandbox |
寫入 |
|||
|
StartSandboxConnection |
寫入 |
|||
|
StopBuild |
寫入 |
|||
|
StopBuildBatch |
寫入 |
|||
|
StopSandbox |
寫入 |
|||
|
UpdateFleet |
寫入 |
|||
寫入 |
||||
|
UpdateProject |
寫入 |
|||
iam:PassedToService |
codebuild.amazonaws.com |
寫入 |
||
|
UpdateProjectVisibility |
寫入 |
|||
iam:PassedToService |
codebuild.amazonaws.com |
寫入 |
||
|
UpdateReportGroup |
寫入 |
|||
|
UpdateWebhook |
寫入 |
AWS CodeBuild 定義的動作
您可在 IAM 政策陳述式的 Action 元素中指定以下動作。使用政策來授予在 AWS中執行操作的許可。在政策中使用動作時,通常會允許或拒絕存取相同名稱的 API 操作或 CLI 命令。不過,在某些情況下,單一動作可控制對多個操作的存取。或者,某些操作需要多種不同的動作。
AWS CodeBuild 的僅限許可動作
下列動作是由 AWS CodeBuild 定義,但無法透過任何 API 操作直接叫用。它們只能在 IAM 政策陳述式中使用,以授予或拒絕許可。
| 動作 | 說明 | 資源類型 (*必填項目) | 條件索引鍵 | 存取層級 |
|---|---|---|---|---|
准許新增或更新報告的資訊 |
寫入 |
|||
准許新增或更新報告的資訊 |
寫入 |
|||
准許建立新報告。在建置專案期間,針對報告群組執行 buildspec 檔案中指定的測試時,將會建立報告 |
寫入 |
|||
准許從連接的第三方 OAuth 提供者刪除 OAuth 權杖。僅在 AWS CodeBuild 主控台中使用 |
寫入 |
|||
准許列出連接的第三方 OAuth 提供者。僅在 AWS CodeBuild 主控台中使用 |
清單 |
|||
准許列出來自連接的第三方 OAuth 提供者的原始程式碼儲存庫。僅在 AWS CodeBuild 主控台中使用 |
清單 |
|||
准許儲存來自連接的第三方 OAuth 提供者的 OAuth 權杖。僅在 AWS CodeBuild 主控台中使用 |
寫入 |
|||
准許更新報告的相關資訊 |
寫入 |
AWS CodeBuild 定義的資源類型
此服務會定義下列資源類型,並可用在 IAM 許可政策陳述式的 Resource 元素中。
| 資源類型 | ARN | 條件索引鍵 |
|---|---|---|
arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId} |
||
arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId} |
||
arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId} |
||
arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName} |
||
arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId} |
||
arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName} |
||
arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId} |
AWS CodeBuild 的條件索引鍵
AWS CodeBuild 定義下列條件索引鍵,可用於 IAM 政策的 Condition元素。
| 條件索引鍵 | 描述 | Type |
|---|---|---|
根據請求中的標籤鍵值對是否存在,依動作篩選存取權 |
String |
|
根據連線到資源的標籤鍵值對,依動作篩選存取權 |
String |
|
根據請求中的標籤索引鍵是否存在,依動作篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依發出請求的 AWS CodeBuild 組建的 ARN 篩選存取權 |
ARN |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
數值 |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
ARN |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依發出請求之 AWS CodeBuild 專案的 ARN 篩選存取權 |
ARN |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfBool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
codebuild:secondaryArtifacts/${artifactIdentifier}.bucketOwnerAccess |
依 API 對應的引數值篩選存取權 |
String |
codebuild:secondaryArtifacts/${artifactIdentifier}.encryptionDisabled |
依 API 對應的引數值篩選存取權 |
Bool |
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfBool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
codebuild:secondarySources/${sourceIdentifier}.auth.resource |
依 API 對應的引數值篩選存取權 |
String |
依 API 對應的引數值篩選存取權 |
String |
|
codebuild:secondarySources/${sourceIdentifier}.buildStatusConfig.context |
依 API 對應的引數值篩選存取權 |
String |
codebuild:secondarySources/${sourceIdentifier}.buildStatusConfig.targetUrl |
依 API 對應的引數值篩選存取權 |
String |
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
String |
|
依 API 對應的引數值篩選存取權 |
Bool |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
ArrayOfString |
|
依 API 對應的引數值篩選存取權 |
String |