CmdID / aws / aws codebuild
aws codebuild batch-get-projects
Gets information about one or more build projects. AWS CLI reference
1 example 1 option Its page in the AWS CLI reference
Examples
To get a list of AWS CodeBuild build project names.
The following batch-get-projects example gets a list of CodeBuild build projects specified by name.
aws codebuild batch-get-projects --names codebuild-demo-project codebuild-demo-project2 my-other-demo-projectIdentify--namesThe names or ARNs of the build projects.In the following 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.
Its output, shortened
{
"projectsNotFound": [],
"projects": [
{
"encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
"name": "codebuild-demo-project2",
"queuedTimeoutInMinutes": 480,
"timeoutInMinutes": 60,
"source": {
"buildspec": "version: 0.2\n\n#env:\n #variables:\n # key: \"value\"\n # key: \"value\"\n #parameter-store:\n # key: \"value\"\n # key:\"value\"\n\nphases:\n #install:\n #commands:\n # - command\n # - command\n #pre_build:\n #commands:\n # - command\n # - command\n build:\n commands:\n # - command\n # - command\n #post_build:\n #commands:\n # - command\n # - command\n#artifacts:\n #files:\n # - location\n # - location\n #name: $(date +%Y-%m-%d)\n #discard-paths: yes\n #base-directory: location\n#cache:\n #paths:\n # - paths",
"type": "NO_SOURCE",
"insecureSsl": false,
"gitCloneDepth": 1
},
"artifacts": {
"type": "NO_ARTIFACTS"
},
"badge": {
"badgeEnabled": false
},
"lastModified": 1540588091.108,
"created": 1540588091.108,
"arn": "arn:aws:codebuild:us-west-2:123456789012:project/test-for-sample",
"secondarySources": [],
"secondaryArtifacts": [],
"cache": {
"type": "NO_CACHE"
},
"serviceRole": "arn:aws:iam::123456789012:role/service-role/my-test-role",
"environment": {
… 48 more linesFor more information, see View a build project's details in AWS CodeBuild in the AWS CodeBuild User Guide.
Options
--namesThe names or ARNs of the build projects.