View a build project's details in Amazon CodeBuild - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

View a build project's details in Amazon CodeBuild

You can use the Amazon CodeBuild console, Amazon CLI, or Amazon SDKs to view the details of a build project in CodeBuild.

View a build project's details (console)

  1. Open the Amazon CodeBuild console at https://console.amazonaws.cn/codesuite/codebuild/home.

  2. In the navigation pane, choose Build projects.

    Note

    By default, only the 10 most recent build projects are displayed. To view more build projects, choose the gear icon, and then choose a different value for Projects per page or use the back and forward arrows.

  3. In the list of build projects, in the Name column, choose the link for the build project.

  4. On the Build project: project-name page, choose Build details.

View a build project's details (Amazon CLI)

Run the batch-get-projects command:

aws codebuild batch-get-projects --names names

In the preceding command, replace the following placeholder:

  • names: Required string used to indicate one or more build project names to view details about. To specify more than one build project, separate each build project's name with a space. You can specify up to 100 build project names. To get a list of build projects, see View a list of build project names (Amazon CLI).

For example, if you run this command:

aws codebuild batch-get-projects --names codebuild-demo-project codebuild-demo-project2 my-other-demo-project

A result similar to the following might appear in the output. Ellipses (...) are used to represent data omitted for brevity.

{ "projectsNotFound": [ "my-other-demo-project" ], "projects": [ { ... "name": codebuild-demo-project, ... }, { ... "name": codebuild-demo-project2", ... } ] }

In the preceding output, the projectsNotFound array lists any build project names that were specified, but not found. The projects array lists details for each build project where information was found. Build project details have been omitted from the preceding output for brevity. For more information, see the output of Create a build project (Amazon CLI).

The batch-get-projects command does not support filtering for certain property values, but you can write a script that enumerates the properties for a project. For example, the following Linux shell script enumerates the projects in the current region for the current account, and prints the image used by each project.

#!/usr/bin/sh # This script enumerates all of the projects for the current account # in the current region and prints out the image that each project is using. imageName="" function getImageName(){ local environmentValues=(${1//$'\t'/ }) imageName=${environmentValues[1]} } function processProjectInfo() { local projectInfo=$1 while IFS=$'\t' read -r section value; do if [[ "$section" == *"ENVIRONMENT"* ]]; then getImageName "$value" fi done <<< "$projectInfo" } # Get the list of projects. projectList=$(aws codebuild list-projects --output=text) for projectName in $projectList do if [[ "$projectName" != *"PROJECTS"* ]]; then echo "===============================================" # Get the detailed information for the project. projectInfo=$(aws codebuild batch-get-projects --output=text --names "$projectName") processProjectInfo "$projectInfo" printf 'Project "%s" has image "%s"\n' "$projectName" "$imageName" fi done

For more information about using the Amazon CLI with Amazon CodeBuild, see the Command line reference.

View a build project's details (Amazon SDKs)

For more information about using Amazon CodeBuild with the Amazon SDKs, see the Amazon SDKs and tools reference.