

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# CodeBuild contoh menggunakan AWS CLI
<a name="cli_2_codebuild_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan AWS Command Line Interface with CodeBuild.

*Tindakan* merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

**Topics**
+ [Tindakan](#actions)

## Tindakan
<a name="actions"></a>

### `batch-delete-builds`
<a name="codebuild_BatchDeleteBuilds_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-delete-builds`.

**AWS CLI**  
**Untuk menghapus build in AWS CodeBuild.**  
`batch-delete-builds`Contoh berikut menghapus build in CodeBuild dengan yang ditentukan. IDs  

```
aws codebuild batch-delete-builds --ids {{my-build-project-one:a1b2c3d4-5678-9012-abcd-11111EXAMPLE}} {{my-build-project-two:a1b2c3d4-5678-9012-abcd-22222EXAMPLE}}
```
Output:  

```
{
    "buildsNotDeleted": [
        {
            "id": "arn:aws:codebuild:us-west-2:123456789012:build/my-build-project-one:a1b2c3d4-5678-9012-abcd-11111EXAMPLE",
            "statusCode": "BUILD_IN_PROGRESS"
        }
    ],
    "buildsDeleted": [
        "arn:aws:codebuild:us-west-2:123456789012:build/my-build-project-two:a1b2c3d4-5678-9012-abcd-22222EXAMPLE"
    ]
}
```
Untuk informasi selengkapnya, lihat [Menghapus Build (AWS CLI](https://docs.aws.amazon.com/codebuild/latest/userguide/delete-builds.html#delete-builds-cli)) di Panduan Pengguna *AWS CodeBuild .*  
+  Untuk detail API, lihat [BatchDeleteBuilds](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-delete-builds.html)di *Referensi AWS CLI Perintah*. 

### `batch-get-build-batches`
<a name="codebuild_BatchGetBuildBatches_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-get-build-batches`.

**AWS CLI**  
**Untuk melihat detail build in AWS CodeBuild.**  
`batch-get-build-batches`Contoh berikut mendapatkan informasi tentang build batch CodeBuild dengan yang ditentukan IDs.  

```
aws codebuild batch-get-build-batches \
    --ids {{codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE}}
```
Output:  

```
{
    "buildBatches": [
        {
            "id": "codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
            "arn": "arn:aws:codebuild:us-west-2:123456789012:build-batch/codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
            "startTime": "2020-11-03T21:52:20.775000+00:00",
            "endTime": "2020-11-03T21:56:59.784000+00:00",
            "currentPhase": "SUCCEEDED",
            "buildBatchStatus": "SUCCEEDED",
            "resolvedSourceVersion": "0a6546f68309560d08a310daac92314c4d378f6b",
            "projectName": "codebuild-demo-project",
            "phases": [
                {
                    "phaseType": "SUBMITTED",
                    "phaseStatus": "SUCCEEDED",
                    "startTime": "2020-11-03T21:52:20.775000+00:00",
                    "endTime": "2020-11-03T21:52:20.976000+00:00",
                    "durationInSeconds": 0
                },
                {
                    "phaseType": "DOWNLOAD_BATCHSPEC",
                    "phaseStatus": "SUCCEEDED",
                    "startTime": "2020-11-03T21:52:20.976000+00:00",
                    "endTime": "2020-11-03T21:52:57.401000+00:00",
                    "durationInSeconds": 36
                },
                {
                    "phaseType": "IN_PROGRESS",
                    "phaseStatus": "SUCCEEDED",
                    "startTime": "2020-11-03T21:52:57.401000+00:00",
                    "endTime": "2020-11-03T21:56:59.751000+00:00",
                    "durationInSeconds": 242
                },
                {
                    "phaseType": "COMBINE_ARTIFACTS",
                    "phaseStatus": "SUCCEEDED",
                    "startTime": "2020-11-03T21:56:59.751000+00:00",
                    "endTime": "2020-11-03T21:56:59.784000+00:00",
                    "durationInSeconds": 0
                },
                {
                    "phaseType": "SUCCEEDED",
                    "startTime": "2020-11-03T21:56:59.784000+00:00"
                }
            ],
            "source": {
                "type": "GITHUB",
                "location": "https://github.com/my-repo/codebuild-demo-project.git",
                "gitCloneDepth": 1,
                "gitSubmodulesConfig": {
                    "fetchSubmodules": false
                },
                "reportBuildStatus": false,
                "insecureSsl": false
            },
            "secondarySources": [],
            "secondarySourceVersions": [],
            "artifacts": {
                "location": ""
            },
            "secondaryArtifacts": [],
            "cache": {
                "type": "NO_CACHE"
            },
            "environment": {
                "type": "LINUX_CONTAINER",
                "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
                "computeType": "BUILD_GENERAL1_SMALL",
                "environmentVariables": [],
                "privilegedMode": false,
                "imagePullCredentialsType": "CODEBUILD"
            },
            "logConfig": {
                "cloudWatchLogs": {
                    "status": "ENABLED"
                },
                "s3Logs": {
                    "status": "DISABLED",
                    "encryptionDisabled": false
                }
            },
            "buildTimeoutInMinutes": 60,
            "queuedTimeoutInMinutes": 480,
            "complete": true,
            "initiator": "Strohm",
            "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
            "buildBatchNumber": 6,
            "buildBatchConfig": {
                "serviceRole": "arn:aws:iam::123456789012:role/service-role/codebuild-demo-project",
                "restrictions": {
                    "maximumBuildsAllowed": 100
                },
                "timeoutInMins": 480
            },
            "buildGroups": [
                {
                    "identifier": "DOWNLOAD_SOURCE",
                    "ignoreFailure": false,
                    "currentBuildSummary": {
                        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:379737d8-bc35-48ec-97fd-776d27545315",
                        "requestedOn": "2020-11-03T21:52:21.394000+00:00",
                        "buildStatus": "SUCCEEDED",
                        "primaryArtifact": {
                            "type": "no_artifacts",
                            "identifier": "DOWNLOAD_SOURCE"
                        },
                        "secondaryArtifacts": []
                    }
                },
                {
                    "identifier": "linux_small",
                    "dependsOn": [],
                    "ignoreFailure": false,
                    "currentBuildSummary": {
                        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:dd785171-ed84-4bb6-8ede-ceeb86e54bdb",
                        "requestedOn": "2020-11-03T21:52:57.604000+00:00",
                        "buildStatus": "SUCCEEDED",
                        "primaryArtifact": {
                            "type": "no_artifacts",
                            "identifier": "linux_small"
                        },
                        "secondaryArtifacts": []
                    }
                },
                {
                    "identifier": "linux_medium",
                    "dependsOn": [
                        "linux_small"
                    ],
                    "ignoreFailure": false,
                    "currentBuildSummary": {
                        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:97cf7bd4-5313-4786-8243-4aef350a1267",
                        "requestedOn": "2020-11-03T21:54:18.474000+00:00",
                        "buildStatus": "SUCCEEDED",
                        "primaryArtifact": {
                            "type": "no_artifacts",
                            "identifier": "linux_medium"
                        },
                        "secondaryArtifacts": []
                    }
                },
                {
                    "identifier": "linux_large",
                    "dependsOn": [
                        "linux_medium"
                    ],
                    "ignoreFailure": false,
                    "currentBuildSummary": {
                        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:60a194cd-0d03-4337-9db1-d41476a17d27",
                        "requestedOn": "2020-11-03T21:55:39.203000+00:00",
                        "buildStatus": "SUCCEEDED",
                        "primaryArtifact": {
                            "type": "no_artifacts",
                            "identifier": "linux_large"
                        },
                        "secondaryArtifacts": []
                    }
                }
            ]
        }
    ],
    "buildBatchesNotFound": []
}
```
*Untuk informasi selengkapnya, lihat Batch build di AWS CodeBuild < https://docs.aws.amazon.com/codebuild/ latest/userguide/batch -build.html>) \_\_ di Panduan Pengguna.AWS CodeBuild *  
+  Untuk detail API, lihat [BatchGetBuildBatches](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-get-build-batches.html)di *Referensi AWS CLI Perintah*. 

### `batch-get-builds`
<a name="codebuild_BatchGetBuilds_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-get-builds`.

**AWS CLI**  
**Untuk melihat detail build in AWS CodeBuild.**  
`batch-get-builds`Contoh berikut mendapatkan informasi tentang build in CodeBuild dengan yang ditentukan IDs.  

```
aws codebuild batch-get-builds --ids {{codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE}} {{codebuild-demo-project:815e755f-bade-4a7e-80f0-efe51EXAMPLE}}
```
Output:  

```
{
    "buildsNotFound": [],
    "builds": [
        {
            "artifacts": {
                "md5sum": "0e95edf915048a0c22efe6d139fff837",
                "location": "arn:aws:s3:::codepipeline-us-west-2-820783811474/CodeBuild-Python-Pip/BuildArtif/6DJsqQa",
                "encryptionDisabled": false,
                "sha256sum": "cfa0df33a090966a737f64ae4fe498969fdc842a0c9aec540bf93c37ac0d05a2"
            },
            "logs": {
                "cloudWatchLogs": {
                    "status": "ENABLED"
                },
                "s3Logs": {
                    "status": "DISABLED"
                },
                "streamName": "46472baf-8f6b-43c2-9255-b3b963af2732",
                "groupName": "/aws/codebuild/codebuild-demo-project",
                "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=/aws/codebuild/codebuild-demo-project;stream=46472baf-8f6b-43c2-9255-b3b963af2732"
            },
            "timeoutInMinutes": 60,
            "environment": {
                "privilegedMode": false,
                "computeType": "BUILD_GENERAL1_MEDIUM",
                "image": "aws/codebuild/windows-base:1.0",
                "environmentVariables": [],
                "type": "WINDOWS_CONTAINER"
            },
            "projectName": "codebuild-demo-project",
            "buildComplete": true,
            "source": {
                "gitCloneDepth": 1,
                "insecureSsl": false,
                "type": "CODEPIPELINE"
            },
            "buildStatus": "SUCCEEDED",
            "secondaryArtifacts": [],
            "phases": [
                {
                    "durationInSeconds": 0,
                    "startTime": 1548717462.122,
                    "phaseType": "SUBMITTED",
                    "endTime": 1548717462.484,
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "startTime": 1548717462.484,
                    "phaseType": "QUEUED",
                    "endTime": 1548717462.775,
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 34,
                    "endTime": 1548717496.909,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717462.775,
                    "phaseType": "PROVISIONING",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 15,
                    "endTime": 1548717512.555,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717496.909,
                    "phaseType": "DOWNLOAD_SOURCE",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "endTime": 1548717512.734,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717512.555,
                    "phaseType": "INSTALL",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "endTime": 1548717512.924,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717512.734,
                    "phaseType": "PRE_BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 9,
                    "endTime": 1548717522.254,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717512.924,
                    "phaseType": "BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 3,
                    "endTime": 1548717525.498,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717522.254,
                    "phaseType": "POST_BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 9,
                    "endTime": 1548717534.646,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717525.498,
                    "phaseType": "UPLOAD_ARTIFACTS",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 2,
                    "endTime": 1548717536.846,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548717534.646,
                    "phaseType": "FINALIZING",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "startTime": 1548717536.846,
                    "phaseType": "COMPLETED"
                }
            ],
            "startTime": 1548717462.122,
            "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
            "initiator": "codepipeline/CodeBuild-Pipeline",
            "secondarySources": [],
            "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
            "currentPhase": "COMPLETED",
            "id": "codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
            "cache": {
                "type": "NO_CACHE"
            },
            "sourceVersion": "arn:aws:s3:::codepipeline-us-west-2-820783811474/CodeBuild-Python-Pip/SourceArti/1TspnN3.zip",
            "endTime": 1548717536.846,
            "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
            "queuedTimeoutInMinutes": 480,
            "resolvedSourceVersion": "f2194c1757bbdcb0f8f229254a4b3c8b27d43e0b"
        },
        {
            "artifacts": {
                "md5sum": "",
                "overrideArtifactName": false,
                "location": "arn:aws:s3:::my-artifacts/codebuild-demo-project",
                "encryptionDisabled": false,
                "sha256sum": ""
            },
            "logs": {
                "cloudWatchLogs": {
                    "status": "ENABLED"
                },
                "s3Logs": {
                    "status": "DISABLED"
                },
                "streamName": "4dea3ca4-20ec-4898-b22a-a9eb9292775d",
                "groupName": "/aws/codebuild/codebuild-demo-project",
                "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=/aws/codebuild/codebuild-demo-project;stream=4dea3ca4-20ec-4898-b22a-a9eb9292775d"
            },
            "timeoutInMinutes": 60,
            "environment": {
                "privilegedMode": false,
                "computeType": "BUILD_GENERAL1_MEDIUM",
                "image": "aws/codebuild/windows-base:1.0",
                "environmentVariables": [],
                "type": "WINDOWS_CONTAINER"
            },
            "projectName": "codebuild-demo-project",
            "buildComplete": true,
            "source": {
                "gitCloneDepth": 1,
                "location": "https://github.com/my-repo/codebuild-demo-project.git",
                "insecureSsl": false,
                "reportBuildStatus": false,
                "type": "GITHUB"
            },
            "buildStatus": "SUCCEEDED",
            "secondaryArtifacts": [],
            "phases": [
                {
                    "durationInSeconds": 0,
                    "startTime": 1548716241.89,
                    "phaseType": "SUBMITTED",
                    "endTime": 1548716242.241,
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "startTime": 1548716242.241,
                    "phaseType": "QUEUED",
                    "endTime": 1548716242.536,
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 33,
                    "endTime": 1548716276.171,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716242.536,
                    "phaseType": "PROVISIONING",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 15,
                    "endTime": 1548716291.809,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716276.171,
                    "phaseType": "DOWNLOAD_SOURCE",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "endTime": 1548716291.993,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716291.809,
                    "phaseType": "INSTALL",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 0,
                    "endTime": 1548716292.191,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716291.993,
                    "phaseType": "PRE_BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 9,
                    "endTime": 1548716301.622,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716292.191,
                    "phaseType": "BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 3,
                    "endTime": 1548716304.783,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716301.622,
                    "phaseType": "POST_BUILD",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 8,
                    "endTime": 1548716313.775,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716304.783,
                    "phaseType": "UPLOAD_ARTIFACTS",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "durationInSeconds": 2,
                    "endTime": 1548716315.935,
                    "contexts": [
                        {
                            "statusCode": "",
                            "message": ""
                        }
                    ],
                    "startTime": 1548716313.775,
                    "phaseType": "FINALIZING",
                    "phaseStatus": "SUCCEEDED"
                },
                {
                    "startTime": 1548716315.935,
                    "phaseType": "COMPLETED"
                }
            ],
            "startTime": 1548716241.89,
            "secondarySourceVersions": [],
            "initiator": "my-codebuild-project",
            "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:815e755f-bade-4a7e-80f0-efe51EXAMPLE",
            "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
            "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
            "currentPhase": "COMPLETED",
            "id": "codebuild-demo-project:815e755f-bade-4a7e-80f0-efe51EXAMPLE",
            "cache": {
                "type": "NO_CACHE"
            },
            "endTime": 1548716315.935,
            "secondarySources": [],
            "queuedTimeoutInMinutes": 480,
            "resolvedSourceVersion": "f2194c1757bbdcb0f8f229254a4b3c8b27d43e0b"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Melihat Detail Build (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/view-build-details.html#view-build-details-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [BatchGetBuilds](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-get-builds.html)di *Referensi AWS CLI Perintah*. 

### `batch-get-projects`
<a name="codebuild_BatchGetProjects_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-get-projects`.

**AWS CLI**  
**Untuk mendapatkan daftar nama proyek AWS CodeBuild build.**  
`batch-get-projects`Contoh berikut mendapatkan daftar proyek CodeBuild build yang ditentukan oleh nama.  

```
aws codebuild batch-get-projects --names {{codebuild-demo-project}} {{codebuild-demo-project2}} {{my-other-demo-project}}
```
Pada output berikut, `projectsNotFound` array mencantumkan nama proyek build yang ditentukan, tetapi tidak ditemukan. `projects`Array mencantumkan detail untuk setiap proyek build tempat informasi ditemukan.  

```
{
    "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": {
                "image": "aws/codebuild/java:openjdk-8",
                "privilegedMode": true,
                "type": "LINUX_CONTAINER",
                "computeType": "BUILD_GENERAL1_SMALL",
                "environmentVariables": []
            },
            "tags": []
        },
        {
            "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
            "name": "my-other-demo-project",
            "queuedTimeoutInMinutes": 480,
            "timeoutInMinutes": 60,
            "source": {
                "location": "https://github.com/iversonic/codedeploy-sample.git",
                "reportBuildStatus": false,
                "buildspec": "buildspec.yml",
                "insecureSsl": false,
                "gitCloneDepth": 1,
                "type": "GITHUB",
                "auth": {
                    "type": "OAUTH"
                }
            },
            "artifacts": {
                "type": "NO_ARTIFACTS"
            },
            "badge": {
                "badgeEnabled": false
            },
            "lastModified": 1523401711.73,
            "created": 1523401711.73,
            "arn": "arn:aws:codebuild:us-west-2:123456789012:project/Project2",
            "cache": {
                "type": "NO_CACHE"
            },
            "serviceRole": "arn:aws:iam::123456789012:role/service-role/codebuild-Project2-service-role",
            "environment": {
                "image": "aws/codebuild/nodejs:4.4.7",
                "privilegedMode": false,
                "type": "LINUX_CONTAINER",
                "computeType": "BUILD_GENERAL1_SMALL",
                "environmentVariables": []
            },
            "tags": []
        }
    ]
}
```
Untuk informasi selengkapnya, [lihat Melihat Detail Build Project (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/view-project-details.html#view-project-details-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [BatchGetProjects](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-get-projects.html)di *Referensi AWS CLI Perintah*. 

### `batch-get-report-groups`
<a name="codebuild_BatchGetReportGroups_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-get-report-groups`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang satu atau lebih grup laporan di AWS CodeBuild.**  
`batch-get-report-groups`Contoh berikut mengambil informasi tentang kelompok laporan dengan ARN yang ditentukan.  

```
aws codebuild batch-get-report-groups \
    --report-group-arns {{arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>}}
```
Output:  

```
{
    "reportGroups": [
        {
            "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
            "name": "report-group-name",
            "type": "TEST",
            "exportConfig": {
                "exportConfigType": "NO_EXPORT"
            },
            "created": "2020-10-01T18:04:08.466000+00:00",
            "lastModified": "2020-10-01T18:04:08.466000+00:00",
            "tags": []
        }
    ],
    "reportGroupsNotFound": []
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [BatchGetReportGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-get-report-groups.html)di *Referensi AWS CLI Perintah*. 

### `batch-get-reports`
<a name="codebuild_BatchGetReports_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-get-reports`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang satu atau lebih laporan di AWS CodeBuild.**  
`batch-get-reports`Contoh berikut mengambil informasi tentang laporan dengan yang ditentukan ARNs.  

```
aws codebuild batch-get-reports \
    --report-arns {{arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report}} {{1}} {{ID>}} {{arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report}} {{2}} {{ID>}}
```
Output:  

```
{
    "reports": [
        {
            "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 1 ID>",
            "type": "TEST",
            "name": "<report-group-name>",
            "reportGroupArn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
            "executionId": "arn:aws:codebuild:<region-ID>:<user-ID>:build/test-reports:<ID>",
            "status": "FAILED",
            "created": "2020-10-01T11:25:22.531000-07:00",
            "expired": "2020-10-31T11:25:22-07:00",
            "exportConfig": {
                "exportConfigType": "NO_EXPORT"
            },
            "truncated": false,
            "testSummary": {
                "total": 28,
                "statusCounts": {
                    "ERROR": 5,
                    "FAILED": 1,
                    "SKIPPED": 4,
                    "SUCCEEDED": 18,
                    "UNKNOWN": 0
                },
                "durationInNanoSeconds": 94000000
            }
        },
        {
            "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 2 ID>",
            "type": "TEST",
            "name": "<report-group-name>",
            "reportGroupArn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
            "executionId": "arn:aws:codebuild:<region-ID>:<user-ID>:build/test-reports:<ID>",
            "status": "FAILED",
            "created": "2020-10-01T11:13:05.816000-07:00",
            "expired": "2020-10-31T11:13:05-07:00",
            "exportConfig": {
                "exportConfigType": "NO_EXPORT"
            },
            "truncated": false,
            "testSummary": {
                "total": 28,
                "statusCounts": {
                    "ERROR": 5,
                    "FAILED": 1,
                    "SKIPPED": 4,
                    "SUCCEEDED": 18,
                    "UNKNOWN": 0
                },
                "durationInNanoSeconds": 94000000
            }
        }
    ],
    "reportsNotFound": []
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [BatchGetReports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/batch-get-reports.html)di *Referensi AWS CLI Perintah*. 

### `create-project`
<a name="codebuild_CreateProject_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-project`.

**AWS CLI**  
**Contoh 1: Untuk membuat proyek AWS CodeBuild build**  
`create-project`Contoh berikut membuat proyek CodeBuild build menggunakan file sumber dari bucket S3  

```
aws codebuild create-project \
    --name {{"my-demo-project"}} \
    --source "{\"type\": \"S3\",\"location\": \"codebuild-us-west-2-123456789012-input-bucket/my-source.zip\"}" \
    --artifacts {"\"type\": \"S3\",\"location\": \"codebuild-us-west-2-123456789012-output-bucket\""} \
    --environment "{\"type\": \"LINUX_CONTAINER\",\"image\": \"aws/codebuild/standard:1.0\",\"computeType\": \"BUILD_GENERAL1_SMALL\"}" \
    --service-role {{"arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role"}}
```
Output:  

```
{
    "project": {
        "arn": "arn:aws:codebuild:us-west-2:123456789012:project/my-demo-project",
        "name": "my-cli-demo-project",
        "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
        "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
        "lastModified": 1556839783.274,
        "badge": {
            "badgeEnabled": false
        },
        "queuedTimeoutInMinutes": 480,
        "environment": {
            "image": "aws/codebuild/standard:1.0",
            "computeType": "BUILD_GENERAL1_SMALL",
            "type": "LINUX_CONTAINER",
            "imagePullCredentialsType": "CODEBUILD",
            "privilegedMode": false,
            "environmentVariables": []
        },
        "artifacts": {
            "location": "codebuild-us-west-2-123456789012-output-bucket",
            "name": "my-cli-demo-project",
            "namespaceType": "NONE",
            "type": "S3",
            "packaging": "NONE",
            "encryptionDisabled": false
        },
        "source": {
            "type": "S3",
            "location": "codebuild-us-west-2-123456789012-input-bucket/my-source.zip",
            "insecureSsl": false
        },
        "timeoutInMinutes": 60,
        "cache": {
            "type": "NO_CACHE"
        },
        "created": 1556839783.274
    }
}
```
**Contoh 2: Untuk membuat proyek AWS CodeBuild build menggunakan file input JSON untuk parameter**  
`create-project`Contoh berikut membuat proyek CodeBuild build dengan meneruskan semua parameter yang diperlukan dalam file input JSON. Buat template file input dengan menjalankan perintah hanya dengan file`--generate-cli-skeleton parameter`.  

```
aws codebuild create-project --cli-input-json {{file://create-project.json}}
```
File JSON masukan `create-project.json` berisi konten berikut:  

```
{
    "name": "codebuild-demo-project",
    "source": {
        "type": "S3",
        "location": "codebuild-region-ID-account-ID-input-bucket/MessageUtil.zip"
    },
    "artifacts": {
        "type": "S3",
        "location": "codebuild-region-ID-account-ID-output-bucket"
    },
    "environment": {
        "type": "LINUX_CONTAINER",
        "image": "aws/codebuild/standard:1.0",
        "computeType": "BUILD_GENERAL1_SMALL"
    },
    "serviceRole": "serviceIAMRole"
}
```
Output:  

```
{
    "project": {
        "name": "codebuild-demo-project",
        "serviceRole": "serviceIAMRole",
        "tags": [],
        "artifacts": {
            "packaging": "NONE",
            "type": "S3",
            "location": "codebuild-region-ID-account-ID-output-bucket",
            "name": "message-util.zip"
        },
        "lastModified": 1472661575.244,
        "timeoutInMinutes": 60,
        "created": 1472661575.244,
        "environment": {
            "computeType": "BUILD_GENERAL1_SMALL",
            "image": "aws/codebuild/standard:1.0",
            "type": "LINUX_CONTAINER",
            "environmentVariables": []
        },
        "source": {
            "type": "S3",
            "location": "codebuild-region-ID-account-ID-input-bucket/MessageUtil.zip"
        },
        "encryptionKey": "arn:aws:kms:region-ID:account-ID:alias/aws/s3",
        "arn": "arn:aws:codebuild:region-ID:account-ID:project/codebuild-demo-project"
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat Proyek Build (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/create-project.html#create-project-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [CreateProject](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/create-project.html)di *Referensi AWS CLI Perintah*. 

### `create-report-group`
<a name="codebuild_CreateReportGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-report-group`.

**AWS CLI**  
**Untuk membuat grup laporan di AWS CodeBuild.**  
`create-report-group`Contoh berikut membuat grup laporan baru.  

```
aws codebuild create-report-group \
    --cli-input-json {{file://create-report-group-source.json}}
```
Isi dari create-report-group-source .json:  

```
{
    "name": "cli-created-report-group",
    "type": "TEST",
    "exportConfig": {
        "exportConfigType": "S3",
        "s3Destination": {
            "bucket": "amzn-s3-demo-bucket",
            "path": "",
            "packaging": "ZIP",
            "encryptionDisabled": true
        }
    }
}
```
Output:  

```
{
    "reportGroup": {
        "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group",
        "name": "cli-created-report-group",
        "type": "TEST",
        "exportConfig": {
            "exportConfigType": "S3",
            "s3Destination": {
                "bucket": "amzn-s3-demo-bucket",
                "path": "",
                "packaging": "ZIP",
                "encryptionDisabled": true
            }
        },
        "created": 1602020026.775,
        "lastModified": 1602020026.775
    }
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [CreateReportGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/create-report-group.html)di *Referensi AWS CLI Perintah*. 

### `create-webhook`
<a name="codebuild_CreateWebhook_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-webhook`.

**AWS CLI**  
**Untuk membuat filter webhook untuk sebuah proyek AWS CodeBuild **  
`create-webhook`Contoh berikut membuat webhook untuk CodeBuild proyek bernama `my-project` yang memiliki dua grup filter. Grup filter pertama menentukan permintaan tarik yang dibuat, diperbarui, atau dibuka kembali pada cabang dengan nama referensi Git yang cocok dengan ekspresi reguler `^refs/heads/master$` dan referensi kepala yang cocok. `^refs/heads/myBranch$` Grup filter kedua menentukan permintaan push pada cabang dengan nama referensi Git yang tidak cocok dengan ekspresi `^refs/heads/myBranch$` reguler.  

```
aws codebuild create-webhook \
    --project-name {{my-project}} \
    --filter-groups "[[{\"type\":\"EVENT\",\"pattern\":\"PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED\"},{\"type\":\"HEAD_REF\",\"pattern\":\"^refs/heads/myBranch$\",\"excludeMatchedPattern\":true},{\"type\":\"BASE_REF\",\"pattern\":\"^refs/heads/master$\",\"excludeMatchedPattern\":true}],[{\"type\":\"EVENT\",\"pattern\":\"PUSH\"},{\"type\":\"HEAD_REF\",\"pattern\":\"^refs/heads/myBranch$\",\"excludeMatchedPattern\":true}]]"
```
Output:  

```
{
    "webhook": {
        "payloadUrl": "https://codebuild.us-west-2.amazonaws.com/webhooks?t=eyJlbmNyeXB0ZWREYXRhIjoiVVl5MGtoeGRwSzZFRXl2Wnh4bld1Z0tKZ291TVpQNEtFamQ3RDlDYWpRaGIreVFrdm9EQktIVk1NeHJEWEpmUDUrVUNOMUIyRHJRc1VxcHJ6QlNDSnljPSIsIml2UGFyYW1ldGVyU3BlYyI6InN4Tm1SeUt5MUhaUVRWbGciLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&v=1",
        "url": "https://api.github.com/repos/iversonic/codedeploy-sample/hooks/105190656",
        "lastModifiedSecret": 1556311319.069,
        "filterGroups": [
            [
                {
                    "type": "EVENT",
                    "pattern": "PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED",
                    "excludeMatchedPattern": false
                },
                {
                    "type": "HEAD_REF",
                    "pattern": "refs/heads/myBranch$",
                    "excludeMatchedPattern": true
                },
                {
                    "type": "BASE_REF",
                    "pattern": "refs/heads/master$",
                    "excludeMatchedPattern": true
                }
            ],
            [
                {
                    "type": "EVENT",
                    "pattern": "PUSH",
                    "excludeMatchedPattern": false
                },
                {
                    "type": "HEAD_REF",
                    "pattern": "refs/heads/myBranch$",
                    "excludeMatchedPattern": true
                }
            ]
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Memfilter Acara GitHub Webhook (SDK)](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html#sample-github-pull-request-filter-webhook-events-sdk) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [CreateWebhook](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/create-webhook.html)di *Referensi AWS CLI Perintah*. 

### `delete-build-batch`
<a name="codebuild_DeleteBuildBatch_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-build-batch`.

**AWS CLI**  
**Untuk menghapus batch build in AWS CodeBuild.**  
`delete-build-batch`Contoh berikut menghapus build batch yang ditentukan.  

```
aws codebuild delete-build-batch \
    --id {{<project-name>:<batch-ID>}}
```
Output:  

```
{
    "statusCode": "BATCH_DELETED",
    "buildsDeleted": [
        "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
        "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
        "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
        "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>"
    ],
    "buildsNotDeleted": []
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [DeleteBuildBatch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-build-batch.html)di *Referensi AWS CLI Perintah*. 

### `delete-project`
<a name="codebuild_DeleteProject_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-project`.

**AWS CLI**  
**Untuk menghapus proyek AWS CodeBuild build**  
`delete-project`Contoh berikut menghapus proyek CodeBuild build yang ditentukan.  

```
aws codebuild delete-project --name {{my-project}}
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menghapus Proyek Pembuatan (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/delete-project.html) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [DeleteProject](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-project.html)di *Referensi AWS CLI Perintah*. 

### `delete-report-group`
<a name="codebuild_DeleteReportGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-report-group`.

**AWS CLI**  
**Untuk menghapus grup laporan di AWS CodeBuild.**  
`delete-report-group`Contoh berikut menghapus grup laporan dengan ARN yang ditentukan.  

```
aws codebuild delete-report-group \
    --arn {{arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>}}
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [DeleteReportGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-report-group.html)di *Referensi AWS CLI Perintah*. 

### `delete-report`
<a name="codebuild_DeleteReport_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-report`.

**AWS CLI**  
**Untuk menghapus laporan di AWS CodeBuild.**  
`delete-report`Contoh berikut menghapus laporan yang ditentukan.  

```
aws codebuild delete-report \
    --arn {{arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>}}
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Bekerja dengan laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [DeleteReport](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-report.html)di *Referensi AWS CLI Perintah*. 

### `delete-source-credentials`
<a name="codebuild_DeleteSourceCredentials_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-source-credentials`.

**AWS CLI**  
**Untuk memutuskan sambungan dari penyedia sumber dan menghapus token aksesnya.**  
`delete-source-credentials`Contoh berikut terputus dari penyedia sumber dan menghapus tokennya. ARN kredenal sumber yang digunakan untuk terhubung ke penyedia sumber menentukan kredensi sumber mana.  

```
aws codebuild delete-source-credentials --arn {{arn-of-your-credentials}}
```
Output:  

```
{
    "arn": "arn:aws:codebuild:your-region:your-account-id:token/your-server-type"
}
```
Untuk informasi selengkapnya, lihat [Connect Source Providers with Access Tokens (CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-access-tokens.html#sample-access-tokens-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [DeleteSourceCredentials](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-source-credentials.html)di *Referensi AWS CLI Perintah*. 

### `delete-webhook`
<a name="codebuild_DeleteWebhook_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-webhook`.

**AWS CLI**  
**Untuk menghapus filter webhook dari proyek AWS CodeBuild **  
`delete-webhook`Contoh berikut menghapus webhook dari proyek yang ditentukan CodeBuild .  

```
aws codebuild delete-webhook --project-name {{my-project}}
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Stop Running Builds Automatically (AWS CLI](https://docs.aws.amazon.com/codebuild/latest/userguide/run-build.html#run-build-cli-auto-stop)) di Panduan Pengguna *AWS CodeBuild .*  
+  Untuk detail API, lihat [DeleteWebhook](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/delete-webhook.html)di *Referensi AWS CLI Perintah*. 

### `describe-code-coverages`
<a name="codebuild_DescribeCodeCoverages_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-code-coverages`.

**AWS CLI**  
**Untuk mendapatkan informasi rinci tentang hasil tes cakupan kode di AWS CodeBuild.**  
`describe-code-coverages`Contoh berikut mendapatkan informasi tentang hasil uji cakupan kode dalam laporan yang ditentukan.  

```
aws codebuild describe-code-coverages \
    --report-arn {{arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>}}
```
Output:  

```
{
    "codeCoverages": [
        {
            "id": "20a0adcc-db13-4b66-804b-ecaf9f852855",
            "reportARN": "arn:aws:codebuild:<region-ID>:972506530580:report/<report-group-name>:<report-ID>",
            "filePath": "<source-file-1-path>",
            "lineCoveragePercentage": 83.33,
            "linesCovered": 5,
            "linesMissed": 1,
            "branchCoveragePercentage": 50.0,
            "branchesCovered": 1,
            "branchesMissed": 1,
            "expired": "2020-11-20T21:22:45+00:00"
        },
        {
            "id": "0887162d-bf57-4cf1-a164-e432373d1a83",
            "reportARN": "arn:aws:codebuild:<region-ID>:972506530580:report/<report-group-name>:<report-ID>",
            "filePath": "<source-file-2-path>",
            "lineCoveragePercentage": 90.9,
            "linesCovered": 10,
            "linesMissed": 1,
            "branchCoveragePercentage": 50.0,
            "branchesCovered": 1,
            "branchesMissed": 1,
            "expired": "2020-11-20T21:22:45+00:00"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Laporan cakupan kode](https://docs.aws.amazon.com/codebuild/latest/userguide/code-coverage-report.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [DescribeCodeCoverages](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/describe-code-coverages.html)di *Referensi AWS CLI Perintah*. 

### `describe-test-cases`
<a name="codebuild_DescribeTestCases_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-test-cases`.

**AWS CLI**  
**Untuk mendapatkan informasi rinci tentang kasus uji di AWS CodeBuild.**  
`describe-test-cases`Contoh berikut mendapatkan informasi tentang kasus uji dalam laporan yang ditentukan.  

```
aws codebuild describe-test-cases \
    --report-arn {{arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>}}
```
Output:  

```
{
    "testCases": [
        {
            "reportArn": "arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>",
            "testRawDataPath": "<test-report-path>",
            "prefix": "NUnit.Tests.Assemblies.MockTestFixture",
            "name": "NUnit.Tests.Assemblies.MockTestFixture.NotRunnableTest",
            "status": "ERROR",
            "durationInNanoSeconds": 0,
            "message": "No arguments were provided\n",
            "expired": "2020-11-20T17:52:10+00:00"
        },
        {
            "reportArn": "arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>",
            "testRawDataPath": "<test-report-path>",
            "prefix": "NUnit.Tests.Assemblies.MockTestFixture",
            "name": "NUnit.Tests.Assemblies.MockTestFixture.TestWithException",
            "status": "ERROR",
            "durationInNanoSeconds": 0,
            "message": "System.ApplicationException : Intentional Exception\nat NUnit.Tests.Assemblies.MockTestFixture.MethodThrowsException()\nat NUnit.Tests.Assemblies.MockTestFixture.TestWithException()\n\n",
            "expired": "2020-11-20T17:52:10+00:00"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan pelaporan pengujian AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/test-reporting.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [DescribeTestCases](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/describe-test-cases.html)di *Referensi AWS CLI Perintah*. 

### `import-source-credentials`
<a name="codebuild_ImportSourceCredentials_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`import-source-credentials`.

**AWS CLI**  
**Connect AWS CodeBuild pengguna ke penyedia sumber dengan mengimpor kredensional untuk penyedia sumber.**  
`import-source-credentials`Contoh berikut mengimpor token untuk repositori Bitbucket yang menggunakan BASIC\_AUTH untuk jenis otentikasi.  

```
aws codebuild import-source-credentials --server-type {{BITBUCKET}} --auth-type {{BASIC_AUTH}} --token {{my-Bitbucket-password}} --username {{my-Bitbucket-username}}
```
Output:  

```
{
    "arn": "arn:aws:codebuild:us-west-2:123456789012:token/bitbucket"
}
```
Untuk informasi selengkapnya, lihat [Connect Source Providers with Access Tokens (CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-access-tokens.html#sample-access-tokens-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [ImportSourceCredentials](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/import-source-credentials.html)di *Referensi AWS CLI Perintah*. 

### `invalidate-project-cache`
<a name="codebuild_InvalidateProjectCache_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`invalidate-project-cache`.

**AWS CLI**  
**Untuk mengatur ulang cache untuk proyek AWS CodeBuild build.**  
`invalidate-project-cache`Contoh berikut me-reset cache untuk CodeBuild proyek yang ditentukan.  

```
aws codebuild invalidate-project-cache --project-name {{my-project}}
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Membangun Caching CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/build-caching.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [InvalidateProjectCache](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/invalidate-project-cache.html)di *Referensi AWS CLI Perintah*. 

### `list-build-batches-for-project`
<a name="codebuild_ListBuildBatchesForProject_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-build-batches-for-project`.

**AWS CLI**  
**Untuk membuat daftar build batch untuk proyek build tertentu di AWS CodeBuild.**  
`list-build-batches-for-project`Contoh berikut mencantumkan build CodeBuild batch untuk proyek yang ditentukan.  

```
aws codebuild list-build-batches-for-project \
    --project-name {{"<project-name>"}}
```
Output:  

```
{
    "ids": [
        "<project-name>:<batch-ID>",
        "<project-name>:<batch-ID>"
    ]
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListBuildBatchesForProject](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-build-batches-for-project.html)di *Referensi AWS CLI Perintah*. 

### `list-build-batches`
<a name="codebuild_ListBuildBatches_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-build-batches`.

**AWS CLI**  
**Untuk membuat daftar batch build in AWS CodeBuild.**  
`list-build-batches`Contoh berikut mencantumkan build CodeBuild batch untuk akun saat ini.  

```
aws codebuild list-build-batches
```
Output:  

```
{
    "ids": [
        "<project-name>:<batch-ID>",
        "<project-name>:<batch-ID>"
    ]
}
```
*Untuk informasi selengkapnya, lihat Batch build di AWS CodeBuild < https://docs.aws.amazon.com/codebuild/ latest/userguide/batch -build.html>) \_\_ di Panduan Pengguna.AWS CodeBuild *  
+  Untuk detail API, lihat [ListBuildBatches](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-build-batches.html)di *Referensi AWS CLI Perintah*. 

### `list-builds-for-project`
<a name="codebuild_ListBuildsForProject_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-builds-for-project`.

**AWS CLI**  
**Untuk melihat daftar build untuk proyek AWS CodeBuild build.**  
`list-builds-for-project`Contoh berikut mencantumkan build IDs dalam urutan menurun untuk proyek CodeBuild build yang ditentukan.  

```
aws codebuild list-builds-for-project --project-name {{codebuild-demo-project}} --sort-order {{DESCENDING}}
```
Output:  

```
{
    "ids": [
        "codebuild-demo-project:1a2b3c4d-5678-90ab-cdef-11111example",
        "codebuild-demo-project:1a2b3c4d-5678-90ab-cdef-22222example",
        "codebuild-demo-project:1a2b3c4d-5678-90ab-cdef-33333example",
        "codebuild-demo-project:1a2b3c4d-5678-90ab-cdef-44444example",
        "codebuild-demo-project:1a2b3c4d-5678-90ab-cdef-55555example"
    ]
}
```
*Untuk informasi selengkapnya, lihat [Melihat Daftar Build IDs for a Build Project (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/view-builds-for-project.html#view-builds-for-project-cli) di Panduan Pengguna AWS CodeBuild *  
+  Untuk detail API, lihat [ListBuildsForProject](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-builds-for-project.html)di *Referensi AWS CLI Perintah*. 

### `list-builds`
<a name="codebuild_ListBuilds_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-builds`.

**AWS CLI**  
**Untuk mendapatkan daftar AWS CodeBuild build. IDs**  
`list-builds`Contoh berikut mendapat daftar CodeBuild IDs diurutkan dalam urutan menaik.  

```
aws codebuild list-builds --sort-order {{ASCENDING}}
```
Output mencakup `nextToken` nilai yang menunjukkan bahwa ada lebih banyak output yang tersedia.  

```
{
    "nextToken": "4AEA6u7J...The full token has been omitted for brevity...MzY2OA==",
    "ids": [
        "codebuild-demo-project:815e755f-bade-4a7e-80f0-efe51EXAMPLE"
        "codebuild-demo-project:84a7f3d1-d40e-4956-b4cf-7a9d4EXAMPLE"
            ... The full list of build IDs has been omitted for brevity ...
        "codebuild-demo-project:931d0b72-bf6f-4040-a472-5c707EXAMPLE"
    ]
}
```
Jalankan perintah ini lagi dan berikan `nextToken` nilai dalam respons sebelumnya sebagai parameter untuk mendapatkan bagian berikutnya dari output. Ulangi sampai Anda tidak menerima `nextToken` nilai dalam respons.  

```
aws codebuild list-builds --sort-order {{ASCENDING}} --next-token {{4AEA6u7J...The}} {{full}} {{token}} {{has}} {{been}} {{omitted}} {{for}} {{brevity...MzY2OA==}}
```
Bagian selanjutnya dari output:  

```
{
    "ids": [
        "codebuild-demo-project:49015049-21cf-4b50-9708-df115EXAMPLE",
        "codebuild-demo-project:543e7206-68a3-46d6-a4da-759abEXAMPLE",
            ... The full list of build IDs has been omitted for brevity ...
        "codebuild-demo-project:c282f198-4582-4b38-bdc0-26f96EXAMPLE"
    ]
}
```
*Untuk informasi selengkapnya, [lihat Melihat Daftar Build IDs (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/view-build-list.html) di Panduan Pengguna AWS CodeBuild *  
+  Untuk detail API, lihat [ListBuilds](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-builds.html)di *Referensi AWS CLI Perintah*. 

### `list-curated-environment-images`
<a name="codebuild_ListCuratedEnvironmentImages_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-curated-environment-images`.

**AWS CLI**  
**Untuk mendapatkan daftar gambar Docker AWS CodeBuild yang dikelola olehnya, Anda dapat menggunakannya untuk build Anda.**  
`list-curated-environment-images`Contoh berikut mencantumkan gambar Docker yang dikelola oleh CodeBuild yang dapat digunakan untuk build. :  

```
aws codebuild list-curated-environment-images
```
Output:  

```
{
    "platforms": [
        {
            "platform": "AMAZON_LINUX",
            "languages": [
                {
                    "language": "JAVA",
                    "images": [
                        {
                            "description": "AWS ElasticBeanstalk - Java 7 Running on Amazon Linux 64bit v2.1.3",
                            "name": "aws/codebuild/eb-java-7-amazonlinux-64:2.1.3",
                            "versions": [
                                "aws/codebuild/eb-java-7-amazonlinux-64:2.1.3-1.0.0"
                            ]
                        },
                        {
                            "description": "AWS ElasticBeanstalk - Java 8 Running on Amazon Linux 64bit v2.1.3",
                            "name": "aws/codebuild/eb-java-8-amazonlinux-64:2.1.3",
                            "versions": [
                                "aws/codebuild/eb-java-8-amazonlinux-64:2.1.3-1.0.0"
                            ]
                        },
                        ... LIST TRUNCATED FOR BREVITY ...
                    ]
                }
            ]
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Gambar Docker Disediakan oleh CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) di *AWS CodeBuild Panduan Pengguna*  
+  Untuk detail API, lihat [ListCuratedEnvironmentImages](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-curated-environment-images.html)di *Referensi AWS CLI Perintah*. 

### `list-projects`
<a name="codebuild_ListProjects_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-projects`.

**AWS CLI**  
**Untuk mendapatkan daftar nama proyek AWS CodeBuild build.**  
`list-projects`Contoh berikut mendapatkan daftar proyek CodeBuild build yang diurutkan berdasarkan nama dalam urutan menaik.  

```
aws codebuild list-projects --sort-by {{NAME}} --sort-order {{ASCENDING}}
```
Output mencakup `nextToken` nilai yang menunjukkan bahwa ada lebih banyak output yang tersedia.  

```
{
    "nextToken": "Ci33ACF6...The full token has been omitted for brevity...U+AkMx8=",
    "projects": [
        "codebuild-demo-project",
        "codebuild-demo-project2",
            ... The full list of build project names has been omitted for brevity ...
        "codebuild-demo-project99"
    ]
}
```
Jalankan perintah ini lagi dan berikan `nextToken` nilai dari respons sebelumnya sebagai parameter untuk mendapatkan bagian berikutnya dari output. Ulangi sampai Anda tidak menerima `nextToken` nilai dalam respons.  

```
aws codebuild list-projects  --sort-by {{NAME}} --sort-order {{ASCENDING}} --next-token {{Ci33ACF6...The}} {{full}} {{token}} {{has}} {{been}} {{omitted}} {{for}} {{brevity...U+AkMx8=}}

{{{}}
    "projects": {{[}}
        "codebuild-demo-project100",
        "codebuild-demo-project101",
            {{...}} {{The}} {{full}} {{list}} {{of}} {{build}} {{project}} {{names}} {{has}} {{been}} {{omitted}} {{for}} {{brevity}} {{...}}
        {{"codebuild-demo-project122"}}
    {{]}}
{{}}}
```
Untuk informasi selengkapnya, [lihat Melihat Daftar Nama Proyek Build (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/view-project-list.html#view-project-list-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [ListProjects](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-projects.html)di *Referensi AWS CLI Perintah*. 

### `list-report-groups`
<a name="codebuild_ListReportGroups_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-report-groups`.

**AWS CLI**  
**Untuk mendapatkan daftar grup laporan ARNs di AWS CodeBuild.**  
`list-report-groups`Contoh berikut mengambil grup laporan ARNs untuk akun di wilayah tersebut.  

```
aws codebuild list-report-groups
```
Output:  

```
{
    "reportGroups": [
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-1",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-2",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-3"
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListReportGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-report-groups.html)di *Referensi AWS CLI Perintah*. 

### `list-reports-for-report-group`
<a name="codebuild_ListReportsForReportGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-reports-for-report-group`.

**AWS CLI**  
**Untuk mendapatkan daftar laporan dalam grup laporan di AWS CodeBuild.**  
`list-report-for-report-groups`Contoh berikut mengambil laporan dalam grup laporan yang ditentukan untuk akun di wilayah tersebut.  

```
aws codebuild list-reports-for-report-group \
    --report-group-arn {{arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>}}
```
Output:  

```
{
    "reports": [
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-1",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-2",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-3"
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListReportsForReportGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-reports-for-report-group.html)di *Referensi AWS CLI Perintah*. 

### `list-reports`
<a name="codebuild_ListReports_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-reports`.

**AWS CLI**  
**Untuk mendapatkan daftar laporan untuk akun saat ini di AWS CodeBuild.**  
`list-reports`Contoh berikut mengambil laporan untuk akun saat ini. ARNs   

```
aws codebuild list-reports
```
Output:  

```
{
    "reports": [
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>"
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListReports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-reports.html)di *Referensi AWS CLI Perintah*. 

### `list-shared-projects`
<a name="codebuild_ListSharedProjects_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-shared-projects`.

**AWS CLI**  
**Untuk membuat daftar proyek bersama di AWS CodeBuild.**  
`list-shared-projects`Contoh berikut mencantumkan proyek CodeBuild bersama yang tersedia untuk akun saat ini.  

```
aws codebuild list-shared-projects
```
Output:  

```
{
    "projects": [
        "arn:aws:codebuild:<region-ID>:<account-ID>:project/<shared-project-name-1>",
        "arn:aws:codebuild:<region-ID>:<account-ID>:project/<shared-project-name-2>"
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan proyek bersama](https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListSharedProjects](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-shared-projects.html)di *Referensi AWS CLI Perintah*. 

### `list-shared-report-groups`
<a name="codebuild_ListSharedReportGroups_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-shared-report-groups`.

**AWS CLI**  
**Untuk mendapatkan daftar grup laporan bersama ARNs di AWS CodeBuild.**  
`list-shared-report-groups`Contoh berikut mengambil grup laporan ARNs untuk akun di wilayah tersebut.  

```
aws codebuild list-shared-report-groups
```
Output:  

```
{
    "reportGroups": [
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-1",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-2",
        "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-3"
    ]
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [ListSharedReportGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-shared-report-groups.html)di *Referensi AWS CLI Perintah*. 

### `list-source-credentials`
<a name="codebuild_ListSourceCredentials_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-source-credentials`.

**AWS CLI**  
**Untuk melihat daftar sourceCredentialsObjects**  
`list-source-credentials`Contoh berikut mencantumkan token untuk AWS akun yang terhubung ke satu akun Bitbucket dan satu GitHub akun. Setiap `sourceCredentialsInfos` objek dalam respon berisi informasi kredensial sumber yang terhubung.  

```
aws codebuild list-source-credentials
```
Output:  

```
{
    "sourceCredentialsInfos": [
        {
            "serverType": "BITBUCKET",
            "arn": "arn:aws:codebuild:us-west-2:123456789012:token/bitbucket",
            "authType": "BASIC_AUTH"
        },
        {
            "serverType": "GITHUB",
            "arn": "arn:aws:codebuild:us-west-2:123456789012:token/github",
            "authType": "OAUTH"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Connect Source Providers with Access Tokens (CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-access-tokens.html#sample-access-tokens-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [ListSourceCredentials](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/list-source-credentials.html)di *Referensi AWS CLI Perintah*. 

### `retry-build-batch`
<a name="codebuild_RetryBuildBatch_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`retry-build-batch`.

**AWS CLI**  
**Untuk mencoba lagi pembuatan batch yang gagal. AWS CodeBuild**  
`retry-build-batch`Contoh berikut memulai ulang build batch yang ditentukan.  

```
aws codebuild retry-build-batch \
    --id {{<project-name>:<batch-ID>}}
```
Output:  

```
{
    "buildBatch": {
        "id": "<project-name>:<batch-ID>",
        "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
        "startTime": "2020-10-21T17:26:23.099000+00:00",
        "currentPhase": "SUBMITTED",
        "buildBatchStatus": "IN_PROGRESS",
        "resolvedSourceVersion": "3a9e11cb419e8fff14b03883dc4e64f6155aaa7e",
        "projectName": "<project-name>",
        "phases": [
            {
                "phaseType": "SUBMITTED",
                "phaseStatus": "SUCCEEDED",
                "startTime": "2020-10-21T17:26:23.099000+00:00",
                "endTime": "2020-10-21T17:26:23.457000+00:00",
                "durationInSeconds": 0
            },
            {
                "phaseType": "DOWNLOAD_BATCHSPEC",
                "phaseStatus": "SUCCEEDED",
                "startTime": "2020-10-21T17:26:23.457000+00:00",
                "endTime": "2020-10-21T17:26:54.902000+00:00",
                "durationInSeconds": 31
            },
            {
                "phaseType": "IN_PROGRESS",
                "phaseStatus": "CLIENT_ERROR",
                "startTime": "2020-10-21T17:26:54.902000+00:00",
                "endTime": "2020-10-21T17:28:16.060000+00:00",
                "durationInSeconds": 81
            },
            {
                "phaseType": "FAILED",
                "phaseStatus": "RETRY",
                "startTime": "2020-10-21T17:28:16.060000+00:00",
                "endTime": "2020-10-21T17:29:39.709000+00:00",
                "durationInSeconds": 83
            },
            {
                "phaseType": "SUBMITTED",
                "startTime": "2020-10-21T17:29:39.709000+00:00"
            }
        ],
        "source": {
            "type": "GITHUB",
            "location": "https://github.com/strohm-a/<project-name>-graph.git",
            "gitCloneDepth": 1,
            "gitSubmodulesConfig": {
                "fetchSubmodules": false
            },
            "reportBuildStatus": false,
            "insecureSsl": false
        },
        "secondarySources": [],
        "secondarySourceVersions": [],
        "artifacts": {
            "location": ""
        },
        "secondaryArtifacts": [],
        "cache": {
            "type": "NO_CACHE"
        },
        "environment": {
            "type": "LINUX_CONTAINER",
            "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
            "computeType": "BUILD_GENERAL1_SMALL",
            "environmentVariables": [],
            "privilegedMode": false,
            "imagePullCredentialsType": "CODEBUILD"
        },
        "logConfig": {
            "cloudWatchLogs": {
                "status": "ENABLED"
            },
            "s3Logs": {
                "status": "DISABLED",
                "encryptionDisabled": false
            }
        },
        "buildTimeoutInMinutes": 60,
        "queuedTimeoutInMinutes": 480,
        "complete": false,
        "initiator": "<username>",
        "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
        "buildBatchNumber": 4,
        "buildBatchConfig": {
            "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<project-name>",
            "restrictions": {
                "maximumBuildsAllowed": 100
            },
            "timeoutInMins": 480
        },
        "buildGroups": [
            {
                "identifier": "DOWNLOAD_SOURCE",
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T17:26:23.889000+00:00",
                    "buildStatus": "SUCCEEDED",
                    "primaryArtifact": {
                        "type": "no_artifacts",
                        "identifier": "DOWNLOAD_SOURCE"
                    },
                    "secondaryArtifacts": []
                }
            },
            {
                "identifier": "linux_small",
                "dependsOn": [],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T17:26:55.115000+00:00",
                    "buildStatus": "FAILED",
                    "primaryArtifact": {
                        "type": "no_artifacts",
                        "identifier": "linux_small"
                    },
                    "secondaryArtifacts": []
                }
            },
            {
                "identifier": "linux_medium",
                "dependsOn": [
                    "linux_small"
                ],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T17:26:54.594000+00:00",
                    "buildStatus": "STOPPED"
                }
            },
            {
                "identifier": "linux_large",
                "dependsOn": [
                    "linux_medium"
                ],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T17:26:54.701000+00:00",
                    "buildStatus": "STOPPED"
                }
            }
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [RetryBuildBatch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/retry-build-batch.html)di *Referensi AWS CLI Perintah*. 

### `retry-build`
<a name="codebuild_RetryBuild_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`retry-build`.

**AWS CLI**  
**Untuk mencoba lagi build in AWS CodeBuild yang gagal.**  
`retry-build`Contoh berikut memulai ulang build yang ditentukan.  

```
aws codebuild retry-build \
    --id {{<project-name>:<build-ID>}}
```
Output:  

```
{
    "build": {
        "id": "<project-name>:<build-ID>",
        "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
        "buildNumber": 9,
        "startTime": "2020-10-21T17:51:38.161000+00:00",
        "currentPhase": "QUEUED",
        "buildStatus": "IN_PROGRESS",
        "projectName": "<project-name>",
        "phases": [
            {
                "phaseType": "SUBMITTED",
                "phaseStatus": "SUCCEEDED",
                "startTime": "2020-10-21T17:51:38.161000+00:00",
                "endTime": "2020-10-21T17:51:38.210000+00:00",
                "durationInSeconds": 0
            },
            {
                "phaseType": "QUEUED",
                "startTime": "2020-10-21T17:51:38.210000+00:00"
            }
        ],
        "source": {
            "type": "GITHUB",
            "location": "<GitHub-repo-URL>",
            "gitCloneDepth": 1,
            "gitSubmodulesConfig": {
                "fetchSubmodules": false
            },
            "reportBuildStatus": false,
            "insecureSsl": false
        },
        "secondarySources": [],
        "secondarySourceVersions": [],
        "artifacts": {
            "location": ""
        },
        "secondaryArtifacts": [],
        "cache": {
            "type": "NO_CACHE"
        },
        "environment": {
            "type": "LINUX_CONTAINER",
            "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
            "computeType": "BUILD_GENERAL1_SMALL",
            "environmentVariables": [],
            "privilegedMode": false,
            "imagePullCredentialsType": "CODEBUILD"
        },
        "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<service-role-name>",
        "logs": {
            "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=<region-ID>#logEvent:group=null;stream=null",
            "cloudWatchLogsArn": "arn:aws:logs:<region-ID>:<account-ID>:log-group:null:log-stream:null",
            "cloudWatchLogs": {
                "status": "ENABLED"
            },
            "s3Logs": {
                "status": "DISABLED",
                "encryptionDisabled": false
            }
        },
        "timeoutInMinutes": 60,
        "queuedTimeoutInMinutes": 480,
        "buildComplete": false,
        "initiator": "<username>",
        "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3"
    }
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [RetryBuild](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/retry-build.html)di *Referensi AWS CLI Perintah*. 

### `start-build-batch`
<a name="codebuild_StartBuildBatch_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`start-build-batch`.

**AWS CLI**  
**Untuk memulai pembuatan batch AWS CodeBuild.**  
`start-build-batch`Contoh berikut memulai batch build dari proyek yang ditentukan.  

```
aws codebuild start-build-batch \
    --project-name {{<project-name>}}
```
Output:  

```
{
    "buildBatch": {
        "id": "<project-name>:<batch-ID>",
        "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
        "startTime": "2020-10-21T16:54:24.740000+00:00",
        "currentPhase": "SUBMITTED",
        "buildBatchStatus": "IN_PROGRESS",
        "projectName": "<project-name>",
        "source": {
            "type": "GITHUB",
            "location": "<GitHub-repo-URL>",
            "gitCloneDepth": 1,
            "gitSubmodulesConfig": {
                "fetchSubmodules": false
            },
            "reportBuildStatus": false,
            "insecureSsl": false
        },
        "secondarySources": [],
        "secondarySourceVersions": [],
        "artifacts": {
            "location": ""
        },
        "secondaryArtifacts": [],
        "cache": {
            "type": "NO_CACHE"
        },
        "environment": {
            "type": "LINUX_CONTAINER",
            "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
            "computeType": "BUILD_GENERAL1_SMALL",
            "environmentVariables": [],
            "privilegedMode": false,
            "imagePullCredentialsType": "CODEBUILD"
        },
        "logConfig": {
            "cloudWatchLogs": {
                "status": "ENABLED"
            },
            "s3Logs": {
                "status": "DISABLED",
                "encryptionDisabled": false
            }
        },
        "buildTimeoutInMinutes": 60,
        "queuedTimeoutInMinutes": 480,
        "complete": false,
        "initiator": "<username>",
        "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
        "buildBatchNumber": 3,
        "buildBatchConfig": {
            "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<service-role-name>",
            "restrictions": {
                "maximumBuildsAllowed": 100
            },
            "timeoutInMins": 480
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [StartBuildBatch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/start-build-batch.html)di *Referensi AWS CLI Perintah*. 

### `start-build`
<a name="codebuild_StartBuild_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`start-build`.

**AWS CLI**  
**Untuk mulai menjalankan build proyek AWS CodeBuild build.**  
`start-build`Contoh berikut memulai build untuk CodeBuild proyek yang ditentukan. Build mengesampingkan pengaturan proyek selama beberapa menit build diizinkan untuk antri sebelum waktu habis dan pengaturan artefak proyek.  

```
aws codebuild start-build \
    --project-name {{"my-demo-project"}} \
    --queued-timeout-in-minutes-override {{5}} \
    --artifacts-override {"\"type\": \"S3\",\"location\": \"arn:aws:s3:::artifacts-override\",\"overrideArtifactName\":true"}
```
Output:  

```
{
    "build": {
        "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
        "buildStatus": "IN_PROGRESS",
        "buildComplete": false,
        "projectName": "my-demo-project",
        "timeoutInMinutes": 60,
        "source": {
            "insecureSsl": false,
            "type": "S3",
            "location": "codebuild-us-west-2-123456789012-input-bucket/my-source.zip"
        },
        "queuedTimeoutInMinutes": 5,
        "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
        "currentPhase": "QUEUED",
        "startTime": 1556905683.568,
        "environment": {
            "computeType": "BUILD_GENERAL1_MEDIUM",
            "environmentVariables": [],
            "type": "LINUX_CONTAINER",
            "privilegedMode": false,
            "image": "aws/codebuild/standard:1.0",
            "imagePullCredentialsType": "CODEBUILD"
        },
        "phases": [
            {
                "phaseStatus": "SUCCEEDED",
                "startTime": 1556905683.568,
                "phaseType": "SUBMITTED",
                "durationInSeconds": 0,
                "endTime": 1556905684.524
            },
            {
                "startTime": 1556905684.524,
                "phaseType": "QUEUED"
            }
        ],
        "logs": {
            "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=null;stream=null"
        },
        "artifacts": {
            "encryptionDisabled": false,
            "location": "arn:aws:s3:::artifacts-override/my-demo-project",
            "overrideArtifactName": true
        },
        "cache": {
            "type": "NO_CACHE"
        },
        "id": "my-demo-project::12345678-a1b2-c3d4-e5f6-11111EXAMPLE",
        "initiator": "my-aws-account-name",
        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/my-demo-project::12345678-a1b2-c3d4-e5f6-11111EXAMPLE"
    }
}
```
Untuk informasi selengkapnya, lihat [Menjalankan Build (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/run-build.html#run-build-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [StartBuild](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/start-build.html)di *Referensi AWS CLI Perintah*. 

### `stop-build-batch`
<a name="codebuild_StopBuildBatch_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`stop-build-batch`.

**AWS CLI**  
**Untuk menghentikan pembuatan batch yang sedang berlangsung. AWS CodeBuild**  
`stop-build-batch`Contoh berikut menghentikan build batch yang ditentukan.  

```
aws codebuild stop-build-batch \
    --id {{<project-name>:<batch-ID>}}
```
Output:  

```
{
    "buildBatch": {
        "id": "<project-name>:<batch-ID>",
        "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
        "startTime": "2020-10-21T16:54:24.740000+00:00",
        "endTime": "2020-10-21T16:56:05.152000+00:00",
        "currentPhase": "STOPPED",
        "buildBatchStatus": "STOPPED",
        "resolvedSourceVersion": "aef7744ed069c51098e15c360f4102cd2cd1ad64",
        "projectName": "<project-name>",
        "phases": [
            {
                "phaseType": "SUBMITTED",
                "phaseStatus": "SUCCEEDED",
                "startTime": "2020-10-21T16:54:24.740000+00:00",
                "endTime": "2020-10-21T16:54:25.039000+00:00",
                "durationInSeconds": 0
            },
            {
                "phaseType": "DOWNLOAD_BATCHSPEC",
                "phaseStatus": "SUCCEEDED",
                "startTime": "2020-10-21T16:54:25.039000+00:00",
                "endTime": "2020-10-21T16:54:56.583000+00:00",
                "durationInSeconds": 31
            },
            {
                "phaseType": "IN_PROGRESS",
                "phaseStatus": "STOPPED",
                "startTime": "2020-10-21T16:54:56.583000+00:00",
                "endTime": "2020-10-21T16:56:05.152000+00:00",
                "durationInSeconds": 68
            },
            {
                "phaseType": "STOPPED",
                "startTime": "2020-10-21T16:56:05.152000+00:00"
            }
        ],
        "source": {
            "type": "GITHUB",
            "location": "<GitHub-repo-URL>",
            "gitCloneDepth": 1,
            "gitSubmodulesConfig": {
                "fetchSubmodules": false
            },
            "reportBuildStatus": false,
            "insecureSsl": false
        },
        "secondarySources": [],
        "secondarySourceVersions": [],
        "artifacts": {
            "location": ""
        },
        "secondaryArtifacts": [],
        "cache": {
            "type": "NO_CACHE"
        },
        "environment": {
            "type": "LINUX_CONTAINER",
            "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
            "computeType": "BUILD_GENERAL1_SMALL",
            "environmentVariables": [],
            "privilegedMode": false,
            "imagePullCredentialsType": "CODEBUILD"
        },
        "logConfig": {
            "cloudWatchLogs": {
                "status": "ENABLED"
            },
            "s3Logs": {
                "status": "DISABLED",
                "encryptionDisabled": false
            }
        },
        "buildTimeoutInMinutes": 60,
        "queuedTimeoutInMinutes": 480,
        "complete": true,
        "initiator": "Strohm",
        "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
        "buildBatchNumber": 3,
        "buildBatchConfig": {
            "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<project-name>",
            "restrictions": {
                "maximumBuildsAllowed": 100
            },
            "timeoutInMins": 480
        },
        "buildGroups": [
            {
                "identifier": "DOWNLOAD_SOURCE",
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T16:54:25.468000+00:00",
                    "buildStatus": "SUCCEEDED",
                    "primaryArtifact": {
                        "type": "no_artifacts",
                        "identifier": "DOWNLOAD_SOURCE"
                    },
                    "secondaryArtifacts": []
                }
            },
            {
                "identifier": "linux_small",
                "dependsOn": [],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T16:54:56.833000+00:00",
                    "buildStatus": "IN_PROGRESS"
                }
            },
            {
                "identifier": "linux_medium",
                "dependsOn": [
                    "linux_small"
                ],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T16:54:56.211000+00:00",
                    "buildStatus": "PENDING"
                }
            },
            {
                "identifier": "linux_large",
                "dependsOn": [
                    "linux_medium"
                ],
                "ignoreFailure": false,
                "currentBuildSummary": {
                    "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
                    "requestedOn": "2020-10-21T16:54:56.330000+00:00",
                    "buildStatus": "PENDING"
                }
            }
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Batch build AWS CodeBuild di](https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html) *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [StopBuildBatch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/stop-build-batch.html)di *Referensi AWS CLI Perintah*. 

### `stop-build`
<a name="codebuild_StopBuild_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`stop-build`.

**AWS CLI**  
**Untuk menghentikan pembangunan proyek AWS CodeBuild pembangunan.**  
`stop-build`Contoh berikut menghentikan CodeBuild build yang ditentukan.  

```
aws codebuild stop-build --id {{my-demo-project:12345678-a1b2-c3d4-e5f6-11111EXAMPLE}}
```
Output:  

```
{
    "build": {
        "startTime": 1556906956.318,
        "initiator": "my-aws-account-name",
        "projectName": "my-demo-project",
        "currentPhase": "COMPLETED",
        "cache": {
            "type": "NO_CACHE"
        },
        "source": {
            "insecureSsl": false,
            "location": "codebuild-us-west-2-123456789012-input-bucket/my-source.zip",
            "type": "S3"
        },
        "id": "my-demo-project:1a2b3c4d-5678-90ab-cdef-11111EXAMPLE",
        "endTime": 1556906974.781,
        "phases": [
            {
                "durationInSeconds": 0,
                "phaseType": "SUBMITTED",
                "endTime": 1556906956.935,
                "phaseStatus": "SUCCEEDED",
                "startTime": 1556906956.318
            },
            {
                "durationInSeconds": 1,
                "phaseType": "QUEUED",
                "endTime": 1556906958.272,
                "phaseStatus": "SUCCEEDED",
                "startTime": 1556906956.935
            },
            {
                "phaseType": "PROVISIONING",
                "phaseStatus": "SUCCEEDED",
                "durationInSeconds": 14,
                "contexts": [
                    {
                        "message": "",
                        "statusCode": ""
                    }
                ],
                "endTime": 1556906972.847,
                "startTime": 1556906958.272
            },
            {
                "phaseType": "DOWNLOAD_SOURCE",
                "phaseStatus": "SUCCEEDED",
                "durationInSeconds": 0,
                "contexts": [
                        {
                        "message": "",
                        "statusCode": ""
                    }
                ],
                "endTime": 1556906973.552,
                "startTime": 1556906972.847
            },
            {
                "phaseType": "INSTALL",
                "phaseStatus": "SUCCEEDED",
                "durationInSeconds": 0,
                "contexts": [
                    {
                        "message": "",
                        "statusCode": ""
                    }
                ],
                "endTime": 1556906973.75,
                "startTime": 1556906973.552
            },
            {
                "phaseType": "PRE_BUILD",
                "phaseStatus": "SUCCEEDED",
                "durationInSeconds": 0,
                "contexts": [
                    {
                        "message": "",
                        "statusCode": ""
                    }
                ],
                "endTime": 1556906973.937,
                "startTime": 1556906973.75
            },
            {
                "durationInSeconds": 0,
                "phaseType": "BUILD",
                "endTime": 1556906974.781,
                "phaseStatus": "STOPPED",
                "startTime": 1556906973.937
            },
            {
                "phaseType": "COMPLETED",
                "startTime": 1556906974.781
            }
        ],
        "artifacts": {
            "location": "arn:aws:s3:::artifacts-override/my-demo-project",
            "encryptionDisabled": false,
            "overrideArtifactName": true
        },
        "buildComplete": true,
        "buildStatus": "STOPPED",
        "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
        "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
        "queuedTimeoutInMinutes": 5,
        "timeoutInMinutes": 60,
        "environment": {
            "type": "LINUX_CONTAINER",
            "environmentVariables": [],
            "computeType": "BUILD_GENERAL1_MEDIUM",
            "privilegedMode": false,
            "image": "aws/codebuild/standard:1.0",
            "imagePullCredentialsType": "CODEBUILD"
        },
        "logs": {
            "streamName": "1a2b3c4d-5678-90ab-cdef-11111EXAMPLE",
            "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=/aws/codebuild/my-demo-project;stream=1a2b3c4d-5678-90ab-cdef-11111EXAMPLE",
            "groupName": "/aws/codebuild/my-demo-project"
        },
        "arn": "arn:aws:codebuild:us-west-2:123456789012:build/my-demo-project:1a2b3c4d-5678-90ab-cdef-11111EXAMPLE"
    }
}
```
Untuk informasi selengkapnya, lihat [Menghentikan Build (AWS CLI)](https://docs.aws.amazon.com/codebuild/latest/userguide/stop-build.html#stop-build-cli) di *AWS CodeBuild Panduan Pengguna*.  
+  Untuk detail API, lihat [StopBuild](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/stop-build.html)di *Referensi AWS CLI Perintah*. 

### `update-project`
<a name="codebuild_UpdateProject_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-project`.

**AWS CLI**  
**Untuk mengubah pengaturan proyek AWS CodeBuild build.**  
`update-project`Contoh berikut mengubah pengaturan proyek CodeBuild build yang ditentukan bernama my-demo-project.  

```
aws codebuild update-project --name {{"my-demo-project"}} \
    --description {{"This project is updated"}} \
    --source "{\"type\": \"S3\",\"location\": \"codebuild-us-west-2-123456789012-input-bucket/my-source-2.zip\"}" \
    --artifacts {"\"type\": \"S3\",\"location\": \"codebuild-us-west-2-123456789012-output-bucket-2\""} \
    --environment "{\"type\": \"LINUX_CONTAINER\",\"image\": \"aws/codebuild/standard:1.0\",\"computeType\": \"BUILD_GENERAL1_MEDIUM\"}" \
    --service-role {{"arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role"}}
```
Output menampilkan pengaturan yang diperbarui.  

```
{
    "project": {
        "arn": "arn:aws:codebuild:us-west-2:123456789012:project/my-demo-project",
        "environment": {
            "privilegedMode": false,
            "environmentVariables": [],
            "type": "LINUX_CONTAINER",
            "image": "aws/codebuild/standard:1.0",
            "computeType": "BUILD_GENERAL1_MEDIUM",
            "imagePullCredentialsType": "CODEBUILD"
        },
        "queuedTimeoutInMinutes": 480,
        "description": "This project is updated",
        "artifacts": {
            "packaging": "NONE",
            "name": "my-demo-project",
            "type": "S3",
            "namespaceType": "NONE",
            "encryptionDisabled": false,
            "location": "codebuild-us-west-2-123456789012-output-bucket-2"
        },
        "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
        "badge": {
            "badgeEnabled": false
        },
        "serviceRole": "arn:aws:iam::123456789012:role/service-role/my-codebuild-service-role",
        "lastModified": 1556840545.967,
        "tags": [],
        "timeoutInMinutes": 60,
        "created": 1556839783.274,
        "name": "my-demo-project",
        "cache": {
            "type": "NO_CACHE"
        },
        "source": {
            "type": "S3",
            "insecureSsl": false,
            "location": "codebuild-us-west-2-123456789012-input-bucket/my-source-2.zip"
        }
    }
}
```
*Untuk informasi selengkapnya, lihat [Mengubah Setelan (AWS CLI) Build Project](https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-cli) di Panduan Pengguna AWS CodeBuild *  
+  Untuk detail API, lihat [UpdateProject](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/update-project.html)di *Referensi AWS CLI Perintah*. 

### `update-report-group`
<a name="codebuild_UpdateReportGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-report-group`.

**AWS CLI**  
**Untuk memperbarui grup laporan di AWS CodeBuild.**  
`update-report-group`Contoh berikut mengubah jenis ekspor grup laporan menjadi “NO\_EXPORT”.  

```
aws codebuild update-report-group \
    --arn {{arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group}} \
    --export-config="exportConfigType=NO_EXPORT"
```
Output:  

```
{
    "reportGroup": {
        "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group",
        "name": "cli-created-report-group",
        "type": "TEST",
        "exportConfig": {
            "exportConfigType": "NO_EXPORT"
        },
        "created": 1602020686.009,
        "lastModified": 1602021033.454,
        "tags": []
    }
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan grup laporan](https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html) di *Panduan AWS CodeBuild Pengguna*.  
+  Untuk detail API, lihat [UpdateReportGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/update-report-group.html)di *Referensi AWS CLI Perintah*. 

### `update-webhook`
<a name="codebuild_UpdateWebhook_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-webhook`.

**AWS CLI**  
**Untuk memperbarui webhook untuk sebuah proyek AWS CodeBuild **  
`update-webhook`Contoh berikut memperbarui webhook untuk CodeBuild proyek yang ditentukan dengan dua grup filter. `--rotate-secret`Parameter menentukan bahwa GitHub memutar kunci rahasia proyek setiap kali perubahan kode memicu build. Grup filter pertama menentukan permintaan tarik yang dibuat, diperbarui, atau dibuka kembali pada cabang dengan nama referensi Git yang cocok dengan ekspresi reguler `^refs/heads/master$` dan referensi kepala yang cocok. `^refs/heads/myBranch$` Grup filter kedua menentukan permintaan push pada cabang dengan nama referensi Git yang tidak cocok dengan ekspresi `^refs/heads/myBranch$` reguler.  

```
aws codebuild update-webhook \
    --project-name {{Project2}} \
    --rotate-secret \
    --filter-groups "[[{\"type\":\"EVENT\",\"pattern\":\"PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED\"},{\"type\":\"HEAD_REF\",\"pattern\":\"^refs/heads/myBranch$\",\"excludeMatchedPattern\":true},{\"type\":\"BASE_REF\",\"pattern\":\"^refs/heads/master$\",\"excludeMatchedPattern\":true}],[{\"type\":\"EVENT\",\"pattern\":\"PUSH\"},{\"type\":\"HEAD_REF\",\"pattern\":\"^refs/heads/myBranch$\",\"excludeMatchedPattern\":true}]]"
```
Output:  

```
{
    "webhook": {
        "filterGroups": [
            [
                {
                    "pattern": "PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED",
                    "type": "EVENT"
                },
                {
                    "excludeMatchedPattern": true,
                    "pattern": "refs/heads/myBranch$",
                    "type": "HEAD_REF"
                },
                {
                    "excludeMatchedPattern": true,
                    "pattern": "refs/heads/master$",
                    "type": "BASE_REF"
                }
            ],
            [
                {
                    "pattern": "PUSH",
                    "type": "EVENT"
                },
                {
                    "excludeMatchedPattern": true,
                    "pattern": "refs/heads/myBranch$",
                    "type": "HEAD_REF"
                }
            ]
        ],
        "lastModifiedSecret": 1556312220.133
    }
}
```
*Untuk informasi selengkapnya, lihat [Mengubah Setelan (AWS CLI) Build Project](https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-cli) di Panduan Pengguna AWS CodeBuild *  
+  Untuk detail API, lihat [UpdateWebhook](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/update-webhook.html)di *Referensi AWS CLI Perintah*. 