Actions, resources, and condition keys for Amazon CodeBuild
Amazon CodeBuild (service prefix: codebuild) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon CodeBuild
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
BatchDeleteBuilds |
Write |
|||
|
BatchGetBuildBatches |
Read |
|||
|
BatchGetBuilds |
Read |
|||
|
BatchGetCommandExecutions |
Read |
|||
|
BatchGetFleets |
Read |
|||
|
BatchGetProjects |
Read |
|||
|
BatchGetReportGroups |
Read |
|||
|
BatchGetReports |
Read |
|||
|
BatchGetSandboxes |
Read |
|||
|
CreateFleet |
Write |
|||
Write |
||||
|
CreateProject |
Write |
|||
iam:PassedToService |
codebuild.amazonaws.com |
Write |
||
|
CreateReportGroup |
Write |
|||
|
CreateWebhook |
Write |
|||
|
DeleteBuildBatch |
Write |
|||
|
DeleteFleet |
Write |
|||
|
DeleteProject |
Write |
|||
|
DeleteReport |
Write |
|||
|
DeleteReportGroup |
Write |
|||
|
DeleteResourcePolicy |
Permissions management, Write |
|||
|
DeleteSourceCredentials |
Write |
|||
|
DeleteWebhook |
Write |
|||
|
DescribeCodeCoverages |
Read |
|||
|
DescribeTestCases |
Read |
|||
|
GetReportGroupTrend |
Read |
|||
|
GetResourcePolicy |
Read |
|||
|
ImportSourceCredentials |
Write |
|||
|
InvalidateProjectCache |
Write |
|||
|
ListBuildBatches |
List |
|||
|
ListBuildBatchesForProject |
List |
|||
|
ListBuilds |
List |
|||
|
ListBuildsForProject |
List |
|||
|
ListCommandExecutionsForSandbox |
List |
|||
|
ListCuratedEnvironmentImages |
List |
|||
|
ListFleets |
List |
|||
|
ListProjects |
List |
|||
|
ListReportGroups |
List |
|||
|
ListReports |
List |
|||
|
ListReportsForReportGroup |
List |
|||
|
ListSandboxes |
List |
|||
|
ListSandboxesForProject |
List |
|||
|
ListSharedProjects |
List |
|||
|
ListSharedReportGroups |
List |
|||
|
ListSourceCredentials |
List |
|||
|
PutResourcePolicy |
Permissions management, Write |
|||
|
RetryBuild |
Write |
|||
|
RetryBuildBatch |
Write |
|||
|
StartBuild |
Write |
|||
iam:PassedToService |
codebuild.amazonaws.com |
Write |
||
|
StartBuildBatch |
Write |
|||
iam:PassedToService |
codebuild.amazonaws.com |
Write |
||
|
StartCommandExecution |
Write |
|||
|
StartSandbox |
Write |
|||
|
StartSandboxConnection |
Write |
|||
|
StopBuild |
Write |
|||
|
StopBuildBatch |
Write |
|||
|
StopSandbox |
Write |
|||
|
UpdateFleet |
Write |
|||
Write |
||||
|
UpdateProject |
Write |
|||
iam:PassedToService |
codebuild.amazonaws.com |
Write |
||
|
UpdateProjectVisibility |
Write |
|||
iam:PassedToService |
codebuild.amazonaws.com |
Write |
||
|
UpdateReportGroup |
Write |
|||
|
UpdateWebhook |
Write |
Actions defined by Amazon CodeBuild
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in Amazon. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
Permission-only actions for Amazon CodeBuild
The following actions are defined by Amazon CodeBuild but are not directly invocable through any API operation. They can only be used in IAM policy statements to grant or deny permissions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to add or update information about a report |
Write |
|||
Grants permission to add or update information about a report |
Write |
|||
Grants permission to create a report. A report is created when tests specified in the buildspec file for a report groups run during the build of a project |
Write |
|||
Grants permission to delete an OAuth token from a connected third-party OAuth provider. Only used in the Amazon CodeBuild console |
Write |
|||
Grants permission to list connected third-party OAuth providers. Only used in the Amazon CodeBuild console |
List |
|||
Grants permission to list source code repositories from a connected third-party OAuth provider. Only used in the Amazon CodeBuild console |
List |
|||
Grants permission to save an OAuth token from a connected third-party OAuth provider. Only used in the Amazon CodeBuild console |
Write |
|||
Grants permission to update information about a report |
Write |
Resource types defined by Amazon CodeBuild
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
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} |
Condition keys for Amazon CodeBuild
Amazon CodeBuild defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by actions based on the presence of tag key-value pairs in the request |
String |
|
Filters access by actions based on tag key-value pairs attached to the resource |
String |
|
Filters access by actions based on the presence of tag keys in the request |
ArrayOfString |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the ARN of the Amazon CodeBuild build from which the request originated |
ARN |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
Numeric |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
ARN |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the ARN of the Amazon CodeBuild project from which the request originated |
ARN |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfBool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
codebuild:secondaryArtifacts/${artifactIdentifier}.bucketOwnerAccess |
Filters access by the API corresponding argument value |
String |
codebuild:secondaryArtifacts/${artifactIdentifier}.encryptionDisabled |
Filters access by the API corresponding argument value |
Bool |
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfBool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
codebuild:secondarySources/${sourceIdentifier}.auth.resource |
Filters access by the API corresponding argument value |
String |
Filters access by the API corresponding argument value |
String |
|
codebuild:secondarySources/${sourceIdentifier}.buildStatusConfig.context |
Filters access by the API corresponding argument value |
String |
codebuild:secondarySources/${sourceIdentifier}.buildStatusConfig.targetUrl |
Filters access by the API corresponding argument value |
String |
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
String |
|
Filters access by the API corresponding argument value |
Bool |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
ArrayOfString |
|
Filters access by the API corresponding argument value |
String |