AWS CodeBuild 2016-10-06
- Client: Aws\CodeBuild\CodeBuildClient
- Service ID: codebuild
- Version: 2016-10-06
This page describes the parameters and results for the operations of the AWS CodeBuild (2016-10-06), and shows how to use the Aws\CodeBuild\CodeBuildClient object to call the described operations. This documentation is specific to the 2016-10-06 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- BatchDeleteBuilds ( array $params = [] )
- Deletes one or more builds.
- BatchGetBuildBatches ( array $params = [] )
- Retrieves information about one or more batch builds.
- BatchGetBuilds ( array $params = [] )
- Gets information about one or more builds.
- BatchGetFleets ( array $params = [] )
- Gets information about one or more compute fleets.
- BatchGetProjects ( array $params = [] )
- Gets information about one or more build projects.
- BatchGetReportGroups ( array $params = [] )
- Returns an array of report groups.
- BatchGetReports ( array $params = [] )
- Returns an array of reports.
- CreateFleet ( array $params = [] )
- Creates a compute fleet.
- CreateProject ( array $params = [] )
- Creates a build project.
- CreateReportGroup ( array $params = [] )
- Creates a report group.
- CreateWebhook ( array $params = [] )
- For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.
- DeleteBuildBatch ( array $params = [] )
- Deletes a batch build.
- DeleteFleet ( array $params = [] )
- Deletes a compute fleet.
- DeleteProject ( array $params = [] )
- Deletes a build project.
- DeleteReport ( array $params = [] )
- Deletes a report.
- DeleteReportGroup ( array $params = [] )
- Deletes a report group.
- DeleteResourcePolicy ( array $params = [] )
- Deletes a resource policy that is identified by its resource ARN.
- DeleteSourceCredentials ( array $params = [] )
- Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
- DeleteWebhook ( array $params = [] )
- For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code every time a code change is pushed to the repository.
- DescribeCodeCoverages ( array $params = [] )
- Retrieves one or more code coverage reports.
- DescribeTestCases ( array $params = [] )
- Returns a list of details about test cases for a report.
- GetReportGroupTrend ( array $params = [] )
- Analyzes and accumulates test report values for the specified test reports.
- GetResourcePolicy ( array $params = [] )
- Gets a resource policy that is identified by its resource ARN.
- ImportSourceCredentials ( array $params = [] )
- Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository.
- InvalidateProjectCache ( array $params = [] )
- Resets the cache for a project.
- ListBuildBatches ( array $params = [] )
- Retrieves the identifiers of your build batches in the current region.
- ListBuildBatchesForProject ( array $params = [] )
- Retrieves the identifiers of the build batches for a specific project.
- ListBuilds ( array $params = [] )
- Gets a list of build IDs, with each build ID representing a single build.
- ListBuildsForProject ( array $params = [] )
- Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.
- ListCuratedEnvironmentImages ( array $params = [] )
- Gets information about Docker images that are managed by CodeBuild.
- ListFleets ( array $params = [] )
- Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.
- ListProjects ( array $params = [] )
- Gets a list of build project names, with each build project name representing a single build project.
- ListReportGroups ( array $params = [] )
- Gets a list ARNs for the report groups in the current Amazon Web Services account.
- ListReports ( array $params = [] )
- Returns a list of ARNs for the reports in the current Amazon Web Services account.
- ListReportsForReportGroup ( array $params = [] )
- Returns a list of ARNs for the reports that belong to a ReportGroup.
- ListSharedProjects ( array $params = [] )
- Gets a list of projects that are shared with other Amazon Web Services accounts or users.
- ListSharedReportGroups ( array $params = [] )
- Gets a list of report groups that are shared with other Amazon Web Services accounts or users.
- ListSourceCredentials ( array $params = [] )
- Returns a list of SourceCredentialsInfo objects.
- PutResourcePolicy ( array $params = [] )
- Stores a resource policy for the ARN of a Project or ReportGroup object.
- RetryBuild ( array $params = [] )
- Restarts a build.
- RetryBuildBatch ( array $params = [] )
- Restarts a failed batch build.
- StartBuild ( array $params = [] )
- Starts running a build with the settings defined in the project.
- StartBuildBatch ( array $params = [] )
- Starts a batch build for a project.
- StopBuild ( array $params = [] )
- Attempts to stop running a build.
- StopBuildBatch ( array $params = [] )
- Stops a running batch build.
- UpdateFleet ( array $params = [] )
- Updates a compute fleet.
- UpdateProject ( array $params = [] )
- Changes the settings of a build project.
- UpdateProjectVisibility ( array $params = [] )
- Changes the public visibility for a project.
- UpdateReportGroup ( array $params = [] )
- Updates a report group.
- UpdateWebhook ( array $params = [] )
- Updates the webhook associated with an CodeBuild build project.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- DescribeCodeCoverages
- DescribeTestCases
- ListBuildBatches
- ListBuildBatchesForProject
- ListBuilds
- ListBuildsForProject
- ListFleets
- ListProjects
- ListReportGroups
- ListReports
- ListReportsForReportGroup
- ListSharedProjects
- ListSharedReportGroups
Operations
BatchDeleteBuilds
$result = $client->batchDeleteBuilds
([/* ... */]); $promise = $client->batchDeleteBuildsAsync
([/* ... */]);
Deletes one or more builds.
Parameter Syntax
$result = $client->batchDeleteBuilds([ 'ids' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- ids
-
- Required: Yes
- Type: Array of strings
The IDs of the builds to delete.
Result Syntax
[ 'buildsDeleted' => ['<string>', ...], 'buildsNotDeleted' => [ [ 'id' => '<string>', 'statusCode' => '<string>', ], // ... ], ]
Result Details
Members
- buildsDeleted
-
- Type: Array of strings
The IDs of the builds that were successfully deleted.
- buildsNotDeleted
-
- Type: Array of BuildNotDeleted structures
Information about any builds that could not be successfully deleted.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetBuildBatches
$result = $client->batchGetBuildBatches
([/* ... */]); $promise = $client->batchGetBuildBatchesAsync
([/* ... */]);
Retrieves information about one or more batch builds.
Parameter Syntax
$result = $client->batchGetBuildBatches([ 'ids' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- ids
-
- Required: Yes
- Type: Array of strings
An array that contains the batch build identifiers to retrieve.
Result Syntax
[ 'buildBatches' => [ [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'buildBatchNumber' => <integer>, 'buildBatchStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'buildGroups' => [ [ 'currentBuildSummary' => [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], 'dependsOn' => ['<string>', ...], 'identifier' => '<string>', 'ignoreFailure' => true || false, 'priorBuildSummaryList' => [ [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], // ... ], ], // ... ], 'buildTimeoutInMinutes' => <integer>, 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'complete' => true || false, 'currentPhase' => '<string>', 'debugSessionEnabled' => true || false, 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|DOWNLOAD_BATCHSPEC|IN_PROGRESS|COMBINE_ARTIFACTS|SUCCEEDED|FAILED|STOPPED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], // ... ], 'buildBatchesNotFound' => ['<string>', ...], ]
Result Details
Members
- buildBatches
-
- Type: Array of BuildBatch structures
An array of
BuildBatch
objects that represent the retrieved batch builds. - buildBatchesNotFound
-
- Type: Array of strings
An array that contains the identifiers of any batch builds that are not found.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetBuilds
$result = $client->batchGetBuilds
([/* ... */]); $promise = $client->batchGetBuildsAsync
([/* ... */]);
Gets information about one or more builds.
Parameter Syntax
$result = $client->batchGetBuilds([ 'ids' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- ids
-
- Required: Yes
- Type: Array of strings
The IDs of the builds.
Result Syntax
[ 'builds' => [ [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchArn' => '<string>', 'buildComplete' => true || false, 'buildNumber' => <integer>, 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'currentPhase' => '<string>', 'debugSession' => [ 'sessionEnabled' => true || false, 'sessionTarget' => '<string>', ], 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'exportedEnvironmentVariables' => [ [ 'name' => '<string>', 'value' => '<string>', ], // ... ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logs' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 'cloudWatchLogsArn' => '<string>', 'deepLink' => '<string>', 'groupName' => '<string>', 's3DeepLink' => '<string>', 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], 's3LogsArn' => '<string>', 'streamName' => '<string>', ], 'networkInterface' => [ 'networkInterfaceId' => '<string>', 'subnetId' => '<string>', ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|QUEUED|PROVISIONING|DOWNLOAD_SOURCE|INSTALL|PRE_BUILD|BUILD|POST_BUILD|UPLOAD_ARTIFACTS|FINALIZING|COMPLETED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'reportArns' => ['<string>', ...], 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], // ... ], 'buildsNotFound' => ['<string>', ...], ]
Result Details
Members
- builds
-
- Type: Array of Build structures
Information about the requested builds.
- buildsNotFound
-
- Type: Array of strings
The IDs of builds for which information could not be found.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetFleets
$result = $client->batchGetFleets
([/* ... */]); $promise = $client->batchGetFleetsAsync
([/* ... */]);
Gets information about one or more compute fleets.
Parameter Syntax
$result = $client->batchGetFleets([ 'names' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- names
-
- Required: Yes
- Type: Array of strings
The names or ARNs of the compute fleets.
Result Syntax
[ 'fleets' => [ [ 'arn' => '<string>', 'baseCapacity' => <integer>, 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'created' => <DateTime>, 'environmentType' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'fleetServiceRole' => '<string>', 'id' => '<string>', 'imageId' => '<string>', 'lastModified' => <DateTime>, 'name' => '<string>', 'overflowBehavior' => 'QUEUE|ON_DEMAND', 'scalingConfiguration' => [ 'desiredCapacity' => <integer>, 'maxCapacity' => <integer>, 'scalingType' => 'TARGET_TRACKING_SCALING', 'targetTrackingScalingConfigs' => [ [ 'metricType' => 'FLEET_UTILIZATION_RATE', 'targetValue' => <float>, ], // ... ], ], 'status' => [ 'context' => 'CREATE_FAILED|UPDATE_FAILED|ACTION_REQUIRED|PENDING_DELETION|INSUFFICIENT_CAPACITY', 'message' => '<string>', 'statusCode' => 'CREATING|UPDATING|ROTATING|PENDING_DELETION|DELETING|CREATE_FAILED|UPDATE_ROLLBACK_FAILED|ACTIVE', ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], // ... ], 'fleetsNotFound' => ['<string>', ...], ]
Result Details
Members
- fleets
-
- Type: Array of Fleet structures
Information about the requested compute fleets.
- fleetsNotFound
-
- Type: Array of strings
The names of compute fleets for which information could not be found.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetProjects
$result = $client->batchGetProjects
([/* ... */]); $promise = $client->batchGetProjectsAsync
([/* ... */]);
Gets information about one or more build projects.
Parameter Syntax
$result = $client->batchGetProjects([ 'names' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- names
-
- Required: Yes
- Type: Array of strings
The names or ARNs of the build projects. To get information about a project shared with your Amazon Web Services account, its ARN must be specified. You cannot specify a shared project using its name.
Result Syntax
[ 'projects' => [ [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'badge' => [ 'badgeEnabled' => true || false, 'badgeRequestUrl' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'concurrentBuildLimit' => <integer>, 'created' => <DateTime>, 'description' => '<string>', 'encryptionKey' => '<string>', 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'lastModified' => <DateTime>, 'logsConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'name' => '<string>', 'projectVisibility' => 'PUBLIC_READ|PRIVATE', 'publicProjectAlias' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resourceAccessRole' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], 'webhook' => [ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', ], // ... ], // ... ], 'lastModifiedSecret' => <DateTime>, 'manualCreation' => true || false, 'payloadUrl' => '<string>', 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', ], 'secret' => '<string>', 'url' => '<string>', ], ], // ... ], 'projectsNotFound' => ['<string>', ...], ]
Result Details
Members
- projects
-
- Type: Array of Project structures
Information about the requested build projects.
- projectsNotFound
-
- Type: Array of strings
The names of build projects for which information could not be found.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetReportGroups
$result = $client->batchGetReportGroups
([/* ... */]); $promise = $client->batchGetReportGroupsAsync
([/* ... */]);
Returns an array of report groups.
Parameter Syntax
$result = $client->batchGetReportGroups([ 'reportGroupArns' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- reportGroupArns
-
- Required: Yes
- Type: Array of strings
An array of report group ARNs that identify the report groups to return.
Result Syntax
[ 'reportGroups' => [ [ 'arn' => '<string>', 'created' => <DateTime>, 'exportConfig' => [ 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'lastModified' => <DateTime>, 'name' => '<string>', 'status' => 'ACTIVE|DELETING', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'type' => 'TEST|CODE_COVERAGE', ], // ... ], 'reportGroupsNotFound' => ['<string>', ...], ]
Result Details
Members
- reportGroups
-
- Type: Array of ReportGroup structures
The array of report groups returned by
BatchGetReportGroups
. - reportGroupsNotFound
-
- Type: Array of strings
An array of ARNs passed to
BatchGetReportGroups
that are not associated with aReportGroup
.
Errors
- InvalidInputException:
The input value that was provided is not valid.
BatchGetReports
$result = $client->batchGetReports
([/* ... */]); $promise = $client->batchGetReportsAsync
([/* ... */]);
Returns an array of reports.
Parameter Syntax
$result = $client->batchGetReports([ 'reportArns' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- reportArns
-
- Required: Yes
- Type: Array of strings
An array of ARNs that identify the
Report
objects to return.
Result Syntax
[ 'reports' => [ [ 'arn' => '<string>', 'codeCoverageSummary' => [ 'branchCoveragePercentage' => <float>, 'branchesCovered' => <integer>, 'branchesMissed' => <integer>, 'lineCoveragePercentage' => <float>, 'linesCovered' => <integer>, 'linesMissed' => <integer>, ], 'created' => <DateTime>, 'executionId' => '<string>', 'expired' => <DateTime>, 'exportConfig' => [ 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'name' => '<string>', 'reportGroupArn' => '<string>', 'status' => 'GENERATING|SUCCEEDED|FAILED|INCOMPLETE|DELETING', 'testSummary' => [ 'durationInNanoSeconds' => <integer>, 'statusCounts' => [<integer>, ...], 'total' => <integer>, ], 'truncated' => true || false, 'type' => 'TEST|CODE_COVERAGE', ], // ... ], 'reportsNotFound' => ['<string>', ...], ]
Result Details
Members
- reports
-
- Type: Array of Report structures
The array of
Report
objects returned byBatchGetReports
. - reportsNotFound
-
- Type: Array of strings
An array of ARNs passed to
BatchGetReportGroups
that are not associated with aReport
.
Errors
- InvalidInputException:
The input value that was provided is not valid.
CreateFleet
$result = $client->createFleet
([/* ... */]); $promise = $client->createFleetAsync
([/* ... */]);
Creates a compute fleet.
Parameter Syntax
$result = $client->createFleet([ 'baseCapacity' => <integer>, // REQUIRED 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', // REQUIRED 'environmentType' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', // REQUIRED 'fleetServiceRole' => '<string>', 'imageId' => '<string>', 'name' => '<string>', // REQUIRED 'overflowBehavior' => 'QUEUE|ON_DEMAND', 'scalingConfiguration' => [ 'maxCapacity' => <integer>, 'scalingType' => 'TARGET_TRACKING_SCALING', 'targetTrackingScalingConfigs' => [ [ 'metricType' => 'FLEET_UTILIZATION_RATE', 'targetValue' => <float>, ], // ... ], ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ]);
Parameter Details
Members
- baseCapacity
-
- Required: Yes
- Type: int
The initial number of machines allocated to the fleet, which defines the number of builds that can run in parallel.
- computeType
-
- Required: Yes
- Type: string
Information about the compute resources the compute fleet uses. Available values include:
-
BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds. -
BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds. -
BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.
If you use
BUILD_GENERAL1_SMALL
:-
For environment type
LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. -
For environment type
ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
If you use
BUILD_GENERAL1_LARGE
:-
For environment type
LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. -
For environment type
ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds.
For more information, see Build environment compute types in the CodeBuild User Guide.
- environmentType
-
- Required: Yes
- Type: string
The environment type of the compute fleet.
-
The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo). -
The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai). -
The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). -
The environment type
MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt) -
The environment type
MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney). -
The environment type
WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). -
The environment type
WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
For more information, see Build environment compute types in the CodeBuild user guide.
- fleetServiceRole
-
- Type: string
The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide.
- imageId
-
- Type: string
The Amazon Machine Image (AMI) of the compute fleet.
- name
-
- Required: Yes
- Type: string
The name of the compute fleet.
- overflowBehavior
-
- Type: string
The compute fleet overflow behavior.
-
For overflow behavior
QUEUE
, your overflow builds need to wait on the existing fleet instance to become available. -
For overflow behavior
ON_DEMAND
, your overflow builds run on CodeBuild on-demand.If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface.
- scalingConfiguration
-
- Type: ScalingConfigurationInput structure
The scaling configuration of the compute fleet.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this compute fleet.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- vpcConfig
-
- Type: VpcConfig structure
Information about the VPC configuration that CodeBuild accesses.
Result Syntax
[ 'fleet' => [ 'arn' => '<string>', 'baseCapacity' => <integer>, 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'created' => <DateTime>, 'environmentType' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'fleetServiceRole' => '<string>', 'id' => '<string>', 'imageId' => '<string>', 'lastModified' => <DateTime>, 'name' => '<string>', 'overflowBehavior' => 'QUEUE|ON_DEMAND', 'scalingConfiguration' => [ 'desiredCapacity' => <integer>, 'maxCapacity' => <integer>, 'scalingType' => 'TARGET_TRACKING_SCALING', 'targetTrackingScalingConfigs' => [ [ 'metricType' => 'FLEET_UTILIZATION_RATE', 'targetValue' => <float>, ], // ... ], ], 'status' => [ 'context' => 'CREATE_FAILED|UPDATE_FAILED|ACTION_REQUIRED|PENDING_DELETION|INSUFFICIENT_CAPACITY', 'message' => '<string>', 'statusCode' => 'CREATING|UPDATING|ROTATING|PENDING_DELETION|DELETING|CREATE_FAILED|UPDATE_ROLLBACK_FAILED|ACTIVE', ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- fleet
-
- Type: Fleet structure
Information about the compute fleet
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceAlreadyExistsException:
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
CreateProject
$result = $client->createProject
([/* ... */]); $promise = $client->createProjectAsync
([/* ... */]);
Creates a build project.
Parameter Syntax
$result = $client->createProject([ 'artifacts' => [ // REQUIRED 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], 'badgeEnabled' => true || false, 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', // REQUIRED ], 'concurrentBuildLimit' => <integer>, 'description' => '<string>', 'encryptionKey' => '<string>', 'environment' => [ // REQUIRED 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', // REQUIRED 'environmentVariables' => [ [ 'name' => '<string>', // REQUIRED 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', // REQUIRED ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', // REQUIRED 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', // REQUIRED 'credentialProvider' => 'SECRETS_MANAGER', // REQUIRED ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', // REQUIRED ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'logsConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED ], ], 'name' => '<string>', // REQUIRED 'queuedTimeoutInMinutes' => <integer>, 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', // REQUIRED 'sourceVersion' => '<string>', // REQUIRED ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], // ... ], 'serviceRole' => '<string>', // REQUIRED 'source' => [ // REQUIRED 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], 'sourceVersion' => '<string>', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ]);
Parameter Details
Members
- artifacts
-
- Required: Yes
- Type: ProjectArtifacts structure
Information about the build output artifacts for the build project.
- badgeEnabled
-
- Type: boolean
Set this to true to generate a publicly accessible URL for your project's build badge.
- buildBatchConfig
-
- Type: ProjectBuildBatchConfig structure
A ProjectBuildBatchConfig object that defines the batch build options for the project.
- cache
-
- Type: ProjectCache structure
Stores recently used information so that it can be quickly accessed at a later time.
- concurrentBuildLimit
-
- Type: int
The maximum number of concurrent builds that are allowed for this project.
New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.
- description
-
- Type: string
A description that makes the build project easy to identify.
- encryptionKey
-
- Type: string
The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - environment
-
- Required: Yes
- Type: ProjectEnvironment structure
Information about the build environment for the build project.
- fileSystemLocations
-
- Type: Array of ProjectFileSystemLocation structures
An array of
ProjectFileSystemLocation
objects for a CodeBuild build project. AProjectFileSystemLocation
object specifies theidentifier
,location
,mountOptions
,mountPoint
, andtype
of a file system created using Amazon Elastic File System. - logsConfig
-
- Type: LogsConfig structure
Information about logs for the build project. These can be logs in CloudWatch Logs, logs uploaded to a specified S3 bucket, or both.
- name
-
- Required: Yes
- Type: string
The name of the build project.
- queuedTimeoutInMinutes
-
- Type: int
The number of minutes a build is allowed to be queued before it times out.
- secondaryArtifacts
-
- Type: Array of ProjectArtifacts structures
An array of
ProjectArtifacts
objects. - secondarySourceVersions
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects. IfsecondarySourceVersions
is specified at the build level, then they take precedence over thesesecondarySourceVersions
(at the project level). - secondarySources
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects. - serviceRole
-
- Required: Yes
- Type: string
The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.
- source
-
- Required: Yes
- Type: ProjectSource structure
Information about the build input source code for the build project.
- sourceVersion
-
- Type: string
A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for examplepr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For GitLab: the commit ID, branch, or Git tag to use.
-
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
If
sourceVersion
is specified at the build level, then that version takes precedence over thissourceVersion
(at the project level).For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this build project.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- timeoutInMinutes
-
- Type: int
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before it times out any build that has not been marked as completed. The default is 60 minutes.
- vpcConfig
-
- Type: VpcConfig structure
VpcConfig enables CodeBuild to access resources in an Amazon VPC.
If you're using compute fleets during project creation, do not provide vpcConfig.
Result Syntax
[ 'project' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'badge' => [ 'badgeEnabled' => true || false, 'badgeRequestUrl' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'concurrentBuildLimit' => <integer>, 'created' => <DateTime>, 'description' => '<string>', 'encryptionKey' => '<string>', 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'lastModified' => <DateTime>, 'logsConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'name' => '<string>', 'projectVisibility' => 'PUBLIC_READ|PRIVATE', 'publicProjectAlias' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resourceAccessRole' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], 'webhook' => [ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', ], // ... ], // ... ], 'lastModifiedSecret' => <DateTime>, 'manualCreation' => true || false, 'payloadUrl' => '<string>', 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', ], 'secret' => '<string>', 'url' => '<string>', ], ], ]
Result Details
Members
- project
-
- Type: Project structure
Information about the build project that was created.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceAlreadyExistsException:
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
CreateReportGroup
$result = $client->createReportGroup
([/* ... */]); $promise = $client->createReportGroupAsync
([/* ... */]);
Creates a report group. A report group contains a collection of reports.
Parameter Syntax
$result = $client->createReportGroup([ 'exportConfig' => [ // REQUIRED 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'name' => '<string>', // REQUIRED 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'type' => 'TEST|CODE_COVERAGE', // REQUIRED ]);
Parameter Details
Members
- exportConfig
-
- Required: Yes
- Type: ReportExportConfig structure
A
ReportExportConfig
object that contains information about where the report group test results are exported. - name
-
- Required: Yes
- Type: string
The name of the report group.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this report group.
These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.
- type
-
- Required: Yes
- Type: string
The type of report group.
Result Syntax
[ 'reportGroup' => [ 'arn' => '<string>', 'created' => <DateTime>, 'exportConfig' => [ 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'lastModified' => <DateTime>, 'name' => '<string>', 'status' => 'ACTIVE|DELETING', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'type' => 'TEST|CODE_COVERAGE', ], ]
Result Details
Members
- reportGroup
-
- Type: ReportGroup structure
Information about the report group that was created.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceAlreadyExistsException:
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
CreateWebhook
$result = $client->createWebhook
([/* ... */]); $promise = $client->createWebhookAsync
([/* ... */]);
For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.
If you enable webhooks for an CodeBuild project, and the project is used as a build step in CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using CodePipeline, we recommend that you disable webhooks in CodeBuild. In the CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings.
Parameter Syntax
$result = $client->createWebhook([ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', // REQUIRED 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', // REQUIRED ], // ... ], // ... ], 'manualCreation' => true || false, 'projectName' => '<string>', // REQUIRED 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', // REQUIRED 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', // REQUIRED ], ]);
Parameter Details
Members
- branchFilter
-
- Type: string
A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If
branchFilter
is empty, then all branches are built.It is recommended that you use
filterGroups
instead ofbranchFilter
. - buildType
-
- Type: string
Specifies the type of build this webhook will trigger.
- filterGroups
-
- Type: Array of WebhookFilter structuress
An array of arrays of
WebhookFilter
objects used to determine which webhooks are triggered. At least oneWebhookFilter
in the array must specifyEVENT
as itstype
.For a build to be triggered, at least one filter group in the
filterGroups
array must pass. For a filter group to pass, each of its filters must pass. - manualCreation
-
- Type: boolean
If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns
payloadUrl
andsecret
values for the webhook. ThepayloadUrl
andsecret
values in the output can be used to manually create a webhook within GitHub.manualCreation
is only available for GitHub webhooks. - projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild project.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The scope configuration for global or organization webhooks.
Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.
Result Syntax
[ 'webhook' => [ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', ], // ... ], // ... ], 'lastModifiedSecret' => <DateTime>, 'manualCreation' => true || false, 'payloadUrl' => '<string>', 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', ], 'secret' => '<string>', 'url' => '<string>', ], ]
Result Details
Members
- webhook
-
- Type: Webhook structure
Information about a webhook that connects repository events to a build project in CodeBuild.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- OAuthProviderException:
There was a problem with the underlying OAuth provider.
- ResourceAlreadyExistsException:
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
DeleteBuildBatch
$result = $client->deleteBuildBatch
([/* ... */]); $promise = $client->deleteBuildBatchAsync
([/* ... */]);
Deletes a batch build.
Parameter Syntax
$result = $client->deleteBuildBatch([ 'id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- id
-
- Required: Yes
- Type: string
The identifier of the batch build to delete.
Result Syntax
[ 'buildsDeleted' => ['<string>', ...], 'buildsNotDeleted' => [ [ 'id' => '<string>', 'statusCode' => '<string>', ], // ... ], 'statusCode' => '<string>', ]
Result Details
Members
- buildsDeleted
-
- Type: Array of strings
An array of strings that contain the identifiers of the builds that were deleted.
- buildsNotDeleted
-
- Type: Array of BuildNotDeleted structures
An array of
BuildNotDeleted
objects that specify the builds that could not be deleted. - statusCode
-
- Type: string
The status code.
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteFleet
$result = $client->deleteFleet
([/* ... */]); $promise = $client->deleteFleetAsync
([/* ... */]);
Deletes a compute fleet. When you delete a compute fleet, its builds are not deleted.
Parameter Syntax
$result = $client->deleteFleet([ 'arn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the compute fleet.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteProject
$result = $client->deleteProject
([/* ... */]); $promise = $client->deleteProjectAsync
([/* ... */]);
Deletes a build project. When you delete a project, its builds are not deleted.
Parameter Syntax
$result = $client->deleteProject([ 'name' => '<string>', // REQUIRED ]);
Parameter Details
Members
- name
-
- Required: Yes
- Type: string
The name of the build project.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteReport
$result = $client->deleteReport
([/* ... */]); $promise = $client->deleteReportAsync
([/* ... */]);
Deletes a report.
Parameter Syntax
$result = $client->deleteReport([ 'arn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the report to delete.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteReportGroup
$result = $client->deleteReportGroup
([/* ... */]); $promise = $client->deleteReportGroupAsync
([/* ... */]);
Deletes a report group. Before you delete a report group, you must delete its reports.
Parameter Syntax
$result = $client->deleteReportGroup([ 'arn' => '<string>', // REQUIRED 'deleteReports' => true || false, ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the report group to delete.
- deleteReports
-
- Type: boolean
If
true
, deletes any reports that belong to a report group before deleting the report group.If
false
, you must delete any reports in the report group. Use ListReportsForReportGroup to get the reports in a report group. Use DeleteReport to delete the reports. If you callDeleteReportGroup
for a report group that contains one or more reports, an exception is thrown.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteResourcePolicy
$result = $client->deleteResourcePolicy
([/* ... */]); $promise = $client->deleteResourcePolicyAsync
([/* ... */]);
Deletes a resource policy that is identified by its resource ARN.
Parameter Syntax
$result = $client->deleteResourcePolicy([ 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource that is associated with the resource policy.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
DeleteSourceCredentials
$result = $client->deleteSourceCredentials
([/* ... */]); $promise = $client->deleteSourceCredentialsAsync
([/* ... */]);
Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
Parameter Syntax
$result = $client->deleteSourceCredentials([ 'arn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the token.
Result Syntax
[ 'arn' => '<string>', ]
Result Details
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) of the token.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
DeleteWebhook
$result = $client->deleteWebhook
([/* ... */]); $promise = $client->deleteWebhookAsync
([/* ... */]);
For an existing CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code every time a code change is pushed to the repository.
Parameter Syntax
$result = $client->deleteWebhook([ 'projectName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild project.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- OAuthProviderException:
There was a problem with the underlying OAuth provider.
DescribeCodeCoverages
$result = $client->describeCodeCoverages
([/* ... */]); $promise = $client->describeCodeCoveragesAsync
([/* ... */]);
Retrieves one or more code coverage reports.
Parameter Syntax
$result = $client->describeCodeCoverages([ 'maxLineCoveragePercentage' => <float>, 'maxResults' => <integer>, 'minLineCoveragePercentage' => <float>, 'nextToken' => '<string>', 'reportArn' => '<string>', // REQUIRED 'sortBy' => 'LINE_COVERAGE_PERCENTAGE|FILE_PATH', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- maxLineCoveragePercentage
-
- Type: double
The maximum line coverage percentage to report.
- maxResults
-
- Type: int
The maximum number of results to return.
- minLineCoveragePercentage
-
- Type: double
The minimum line coverage percentage to report.
- nextToken
-
- Type: string
The
nextToken
value returned from a previous call toDescribeCodeCoverages
. This specifies the next item to return. To return the beginning of the list, exclude this parameter. - reportArn
-
- Required: Yes
- Type: string
The ARN of the report for which test cases are returned.
- sortBy
-
- Type: string
Specifies how the results are sorted. Possible values are:
- FILE_PATH
-
The results are sorted by file path.
- LINE_COVERAGE_PERCENTAGE
-
The results are sorted by the percentage of lines that are covered.
- sortOrder
-
- Type: string
Specifies if the results are sorted in ascending or descending order.
Result Syntax
[ 'codeCoverages' => [ [ 'branchCoveragePercentage' => <float>, 'branchesCovered' => <integer>, 'branchesMissed' => <integer>, 'expired' => <DateTime>, 'filePath' => '<string>', 'id' => '<string>', 'lineCoveragePercentage' => <float>, 'linesCovered' => <integer>, 'linesMissed' => <integer>, 'reportARN' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- codeCoverages
-
- Type: Array of CodeCoverage structures
An array of
CodeCoverage
objects that contain the results. - nextToken
-
- Type: string
If there are more items to return, this contains a token that is passed to a subsequent call to
DescribeCodeCoverages
to retrieve the next set of items.
Errors
- InvalidInputException:
The input value that was provided is not valid.
DescribeTestCases
$result = $client->describeTestCases
([/* ... */]); $promise = $client->describeTestCasesAsync
([/* ... */]);
Returns a list of details about test cases for a report.
Parameter Syntax
$result = $client->describeTestCases([ 'filter' => [ 'keyword' => '<string>', 'status' => '<string>', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'reportArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- filter
-
- Type: TestCaseFilter structure
A
TestCaseFilter
object used to filter the returned reports. - maxResults
-
- Type: int
The maximum number of paginated test cases returned per response. Use
nextToken
to iterate pages in the list of returnedTestCase
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reportArn
-
- Required: Yes
- Type: string
The ARN of the report for which test cases are returned.
Result Syntax
[ 'nextToken' => '<string>', 'testCases' => [ [ 'durationInNanoSeconds' => <integer>, 'expired' => <DateTime>, 'message' => '<string>', 'name' => '<string>', 'prefix' => '<string>', 'reportArn' => '<string>', 'status' => '<string>', 'testRawDataPath' => '<string>', ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - testCases
-
- Type: Array of TestCase structures
The returned list of test cases.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
GetReportGroupTrend
$result = $client->getReportGroupTrend
([/* ... */]); $promise = $client->getReportGroupTrendAsync
([/* ... */]);
Analyzes and accumulates test report values for the specified test reports.
Parameter Syntax
$result = $client->getReportGroupTrend([ 'numOfReports' => <integer>, 'reportGroupArn' => '<string>', // REQUIRED 'trendField' => 'PASS_RATE|DURATION|TOTAL|LINE_COVERAGE|LINES_COVERED|LINES_MISSED|BRANCH_COVERAGE|BRANCHES_COVERED|BRANCHES_MISSED', // REQUIRED ]);
Parameter Details
Members
- numOfReports
-
- Type: int
The number of reports to analyze. This operation always retrieves the most recent reports.
If this parameter is omitted, the most recent 100 reports are analyzed.
- reportGroupArn
-
- Required: Yes
- Type: string
The ARN of the report group that contains the reports to analyze.
- trendField
-
- Required: Yes
- Type: string
The test report value to accumulate. This must be one of the following values:
- Test reports:
-
- DURATION
-
Accumulate the test run times for the specified reports.
- PASS_RATE
-
Accumulate the percentage of tests that passed for the specified test reports.
- TOTAL
-
Accumulate the total number of tests for the specified test reports.
- Code coverage reports:
-
- BRANCH_COVERAGE
-
Accumulate the branch coverage percentages for the specified test reports.
- BRANCHES_COVERED
-
Accumulate the branches covered values for the specified test reports.
- BRANCHES_MISSED
-
Accumulate the branches missed values for the specified test reports.
- LINE_COVERAGE
-
Accumulate the line coverage percentages for the specified test reports.
- LINES_COVERED
-
Accumulate the lines covered values for the specified test reports.
- LINES_MISSED
-
Accumulate the lines not covered values for the specified test reports.
Result Syntax
[ 'rawData' => [ [ 'data' => '<string>', 'reportArn' => '<string>', ], // ... ], 'stats' => [ 'average' => '<string>', 'max' => '<string>', 'min' => '<string>', ], ]
Result Details
Members
- rawData
-
- Type: Array of ReportWithRawData structures
An array that contains the raw data for each report.
- stats
-
- Type: ReportGroupTrendStats structure
Contains the accumulated trend data.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
GetResourcePolicy
$result = $client->getResourcePolicy
([/* ... */]); $promise = $client->getResourcePolicyAsync
([/* ... */]);
Gets a resource policy that is identified by its resource ARN.
Parameter Syntax
$result = $client->getResourcePolicy([ 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the resource that is associated with the resource policy.
Result Syntax
[ 'policy' => '<string>', ]
Result Details
Members
- policy
-
- Type: string
The resource policy for the resource identified by the input ARN parameter.
Errors
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- InvalidInputException:
The input value that was provided is not valid.
ImportSourceCredentials
$result = $client->importSourceCredentials
([/* ... */]); $promise = $client->importSourceCredentialsAsync
([/* ... */]);
Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository.
Parameter Syntax
$result = $client->importSourceCredentials([ 'authType' => 'OAUTH|BASIC_AUTH|PERSONAL_ACCESS_TOKEN|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED 'serverType' => 'GITHUB|BITBUCKET|GITHUB_ENTERPRISE|GITLAB|GITLAB_SELF_MANAGED', // REQUIRED 'shouldOverwrite' => true || false, 'token' => '<string>', // REQUIRED 'username' => '<string>', ]);
Parameter Details
Members
- authType
-
- Required: Yes
- Type: string
The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.
- serverType
-
- Required: Yes
- Type: string
The source provider used for this project.
- shouldOverwrite
-
- Type: boolean
Set to
false
to prevent overwriting the repository source credentials. Set totrue
to overwrite the repository source credentials. The default value istrue
. - token
-
- Required: Yes
- Type: string
For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the
authType
CODECONNECTIONS, this is theconnectionArn
. For theauthType
SECRETS_MANAGER, this is thesecretArn
. - username
-
- Type: string
The Bitbucket username when the
authType
is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.
Result Syntax
[ 'arn' => '<string>', ]
Result Details
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) of the token.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
- ResourceAlreadyExistsException:
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
InvalidateProjectCache
$result = $client->invalidateProjectCache
([/* ... */]); $promise = $client->invalidateProjectCacheAsync
([/* ... */]);
Resets the cache for a project.
Parameter Syntax
$result = $client->invalidateProjectCache([ 'projectName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild build project that the cache is reset for.
Result Syntax
[]
Result Details
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
ListBuildBatches
$result = $client->listBuildBatches
([/* ... */]); $promise = $client->listBuildBatchesAsync
([/* ... */]);
Retrieves the identifiers of your build batches in the current region.
Parameter Syntax
$result = $client->listBuildBatches([ 'filter' => [ 'status' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- filter
-
- Type: BuildBatchFilter structure
A
BuildBatchFilter
object that specifies the filters for the search. - maxResults
-
- Type: int
The maximum number of results to return.
- nextToken
-
- Type: string
The
nextToken
value returned from a previous call toListBuildBatches
. This specifies the next item to return. To return the beginning of the list, exclude this parameter. - sortOrder
-
- Type: string
Specifies the sort order of the returned items. Valid values include:
-
ASCENDING
: List the batch build identifiers in ascending order by identifier. -
DESCENDING
: List the batch build identifiers in descending order by identifier.
Result Syntax
[ 'ids' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- ids
-
- Type: Array of strings
An array of strings that contains the batch build identifiers.
- nextToken
-
- Type: string
If there are more items to return, this contains a token that is passed to a subsequent call to
ListBuildBatches
to retrieve the next set of items.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListBuildBatchesForProject
$result = $client->listBuildBatchesForProject
([/* ... */]); $promise = $client->listBuildBatchesForProjectAsync
([/* ... */]);
Retrieves the identifiers of the build batches for a specific project.
Parameter Syntax
$result = $client->listBuildBatchesForProject([ 'filter' => [ 'status' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'projectName' => '<string>', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- filter
-
- Type: BuildBatchFilter structure
A
BuildBatchFilter
object that specifies the filters for the search. - maxResults
-
- Type: int
The maximum number of results to return.
- nextToken
-
- Type: string
The
nextToken
value returned from a previous call toListBuildBatchesForProject
. This specifies the next item to return. To return the beginning of the list, exclude this parameter. - projectName
-
- Type: string
The name of the project.
- sortOrder
-
- Type: string
Specifies the sort order of the returned items. Valid values include:
-
ASCENDING
: List the batch build identifiers in ascending order by identifier. -
DESCENDING
: List the batch build identifiers in descending order by identifier.
Result Syntax
[ 'ids' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- ids
-
- Type: Array of strings
An array of strings that contains the batch build identifiers.
- nextToken
-
- Type: string
If there are more items to return, this contains a token that is passed to a subsequent call to
ListBuildBatchesForProject
to retrieve the next set of items.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
ListBuilds
$result = $client->listBuilds
([/* ... */]); $promise = $client->listBuildsAsync
([/* ... */]);
Gets a list of build IDs, with each build ID representing a single build.
Parameter Syntax
$result = $client->listBuilds([ 'nextToken' => '<string>', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- nextToken
-
- Type: string
During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- sortOrder
-
- Type: string
The order to list build IDs. Valid values include:
-
ASCENDING
: List the build IDs in ascending order by build ID. -
DESCENDING
: List the build IDs in descending order by build ID.
Result Syntax
[ 'ids' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- ids
-
- Type: Array of strings
A list of build IDs, with each build ID representing a single build.
- nextToken
-
- Type: string
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListBuildsForProject
$result = $client->listBuildsForProject
([/* ... */]); $promise = $client->listBuildsForProjectAsync
([/* ... */]);
Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.
Parameter Syntax
$result = $client->listBuildsForProject([ 'nextToken' => '<string>', 'projectName' => '<string>', // REQUIRED 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- nextToken
-
- Type: string
During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild project.
- sortOrder
-
- Type: string
The order to sort the results in. The results are sorted by build number, not the build identifier. If this is not specified, the results are sorted in descending order.
Valid values include:
-
ASCENDING
: List the build identifiers in ascending order, by build number. -
DESCENDING
: List the build identifiers in descending order, by build number.
If the project has more than 100 builds, setting the sort order will result in an error.
Result Syntax
[ 'ids' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- ids
-
- Type: Array of strings
A list of build identifiers for the specified build project, with each build ID representing a single build.
- nextToken
-
- Type: string
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
ListCuratedEnvironmentImages
$result = $client->listCuratedEnvironmentImages
([/* ... */]); $promise = $client->listCuratedEnvironmentImagesAsync
([/* ... */]);
Gets information about Docker images that are managed by CodeBuild.
Parameter Syntax
$result = $client->listCuratedEnvironmentImages([ ]);
Parameter Details
Members
Result Syntax
[ 'platforms' => [ [ 'languages' => [ [ 'images' => [ [ 'description' => '<string>', 'name' => '<string>', 'versions' => ['<string>', ...], ], // ... ], 'language' => 'JAVA|PYTHON|NODE_JS|RUBY|GOLANG|DOCKER|ANDROID|DOTNET|BASE|PHP', ], // ... ], 'platform' => 'DEBIAN|AMAZON_LINUX|UBUNTU|WINDOWS_SERVER', ], // ... ], ]
Result Details
Members
- platforms
-
- Type: Array of EnvironmentPlatform structures
Information about supported platforms for Docker images that are managed by CodeBuild.
Errors
There are no errors described for this operation.
ListFleets
$result = $client->listFleets
([/* ... */]); $promise = $client->listFleetsAsync
([/* ... */]);
Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.
Parameter Syntax
$result = $client->listFleets([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortBy' => 'NAME|CREATED_TIME|LAST_MODIFIED_TIME', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of paginated compute fleets returned per response. Use
nextToken
to iterate pages in the list of returned compute fleets. - nextToken
-
- Type: string
During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- sortBy
-
- Type: string
The criterion to be used to list compute fleet names. Valid values include:
-
CREATED_TIME
: List based on when each compute fleet was created. -
LAST_MODIFIED_TIME
: List based on when information about each compute fleet was last changed. -
NAME
: List based on each compute fleet's name.
Use
sortOrder
to specify in what order to list the compute fleet names based on the preceding criteria. - sortOrder
-
- Type: string
The order in which to list compute fleets. Valid values include:
-
ASCENDING
: List in ascending order. -
DESCENDING
: List in descending order.
Use
sortBy
to specify the criterion to be used to list compute fleet names.
Result Syntax
[ 'fleets' => ['<string>', ...], 'nextToken' => '<string>', ]
Result Details
Members
- fleets
-
- Type: Array of strings
The list of compute fleet names.
- nextToken
-
- Type: string
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListProjects
$result = $client->listProjects
([/* ... */]); $promise = $client->listProjectsAsync
([/* ... */]);
Gets a list of build project names, with each build project name representing a single build project.
Parameter Syntax
$result = $client->listProjects([ 'nextToken' => '<string>', 'sortBy' => 'NAME|CREATED_TIME|LAST_MODIFIED_TIME', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- nextToken
-
- Type: string
During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- sortBy
-
- Type: string
The criterion to be used to list build project names. Valid values include:
-
CREATED_TIME
: List based on when each build project was created. -
LAST_MODIFIED_TIME
: List based on when information about each build project was last changed. -
NAME
: List based on each build project's name.
Use
sortOrder
to specify in what order to list the build project names based on the preceding criteria. - sortOrder
-
- Type: string
The order in which to list build projects. Valid values include:
-
ASCENDING
: List in ascending order. -
DESCENDING
: List in descending order.
Use
sortBy
to specify the criterion to be used to list build project names.
Result Syntax
[ 'nextToken' => '<string>', 'projects' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.
- projects
-
- Type: Array of strings
The list of build project names, with each build project name representing a single build project.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListReportGroups
$result = $client->listReportGroups
([/* ... */]); $promise = $client->listReportGroupsAsync
([/* ... */]);
Gets a list ARNs for the report groups in the current Amazon Web Services account.
Parameter Syntax
$result = $client->listReportGroups([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortBy' => 'NAME|CREATED_TIME|LAST_MODIFIED_TIME', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of paginated report groups returned per response. Use
nextToken
to iterate pages in the list of returnedReportGroup
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - sortBy
-
- Type: string
The criterion to be used to list build report groups. Valid values include:
-
CREATED_TIME
: List based on when each report group was created. -
LAST_MODIFIED_TIME
: List based on when each report group was last changed. -
NAME
: List based on each report group's name.
- sortOrder
-
- Type: string
Used to specify the order to sort the list of returned report groups. Valid values are
ASCENDING
andDESCENDING
.
Result Syntax
[ 'nextToken' => '<string>', 'reportGroups' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reportGroups
-
- Type: Array of strings
The list of ARNs for the report groups in the current Amazon Web Services account.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListReports
$result = $client->listReports
([/* ... */]); $promise = $client->listReportsAsync
([/* ... */]);
Returns a list of ARNs for the reports in the current Amazon Web Services account.
Parameter Syntax
$result = $client->listReports([ 'filter' => [ 'status' => 'GENERATING|SUCCEEDED|FAILED|INCOMPLETE|DELETING', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- filter
-
- Type: ReportFilter structure
A
ReportFilter
object used to filter the returned reports. - maxResults
-
- Type: int
The maximum number of paginated reports returned per response. Use
nextToken
to iterate pages in the list of returnedReport
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - sortOrder
-
- Type: string
Specifies the sort order for the list of returned reports. Valid values are:
-
ASCENDING
: return reports in chronological order based on their creation date. -
DESCENDING
: return reports in the reverse chronological order based on their creation date.
Result Syntax
[ 'nextToken' => '<string>', 'reports' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reports
-
- Type: Array of strings
The list of returned ARNs for the reports in the current Amazon Web Services account.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListReportsForReportGroup
$result = $client->listReportsForReportGroup
([/* ... */]); $promise = $client->listReportsForReportGroupAsync
([/* ... */]);
Returns a list of ARNs for the reports that belong to a ReportGroup
.
Parameter Syntax
$result = $client->listReportsForReportGroup([ 'filter' => [ 'status' => 'GENERATING|SUCCEEDED|FAILED|INCOMPLETE|DELETING', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'reportGroupArn' => '<string>', // REQUIRED 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- filter
-
- Type: ReportFilter structure
A
ReportFilter
object used to filter the returned reports. - maxResults
-
- Type: int
The maximum number of paginated reports in this report group returned per response. Use
nextToken
to iterate pages in the list of returnedReport
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reportGroupArn
-
- Required: Yes
- Type: string
The ARN of the report group for which you want to return report ARNs.
- sortOrder
-
- Type: string
Use to specify whether the results are returned in ascending or descending order.
Result Syntax
[ 'nextToken' => '<string>', 'reports' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reports
-
- Type: Array of strings
The list of report ARNs.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
ListSharedProjects
$result = $client->listSharedProjects
([/* ... */]); $promise = $client->listSharedProjectsAsync
([/* ... */]);
Gets a list of projects that are shared with other Amazon Web Services accounts or users.
Parameter Syntax
$result = $client->listSharedProjects([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortBy' => 'ARN|MODIFIED_TIME', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of paginated shared build projects returned per response. Use
nextToken
to iterate pages in the list of returnedProject
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - sortBy
-
- Type: string
The criterion to be used to list build projects shared with the current Amazon Web Services account or user. Valid values include:
-
ARN
: List based on the ARN. -
MODIFIED_TIME
: List based on when information about the shared project was last changed.
- sortOrder
-
- Type: string
The order in which to list shared build projects. Valid values include:
-
ASCENDING
: List in ascending order. -
DESCENDING
: List in descending order.
Result Syntax
[ 'nextToken' => '<string>', 'projects' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - projects
-
- Type: Array of strings
The list of ARNs for the build projects shared with the current Amazon Web Services account or user.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListSharedReportGroups
$result = $client->listSharedReportGroups
([/* ... */]); $promise = $client->listSharedReportGroupsAsync
([/* ... */]);
Gets a list of report groups that are shared with other Amazon Web Services accounts or users.
Parameter Syntax
$result = $client->listSharedReportGroups([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'sortBy' => 'ARN|MODIFIED_TIME', 'sortOrder' => 'ASCENDING|DESCENDING', ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of paginated shared report groups per response. Use
nextToken
to iterate pages in the list of returnedReportGroup
objects. The default value is 100. - nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - sortBy
-
- Type: string
The criterion to be used to list report groups shared with the current Amazon Web Services account or user. Valid values include:
-
ARN
: List based on the ARN. -
MODIFIED_TIME
: List based on when information about the shared report group was last changed.
- sortOrder
-
- Type: string
The order in which to list shared report groups. Valid values include:
-
ASCENDING
: List in ascending order. -
DESCENDING
: List in descending order.
Result Syntax
[ 'nextToken' => '<string>', 'reportGroups' => ['<string>', ...], ]
Result Details
Members
- nextToken
-
- Type: string
During a previous call, the maximum number of items that can be returned is the value specified in
maxResults
. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. - reportGroups
-
- Type: Array of strings
The list of ARNs for the report groups shared with the current Amazon Web Services account or user.
Errors
- InvalidInputException:
The input value that was provided is not valid.
ListSourceCredentials
$result = $client->listSourceCredentials
([/* ... */]); $promise = $client->listSourceCredentialsAsync
([/* ... */]);
Returns a list of SourceCredentialsInfo
objects.
Parameter Syntax
$result = $client->listSourceCredentials([ ]);
Parameter Details
Members
Result Syntax
[ 'sourceCredentialsInfos' => [ [ 'arn' => '<string>', 'authType' => 'OAUTH|BASIC_AUTH|PERSONAL_ACCESS_TOKEN|CODECONNECTIONS|SECRETS_MANAGER', 'resource' => '<string>', 'serverType' => 'GITHUB|BITBUCKET|GITHUB_ENTERPRISE|GITLAB|GITLAB_SELF_MANAGED', ], // ... ], ]
Result Details
Members
- sourceCredentialsInfos
-
- Type: Array of SourceCredentialsInfo structures
A list of
SourceCredentialsInfo
objects. EachSourceCredentialsInfo
object includes the authentication type, token ARN, and type of source provider for one set of credentials.
Errors
- InvalidInputException:
The input value that was provided is not valid.
PutResourcePolicy
$result = $client->putResourcePolicy
([/* ... */]); $promise = $client->putResourcePolicyAsync
([/* ... */]);
Stores a resource policy for the ARN of a Project
or ReportGroup
object.
Parameter Syntax
$result = $client->putResourcePolicy([ 'policy' => '<string>', // REQUIRED 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- policy
-
- Required: Yes
- Type: string
A JSON-formatted resource policy. For more information, see Sharing a Project and Sharing a Report Group in the CodeBuild User Guide.
- resourceArn
-
- Required: Yes
- Type: string
The ARN of the
Project
orReportGroup
resource you want to associate with a resource policy.
Result Syntax
[ 'resourceArn' => '<string>', ]
Result Details
Members
- resourceArn
-
- Type: string
The ARN of the
Project
orReportGroup
resource that is associated with a resource policy.
Errors
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- InvalidInputException:
The input value that was provided is not valid.
RetryBuild
$result = $client->retryBuild
([/* ... */]); $promise = $client->retryBuildAsync
([/* ... */]);
Restarts a build.
Parameter Syntax
$result = $client->retryBuild([ 'id' => '<string>', 'idempotencyToken' => '<string>', ]);
Parameter Details
Members
- id
-
- Type: string
Specifies the identifier of the build to restart.
- idempotencyToken
-
- Type: string
A unique, case sensitive identifier you provide to ensure the idempotency of the
RetryBuild
request. The token is included in theRetryBuild
request and is valid for five minutes. If you repeat theRetryBuild
request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.
Result Syntax
[ 'build' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchArn' => '<string>', 'buildComplete' => true || false, 'buildNumber' => <integer>, 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'currentPhase' => '<string>', 'debugSession' => [ 'sessionEnabled' => true || false, 'sessionTarget' => '<string>', ], 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'exportedEnvironmentVariables' => [ [ 'name' => '<string>', 'value' => '<string>', ], // ... ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logs' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 'cloudWatchLogsArn' => '<string>', 'deepLink' => '<string>', 'groupName' => '<string>', 's3DeepLink' => '<string>', 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], 's3LogsArn' => '<string>', 'streamName' => '<string>', ], 'networkInterface' => [ 'networkInterfaceId' => '<string>', 'subnetId' => '<string>', ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|QUEUED|PROVISIONING|DOWNLOAD_SOURCE|INSTALL|PRE_BUILD|BUILD|POST_BUILD|UPLOAD_ARTIFACTS|FINALIZING|COMPLETED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'reportArns' => ['<string>', ...], 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- build
-
- Type: Build structure
Information about a build.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
RetryBuildBatch
$result = $client->retryBuildBatch
([/* ... */]); $promise = $client->retryBuildBatchAsync
([/* ... */]);
Restarts a failed batch build. Only batch builds that have failed can be retried.
Parameter Syntax
$result = $client->retryBuildBatch([ 'id' => '<string>', 'idempotencyToken' => '<string>', 'retryType' => 'RETRY_ALL_BUILDS|RETRY_FAILED_BUILDS', ]);
Parameter Details
Members
- id
-
- Type: string
Specifies the identifier of the batch build to restart.
- idempotencyToken
-
- Type: string
A unique, case sensitive identifier you provide to ensure the idempotency of the
RetryBuildBatch
request. The token is included in theRetryBuildBatch
request and is valid for five minutes. If you repeat theRetryBuildBatch
request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error. - retryType
-
- Type: string
Specifies the type of retry to perform.
Result Syntax
[ 'buildBatch' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'buildBatchNumber' => <integer>, 'buildBatchStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'buildGroups' => [ [ 'currentBuildSummary' => [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], 'dependsOn' => ['<string>', ...], 'identifier' => '<string>', 'ignoreFailure' => true || false, 'priorBuildSummaryList' => [ [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], // ... ], ], // ... ], 'buildTimeoutInMinutes' => <integer>, 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'complete' => true || false, 'currentPhase' => '<string>', 'debugSessionEnabled' => true || false, 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|DOWNLOAD_BATCHSPEC|IN_PROGRESS|COMBINE_ARTIFACTS|SUCCEEDED|FAILED|STOPPED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- buildBatch
-
- Type: BuildBatch structure
Contains information about a batch build.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
StartBuild
$result = $client->startBuild
([/* ... */]); $promise = $client->startBuildAsync
([/* ... */]);
Starts running a build with the settings defined in the project. These setting include: how to run a build, where to get the source code, which build environment to use, which build commands to run, and where to store the build output.
You can also start a build run by overriding some of the build settings in the project. The overrides only apply for that specific start build request. The settings in the project are unaltered.
Parameter Syntax
$result = $client->startBuild([ 'artifactsOverride' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], 'buildStatusConfigOverride' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspecOverride' => '<string>', 'cacheOverride' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', // REQUIRED ], 'certificateOverride' => '<string>', 'computeTypeOverride' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'debugSessionEnabled' => true || false, 'encryptionKeyOverride' => '<string>', 'environmentTypeOverride' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'environmentVariablesOverride' => [ [ 'name' => '<string>', // REQUIRED 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', // REQUIRED ], // ... ], 'fleetOverride' => [ 'fleetArn' => '<string>', ], 'gitCloneDepthOverride' => <integer>, 'gitSubmodulesConfigOverride' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'idempotencyToken' => '<string>', 'imageOverride' => '<string>', 'imagePullCredentialsTypeOverride' => 'CODEBUILD|SERVICE_ROLE', 'insecureSslOverride' => true || false, 'logsConfigOverride' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED ], ], 'privilegedModeOverride' => true || false, 'projectName' => '<string>', // REQUIRED 'queuedTimeoutInMinutesOverride' => <integer>, 'registryCredentialOverride' => [ 'credential' => '<string>', // REQUIRED 'credentialProvider' => 'SECRETS_MANAGER', // REQUIRED ], 'reportBuildStatusOverride' => true || false, 'secondaryArtifactsOverride' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], // ... ], 'secondarySourcesOverride' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], // ... ], 'secondarySourcesVersionOverride' => [ [ 'sourceIdentifier' => '<string>', // REQUIRED 'sourceVersion' => '<string>', // REQUIRED ], // ... ], 'serviceRoleOverride' => '<string>', 'sourceAuthOverride' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'sourceLocationOverride' => '<string>', 'sourceTypeOverride' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', 'sourceVersion' => '<string>', 'timeoutInMinutesOverride' => <integer>, ]);
Parameter Details
Members
- artifactsOverride
-
- Type: ProjectArtifacts structure
Build output artifact settings that override, for this build only, the latest ones already defined in the build project.
- buildStatusConfigOverride
-
- Type: BuildStatusConfig structure
Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is
GITHUB
,GITHUB_ENTERPRISE
, orBITBUCKET
. - buildspecOverride
-
- Type: string
A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.
If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in
CODEBUILD_SRC_DIR
environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example,arn:aws:s3:::my-codebuild-sample2/buildspec.yml
). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location.Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.
- cacheOverride
-
- Type: ProjectCache structure
A ProjectCache object specified for this build that overrides the one defined in the build project.
- certificateOverride
-
- Type: string
The name of a certificate for this build that overrides the one specified in the build project.
- computeTypeOverride
-
- Type: string
The name of a compute type for this build that overrides the one specified in the build project.
- debugSessionEnabled
-
- Type: boolean
Specifies if session debugging is enabled for this build. For more information, see Viewing a running build in Session Manager.
- encryptionKeyOverride
-
- Type: string
The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - environmentTypeOverride
-
- Type: string
A container type for this build that overrides the one specified in the build project.
- environmentVariablesOverride
-
- Type: Array of EnvironmentVariable structures
A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.
- fleetOverride
-
- Type: ProjectFleet structure
A ProjectFleet object specified for this build that overrides the one defined in the build project.
- gitCloneDepthOverride
-
- Type: int
The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.
- gitSubmodulesConfigOverride
-
- Type: GitSubmodulesConfig structure
Information about the Git submodules configuration for this build of an CodeBuild build project.
- idempotencyToken
-
- Type: string
A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.
- imageOverride
-
- Type: string
The name of an image for this build that overrides the one specified in the build project.
- imagePullCredentialsTypeOverride
-
- Type: string
The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
- CODEBUILD
-
Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.
- SERVICE_ROLE
-
Specifies that CodeBuild uses your build project's service role.
When using a cross-account or private registry image, you must use
SERVICE_ROLE
credentials. When using an CodeBuild curated image, you must useCODEBUILD
credentials. - insecureSslOverride
-
- Type: boolean
Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.
- logsConfigOverride
-
- Type: LogsConfig structure
Log settings for this build that override the log settings defined in the build project.
- privilegedModeOverride
-
- Type: boolean
Enable this flag to override privileged mode in the build project.
- projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild build project to start running a build.
- queuedTimeoutInMinutesOverride
-
- Type: int
The number of minutes a build is allowed to be queued before it times out.
- registryCredentialOverride
-
- Type: RegistryCredential structure
The credentials for access to a private registry.
- reportBuildStatusOverride
-
- Type: boolean
Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an
invalidInputException
is thrown.To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.
The status of a build triggered by a webhook is always reported to your source provider.
- secondaryArtifactsOverride
-
- Type: Array of ProjectArtifacts structures
An array of
ProjectArtifacts
objects. - secondarySourcesOverride
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects. - secondarySourcesVersionOverride
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects that specify one or more versions of the project's secondary sources to be used for this build only. - serviceRoleOverride
-
- Type: string
The name of a service role for this build that overrides the one specified in the build project.
- sourceAuthOverride
-
- Type: SourceAuth structure
An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.
- sourceLocationOverride
-
- Type: string
A location that overrides, for this build, the source location for the one defined in the build project.
- sourceTypeOverride
-
- Type: string
A source input type, for this build, that overrides the source input defined in the build project.
- sourceVersion
-
- Type: string
The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:
- CodeCommit
-
The commit ID, branch, or Git tag to use.
- GitHub
-
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for examplepr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. - GitLab
-
The commit ID, branch, or Git tag to use.
- Bitbucket
-
The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
- Amazon S3
-
The version ID of the object that represents the build input ZIP file to use.
If
sourceVersion
is specified at the project level, then thissourceVersion
(at the build level) takes precedence.For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
- timeoutInMinutesOverride
-
- Type: int
The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project.
Result Syntax
[ 'build' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchArn' => '<string>', 'buildComplete' => true || false, 'buildNumber' => <integer>, 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'currentPhase' => '<string>', 'debugSession' => [ 'sessionEnabled' => true || false, 'sessionTarget' => '<string>', ], 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'exportedEnvironmentVariables' => [ [ 'name' => '<string>', 'value' => '<string>', ], // ... ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logs' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 'cloudWatchLogsArn' => '<string>', 'deepLink' => '<string>', 'groupName' => '<string>', 's3DeepLink' => '<string>', 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], 's3LogsArn' => '<string>', 'streamName' => '<string>', ], 'networkInterface' => [ 'networkInterfaceId' => '<string>', 'subnetId' => '<string>', ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|QUEUED|PROVISIONING|DOWNLOAD_SOURCE|INSTALL|PRE_BUILD|BUILD|POST_BUILD|UPLOAD_ARTIFACTS|FINALIZING|COMPLETED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'reportArns' => ['<string>', ...], 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- build
-
- Type: Build structure
Information about the build to be run.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
StartBuildBatch
$result = $client->startBuildBatch
([/* ... */]); $promise = $client->startBuildBatchAsync
([/* ... */]);
Starts a batch build for a project.
Parameter Syntax
$result = $client->startBuildBatch([ 'artifactsOverride' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], 'buildBatchConfigOverride' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'buildTimeoutInMinutesOverride' => <integer>, 'buildspecOverride' => '<string>', 'cacheOverride' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', // REQUIRED ], 'certificateOverride' => '<string>', 'computeTypeOverride' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'debugSessionEnabled' => true || false, 'encryptionKeyOverride' => '<string>', 'environmentTypeOverride' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'environmentVariablesOverride' => [ [ 'name' => '<string>', // REQUIRED 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', // REQUIRED ], // ... ], 'gitCloneDepthOverride' => <integer>, 'gitSubmodulesConfigOverride' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'idempotencyToken' => '<string>', 'imageOverride' => '<string>', 'imagePullCredentialsTypeOverride' => 'CODEBUILD|SERVICE_ROLE', 'insecureSslOverride' => true || false, 'logsConfigOverride' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED ], ], 'privilegedModeOverride' => true || false, 'projectName' => '<string>', // REQUIRED 'queuedTimeoutInMinutesOverride' => <integer>, 'registryCredentialOverride' => [ 'credential' => '<string>', // REQUIRED 'credentialProvider' => 'SECRETS_MANAGER', // REQUIRED ], 'reportBuildBatchStatusOverride' => true || false, 'secondaryArtifactsOverride' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], // ... ], 'secondarySourcesOverride' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], // ... ], 'secondarySourcesVersionOverride' => [ [ 'sourceIdentifier' => '<string>', // REQUIRED 'sourceVersion' => '<string>', // REQUIRED ], // ... ], 'serviceRoleOverride' => '<string>', 'sourceAuthOverride' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'sourceLocationOverride' => '<string>', 'sourceTypeOverride' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', 'sourceVersion' => '<string>', ]);
Parameter Details
Members
- artifactsOverride
-
- Type: ProjectArtifacts structure
An array of
ProjectArtifacts
objects that contains information about the build output artifact overrides for the build project. - buildBatchConfigOverride
-
- Type: ProjectBuildBatchConfig structure
A
BuildBatchConfigOverride
object that contains batch build configuration overrides. - buildTimeoutInMinutesOverride
-
- Type: int
Overrides the build timeout specified in the batch build project.
- buildspecOverride
-
- Type: string
A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.
If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in
CODEBUILD_SRC_DIR
environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example,arn:aws:s3:::my-codebuild-sample2/buildspec.yml
). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location. - cacheOverride
-
- Type: ProjectCache structure
A
ProjectCache
object that specifies cache overrides. - certificateOverride
-
- Type: string
The name of a certificate for this batch build that overrides the one specified in the batch build project.
- computeTypeOverride
-
- Type: string
The name of a compute type for this batch build that overrides the one specified in the batch build project.
- debugSessionEnabled
-
- Type: boolean
Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
- encryptionKeyOverride
-
- Type: string
The Key Management Service customer master key (CMK) that overrides the one specified in the batch build project. The CMK key encrypts the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - environmentTypeOverride
-
- Type: string
A container type for this batch build that overrides the one specified in the batch build project.
- environmentVariablesOverride
-
- Type: Array of EnvironmentVariable structures
An array of
EnvironmentVariable
objects that override, or add to, the environment variables defined in the batch build project. - gitCloneDepthOverride
-
- Type: int
The user-defined depth of history, with a minimum value of 0, that overrides, for this batch build only, any previous depth of history defined in the batch build project.
- gitSubmodulesConfigOverride
-
- Type: GitSubmodulesConfig structure
A
GitSubmodulesConfig
object that overrides the Git submodules configuration for this batch build. - idempotencyToken
-
- Type: string
A unique, case sensitive identifier you provide to ensure the idempotency of the
StartBuildBatch
request. The token is included in theStartBuildBatch
request and is valid for five minutes. If you repeat theStartBuildBatch
request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error. - imageOverride
-
- Type: string
The name of an image for this batch build that overrides the one specified in the batch build project.
- imagePullCredentialsTypeOverride
-
- Type: string
The type of credentials CodeBuild uses to pull images in your batch build. There are two valid values:
- CODEBUILD
-
Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.
- SERVICE_ROLE
-
Specifies that CodeBuild uses your build project's service role.
When using a cross-account or private registry image, you must use
SERVICE_ROLE
credentials. When using an CodeBuild curated image, you must useCODEBUILD
credentials. - insecureSslOverride
-
- Type: boolean
Enable this flag to override the insecure SSL setting that is specified in the batch build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.
- logsConfigOverride
-
- Type: LogsConfig structure
A
LogsConfig
object that override the log settings defined in the batch build project. - privilegedModeOverride
-
- Type: boolean
Enable this flag to override privileged mode in the batch build project.
- projectName
-
- Required: Yes
- Type: string
The name of the project.
- queuedTimeoutInMinutesOverride
-
- Type: int
The number of minutes a batch build is allowed to be queued before it times out.
- registryCredentialOverride
-
- Type: RegistryCredential structure
A
RegistryCredential
object that overrides credentials for access to a private registry. - reportBuildBatchStatusOverride
-
- Type: boolean
Set to
true
to report to your source provider the status of a batch build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, aninvalidInputException
is thrown.The status of a build triggered by a webhook is always reported to your source provider.
- secondaryArtifactsOverride
-
- Type: Array of ProjectArtifacts structures
An array of
ProjectArtifacts
objects that override the secondary artifacts defined in the batch build project. - secondarySourcesOverride
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects that override the secondary sources defined in the batch build project. - secondarySourcesVersionOverride
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects that override the secondary source versions in the batch build project. - serviceRoleOverride
-
- Type: string
The name of a service role for this batch build that overrides the one specified in the batch build project.
- sourceAuthOverride
-
- Type: SourceAuth structure
A
SourceAuth
object that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub. - sourceLocationOverride
-
- Type: string
A location that overrides, for this batch build, the source location defined in the batch build project.
- sourceTypeOverride
-
- Type: string
The source input type that overrides the source input defined in the batch build project.
- sourceVersion
-
- Type: string
The version of the batch build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:
- CodeCommit
-
The commit ID, branch, or Git tag to use.
- GitHub
-
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for examplepr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. - Bitbucket
-
The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
- Amazon S3
-
The version ID of the object that represents the build input ZIP file to use.
If
sourceVersion
is specified at the project level, then thissourceVersion
(at the build level) takes precedence.For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
Result Syntax
[ 'buildBatch' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'buildBatchNumber' => <integer>, 'buildBatchStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'buildGroups' => [ [ 'currentBuildSummary' => [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], 'dependsOn' => ['<string>', ...], 'identifier' => '<string>', 'ignoreFailure' => true || false, 'priorBuildSummaryList' => [ [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], // ... ], ], // ... ], 'buildTimeoutInMinutes' => <integer>, 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'complete' => true || false, 'currentPhase' => '<string>', 'debugSessionEnabled' => true || false, 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|DOWNLOAD_BATCHSPEC|IN_PROGRESS|COMBINE_ARTIFACTS|SUCCEEDED|FAILED|STOPPED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- buildBatch
-
- Type: BuildBatch structure
A
BuildBatch
object that contains information about the batch build.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
StopBuild
$result = $client->stopBuild
([/* ... */]); $promise = $client->stopBuildAsync
([/* ... */]);
Attempts to stop running a build.
Parameter Syntax
$result = $client->stopBuild([ 'id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- id
-
- Required: Yes
- Type: string
The ID of the build.
Result Syntax
[ 'build' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchArn' => '<string>', 'buildComplete' => true || false, 'buildNumber' => <integer>, 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'currentPhase' => '<string>', 'debugSession' => [ 'sessionEnabled' => true || false, 'sessionTarget' => '<string>', ], 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'exportedEnvironmentVariables' => [ [ 'name' => '<string>', 'value' => '<string>', ], // ... ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logs' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 'cloudWatchLogsArn' => '<string>', 'deepLink' => '<string>', 'groupName' => '<string>', 's3DeepLink' => '<string>', 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], 's3LogsArn' => '<string>', 'streamName' => '<string>', ], 'networkInterface' => [ 'networkInterfaceId' => '<string>', 'subnetId' => '<string>', ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|QUEUED|PROVISIONING|DOWNLOAD_SOURCE|INSTALL|PRE_BUILD|BUILD|POST_BUILD|UPLOAD_ARTIFACTS|FINALIZING|COMPLETED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'reportArns' => ['<string>', ...], 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- build
-
- Type: Build structure
Information about the build.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
StopBuildBatch
$result = $client->stopBuildBatch
([/* ... */]); $promise = $client->stopBuildBatchAsync
([/* ... */]);
Stops a running batch build.
Parameter Syntax
$result = $client->stopBuildBatch([ 'id' => '<string>', // REQUIRED ]);
Parameter Details
Members
- id
-
- Required: Yes
- Type: string
The identifier of the batch build to stop.
Result Syntax
[ 'buildBatch' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'buildBatchNumber' => <integer>, 'buildBatchStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'buildGroups' => [ [ 'currentBuildSummary' => [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], 'dependsOn' => ['<string>', ...], 'identifier' => '<string>', 'ignoreFailure' => true || false, 'priorBuildSummaryList' => [ [ 'arn' => '<string>', 'buildStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'primaryArtifact' => [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'requestedOn' => <DateTime>, 'secondaryArtifacts' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], ], // ... ], ], // ... ], 'buildTimeoutInMinutes' => <integer>, 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'complete' => true || false, 'currentPhase' => '<string>', 'debugSessionEnabled' => true || false, 'encryptionKey' => '<string>', 'endTime' => <DateTime>, 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'id' => '<string>', 'initiator' => '<string>', 'logConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'phases' => [ [ 'contexts' => [ [ 'message' => '<string>', 'statusCode' => '<string>', ], // ... ], 'durationInSeconds' => <integer>, 'endTime' => <DateTime>, 'phaseStatus' => 'SUCCEEDED|FAILED|FAULT|TIMED_OUT|IN_PROGRESS|STOPPED', 'phaseType' => 'SUBMITTED|DOWNLOAD_BATCHSPEC|IN_PROGRESS|COMBINE_ARTIFACTS|SUCCEEDED|FAILED|STOPPED', 'startTime' => <DateTime>, ], // ... ], 'projectName' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resolvedSourceVersion' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'md5sum' => '<string>', 'overrideArtifactName' => true || false, 'sha256sum' => '<string>', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'startTime' => <DateTime>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- buildBatch
-
- Type: BuildBatch structure
Contains information about a batch build.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
UpdateFleet
$result = $client->updateFleet
([/* ... */]); $promise = $client->updateFleetAsync
([/* ... */]);
Updates a compute fleet.
Parameter Syntax
$result = $client->updateFleet([ 'arn' => '<string>', // REQUIRED 'baseCapacity' => <integer>, 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentType' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'fleetServiceRole' => '<string>', 'imageId' => '<string>', 'overflowBehavior' => 'QUEUE|ON_DEMAND', 'scalingConfiguration' => [ 'maxCapacity' => <integer>, 'scalingType' => 'TARGET_TRACKING_SCALING', 'targetTrackingScalingConfigs' => [ [ 'metricType' => 'FLEET_UTILIZATION_RATE', 'targetValue' => <float>, ], // ... ], ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the compute fleet.
- baseCapacity
-
- Type: int
The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.
- computeType
-
- Type: string
Information about the compute resources the compute fleet uses. Available values include:
-
BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds. -
BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds. -
BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.
If you use
BUILD_GENERAL1_SMALL
:-
For environment type
LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. -
For environment type
ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
If you use
BUILD_GENERAL1_LARGE
:-
For environment type
LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. -
For environment type
ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds.
For more information, see Build environment compute types in the CodeBuild User Guide.
- environmentType
-
- Type: string
The environment type of the compute fleet.
-
The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo). -
The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai). -
The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). -
The environment type
MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt) -
The environment type
MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney). -
The environment type
WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). -
The environment type
WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
For more information, see Build environment compute types in the CodeBuild user guide.
- fleetServiceRole
-
- Type: string
The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide.
- imageId
-
- Type: string
The Amazon Machine Image (AMI) of the compute fleet.
- overflowBehavior
-
- Type: string
The compute fleet overflow behavior.
-
For overflow behavior
QUEUE
, your overflow builds need to wait on the existing fleet instance to become available. -
For overflow behavior
ON_DEMAND
, your overflow builds run on CodeBuild on-demand.If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface.
- scalingConfiguration
-
- Type: ScalingConfigurationInput structure
The scaling configuration of the compute fleet.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this compute fleet.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- vpcConfig
-
- Type: VpcConfig structure
Information about the VPC configuration that CodeBuild accesses.
Result Syntax
[ 'fleet' => [ 'arn' => '<string>', 'baseCapacity' => <integer>, 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'created' => <DateTime>, 'environmentType' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', 'fleetServiceRole' => '<string>', 'id' => '<string>', 'imageId' => '<string>', 'lastModified' => <DateTime>, 'name' => '<string>', 'overflowBehavior' => 'QUEUE|ON_DEMAND', 'scalingConfiguration' => [ 'desiredCapacity' => <integer>, 'maxCapacity' => <integer>, 'scalingType' => 'TARGET_TRACKING_SCALING', 'targetTrackingScalingConfigs' => [ [ 'metricType' => 'FLEET_UTILIZATION_RATE', 'targetValue' => <float>, ], // ... ], ], 'status' => [ 'context' => 'CREATE_FAILED|UPDATE_FAILED|ACTION_REQUIRED|PENDING_DELETION|INSUFFICIENT_CAPACITY', 'message' => '<string>', 'statusCode' => 'CREATING|UPDATING|ROTATING|PENDING_DELETION|DELETING|CREATE_FAILED|UPDATE_ROLLBACK_FAILED|ACTIVE', ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ], ]
Result Details
Members
- fleet
-
- Type: Fleet structure
A
Fleet
object.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- AccountLimitExceededException:
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
UpdateProject
$result = $client->updateProject
([/* ... */]); $promise = $client->updateProjectAsync
([/* ... */]);
Changes the settings of a build project.
Parameter Syntax
$result = $client->updateProject([ 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], 'badgeEnabled' => true || false, 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', // REQUIRED ], 'concurrentBuildLimit' => <integer>, 'description' => '<string>', 'encryptionKey' => '<string>', 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', // REQUIRED 'environmentVariables' => [ [ 'name' => '<string>', // REQUIRED 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', // REQUIRED ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', // REQUIRED 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', // REQUIRED 'credentialProvider' => 'SECRETS_MANAGER', // REQUIRED ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', // REQUIRED ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'logsConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', // REQUIRED ], ], 'name' => '<string>', // REQUIRED 'queuedTimeoutInMinutes' => <integer>, 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', // REQUIRED ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', // REQUIRED 'sourceVersion' => '<string>', // REQUIRED ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', // REQUIRED ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, // REQUIRED ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', // REQUIRED ], 'sourceVersion' => '<string>', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], ]);
Parameter Details
Members
- artifacts
-
- Type: ProjectArtifacts structure
Information to be changed about the build output artifacts for the build project.
- badgeEnabled
-
- Type: boolean
Set this to true to generate a publicly accessible URL for your project's build badge.
- buildBatchConfig
-
- Type: ProjectBuildBatchConfig structure
Contains configuration information about a batch build project.
- cache
-
- Type: ProjectCache structure
Stores recently used information so that it can be quickly accessed at a later time.
- concurrentBuildLimit
-
- Type: int
The maximum number of concurrent builds that are allowed for this project.
New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.
To remove this limit, set this value to -1.
- description
-
- Type: string
A new or replacement description of the build project.
- encryptionKey
-
- Type: string
The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - environment
-
- Type: ProjectEnvironment structure
Information to be changed about the build environment for the build project.
- fileSystemLocations
-
- Type: Array of ProjectFileSystemLocation structures
An array of
ProjectFileSystemLocation
objects for a CodeBuild build project. AProjectFileSystemLocation
object specifies theidentifier
,location
,mountOptions
,mountPoint
, andtype
of a file system created using Amazon Elastic File System. - logsConfig
-
- Type: LogsConfig structure
Information about logs for the build project. A project can create logs in CloudWatch Logs, logs in an S3 bucket, or both.
- name
-
- Required: Yes
- Type: string
The name of the build project.
You cannot change a build project's name.
- queuedTimeoutInMinutes
-
- Type: int
The number of minutes a build is allowed to be queued before it times out.
- secondaryArtifacts
-
- Type: Array of ProjectArtifacts structures
An array of
ProjectArtifact
objects. - secondarySourceVersions
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects. IfsecondarySourceVersions
is specified at the build level, then they take over thesesecondarySourceVersions
(at the project level). - secondarySources
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects. - serviceRole
-
- Type: string
The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.
- source
-
- Type: ProjectSource structure
Information to be changed about the build input source code for the build project.
- sourceVersion
-
- Type: string
A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for examplepr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For GitLab: the commit ID, branch, or Git tag to use.
-
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
If
sourceVersion
is specified at the build level, then that version takes precedence over thissourceVersion
(at the project level).For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
- tags
-
- Type: Array of Tag structures
An updated list of tag key and value pairs associated with this build project.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- timeoutInMinutes
-
- Type: int
The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed.
- vpcConfig
-
- Type: VpcConfig structure
VpcConfig enables CodeBuild to access resources in an Amazon VPC.
Result Syntax
[ 'project' => [ 'arn' => '<string>', 'artifacts' => [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], 'badge' => [ 'badgeEnabled' => true || false, 'badgeRequestUrl' => '<string>', ], 'buildBatchConfig' => [ 'batchReportMode' => 'REPORT_INDIVIDUAL_BUILDS|REPORT_AGGREGATED_BATCH', 'combineArtifacts' => true || false, 'restrictions' => [ 'computeTypesAllowed' => ['<string>', ...], 'maximumBuildsAllowed' => <integer>, ], 'serviceRole' => '<string>', 'timeoutInMins' => <integer>, ], 'cache' => [ 'location' => '<string>', 'modes' => ['<string>', ...], 'type' => 'NO_CACHE|S3|LOCAL', ], 'concurrentBuildLimit' => <integer>, 'created' => <DateTime>, 'description' => '<string>', 'encryptionKey' => '<string>', 'environment' => [ 'certificate' => '<string>', 'computeType' => 'BUILD_GENERAL1_SMALL|BUILD_GENERAL1_MEDIUM|BUILD_GENERAL1_LARGE|BUILD_GENERAL1_XLARGE|BUILD_GENERAL1_2XLARGE|BUILD_LAMBDA_1GB|BUILD_LAMBDA_2GB|BUILD_LAMBDA_4GB|BUILD_LAMBDA_8GB|BUILD_LAMBDA_10GB', 'environmentVariables' => [ [ 'name' => '<string>', 'type' => 'PLAINTEXT|PARAMETER_STORE|SECRETS_MANAGER', 'value' => '<string>', ], // ... ], 'fleet' => [ 'fleetArn' => '<string>', ], 'image' => '<string>', 'imagePullCredentialsType' => 'CODEBUILD|SERVICE_ROLE', 'privilegedMode' => true || false, 'registryCredential' => [ 'credential' => '<string>', 'credentialProvider' => 'SECRETS_MANAGER', ], 'type' => 'WINDOWS_CONTAINER|LINUX_CONTAINER|LINUX_GPU_CONTAINER|ARM_CONTAINER|WINDOWS_SERVER_2019_CONTAINER|LINUX_LAMBDA_CONTAINER|ARM_LAMBDA_CONTAINER|MAC_ARM', ], 'fileSystemLocations' => [ [ 'identifier' => '<string>', 'location' => '<string>', 'mountOptions' => '<string>', 'mountPoint' => '<string>', 'type' => 'EFS', ], // ... ], 'lastModified' => <DateTime>, 'logsConfig' => [ 'cloudWatchLogs' => [ 'groupName' => '<string>', 'status' => 'ENABLED|DISABLED', 'streamName' => '<string>', ], 's3Logs' => [ 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'status' => 'ENABLED|DISABLED', ], ], 'name' => '<string>', 'projectVisibility' => 'PUBLIC_READ|PRIVATE', 'publicProjectAlias' => '<string>', 'queuedTimeoutInMinutes' => <integer>, 'resourceAccessRole' => '<string>', 'secondaryArtifacts' => [ [ 'artifactIdentifier' => '<string>', 'bucketOwnerAccess' => 'NONE|READ_ONLY|FULL', 'encryptionDisabled' => true || false, 'location' => '<string>', 'name' => '<string>', 'namespaceType' => 'NONE|BUILD_ID', 'overrideArtifactName' => true || false, 'packaging' => 'NONE|ZIP', 'path' => '<string>', 'type' => 'CODEPIPELINE|S3|NO_ARTIFACTS', ], // ... ], 'secondarySourceVersions' => [ [ 'sourceIdentifier' => '<string>', 'sourceVersion' => '<string>', ], // ... ], 'secondarySources' => [ [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], // ... ], 'serviceRole' => '<string>', 'source' => [ 'auth' => [ 'resource' => '<string>', 'type' => 'OAUTH|CODECONNECTIONS|SECRETS_MANAGER', ], 'buildStatusConfig' => [ 'context' => '<string>', 'targetUrl' => '<string>', ], 'buildspec' => '<string>', 'gitCloneDepth' => <integer>, 'gitSubmodulesConfig' => [ 'fetchSubmodules' => true || false, ], 'insecureSsl' => true || false, 'location' => '<string>', 'reportBuildStatus' => true || false, 'sourceIdentifier' => '<string>', 'type' => 'CODECOMMIT|CODEPIPELINE|GITHUB|GITLAB|GITLAB_SELF_MANAGED|S3|BITBUCKET|GITHUB_ENTERPRISE|NO_SOURCE', ], 'sourceVersion' => '<string>', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'timeoutInMinutes' => <integer>, 'vpcConfig' => [ 'securityGroupIds' => ['<string>', ...], 'subnets' => ['<string>', ...], 'vpcId' => '<string>', ], 'webhook' => [ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', ], // ... ], // ... ], 'lastModifiedSecret' => <DateTime>, 'manualCreation' => true || false, 'payloadUrl' => '<string>', 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', ], 'secret' => '<string>', 'url' => '<string>', ], ], ]
Result Details
Members
- project
-
- Type: Project structure
Information about the build project that was changed.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
UpdateProjectVisibility
$result = $client->updateProjectVisibility
([/* ... */]); $promise = $client->updateProjectVisibilityAsync
([/* ... */]);
Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the general public. For more information, see Public build projects in the CodeBuild User Guide.
The following should be kept in mind when making your projects public:
-
All of a project's build results, logs, and artifacts, including builds that were run when the project was private, are available to the general public.
-
All build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs. Some best practice are:
-
Do not store sensitive values in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to store sensitive values.
-
Follow Best practices for using webhooks in the CodeBuild User Guide to limit which entities can trigger a build, and do not store the buildspec in the project itself, to ensure that your webhooks are as secure as possible.
-
-
A malicious user can use public builds to distribute malicious artifacts. We recommend that you review all pull requests to verify that the pull request is a legitimate change. We also recommend that you validate any artifacts with their checksums to make sure that the correct artifacts are being downloaded.
Parameter Syntax
$result = $client->updateProjectVisibility([ 'projectArn' => '<string>', // REQUIRED 'projectVisibility' => 'PUBLIC_READ|PRIVATE', // REQUIRED 'resourceAccessRole' => '<string>', ]);
Parameter Details
Members
- projectArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the build project.
- projectVisibility
-
- Required: Yes
- Type: string
Specifies the visibility of the project's builds. Possible values are:
- PUBLIC_READ
-
The project builds are visible to the public.
- PRIVATE
-
The project builds are not visible to the public.
- resourceAccessRole
-
- Type: string
The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
Result Syntax
[ 'projectArn' => '<string>', 'projectVisibility' => 'PUBLIC_READ|PRIVATE', 'publicProjectAlias' => '<string>', ]
Result Details
Members
- projectArn
-
- Type: string
The Amazon Resource Name (ARN) of the build project.
- projectVisibility
-
- Type: string
Specifies the visibility of the project's builds. Possible values are:
- PUBLIC_READ
-
The project builds are visible to the public.
- PRIVATE
-
The project builds are not visible to the public.
- publicProjectAlias
-
- Type: string
Contains the project identifier used with the public build APIs.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
UpdateReportGroup
$result = $client->updateReportGroup
([/* ... */]); $promise = $client->updateReportGroupAsync
([/* ... */]);
Updates a report group.
Parameter Syntax
$result = $client->updateReportGroup([ 'arn' => '<string>', // REQUIRED 'exportConfig' => [ 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], ]);
Parameter Details
Members
- arn
-
- Required: Yes
- Type: string
The ARN of the report group to update.
- exportConfig
-
- Type: ReportExportConfig structure
Used to specify an updated export type. Valid values are:
-
S3
: The report results are exported to an S3 bucket. -
NO_EXPORT
: The report results are not exported.
- tags
-
- Type: Array of Tag structures
An updated list of tag key and value pairs associated with this report group.
These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.
Result Syntax
[ 'reportGroup' => [ 'arn' => '<string>', 'created' => <DateTime>, 'exportConfig' => [ 'exportConfigType' => 'S3|NO_EXPORT', 's3Destination' => [ 'bucket' => '<string>', 'bucketOwner' => '<string>', 'encryptionDisabled' => true || false, 'encryptionKey' => '<string>', 'packaging' => 'ZIP|NONE', 'path' => '<string>', ], ], 'lastModified' => <DateTime>, 'name' => '<string>', 'status' => 'ACTIVE|DELETING', 'tags' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'type' => 'TEST|CODE_COVERAGE', ], ]
Result Details
Members
- reportGroup
-
- Type: ReportGroup structure
Information about the updated report group.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
UpdateWebhook
$result = $client->updateWebhook
([/* ... */]); $promise = $client->updateWebhookAsync
([/* ... */]);
Updates the webhook associated with an CodeBuild build project.
If you use Bitbucket for your repository, rotateSecret
is ignored.
Parameter Syntax
$result = $client->updateWebhook([ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', // REQUIRED 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', // REQUIRED ], // ... ], // ... ], 'projectName' => '<string>', // REQUIRED 'rotateSecret' => true || false, ]);
Parameter Details
Members
- branchFilter
-
- Type: string
A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If
branchFilter
is empty, then all branches are built.It is recommended that you use
filterGroups
instead ofbranchFilter
. - buildType
-
- Type: string
Specifies the type of build this webhook will trigger.
- filterGroups
-
- Type: Array of WebhookFilter structuress
An array of arrays of
WebhookFilter
objects used to determine if a webhook event can trigger a build. A filter group must contain at least oneEVENT
WebhookFilter
. - projectName
-
- Required: Yes
- Type: string
The name of the CodeBuild project.
- rotateSecret
-
- Type: boolean
A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository,
rotateSecret
is ignored.
Result Syntax
[ 'webhook' => [ 'branchFilter' => '<string>', 'buildType' => 'BUILD|BUILD_BATCH', 'filterGroups' => [ [ [ 'excludeMatchedPattern' => true || false, 'pattern' => '<string>', 'type' => 'EVENT|BASE_REF|HEAD_REF|ACTOR_ACCOUNT_ID|FILE_PATH|COMMIT_MESSAGE|WORKFLOW_NAME|TAG_NAME|RELEASE_NAME', ], // ... ], // ... ], 'lastModifiedSecret' => <DateTime>, 'manualCreation' => true || false, 'payloadUrl' => '<string>', 'scopeConfiguration' => [ 'domain' => '<string>', 'name' => '<string>', 'scope' => 'GITHUB_ORGANIZATION|GITHUB_GLOBAL|GITLAB_GROUP', ], 'secret' => '<string>', 'url' => '<string>', ], ]
Result Details
Members
- webhook
-
- Type: Webhook structure
Information about a repository's webhook that is associated with a project in CodeBuild.
Errors
- InvalidInputException:
The input value that was provided is not valid.
- ResourceNotFoundException:
The specified Amazon Web Services resource cannot be found.
- OAuthProviderException:
There was a problem with the underlying OAuth provider.
Shapes
AccountLimitExceededException
Description
An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
Members
BatchRestrictions
Description
Specifies restrictions for the batch build.
Members
- computeTypesAllowed
-
- Type: Array of strings
An array of strings that specify the compute types that are allowed for the batch build. See Build environment compute types in the CodeBuild User Guide for these values.
- maximumBuildsAllowed
-
- Type: int
Specifies the maximum number of builds allowed.
Build
Description
Information about a build.
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) of the build.
- artifacts
-
- Type: BuildArtifacts structure
Information about the output artifacts for the build.
- buildBatchArn
-
- Type: string
The ARN of the batch build that this build is a member of, if applicable.
- buildComplete
-
- Type: boolean
Whether the build is complete. True if complete; otherwise, false.
- buildNumber
-
- Type: long (int|float)
The number of the build. For each project, the
buildNumber
of its first build is1
. ThebuildNumber
of each subsequent build is incremented by1
. If a build is deleted, thebuildNumber
of other builds does not change. - buildStatus
-
- Type: string
The current status of the build. Valid values include:
-
FAILED
: The build failed. -
FAULT
: The build faulted. -
IN_PROGRESS
: The build is still in progress. -
STOPPED
: The build stopped. -
SUCCEEDED
: The build succeeded. -
TIMED_OUT
: The build timed out.
- cache
-
- Type: ProjectCache structure
Information about the cache for the build.
- currentPhase
-
- Type: string
The current build phase.
- debugSession
-
- Type: DebugSession structure
Contains information about the debug session for this build.
- encryptionKey
-
- Type: string
The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - endTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build process ended, expressed in Unix time format.
- environment
-
- Type: ProjectEnvironment structure
Information about the build environment for this build.
- exportedEnvironmentVariables
-
- Type: Array of ExportedEnvironmentVariable structures
A list of exported environment variables for this build.
Exported environment variables are used in conjunction with CodePipeline to export environment variables from the current build stage to subsequent stages in the pipeline. For more information, see Working with variables in the CodePipeline User Guide.
- fileSystemLocations
-
- Type: Array of ProjectFileSystemLocation structures
An array of
ProjectFileSystemLocation
objects for a CodeBuild build project. AProjectFileSystemLocation
object specifies theidentifier
,location
,mountOptions
,mountPoint
, andtype
of a file system created using Amazon Elastic File System. - id
-
- Type: string
The unique ID for the build.
- initiator
-
- Type: string
The entity that started the build. Valid values include:
-
If CodePipeline started the build, the pipeline's name (for example,
codepipeline/my-demo-pipeline
). -
If a user started the build, the user's name (for example,
MyUserName
). -
If the Jenkins plugin for CodeBuild started the build, the string
CodeBuild-Jenkins-Plugin
.
- logs
-
- Type: LogsLocation structure
Information about the build's logs in CloudWatch Logs.
- networkInterface
-
- Type: NetworkInterface structure
Describes a network interface.
- phases
-
- Type: Array of BuildPhase structures
Information about all previous build phases that are complete and information about any current build phase that is not yet complete.
- projectName
-
- Type: string
The name of the CodeBuild project.
- queuedTimeoutInMinutes
-
- Type: int
The number of minutes a build is allowed to be queued before it times out.
- reportArns
-
- Type: Array of strings
An array of the ARNs associated with this build's reports.
- resolvedSourceVersion
-
- Type: string
An identifier for the version of this build's source code.
-
For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID.
-
For CodePipeline, the source revision provided by CodePipeline.
-
For Amazon S3, this does not apply.
- secondaryArtifacts
-
- Type: Array of BuildArtifacts structures
An array of
ProjectArtifacts
objects. - secondarySourceVersions
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects. EachProjectSourceVersion
must be one of:-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for example,pr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
- secondarySources
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects. - serviceRole
-
- Type: string
The name of a service role used for this build.
- source
-
- Type: ProjectSource structure
Information about the source code to be built.
- sourceVersion
-
- Type: string
Any version identifier for the version of the source code to be built. If
sourceVersion
is specified at the project level, then thissourceVersion
(at the build level) takes precedence.For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
- startTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build process started, expressed in Unix time format.
- timeoutInMinutes
-
- Type: int
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out this build if it does not get marked as completed.
- vpcConfig
-
- Type: VpcConfig structure
If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You must provide at least one security group and one subnet ID.
BuildArtifacts
Description
Information about build output artifacts.
Members
- artifactIdentifier
-
- Type: string
An identifier for this artifact definition.
- bucketOwnerAccess
-
- Type: string
Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.
To use this property, your CodeBuild service role must have the
s3:PutBucketAcl
permission. This permission allows CodeBuild to modify the access control list for the bucket.This property can be one of the following values:
- NONE
-
The bucket owner does not have access to the objects. This is the default.
- READ_ONLY
-
The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.
- FULL
-
The bucket owner has full access to the objects. Object ownership is determined by the following criteria:
-
If the bucket is configured with the Bucket owner preferred setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.
-
Otherwise, the uploading account retains ownership of the objects.
For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3 Object Ownership in the Amazon Simple Storage Service User Guide.
-
- encryptionDisabled
-
- Type: boolean
Information that tells you if encryption for build artifacts is disabled.
- location
-
- Type: string
Information about the location of the build artifacts.
- md5sum
-
- Type: string
The MD5 hash of the build artifact.
You can use this hash along with a checksum tool to confirm file integrity and authenticity.
This value is available only if the build project's
packaging
value is set toZIP
. - overrideArtifactName
-
- Type: boolean
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
- sha256sum
-
- Type: string
The SHA-256 hash of the build artifact.
You can use this hash along with a checksum tool to confirm file integrity and authenticity.
This value is available only if the build project's
packaging
value is set toZIP
.
BuildBatch
Description
Contains information about a batch build.
Members
- arn
-
- Type: string
The ARN of the batch build.
- artifacts
-
- Type: BuildArtifacts structure
A
BuildArtifacts
object the defines the build artifacts for this batch build. - buildBatchConfig
-
- Type: ProjectBuildBatchConfig structure
Contains configuration information about a batch build project.
- buildBatchNumber
-
- Type: long (int|float)
The number of the batch build. For each project, the
buildBatchNumber
of its first batch build is1
. ThebuildBatchNumber
of each subsequent batch build is incremented by1
. If a batch build is deleted, thebuildBatchNumber
of other batch builds does not change. - buildBatchStatus
-
- Type: string
The status of the batch build.
- buildGroups
-
- Type: Array of BuildGroup structures
An array of
BuildGroup
objects that define the build groups for the batch build. - buildTimeoutInMinutes
-
- Type: int
Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in.
- cache
-
- Type: ProjectCache structure
Information about the cache for the build project.
- complete
-
- Type: boolean
Indicates if the batch build is complete.
- currentPhase
-
- Type: string
The current phase of the batch build.
- debugSessionEnabled
-
- Type: boolean
Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
- encryptionKey
-
- Type: string
The Key Management Service customer master key (CMK) to be used for encrypting the batch build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). - endTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the batch build ended.
- environment
-
- Type: ProjectEnvironment structure
Information about the build environment of the build project.
- fileSystemLocations
-
- Type: Array of ProjectFileSystemLocation structures
An array of
ProjectFileSystemLocation
objects for the batch build project. AProjectFileSystemLocation
object specifies theidentifier
,location
,mountOptions
,mountPoint
, andtype
of a file system created using Amazon Elastic File System. - id
-
- Type: string
The identifier of the batch build.
- initiator
-
- Type: string
The entity that started the batch build. Valid values include:
-
If CodePipeline started the build, the pipeline's name (for example,
codepipeline/my-demo-pipeline
). -
If a user started the build, the user's name.
-
If the Jenkins plugin for CodeBuild started the build, the string
CodeBuild-Jenkins-Plugin
.
- logConfig
-
- Type: LogsConfig structure
Information about logs for a build project. These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
- phases
-
- Type: Array of BuildBatchPhase structures
An array of
BuildBatchPhase
objects the specify the phases of the batch build. - projectName
-
- Type: string
The name of the batch build project.
- queuedTimeoutInMinutes
-
- Type: int
Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out.
- resolvedSourceVersion
-
- Type: string
The identifier of the resolved version of this batch build's source code.
-
For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID.
-
For CodePipeline, the source revision provided by CodePipeline.
-
For Amazon S3, this does not apply.
- secondaryArtifacts
-
- Type: Array of BuildArtifacts structures
An array of
BuildArtifacts
objects the define the build artifacts for this batch build. - secondarySourceVersions
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects. EachProjectSourceVersion
must be one of:-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for example,pr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
- secondarySources
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects that define the sources for the batch build. - serviceRole
-
- Type: string
The name of a service role used for builds in the batch.
- source
-
- Type: ProjectSource structure
Information about the build input source code for the build project.
- sourceVersion
-
- Type: string
The identifier of the version of the source code to be built.
- startTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the batch build started.
- vpcConfig
-
- Type: VpcConfig structure
Information about the VPC configuration that CodeBuild accesses.
BuildBatchFilter
Description
Specifies filters when retrieving batch builds.
Members
- status
-
- Type: string
The status of the batch builds to retrieve. Only batch builds that have this status will be retrieved.
BuildBatchPhase
Description
Contains information about a stage for a batch build.
Members
- contexts
-
- Type: Array of PhaseContext structures
Additional information about the batch build phase. Especially to help troubleshoot a failed batch build.
- durationInSeconds
-
- Type: long (int|float)
How long, in seconds, between the starting and ending times of the batch build's phase.
- endTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the batch build phase ended, expressed in Unix time format.
- phaseStatus
-
- Type: string
The current status of the batch build phase. Valid values include:
- FAILED
-
The build phase failed.
- FAULT
-
The build phase faulted.
- IN_PROGRESS
-
The build phase is still in progress.
- STOPPED
-
The build phase stopped.
- SUCCEEDED
-
The build phase succeeded.
- TIMED_OUT
-
The build phase timed out.
- phaseType
-
- Type: string
The name of the batch build phase. Valid values include:
- COMBINE_ARTIFACTS
-
Build output artifacts are being combined and uploaded to the output location.
- DOWNLOAD_BATCHSPEC
-
The batch build specification is being downloaded.
- FAILED
-
One or more of the builds failed.
- IN_PROGRESS
-
The batch build is in progress.
- STOPPED
-
The batch build was stopped.
- SUBMITTED
-
The btach build has been submitted.
- SUCCEEDED
-
The batch build succeeded.
- startTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the batch build phase started, expressed in Unix time format.
BuildGroup
Description
Contains information about a batch build build group. Build groups are used to combine builds that can run in parallel, while still being able to set dependencies on other build groups.
Members
- currentBuildSummary
-
- Type: BuildSummary structure
A
BuildSummary
object that contains a summary of the current build group. - dependsOn
-
- Type: Array of strings
An array of strings that contain the identifiers of the build groups that this build group depends on.
- identifier
-
- Type: string
Contains the identifier of the build group.
- ignoreFailure
-
- Type: boolean
Specifies if failures in this build group can be ignored.
- priorBuildSummaryList
-
- Type: Array of BuildSummary structures
An array of
BuildSummary
objects that contain summaries of previous build groups.
BuildNotDeleted
Description
Information about a build that could not be successfully deleted.
Members
- id
-
- Type: string
The ID of the build that could not be successfully deleted.
- statusCode
-
- Type: string
Additional information about the build that could not be successfully deleted.
BuildPhase
Description
Information about a stage for a build.
Members
- contexts
-
- Type: Array of PhaseContext structures
Additional information about a build phase, especially to help troubleshoot a failed build.
- durationInSeconds
-
- Type: long (int|float)
How long, in seconds, between the starting and ending times of the build's phase.
- endTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build phase ended, expressed in Unix time format.
- phaseStatus
-
- Type: string
The current status of the build phase. Valid values include:
- FAILED
-
The build phase failed.
- FAULT
-
The build phase faulted.
- IN_PROGRESS
-
The build phase is still in progress.
- STOPPED
-
The build phase stopped.
- SUCCEEDED
-
The build phase succeeded.
- TIMED_OUT
-
The build phase timed out.
- phaseType
-
- Type: string
The name of the build phase. Valid values include:
- BUILD
-
Core build activities typically occur in this build phase.
- COMPLETED
-
The build has been completed.
- DOWNLOAD_SOURCE
-
Source code is being downloaded in this build phase.
- FINALIZING
-
The build process is completing in this build phase.
- INSTALL
-
Installation activities typically occur in this build phase.
- POST_BUILD
-
Post-build activities typically occur in this build phase.
- PRE_BUILD
-
Pre-build activities typically occur in this build phase.
- PROVISIONING
-
The build environment is being set up.
- QUEUED
-
The build has been submitted and is queued behind other submitted builds.
- SUBMITTED
-
The build has been submitted.
- UPLOAD_ARTIFACTS
-
Build output artifacts are being uploaded to the output location.
- startTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build phase started, expressed in Unix time format.
BuildStatusConfig
Description
Contains information that defines how the CodeBuild build project reports the build status to the source provider.
Members
- context
-
- Type: string
Specifies the context of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider.
- Bitbucket
-
This parameter is used for the
name
parameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. - GitHub/GitHub Enterprise Server
-
This parameter is used for the
context
parameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.
- targetUrl
-
- Type: string
Specifies the target url of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider.
- Bitbucket
-
This parameter is used for the
url
parameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. - GitHub/GitHub Enterprise Server
-
This parameter is used for the
target_url
parameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.
BuildSummary
Description
Contains summary information about a batch build group.
Members
- arn
-
- Type: string
The batch build ARN.
- buildStatus
-
- Type: string
The status of the build group.
- FAILED
-
The build group failed.
- FAULT
-
The build group faulted.
- IN_PROGRESS
-
The build group is still in progress.
- STOPPED
-
The build group stopped.
- SUCCEEDED
-
The build group succeeded.
- TIMED_OUT
-
The build group timed out.
- primaryArtifact
-
- Type: ResolvedArtifact structure
A
ResolvedArtifact
object that represents the primary build artifacts for the build group. - requestedOn
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build was started, expressed in Unix time format.
- secondaryArtifacts
-
- Type: Array of ResolvedArtifact structures
An array of
ResolvedArtifact
objects that represents the secondary build artifacts for the build group.
CloudWatchLogsConfig
Description
Information about CloudWatch Logs for a build project.
Members
- groupName
-
- Type: string
The group name of the logs in CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.
- status
-
- Required: Yes
- Type: string
The current status of the logs in CloudWatch Logs for a build project. Valid values are:
-
ENABLED
: CloudWatch Logs are enabled for this build project. -
DISABLED
: CloudWatch Logs are not enabled for this build project.
- streamName
-
- Type: string
The prefix of the stream name of the CloudWatch Logs. For more information, see Working with Log Groups and Log Streams.
CodeCoverage
Description
Contains code coverage report information.
Line coverage measures how many statements your tests cover. A statement is a single instruction, not including comments, conditionals, etc.
Branch coverage determines if your tests cover every possible branch of a control structure, such as an if
or case
statement.
Members
- branchCoveragePercentage
-
- Type: double
The percentage of branches that are covered by your tests.
- branchesCovered
-
- Type: int
The number of conditional branches that are covered by your tests.
- branchesMissed
-
- Type: int
The number of conditional branches that are not covered by your tests.
- expired
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the tests were run.
- filePath
-
- Type: string
The path of the test report file.
- id
-
- Type: string
The identifier of the code coverage report.
- lineCoveragePercentage
-
- Type: double
The percentage of lines that are covered by your tests.
- linesCovered
-
- Type: int
The number of lines that are covered by your tests.
- linesMissed
-
- Type: int
The number of lines that are not covered by your tests.
- reportARN
-
- Type: string
The ARN of the report.
CodeCoverageReportSummary
Description
Contains a summary of a code coverage report.
Line coverage measures how many statements your tests cover. A statement is a single instruction, not including comments, conditionals, etc.
Branch coverage determines if your tests cover every possible branch of a control structure, such as an if
or case
statement.
Members
- branchCoveragePercentage
-
- Type: double
The percentage of branches that are covered by your tests.
- branchesCovered
-
- Type: int
The number of conditional branches that are covered by your tests.
- branchesMissed
-
- Type: int
The number of conditional branches that are not covered by your tests.
- lineCoveragePercentage
-
- Type: double
The percentage of lines that are covered by your tests.
- linesCovered
-
- Type: int
The number of lines that are covered by your tests.
- linesMissed
-
- Type: int
The number of lines that are not covered by your tests.
DebugSession
Description
Contains information about the debug session for a build. For more information, see Viewing a running build in Session Manager.
Members
- sessionEnabled
-
- Type: boolean
Specifies if session debugging is enabled for this build.
- sessionTarget
-
- Type: string
Contains the identifier of the Session Manager session used for the build. To work with the paused build, you open this session to examine, control, and resume the build.
EnvironmentImage
Description
Information about a Docker image that is managed by CodeBuild.
Members
- description
-
- Type: string
The description of the Docker image.
- name
-
- Type: string
The name of the Docker image.
- versions
-
- Type: Array of strings
A list of environment image versions.
EnvironmentLanguage
Description
A set of Docker images that are related by programming language and are managed by CodeBuild.
Members
- images
-
- Type: Array of EnvironmentImage structures
The list of Docker images that are related by the specified programming language.
- language
-
- Type: string
The programming language for the Docker images.
EnvironmentPlatform
Description
A set of Docker images that are related by platform and are managed by CodeBuild.
Members
- languages
-
- Type: Array of EnvironmentLanguage structures
The list of programming languages that are available for the specified platform.
- platform
-
- Type: string
The platform's name.
EnvironmentVariable
Description
Information about an environment variable for a build project or a build.
Members
- name
-
- Required: Yes
- Type: string
The name or key of the environment variable.
- type
-
- Type: string
The type of environment variable. Valid values include:
-
PARAMETER_STORE
: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalue
of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide. -
PLAINTEXT
: An environment variable in plain text format. This is the default value. -
SECRETS_MANAGER
: An environment variable stored in Secrets Manager. For environment variables of this type, specify the name of the secret as thevalue
of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the CodeBuild User Guide.
- value
-
- Required: Yes
- Type: string
The value of the environment variable.
We strongly discourage the use of
PLAINTEXT
environment variables to store sensitive values, especially Amazon Web Services secret key IDs.PLAINTEXT
environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of typePARAMETER_STORE
orSECRETS_MANAGER
.
ExportedEnvironmentVariable
Description
Contains information about an exported environment variable.
Exported environment variables are used in conjunction with CodePipeline to export environment variables from the current build stage to subsequent stages in the pipeline. For more information, see Working with variables in the CodePipeline User Guide.
During a build, the value of a variable is available starting with the install
phase. It can be updated between the start of the install
phase and the end of the post_build
phase. After the post_build
phase ends, the value of exported variables cannot change.
Members
- name
-
- Type: string
The name of the exported environment variable.
- value
-
- Type: string
The value assigned to the exported environment variable.
Fleet
Description
A set of dedicated instances for your build environment.
Members
- arn
-
- Type: string
The ARN of the compute fleet.
- baseCapacity
-
- Type: int
The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.
- computeType
-
- Type: string
Information about the compute resources the compute fleet uses. Available values include:
-
BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds. -
BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds. -
BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.
If you use
BUILD_GENERAL1_SMALL
:-
For environment type
LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. -
For environment type
ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
If you use
BUILD_GENERAL1_LARGE
:-
For environment type
LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. -
For environment type
ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds.
For more information, see Build environment compute types in the CodeBuild User Guide.
- created
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the compute fleet was created.
- environmentType
-
- Type: string
The environment type of the compute fleet.
-
The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo). -
The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai). -
The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). -
The environment type
MAC_ARM
is available for Medium fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), and EU (Frankfurt) -
The environment type
MAC_ARM
is available for Large fleets only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific (Sydney). -
The environment type
WINDOWS_SERVER_2019_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). -
The environment type
WINDOWS_SERVER_2022_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai).
For more information, see Build environment compute types in the CodeBuild user guide.
- fleetServiceRole
-
- Type: string
The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide.
- id
-
- Type: string
The ID of the compute fleet.
- imageId
-
- Type: string
The Amazon Machine Image (AMI) of the compute fleet.
- lastModified
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the compute fleet was last modified.
- name
-
- Type: string
The name of the compute fleet.
- overflowBehavior
-
- Type: string
The compute fleet overflow behavior.
-
For overflow behavior
QUEUE
, your overflow builds need to wait on the existing fleet instance to become available. -
For overflow behavior
ON_DEMAND
, your overflow builds run on CodeBuild on-demand.If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface.
- scalingConfiguration
-
- Type: ScalingConfigurationOutput structure
The scaling configuration of the compute fleet.
- status
-
- Type: FleetStatus structure
The status of the compute fleet.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this compute fleet.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- vpcConfig
-
- Type: VpcConfig structure
Information about the VPC configuration that CodeBuild accesses.
FleetStatus
Description
The status of the compute fleet.
Members
- context
-
- Type: string
Additional information about a compute fleet. Valid values include:
-
CREATE_FAILED
: The compute fleet has failed to create. -
UPDATE_FAILED
: The compute fleet has failed to update.
- message
-
- Type: string
A message associated with the status of a compute fleet.
- statusCode
-
- Type: string
The status code of the compute fleet. Valid values include:
-
CREATING
: The compute fleet is being created. -
UPDATING
: The compute fleet is being updated. -
ROTATING
: The compute fleet is being rotated. -
PENDING_DELETION
: The compute fleet is pending deletion. -
DELETING
: The compute fleet is being deleted. -
CREATE_FAILED
: The compute fleet has failed to create. -
UPDATE_ROLLBACK_FAILED
: The compute fleet has failed to update and could not rollback to previous state. -
ACTIVE
: The compute fleet has succeeded and is active.
GitSubmodulesConfig
Description
Information about the Git submodules configuration for an CodeBuild build project.
Members
- fetchSubmodules
-
- Required: Yes
- Type: boolean
Set to true to fetch Git submodules for your CodeBuild build project.
InvalidInputException
Description
The input value that was provided is not valid.
Members
LogsConfig
Description
Information about logs for a build project. These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
Members
- cloudWatchLogs
-
- Type: CloudWatchLogsConfig structure
Information about CloudWatch Logs for a build project. CloudWatch Logs are enabled by default.
- s3Logs
-
- Type: S3LogsConfig structure
Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.
LogsLocation
Description
Information about build logs in CloudWatch Logs.
Members
- cloudWatchLogs
-
- Type: CloudWatchLogsConfig structure
Information about CloudWatch Logs for a build project.
- cloudWatchLogsArn
-
- Type: string
The ARN of the CloudWatch Logs stream for a build execution. Its format is
arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
. The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid until it is created. For more information, see Resources Defined by CloudWatch Logs. - deepLink
-
- Type: string
The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING phase of a build and the
deeplink
will not be valid until it is created. - groupName
-
- Type: string
The name of the CloudWatch Logs group for the build logs.
- s3DeepLink
-
- Type: string
The URL to a build log in an S3 bucket.
- s3Logs
-
- Type: S3LogsConfig structure
Information about S3 logs for a build project.
- s3LogsArn
-
- Type: string
The ARN of S3 logs for a build project. Its format is
arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3. - streamName
-
- Type: string
The name of the CloudWatch Logs stream for the build logs.
NetworkInterface
Description
Describes a network interface.
Members
- networkInterfaceId
-
- Type: string
The ID of the network interface.
- subnetId
-
- Type: string
The ID of the subnet.
OAuthProviderException
Description
There was a problem with the underlying OAuth provider.
Members
PhaseContext
Description
Additional information about a build phase that has an error. You can use this information for troubleshooting.
Members
- message
-
- Type: string
An explanation of the build phase's context. This might include a command ID and an exit code.
- statusCode
-
- Type: string
The status code for the context of the build phase.
Project
Description
Information about a build project.
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) of the build project.
- artifacts
-
- Type: ProjectArtifacts structure
Information about the build output artifacts for the build project.
- badge
-
- Type: ProjectBadge structure
Information about the build badge for the build project.
- buildBatchConfig
-
- Type: ProjectBuildBatchConfig structure
A ProjectBuildBatchConfig object that defines the batch build options for the project.
- cache
-
- Type: ProjectCache structure
Information about the cache for the build project.
- concurrentBuildLimit
-
- Type: int
The maximum number of concurrent builds that are allowed for this project.
New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.
- created
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build project was created, expressed in Unix time format.
- description
-
- Type: string
A description that makes the build project easy to identify.
- encryptionKey
-
- Type: string
The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/<alias-name>
). If you don't specify a value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon S3). - environment
-
- Type: ProjectEnvironment structure
Information about the build environment for this build project.
- fileSystemLocations
-
- Type: Array of ProjectFileSystemLocation structures
An array of
ProjectFileSystemLocation
objects for a CodeBuild build project. AProjectFileSystemLocation
object specifies theidentifier
,location
,mountOptions
,mountPoint
, andtype
of a file system created using Amazon Elastic File System. - lastModified
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
When the build project's settings were last modified, expressed in Unix time format.
- logsConfig
-
- Type: LogsConfig structure
Information about logs for the build project. A project can create logs in CloudWatch Logs, an S3 bucket, or both.
- name
-
- Type: string
The name of the build project.
- projectVisibility
-
- Type: string
Specifies the visibility of the project's builds. Possible values are:
- PUBLIC_READ
-
The project builds are visible to the public.
- PRIVATE
-
The project builds are not visible to the public.
- publicProjectAlias
-
- Type: string
Contains the project identifier used with the public build APIs.
- queuedTimeoutInMinutes
-
- Type: int
The number of minutes a build is allowed to be queued before it times out.
- resourceAccessRole
-
- Type: string
The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
- secondaryArtifacts
-
- Type: Array of ProjectArtifacts structures
An array of
ProjectArtifacts
objects. - secondarySourceVersions
-
- Type: Array of ProjectSourceVersion structures
An array of
ProjectSourceVersion
objects. IfsecondarySourceVersions
is specified at the build level, then they take over thesesecondarySourceVersions
(at the project level). - secondarySources
-
- Type: Array of ProjectSource structures
An array of
ProjectSource
objects. - serviceRole
-
- Type: string
The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.
- source
-
- Type: ProjectSource structure
Information about the build input source code for this build project.
- sourceVersion
-
- Type: string
A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for examplepr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For GitLab: the commit ID, branch, or Git tag to use.
-
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
If
sourceVersion
is specified at the build level, then that version takes precedence over thissourceVersion
(at the project level).For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this build project.
These tags are available for use by Amazon Web Services services that support CodeBuild build project tags.
- timeoutInMinutes
-
- Type: int
How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before timing out any related build that did not get marked as completed. The default is 60 minutes.
- vpcConfig
-
- Type: VpcConfig structure
Information about the VPC configuration that CodeBuild accesses.
- webhook
-
- Type: Webhook structure
Information about a webhook that connects repository events to a build project in CodeBuild.
ProjectArtifacts
Description
Information about the build output artifacts for the build project.
Members
- artifactIdentifier
-
- Type: string
An identifier for this artifact definition.
- bucketOwnerAccess
-
- Type: string
Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.
To use this property, your CodeBuild service role must have the
s3:PutBucketAcl
permission. This permission allows CodeBuild to modify the access control list for the bucket.This property can be one of the following values:
- NONE
-
The bucket owner does not have access to the objects. This is the default.
- READ_ONLY
-
The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.
- FULL
-
The bucket owner has full access to the objects. Object ownership is determined by the following criteria:
-
If the bucket is configured with the Bucket owner preferred setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.
-
Otherwise, the uploading account retains ownership of the objects.
For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3 Object Ownership in the Amazon Simple Storage Service User Guide.
-
- encryptionDisabled
-
- Type: boolean
Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException is thrown.
- location
-
- Type: string
Information about the build output artifact location:
-
If
type
is set toCODEPIPELINE
, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild. -
If
type
is set toNO_ARTIFACTS
, this value is ignored if specified, because no build output is produced. -
If
type
is set toS3
, this is the name of the output bucket.
- name
-
- Type: string
Along with
path
andnamespaceType
, the pattern that CodeBuild uses to name and store the output artifact:-
If
type
is set toCODEPIPELINE
, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. -
If
type
is set toNO_ARTIFACTS
, this value is ignored if specified, because no build output is produced. -
If
type
is set toS3
, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.
For example:
-
If
path
is set toMyArtifacts
,namespaceType
is set toBUILD_ID
, andname
is set toMyArtifact.zip
, then the output artifact is stored inMyArtifacts/<build-ID>/MyArtifact.zip
. -
If
path
is empty,namespaceType
is set toNONE
, andname
is set to "/
", the output artifact is stored in the root of the output bucket. -
If
path
is set toMyArtifacts
,namespaceType
is set toBUILD_ID
, andname
is set to "/
", the output artifact is stored inMyArtifacts/<build-ID>
.
- namespaceType
-
- Type: string
Along with
path
andname
, the pattern that CodeBuild uses to determine the name and location to store the output artifact:-
If
type
is set toCODEPIPELINE
, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. -
If
type
is set toNO_ARTIFACTS
, this value is ignored if specified, because no build output is produced. -
If
type
is set toS3
, valid values include:-
BUILD_ID
: Include the build ID in the location of the build output artifact. -
NONE
: Do not include the build ID. This is the default ifnamespaceType
is not specified.
-
For example, if
path
is set toMyArtifacts
,namespaceType
is set toBUILD_ID
, andname
is set toMyArtifact.zip
, the output artifact is stored inMyArtifacts/<build-ID>/MyArtifact.zip
. - overrideArtifactName
-
- Type: boolean
If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique.
- packaging
-
- Type: string
The type of build output artifact to create:
-
If
type
is set toCODEPIPELINE
, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of CodeBuild. -
If
type
is set toNO_ARTIFACTS
, this value is ignored if specified, because no build output is produced. -
If
type
is set toS3
, valid values include:-
NONE
: CodeBuild creates in the output bucket a folder that contains the build output. This is the default ifpackaging
is not specified. -
ZIP
: CodeBuild creates in the output bucket a ZIP file that contains the build output.
-
- path
-
- Type: string
Along with
namespaceType
andname
, the pattern that CodeBuild uses to name and store the output artifact:-
If
type
is set toCODEPIPELINE
, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. -
If
type
is set toNO_ARTIFACTS
, this value is ignored if specified, because no build output is produced. -
If
type
is set toS3
, this is the path to the output artifact. Ifpath
is not specified,path
is not used.
For example, if
path
is set toMyArtifacts
,namespaceType
is set toNONE
, andname
is set toMyArtifact.zip
, the output artifact is stored in the output bucket atMyArtifacts/MyArtifact.zip
. - type
-
- Required: Yes
- Type: string
The type of build output artifact. Valid values include:
-
CODEPIPELINE
: The build project has build output generated through CodePipeline.The
CODEPIPELINE
type is not supported forsecondaryArtifacts
. -
NO_ARTIFACTS
: The build project does not produce any build output. -
S3
: The build project stores build output in Amazon S3.
ProjectBadge
Description
Information about the build badge for the build project.
Members
- badgeEnabled
-
- Type: boolean
Set this to true to generate a publicly accessible URL for your project's build badge.
- badgeRequestUrl
-
- Type: string
The publicly-accessible URL through which you can access the build badge for your project.
ProjectBuildBatchConfig
Description
Contains configuration information about a batch build project.
Members
- batchReportMode
-
- Type: string
Specifies how build status reports are sent to the source provider for the batch build. This property is only used when the source provider for your project is Bitbucket, GitHub, or GitHub Enterprise, and your project is configured to report build statuses to the source provider.
- REPORT_AGGREGATED_BATCH
-
(Default) Aggregate all of the build statuses into a single status report.
- REPORT_INDIVIDUAL_BUILDS
-
Send a separate status report for each individual build.
- combineArtifacts
-
- Type: boolean
Specifies if the build artifacts for the batch build should be combined into a single artifact location.
- restrictions
-
- Type: BatchRestrictions structure
A
BatchRestrictions
object that specifies the restrictions for the batch build. - serviceRole
-
- Type: string
Specifies the service role ARN for the batch build project.
- timeoutInMins
-
- Type: int
Specifies the maximum amount of time, in minutes, that the batch build must be completed in.
ProjectCache
Description
Information about the cache for the build project.
Members
- location
-
- Type: string
Information about the cache location:
-
NO_CACHE
orLOCAL
: This value is ignored. -
S3
: This is the S3 bucket name/prefix.
- modes
-
- Type: Array of strings
An array of strings that specify the local cache modes. You can use one or more local cache modes at the same time. This is only used for
LOCAL
cache types.Possible values are:
- LOCAL_SOURCE_CACHE
-
Caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.
- LOCAL_DOCKER_LAYER_CACHE
-
Caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.
-
You can use a Docker layer cache in the Linux environment only.
-
The
privileged
flag must be set so that your project has the required Docker permissions. -
You should consider the security implications before you use a Docker layer cache.
-
- LOCAL_CUSTOM_CACHE
-
Caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:
-
Only directories can be specified for caching. You cannot specify individual files.
-
Symlinks are used to reference cached directories.
-
Cached directories are linked to your build before it downloads its project sources. Cached items are overridden if a source item has the same name. Directories are specified using cache paths in the buildspec file.
-
- type
-
- Required: Yes
- Type: string
The type of cache used by the build project. Valid values include:
-
NO_CACHE
: The build project does not use any cache. -
S3
: The build project reads and writes from and to S3. -
LOCAL
: The build project stores a cache locally on a build host that is only available to that build host.
ProjectEnvironment
Description
Information about the build environment of the build project.
Members
- certificate
-
- Type: string
The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded certificate for the build project. For more information, see certificate in the CodeBuild User Guide.
- computeType
-
- Required: Yes
- Type: string
Information about the compute resources the build project uses. Available values include:
-
BUILD_GENERAL1_SMALL
: Use up to 3 GB memory and 2 vCPUs for builds. -
BUILD_GENERAL1_MEDIUM
: Use up to 7 GB memory and 4 vCPUs for builds. -
BUILD_GENERAL1_LARGE
: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_XLARGE
: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. -
BUILD_GENERAL1_2XLARGE
: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed. -
BUILD_LAMBDA_1GB
: Use up to 1 GB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
. -
BUILD_LAMBDA_2GB
: Use up to 2 GB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
. -
BUILD_LAMBDA_4GB
: Use up to 4 GB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
. -
BUILD_LAMBDA_8GB
: Use up to 8 GB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
. -
BUILD_LAMBDA_10GB
: Use up to 10 GB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINER
andARM_LAMBDA_CONTAINER
.
If you use
BUILD_GENERAL1_SMALL
:-
For environment type
LINUX_CONTAINER
, you can use up to 3 GB memory and 2 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. -
For environment type
ARM_CONTAINER
, you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
If you use
BUILD_GENERAL1_LARGE
:-
For environment type
LINUX_CONTAINER
, you can use up to 15 GB memory and 8 vCPUs for builds. -
For environment type
LINUX_GPU_CONTAINER
, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. -
For environment type
ARM_CONTAINER
, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds.
If you're using compute fleets during project creation,
computeType
will be ignored.For more information, see Build Environment Compute Types in the CodeBuild User Guide.
- environmentVariables
-
- Type: Array of EnvironmentVariable structures
A set of environment variables to make available to builds for this build project.
- fleet
-
- Type: ProjectFleet structure
A ProjectFleet object to use for this build project.
- image
-
- Required: Yes
- Type: string
The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats:
-
For an image tag:
<registry>/<repository>:<tag>
. For example, in the Docker repository that CodeBuild uses to manage its Docker images, this would beaws/codebuild/standard:4.0
. -
For an image digest:
<registry>/<repository>@<digest>
. For example, to specify an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use<registry>/<repository>@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf
.
For more information, see Docker images provided by CodeBuild in the CodeBuild user guide.
- imagePullCredentialsType
-
- Type: string
The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
-
CODEBUILD
specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild service principal. -
SERVICE_ROLE
specifies that CodeBuild uses your build project's service role.
When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an CodeBuild curated image, you must use CODEBUILD credentials.
- privilegedMode
-
- Type: boolean
Enables running the Docker daemon inside a Docker container. Set to true only if the build project is used to build Docker images. Otherwise, a build that attempts to interact with the Docker daemon fails. The default setting is
false
.You can initialize the Docker daemon during the install phase of your build by adding one of the following sets of commands to the install phase of your buildspec file:
If the operating system's base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
If the operating system's base image is Alpine Linux and the previous command does not work, add the
-t
argument totimeout
:- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&
- timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"
- registryCredential
-
- Type: RegistryCredential structure
The credentials for access to a private registry.
- type
-
- Required: Yes
- Type: string
The type of build environment to use for related builds.
-
The environment type
ARM_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Sydney), and EU (Frankfurt). -
The environment type
LINUX_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), China (Beijing), and China (Ningxia). -
The environment type
LINUX_GPU_CONTAINER
is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) , China (Beijing), and China (Ningxia).
-
The environment types
ARM_LAMBDA_CONTAINER
andLINUX_LAMBDA_CONTAINER
are available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Frankfurt), EU (Ireland), and South America (São Paulo).
-
The environment types
WINDOWS_CONTAINER
andWINDOWS_SERVER_2019_CONTAINER
are available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and EU (Ireland).
If you're using compute fleets during project creation,
type
will be ignored.For more information, see Build environment compute types in the CodeBuild user guide.
ProjectFileSystemLocation
Description
Information about a file system created by Amazon Elastic File System (EFS). For more information, see What Is Amazon Elastic File System?
Members
- identifier
-
- Type: string
The name used to access a file system created by Amazon EFS. CodeBuild creates an environment variable by appending the
identifier
in all capital letters toCODEBUILD_
. For example, if you specifymy_efs
foridentifier
, a new environment variable is create namedCODEBUILD_MY_EFS
.The
identifier
is used to mount your file system. - location
-
- Type: string
A string that specifies the location of the file system created by Amazon EFS. Its format is
efs-dns-name:/directory-path
. You can find the DNS name of file system when you view it in the Amazon EFS console. The directory path is a path to a directory in the file system that CodeBuild mounts. For example, if the DNS name of a file system isfs-abcd1234.efs.us-west-2.amazonaws.com
, and its mount directory ismy-efs-mount-directory
, then thelocation
isfs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory
.The directory path in the format
efs-dns-name:/directory-path
is optional. If you do not specify a directory path, the location is only the DNS name and CodeBuild mounts the entire file system. - mountOptions
-
- Type: string
The mount options for a file system created by Amazon EFS. The default mount options used by CodeBuild are
nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2
. For more information, see Recommended NFS Mount Options. - mountPoint
-
- Type: string
The location in the container where you mount the file system.
- type
-
- Type: string
The type of the file system. The one supported type is
EFS
.
ProjectFleet
Description
Information about the compute fleet of the build project. For more information, see Working with reserved capacity in CodeBuild.
Members
- fleetArn
-
- Type: string
Specifies the compute fleet ARN for the build project.
ProjectSource
Description
Information about the build input source code for the build project.
Members
- auth
-
- Type: SourceAuth structure
Information about the authorization settings for CodeBuild to access the source code to be built.
- buildStatusConfig
-
- Type: BuildStatusConfig structure
Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is
GITHUB
,GITHUB_ENTERPRISE
, orBITBUCKET
. - buildspec
-
- Type: string
The buildspec file declaration to use for the builds in this build project.
If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in
CODEBUILD_SRC_DIR
environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example,arn:aws:s3:::my-codebuild-sample2/buildspec.yml
). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location. - gitCloneDepth
-
- Type: int
Information about the Git clone depth for the build project.
- gitSubmodulesConfig
-
- Type: GitSubmodulesConfig structure
Information about the Git submodules configuration for the build project.
- insecureSsl
-
- Type: boolean
Enable this flag to ignore SSL warnings while connecting to the project source code.
- location
-
- Type: string
Information about the location of the source code to be built. Valid values include:
-
For source code settings that are specified in the source action of a pipeline in CodePipeline,
location
should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in a pipeline's source action instead of this value. -
For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the buildspec file (for example,
https://git-codecommit.<region-ID>.amazonaws.com/v1/repos/<repo-name>
). -
For source code in an Amazon S3 input bucket, one of the following.
-
The path to the ZIP file that contains the source code (for example,
<bucket-name>/<path>/<object-name>.zip
). -
The path to the folder that contains the source code (for example,
<bucket-name>/<path-to-source-code>/<folder>/
).
-
-
For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your Amazon Web Services account to your GitHub account. Use the CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page, for Organization access, choose Request access next to each repository you want to allow CodeBuild to have access to, and then choose Authorize application. (After you have connected to your GitHub account, you do not need to finish creating the build project. You can leave the CodeBuild console.) To instruct CodeBuild to use this connection, in the
source
object, set theauth
object'stype
value toOAUTH
. -
For source code in an GitLab or self-managed GitLab repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your Amazon Web Services account to your GitLab account. Use the CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitLab, on the Connections Authorize application page, choose Authorize. Then on the CodeConnections Create GitLab connection page, choose Connect to GitLab. (After you have connected to your GitLab account, you do not need to finish creating the build project. You can leave the CodeBuild console.) To instruct CodeBuild to override the default connection and use this connection instead, set the
auth
object'stype
value toCODECONNECTIONS
in thesource
object. -
For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your Amazon Web Services account to your Bitbucket account. Use the CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access. (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the CodeBuild console.) To instruct CodeBuild to use this connection, in the
source
object, set theauth
object'stype
value toOAUTH
.
If you specify
CODEPIPELINE
for theType
property, don't specify this property. For all of the other types, you must specifyLocation
. - reportBuildStatus
-
- Type: boolean
Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, an
invalidInputException
is thrown.To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.
The status of a build triggered by a webhook is always reported to your source provider.
If your project's builds are triggered by a webhook, you must push a new commit to the repo for a change to this property to take effect.
- sourceIdentifier
-
- Type: string
An identifier for this project source. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
- type
-
- Required: Yes
- Type: string
The type of repository that contains the source code to be built. Valid values include:
-
BITBUCKET
: The source code is in a Bitbucket repository. -
CODECOMMIT
: The source code is in an CodeCommit repository. -
CODEPIPELINE
: The source code settings are specified in the source action of a pipeline in CodePipeline. -
GITHUB
: The source code is in a GitHub repository. -
GITHUB_ENTERPRISE
: The source code is in a GitHub Enterprise Server repository. -
GITLAB
: The source code is in a GitLab repository. -
GITLAB_SELF_MANAGED
: The source code is in a self-managed GitLab repository. -
NO_SOURCE
: The project does not have input source code. -
S3
: The source code is in an Amazon S3 bucket.
ProjectSourceVersion
Description
A source identifier and its corresponding version.
Members
- sourceIdentifier
-
- Required: Yes
- Type: string
An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
- sourceVersion
-
- Required: Yes
- Type: string
The source version for the corresponding source identifier. If specified, must be one of:
-
For CodeCommit: the commit ID, branch, or Git tag to use.
-
For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID
(for example,pr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. -
For GitLab: the commit ID, branch, or Git tag to use.
-
For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
-
For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
RegistryCredential
Description
Information about credentials that provide access to a private Docker registry. When this is set:
-
imagePullCredentialsType
must be set toSERVICE_ROLE
. -
images cannot be curated or an Amazon ECR image.
For more information, see Private Registry with Secrets Manager Sample for CodeBuild.
Members
- credential
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager.
The
credential
can use the name of the credentials only if they exist in your current Amazon Web Services Region. - credentialProvider
-
- Required: Yes
- Type: string
The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for Secrets Manager.
Report
Description
Information about the results from running a series of test cases during the run of a build project. The test cases are specified in the buildspec for the build project using one or more paths to the test case files. You can specify any type of tests you want, such as unit tests, integration tests, and functional tests.
Members
- arn
-
- Type: string
The ARN of the report run.
- codeCoverageSummary
-
- Type: CodeCoverageReportSummary structure
A
CodeCoverageReportSummary
object that contains a code coverage summary for this report. - created
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time this report run occurred.
- executionId
-
- Type: string
The ARN of the build run that generated this report.
- expired
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time a report expires. A report expires 30 days after it is created. An expired report is not available to view in CodeBuild.
- exportConfig
-
- Type: ReportExportConfig structure
Information about where the raw data used to generate this report was exported.
- name
-
- Type: string
The name of the report that was run.
- reportGroupArn
-
- Type: string
The ARN of the report group associated with this report.
- status
-
- Type: string
The status of this report.
- testSummary
-
- Type: TestReportSummary structure
A
TestReportSummary
object that contains information about this test report. - truncated
-
- Type: boolean
A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum number of test cases is reached.
- type
-
- Type: string
The type of the report that was run.
- CODE_COVERAGE
-
A code coverage report.
- TEST
-
A test report.
ReportExportConfig
Description
Information about the location where the run of a report is exported.
Members
- exportConfigType
-
- Type: string
The export configuration type. Valid values are:
-
S3
: The report results are exported to an S3 bucket. -
NO_EXPORT
: The report results are not exported.
- s3Destination
-
- Type: S3ReportExportConfig structure
A
S3ReportExportConfig
object that contains information about the S3 bucket where the run of a report is exported.
ReportFilter
Description
A filter used to return reports with the status specified by the input status
parameter.
Members
- status
-
- Type: string
The status used to filter reports. You can filter using one status only.
ReportGroup
Description
A series of reports. Each report contains information about the results from running a series of test cases. You specify the test cases for a report group in the buildspec for a build project using one or more paths to the test case files.
Members
- arn
-
- Type: string
The ARN of the
ReportGroup
. - created
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time this
ReportGroup
was created. - exportConfig
-
- Type: ReportExportConfig structure
Information about the destination where the raw data of this
ReportGroup
is exported. - lastModified
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time this
ReportGroup
was last modified. - name
-
- Type: string
The name of the
ReportGroup
. - status
-
- Type: string
The status of the report group. This property is read-only.
This can be one of the following values:
- ACTIVE
-
The report group is active.
- DELETING
-
The report group is in the process of being deleted.
- tags
-
- Type: Array of Tag structures
A list of tag key and value pairs associated with this report group.
These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.
- type
-
- Type: string
The type of the
ReportGroup
. This can be one of the following values:- CODE_COVERAGE
-
The report group contains code coverage reports.
- TEST
-
The report group contains test reports.
ReportGroupTrendStats
Description
Contains trend statistics for a set of reports. The actual values depend on the type of trend being collected. For more information, see .
Members
- average
-
- Type: string
Contains the average of all values analyzed.
- max
-
- Type: string
Contains the maximum value analyzed.
- min
-
- Type: string
Contains the minimum value analyzed.
ReportWithRawData
Description
Contains the unmodified data for the report. For more information, see .
Members
- data
-
- Type: string
The value of the requested data field from the report.
- reportArn
-
- Type: string
The ARN of the report.
ResolvedArtifact
Description
Represents a resolved build artifact. A resolved artifact is an artifact that is built and deployed to the destination, such as Amazon S3.
Members
- identifier
-
- Type: string
The identifier of the artifact.
- location
-
- Type: string
The location of the artifact.
- type
-
- Type: string
Specifies the type of artifact.
ResourceAlreadyExistsException
Description
The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
Members
ResourceNotFoundException
Description
The specified Amazon Web Services resource cannot be found.
Members
S3LogsConfig
Description
Information about S3 logs for a build project.
Members
- bucketOwnerAccess
-
- Type: string
Specifies the bucket owner's access for objects that another account uploads to their Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has access to these objects. This property allows you to give the bucket owner access to these objects.
To use this property, your CodeBuild service role must have the
s3:PutBucketAcl
permission. This permission allows CodeBuild to modify the access control list for the bucket.This property can be one of the following values:
- NONE
-
The bucket owner does not have access to the objects. This is the default.
- READ_ONLY
-
The bucket owner has read-only access to the objects. The uploading account retains ownership of the objects.
- FULL
-
The bucket owner has full access to the objects. Object ownership is determined by the following criteria:
-
If the bucket is configured with the Bucket owner preferred setting, the bucket owner owns the objects. The uploading account will have object access as specified by the bucket's policy.
-
Otherwise, the uploading account retains ownership of the objects.
For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3 Object Ownership in the Amazon Simple Storage Service User Guide.
-
- encryptionDisabled
-
- Type: boolean
Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.
- location
-
- Type: string
The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is
my-bucket
, and your path prefix isbuild-log
, then acceptable formats aremy-bucket/build-log
orarn:aws:s3:::my-bucket/build-log
. - status
-
- Required: Yes
- Type: string
The current status of the S3 build logs. Valid values are:
-
ENABLED
: S3 build logs are enabled for this build project. -
DISABLED
: S3 build logs are not enabled for this build project.
S3ReportExportConfig
Description
Information about the S3 bucket where the raw data of a report are exported.
Members
- bucket
-
- Type: string
The name of the S3 bucket where the raw data of a report are exported.
- bucketOwner
-
- Type: string
The Amazon Web Services account identifier of the owner of the Amazon S3 bucket. This allows report data to be exported to an Amazon S3 bucket that is owned by an account other than the account running the build.
- encryptionDisabled
-
- Type: boolean
A boolean value that specifies if the results of a report are encrypted.
- encryptionKey
-
- Type: string
The encryption key for the report's encrypted raw data.
- packaging
-
- Type: string
The type of build output artifact to create. Valid values include:
-
NONE
: CodeBuild creates the raw data in the output bucket. This is the default if packaging is not specified. -
ZIP
: CodeBuild creates a ZIP file with the raw data in the output bucket.
- path
-
- Type: string
The path to the exported report's raw data results.
ScalingConfigurationInput
Description
The scaling configuration input of a compute fleet.
Members
- maxCapacity
-
- Type: int
The maximum number of instances in the fleet when auto-scaling.
- scalingType
-
- Type: string
The scaling type for a compute fleet.
- targetTrackingScalingConfigs
-
- Type: Array of TargetTrackingScalingConfiguration structures
A list of
TargetTrackingScalingConfiguration
objects.
ScalingConfigurationOutput
Description
The scaling configuration output of a compute fleet.
Members
- desiredCapacity
-
- Type: int
The desired number of instances in the fleet when auto-scaling.
- maxCapacity
-
- Type: int
The maximum number of instances in the fleet when auto-scaling.
- scalingType
-
- Type: string
The scaling type for a compute fleet.
- targetTrackingScalingConfigs
-
- Type: Array of TargetTrackingScalingConfiguration structures
A list of
TargetTrackingScalingConfiguration
objects.
ScopeConfiguration
Description
Contains configuration information about the scope for a webhook.
Members
- domain
-
- Type: string
The domain of the GitHub Enterprise organization or the GitLab Self Managed group. Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED.
- name
-
- Required: Yes
- Type: string
The name of either the group, enterprise, or organization that will send webhook events to CodeBuild, depending on the type of webhook.
- scope
-
- Required: Yes
- Type: string
The type of scope for a GitHub or GitLab webhook.
SourceAuth
Description
Information about the authorization settings for CodeBuild to access the source code to be built.
Members
- resource
-
- Type: string
The resource value that applies to the specified authorization type.
- type
-
- Required: Yes
- Type: string
The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
SourceCredentialsInfo
Description
Information about the credentials for a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository.
Members
- arn
-
- Type: string
The Amazon Resource Name (ARN) of the token.
- authType
-
- Type: string
The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.
- resource
-
- Type: string
The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.
- serverType
-
- Type: string
The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.
Tag
Description
A tag, consisting of a key and a value.
This tag is available for use by Amazon Web Services services that support tags in CodeBuild.
Members
- key
-
- Type: string
The tag's key.
- value
-
- Type: string
The tag's value.
TargetTrackingScalingConfiguration
Description
Defines when a new instance is auto-scaled into the compute fleet.
Members
- metricType
-
- Type: string
The metric type to determine auto-scaling.
- targetValue
-
- Type: double
The value of
metricType
when to start scaling.
TestCase
Description
Information about a test case created using a framework such as NUnit or Cucumber. A test case might be a unit test or a configuration test.
Members
- durationInNanoSeconds
-
- Type: long (int|float)
The number of nanoseconds it took to run this test case.
- expired
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time a test case expires. A test case expires 30 days after it is created. An expired test case is not available to view in CodeBuild.
- message
-
- Type: string
A message associated with a test case. For example, an error message or stack trace.
- name
-
- Type: string
The name of the test case.
- prefix
-
- Type: string
A string that is applied to a series of related test cases. CodeBuild generates the prefix. The prefix depends on the framework used to generate the tests.
- reportArn
-
- Type: string
The ARN of the report to which the test case belongs.
- status
-
- Type: string
The status returned by the test case after it was run. Valid statuses are
SUCCEEDED
,FAILED
,ERROR
,SKIPPED
, andUNKNOWN
. - testRawDataPath
-
- Type: string
The path to the raw data file that contains the test result.
TestCaseFilter
Description
A filter used to return specific types of test cases. In order to pass the filter, the report must meet all of the filter properties.
Members
- keyword
-
- Type: string
A keyword that is used to filter on the
name
or theprefix
of the test cases. Only test cases where the keyword is a substring of thename
or theprefix
will be returned. - status
-
- Type: string
The status used to filter test cases. A
TestCaseFilter
can have one status. Valid values are:-
SUCCEEDED
-
FAILED
-
ERROR
-
SKIPPED
-
UNKNOWN
TestReportSummary
Description
Information about a test report.
Members
- durationInNanoSeconds
-
- Required: Yes
- Type: long (int|float)
The number of nanoseconds it took to run all of the test cases in this report.
- statusCounts
-
- Required: Yes
- Type: Associative array of custom strings keys (String) to ints
A map that contains the number of each type of status returned by the test results in this
TestReportSummary
. - total
-
- Required: Yes
- Type: int
The number of test cases in this
TestReportSummary
. The total includes truncated test cases.
VpcConfig
Description
Information about the VPC configuration that CodeBuild accesses.
Members
- securityGroupIds
-
- Type: Array of strings
A list of one or more security groups IDs in your Amazon VPC.
- subnets
-
- Type: Array of strings
A list of one or more subnet IDs in your Amazon VPC.
- vpcId
-
- Type: string
The ID of the Amazon VPC.
Webhook
Description
Information about a webhook that connects repository events to a build project in CodeBuild.
Members
- branchFilter
-
- Type: string
A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If
branchFilter
is empty, then all branches are built.It is recommended that you use
filterGroups
instead ofbranchFilter
. - buildType
-
- Type: string
Specifies the type of build this webhook will trigger.
- filterGroups
-
- Type: Array of WebhookFilter structuress
An array of arrays of
WebhookFilter
objects used to determine which webhooks are triggered. At least oneWebhookFilter
in the array must specifyEVENT
as itstype
.For a build to be triggered, at least one filter group in the
filterGroups
array must pass. For a filter group to pass, each of its filters must pass. - lastModifiedSecret
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
A timestamp that indicates the last time a repository's secret token was modified.
- manualCreation
-
- Type: boolean
If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and instead returns
payloadUrl
andsecret
values for the webhook. ThepayloadUrl
andsecret
values in the output can be used to manually create a webhook within GitHub.manualCreation is only available for GitHub webhooks.
- payloadUrl
-
- Type: string
The CodeBuild endpoint where webhook events are sent.
- scopeConfiguration
-
- Type: ScopeConfiguration structure
The scope configuration for global or organization webhooks.
Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.
- secret
-
- Type: string
The secret token of the associated repository.
A Bitbucket webhook does not support
secret
. - url
-
- Type: string
The URL to the webhook.
WebhookFilter
Description
A filter used to determine which webhooks trigger a build.
Members
- excludeMatchedPattern
-
- Type: boolean
Used to indicate that the
pattern
determines which webhook events do not trigger a build. If true, then a webhook event that does not match thepattern
triggers a build. If false, then a webhook event that matches thepattern
triggers a build. - pattern
-
- Required: Yes
- Type: string
For a
WebHookFilter
that usesEVENT
type, a comma-separated string that specifies one or more events. For example, the webhook filterPUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED
allows all push, pull request created, and pull request updated events to trigger a build.For a
WebHookFilter
that uses any of the other filter types, a regular expression pattern. For example, aWebHookFilter
that usesHEAD_REF
for itstype
and the pattern^refs/heads/
triggers a build when the head reference is a branch with a reference namerefs/heads/branch-name
. - type
-
- Required: Yes
- Type: string
The type of webhook filter. There are nine webhook filter types:
EVENT
,ACTOR_ACCOUNT_ID
,HEAD_REF
,BASE_REF
,FILE_PATH
,COMMIT_MESSAGE
,TAG_NAME
,RELEASE_NAME
, andWORKFLOW_NAME
.-
EVENT
-
A webhook event triggers a build when the provided
pattern
matches one of nine event types:PUSH
,PULL_REQUEST_CREATED
,PULL_REQUEST_UPDATED
,PULL_REQUEST_CLOSED
,PULL_REQUEST_REOPENED
,PULL_REQUEST_MERGED
,RELEASED
,PRERELEASED
, andWORKFLOW_JOB_QUEUED
. TheEVENT
patterns are specified as a comma-separated string. For example,PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED
filters all push, pull request created, and pull request updated events.Types
PULL_REQUEST_REOPENED
andWORKFLOW_JOB_QUEUED
work with GitHub and GitHub Enterprise only. TypesRELEASED
andPRERELEASED
work with GitHub only.
-
-
ACTOR_ACCOUNT_ID
-
A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression
pattern
.
-
-
HEAD_REF
-
A webhook event triggers a build when the head reference matches the regular expression
pattern
. For example,refs/heads/branch-name
andrefs/tags/tag-name
.Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.
-
-
BASE_REF
-
A webhook event triggers a build when the base reference matches the regular expression
pattern
. For example,refs/heads/branch-name
.Works with pull request events only.
-
-
FILE_PATH
-
A webhook triggers a build when the path of a changed file matches the regular expression
pattern
.Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.
-
-
COMMIT_MESSAGE
-
A webhook triggers a build when the head commit message matches the regular expression
pattern
.Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.
-
-
TAG_NAME
-
A webhook triggers a build when the tag name of the release matches the regular expression
pattern
.Works with
RELEASED
andPRERELEASED
events only.
-
-
RELEASE_NAME
-
A webhook triggers a build when the release name matches the regular expression
pattern
.Works with
RELEASED
andPRERELEASED
events only.
-
-
REPOSITORY_NAME
-
A webhook triggers a build when the repository name matches the regular expression pattern.
Works with GitHub global or organization webhooks only.
-
-
WORKFLOW_NAME
-
A webhook triggers a build when the workflow name matches the regular expression
pattern
.Works with
WORKFLOW_JOB_QUEUED
events only.
-