

# Public build actions


**Note**  
The CodeBuild public build API is not contained in the AWS CLI or AWS SDKs.

The following actions are supported by the CodeBuild public build API:

**Topics**
+ [

# DescribeBuildBatchesForPublicProject
](API_DescribeBuildBatchesForPublicProject.md)
+ [

# DescribeBuildsForPublicProject
](API_DescribeBuildsForPublicProject.md)
+ [

# GetCloudWatchLogsForPublicBuild
](API_GetCloudWatchLogsForPublicBuild.md)
+ [

# GetPresignedUrlsForPublicBuild
](API_GetPresignedUrlsForPublicBuild.md)
+ [

# GetPublicBuild
](API_GetPublicBuild.md)
+ [

# GetPublicBuildBatch
](API_GetPublicBuildBatch.md)
+ [

# GetPublicProject
](API_GetPublicProject.md)

# DescribeBuildBatchesForPublicProject


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "filter": { 
      "status": "string"
   },
   "maxResults": number,
   "nextToken": "string",
   "publicProjectAlias": "string",
   "sortOrder": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicProjectAlias](#API_DescribeBuildBatchesForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-request-publicProjectAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+$`   
Required: Yes

 ** [filter](#API_DescribeBuildBatchesForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-request-filter"></a>
Specifies filters when retrieving batch builds.  
Type: [BuildBatchFilter](API_BuildBatchFilter.md) object  
Required: No

 ** [maxResults](#API_DescribeBuildBatchesForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-request-maxResults"></a>
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [nextToken](#API_DescribeBuildBatchesForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-request-nextToken"></a>
Type: String  
Required: No

 ** [sortOrder](#API_DescribeBuildBatchesForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-request-sortOrder"></a>
Type: String  
Valid Values:` ASCENDING | DESCENDING`   
Required: No

## Response Syntax


```
{
   "nextToken": "string",
   "publicBuildBatches": [ 
      { 
         "buildBatchNumber": number,
         "buildBatchStatus": "string",
         "endTime": number,
         "publicBuildBatchAlias": "string",
         "sourceVersion": "string",
         "startTime": number
      }
   ]
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_DescribeBuildBatchesForPublicProject_ResponseSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-response-nextToken"></a>
Type: String

 ** [publicBuildBatches](#API_DescribeBuildBatchesForPublicProject_ResponseSyntax) **   <a name="CodeBuild-DescribeBuildBatchesForPublicProject-response-publicBuildBatches"></a>
Type: Array of [BuildBatchForDescribeBuildBatchesPublic](API_BuildBatchForDescribeBuildBatchesPublic.md) objects

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# DescribeBuildsForPublicProject


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "maxResults": number,
   "nextToken": "string",
   "publicProjectAlias": "string",
   "sortOrder": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicProjectAlias](#API_DescribeBuildsForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-request-publicProjectAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+$`   
Required: Yes

 ** [maxResults](#API_DescribeBuildsForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-request-maxResults"></a>
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [nextToken](#API_DescribeBuildsForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-request-nextToken"></a>
Type: String  
Required: No

 ** [sortOrder](#API_DescribeBuildsForPublicProject_RequestSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-request-sortOrder"></a>
Type: String  
Valid Values:` ASCENDING | DESCENDING`   
Required: No

## Response Syntax


```
{
   "builds": [ 
      { 
         "artifacts": { 
            "artifactIdentifier": "string",
            "packaging": "string",
            "type": "string"
         },
         "buildComplete": boolean,
         "buildNumber": number,
         "buildStatus": "string",
         "endTime": number,
         "environment": { 
            "computeType": "string",
            "environmentVariables": [ 
               { 
                  "name": "string",
                  "type": "string",
                  "value": "string"
               }
            ],
            "image": "string",
            "type": "string"
         },
         "id": "string",
         "initiator": "string",
         "logsStatus": { 
            "cloudWatchLogsStatus": "string",
            "s3LogsStatus": "string"
         },
         "phases": [ 
            { 
               "contexts": [ 
                  { 
                     "message": "string",
                     "statusCode": "string"
                  }
               ],
               "durationInSeconds": number,
               "endTime": number,
               "phaseStatus": "string",
               "phaseType": "string",
               "startTime": number
            }
         ],
         "projectName": "string",
         "queuedTimeoutInMinutes": number,
         "resolvedSourceVersion": "string",
         "secondaryArtifacts": [ 
            { 
               "artifactIdentifier": "string",
               "packaging": "string",
               "type": "string"
            }
         ],
         "secondarySources": [ 
            { 
               "buildspec": "string",
               "gitCloneDepth": number,
               "gitSubmodulesConfig": { 
                  "fetchSubmodules": boolean
               },
               "location": "string",
               "sourceIdentifier": "string",
               "type": "string"
            }
         ],
         "secondarySourceVersions": [ 
            { 
               "sourceIdentifier": "string",
               "sourceVersion": "string"
            }
         ],
         "source": { 
            "buildspec": "string",
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "fetchSubmodules": boolean
            },
            "location": "string",
            "sourceIdentifier": "string",
            "type": "string"
         },
         "sourceVersion": "string",
         "startTime": number,
         "timeoutInMinutes": number
      }
   ],
   "nextToken": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [builds](#API_DescribeBuildsForPublicProject_ResponseSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-response-builds"></a>
Type: Array of [PublicBuild](API_PublicBuild.md) objects

 ** [nextToken](#API_DescribeBuildsForPublicProject_ResponseSyntax) **   <a name="CodeBuild-DescribeBuildsForPublicProject-response-nextToken"></a>
Type: String

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# GetCloudWatchLogsForPublicBuild


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "maxResult": number,
   "nextToken": "string",
   "publicBuildAlias": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicBuildAlias](#API_GetCloudWatchLogsForPublicBuild_RequestSyntax) **   <a name="CodeBuild-GetCloudWatchLogsForPublicBuild-request-publicBuildAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+:\p{XDigit}{8}(-\p{XDigit}{4}){3}-\p{XDigit}{12}$`   
Required: Yes

 ** [maxResult](#API_GetCloudWatchLogsForPublicBuild_RequestSyntax) **   <a name="CodeBuild-GetCloudWatchLogsForPublicBuild-request-maxResult"></a>
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 10000.  
Required: No

 ** [nextToken](#API_GetCloudWatchLogsForPublicBuild_RequestSyntax) **   <a name="CodeBuild-GetCloudWatchLogsForPublicBuild-request-nextToken"></a>
Type: String  
Required: No

## Response Syntax


```
{
   "logs": [ "string" ],
   "nextToken": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [logs](#API_GetCloudWatchLogsForPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetCloudWatchLogsForPublicBuild-response-logs"></a>
Type: Array of strings

 ** [nextToken](#API_GetCloudWatchLogsForPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetCloudWatchLogsForPublicBuild-response-nextToken"></a>
Type: String  
Length Constraints: Minimum length of 1.

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# GetPresignedUrlsForPublicBuild


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "publicBuildAlias": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicBuildAlias](#API_GetPresignedUrlsForPublicBuild_RequestSyntax) **   <a name="CodeBuild-GetPresignedUrlsForPublicBuild-request-publicBuildAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+:\p{XDigit}{8}(-\p{XDigit}{4}){3}-\p{XDigit}{12}$`   
Required: Yes

## Response Syntax


```
{
   "artifacts": { 
      "expiredAt": number,
      "identifier": "string",
      "md5Checksum": "string",
      "presignedUrl": "string",
      "s3Arn": "string",
      "sha256Checksum": "string"
   },
   "log": { 
      "expiredAt": number,
      "identifier": "string",
      "md5Checksum": "string",
      "presignedUrl": "string",
      "s3Arn": "string",
      "sha256Checksum": "string"
   },
   "secondaryArtifacts": [ 
      { 
         "expiredAt": number,
         "identifier": "string",
         "md5Checksum": "string",
         "presignedUrl": "string",
         "s3Arn": "string",
         "sha256Checksum": "string"
      }
   ]
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [artifacts](#API_GetPresignedUrlsForPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetPresignedUrlsForPublicBuild-response-artifacts"></a>
Type: [S3Downloadable](API_S3Downloadable.md) object

 ** [log](#API_GetPresignedUrlsForPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetPresignedUrlsForPublicBuild-response-log"></a>
Type: [S3Downloadable](API_S3Downloadable.md) object

 ** [secondaryArtifacts](#API_GetPresignedUrlsForPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetPresignedUrlsForPublicBuild-response-secondaryArtifacts"></a>
Type: Array of [S3Downloadable](API_S3Downloadable.md) objects

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# GetPublicBuild


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "publicBuildAlias": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicBuildAlias](#API_GetPublicBuild_RequestSyntax) **   <a name="CodeBuild-GetPublicBuild-request-publicBuildAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+:\p{XDigit}{8}(-\p{XDigit}{4}){3}-\p{XDigit}{12}$`   
Required: Yes

## Response Syntax


```
{
   "build": { 
      "artifacts": { 
         "artifactIdentifier": "string",
         "packaging": "string",
         "type": "string"
      },
      "buildComplete": boolean,
      "buildNumber": number,
      "buildStatus": "string",
      "endTime": number,
      "environment": { 
         "computeType": "string",
         "environmentVariables": [ 
            { 
               "name": "string",
               "type": "string",
               "value": "string"
            }
         ],
         "image": "string",
         "type": "string"
      },
      "id": "string",
      "initiator": "string",
      "logsStatus": { 
         "cloudWatchLogsStatus": "string",
         "s3LogsStatus": "string"
      },
      "phases": [ 
         { 
            "contexts": [ 
               { 
                  "message": "string",
                  "statusCode": "string"
               }
            ],
            "durationInSeconds": number,
            "endTime": number,
            "phaseStatus": "string",
            "phaseType": "string",
            "startTime": number
         }
      ],
      "projectName": "string",
      "queuedTimeoutInMinutes": number,
      "resolvedSourceVersion": "string",
      "secondaryArtifacts": [ 
         { 
            "artifactIdentifier": "string",
            "packaging": "string",
            "type": "string"
         }
      ],
      "secondarySources": [ 
         { 
            "buildspec": "string",
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "fetchSubmodules": boolean
            },
            "location": "string",
            "sourceIdentifier": "string",
            "type": "string"
         }
      ],
      "secondarySourceVersions": [ 
         { 
            "sourceIdentifier": "string",
            "sourceVersion": "string"
         }
      ],
      "source": { 
         "buildspec": "string",
         "gitCloneDepth": number,
         "gitSubmodulesConfig": { 
            "fetchSubmodules": boolean
         },
         "location": "string",
         "sourceIdentifier": "string",
         "type": "string"
      },
      "sourceVersion": "string",
      "startTime": number,
      "timeoutInMinutes": number
   }
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [build](#API_GetPublicBuild_ResponseSyntax) **   <a name="CodeBuild-GetPublicBuild-response-build"></a>
Type: [PublicBuild](API_PublicBuild.md) object

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# GetPublicBuildBatch


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "publicBuildBatchAlias": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicBuildBatchAlias](#API_GetPublicBuildBatch_RequestSyntax) **   <a name="CodeBuild-GetPublicBuildBatch-request-publicBuildBatchAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+:[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$`   
Required: Yes

## Response Syntax


```
{
   "publicBuildBatch": { 
      "artifacts": { 
         "artifactIdentifier": "string",
         "packaging": "string",
         "type": "string"
      },
      "buildBatchConfig": { 
         "combineArtifacts": boolean,
         "restrictions": { 
            "computeTypesAllowed": [ "string" ],
            "maximumBuildsAllowed": number
         },
         "timeoutInMins": number
      },
      "buildBatchNumber": number,
      "buildBatchStatus": "string",
      "buildGroups": [ 
         { 
            "currentBuildSummary": { 
               "buildStatus": "string",
               "primaryArtifact": { 
                  "identifier": "string",
                  "location": "string",
                  "type": "string"
               },
               "publicBuildAlias": "string",
               "requestedOn": number,
               "secondaryArtifacts": [ 
                  { 
                     "identifier": "string",
                     "location": "string",
                     "type": "string"
                  }
               ]
            },
            "dependsOn": [ "string" ],
            "identifier": "string",
            "ignoreFailure": boolean,
            "priorBuildSummaryList": [ 
               { 
                  "buildStatus": "string",
                  "primaryArtifact": { 
                     "identifier": "string",
                     "location": "string",
                     "type": "string"
                  },
                  "publicBuildAlias": "string",
                  "requestedOn": number,
                  "secondaryArtifacts": [ 
                     { 
                        "identifier": "string",
                        "location": "string",
                        "type": "string"
                     }
                  ]
               }
            ]
         }
      ],
      "buildTimeoutInMinutes": number,
      "complete": boolean,
      "currentPhase": "string",
      "endTime": number,
      "environment": { 
         "computeType": "string",
         "environmentVariables": [ 
            { 
               "name": "string",
               "type": "string",
               "value": "string"
            }
         ],
         "image": "string",
         "type": "string"
      },
      "id": "string",
      "initiator": "string",
      "logsStatus": { 
         "cloudWatchLogsStatus": "string",
         "s3LogsStatus": "string"
      },
      "phases": [ 
         { 
            "contexts": [ 
               { 
                  "message": "string",
                  "statusCode": "string"
               }
            ],
            "durationInSeconds": number,
            "endTime": number,
            "phaseStatus": "string",
            "phaseType": "string",
            "startTime": number
         }
      ],
      "projectName": "string",
      "publicBuildBatchAlias": "string",
      "queuedTimeoutInMinutes": number,
      "resolvedSourceVersion": "string",
      "secondaryArtifacts": [ 
         { 
            "artifactIdentifier": "string",
            "packaging": "string",
            "type": "string"
         }
      ],
      "secondarySources": [ 
         { 
            "buildspec": "string",
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "fetchSubmodules": boolean
            },
            "location": "string",
            "sourceIdentifier": "string",
            "type": "string"
         }
      ],
      "secondarySourceVersions": [ 
         { 
            "sourceIdentifier": "string",
            "sourceVersion": "string"
         }
      ],
      "source": { 
         "buildspec": "string",
         "gitCloneDepth": number,
         "gitSubmodulesConfig": { 
            "fetchSubmodules": boolean
         },
         "location": "string",
         "sourceIdentifier": "string",
         "type": "string"
      },
      "sourceVersion": "string",
      "startTime": number
   }
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [publicBuildBatch](#API_GetPublicBuildBatch_ResponseSyntax) **   <a name="CodeBuild-GetPublicBuildBatch-response-publicBuildBatch"></a>
Type: [PublicBuildBatch](API_PublicBuildBatch.md) object

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400

# GetPublicProject


**Note**  
This API element is not contained in the AWS CLI or AWS SDKs.

## Request Syntax


```
{
   "publicProjectAlias": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

**Note**  
In the following list, the required parameters are described first.

 ** [publicProjectAlias](#API_GetPublicProject_RequestSyntax) **   <a name="CodeBuild-GetPublicProject-request-publicProjectAlias"></a>
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `^[0-9a-zA-Z%+=]+$`   
Required: Yes

## Response Syntax


```
{
   "project": { 
      "artifacts": { 
         "artifactIdentifier": "string",
         "location": "string",
         "type": "string"
      },
      "buildBatchConfig": { 
         "combineArtifacts": boolean,
         "restrictions": { 
            "computeTypesAllowed": [ "string" ],
            "maximumBuildsAllowed": number
         },
         "timeoutInMins": number
      },
      "concurrentBuildLimit": number,
      "description": "string",
      "environment": { 
         "computeType": "string",
         "environmentVariables": [ 
            { 
               "name": "string",
               "type": "string",
               "value": "string"
            }
         ],
         "image": "string",
         "type": "string"
      },
      "name": "string",
      "queuedTimeoutInMinutes": number,
      "secondaryArtifacts": [ 
         { 
            "artifactIdentifier": "string",
            "location": "string",
            "type": "string"
         }
      ],
      "secondarySources": [ 
         { 
            "buildspec": "string",
            "gitCloneDepth": number,
            "gitSubmodulesConfig": { 
               "fetchSubmodules": boolean
            },
            "location": "string",
            "sourceIdentifier": "string",
            "type": "string"
         }
      ],
      "secondarySourceVersions": [ 
         { 
            "sourceIdentifier": "string",
            "sourceVersion": "string"
         }
      ],
      "source": { 
         "buildspec": "string",
         "gitCloneDepth": number,
         "gitSubmodulesConfig": { 
            "fetchSubmodules": boolean
         },
         "location": "string",
         "sourceIdentifier": "string",
         "type": "string"
      },
      "sourceVersion": "string",
      "timeoutInMinutes": number,
      "webhook": { 
         "branchFilter": "string",
         "buildType": "string",
         "filterGroups": [ 
            [ 
               { 
                  "excludeMatchedPattern": boolean,
                  "pattern": "string",
                  "type": "string"
               }
            ]
         ],
         "payloadUrl": "string",
         "url": "string"
      }
   }
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [project](#API_GetPublicProject_ResponseSyntax) **   <a name="CodeBuild-GetPublicProject-response-project"></a>
Type: [PublicProject](API_PublicProject.md) object

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 **InvalidInputException**   
HTTP Status Code: 400

 **ResourceNotFoundException**   
HTTP Status Code: 400