

# AWS CLI를 사용한 CodeCommit 예시
<a name="cli_codecommit_code_examples"></a>

다음 코드 예시에서는 CodeCommit에서 AWS Command Line Interface를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

### `associate-approval-rule-template-with-repository`
<a name="codecommit_AssociateApprovalRuleTemplateWithRepository_cli_topic"></a>

다음 코드 예시에서는 `associate-approval-rule-template-with-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿을 리포지토리와 연결**  
다음 `associate-approval-rule-template-with-repository` 예시는 지정된 승인 규칙 템플릿을 `MyDemoRepo` 리포지토리와 연결합니다.  

```
aws codecommit associate-approval-rule-template-with-repository \
    --repository-name MyDemoRepo  \
    --approval-rule-template-name 2-approver-rule-for-main
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Associate an Approval Rule Template with a Repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-associate-template.html#associate-template-repository) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [AssociateApprovalRuleTemplateWithRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/associate-approval-rule-template-with-repository.html) 섹션을 참조하세요.

### `batch-associate-approval-rule-template-with-repositories`
<a name="codecommit_BatchAssociateApprovalRuleTemplateWithRepositories_cli_topic"></a>

다음 코드 예시에서는 `batch-associate-approval-rule-template-with-repositories`의 사용 방법을 보여줍니다.

**AWS CLI**  
**한 번의 작업으로 승인 규칙 템플릿을 여러 리포지토리와 연결**  
다음 `batch-associate-approval-rule-template-with-repositories` 예시에서는 지정된 승인 규칙 템플릿을 `MyDemoRepo` 및 `MyOtherDemoRepo` 리포지토리와 연결합니다.  
참고: 승인 규칙 템플릿은 해당 템플릿이 생성된 AWS 리전에만 적용됩니다. 해당 AWS 리전의 리포지토리에만 연결할 수 있습니다.  

```
aws codecommit batch-associate-approval-rule-template-with-repositories \
    --repository-names MyDemoRepo, MyOtherDemoRepo  \
    --approval-rule-template-name 2-approver-rule-for-main
```
출력:  

```
{
    "associatedRepositoryNames": [
        "MyDemoRepo",
        "MyOtherDemoRepo"
    ],
    "errors": []
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Associate an Approval Rule Template with a Repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-associate-template.html#batch-associate-template-repositories) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchAssociateApprovalRuleTemplateWithRepositories](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/batch-associate-approval-rule-template-with-repositories.html) 섹션을 참조하세요.

### `batch-describe-merge-conflicts`
<a name="codecommit_BatchDescribeMergeConflicts_cli_topic"></a>

다음 코드 예시에서는 `batch-describe-merge-conflicts`의 사용 방법을 보여줍니다.

**AWS CLI**  
**두 커밋 지정자 간의 병합에서 모든 파일 또는 파일 하위 세트의 병합 충돌에 대한 정보 가져오기**  
다음 `batch-describe-merge-conflicts` 예시에서는 `MyDemoRepo` 리포지토리에서 `THREE_WAY_MERGE` 전략을 사용하여 `feature-randomizationfeature` 소스 브랜치를 `main` 대상 브랜치와 병합할 때 병합 충돌을 확인합니다.  

```
aws codecommit batch-describe-merge-conflicts \
    --source-commit-specifier feature-randomizationfeature \
    --destination-commit-specifier main \
    --merge-option THREE_WAY_MERGE \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "conflicts": [
        {
            "conflictMetadata": {
                "filePath": "readme.md",
                "fileSizes": {
                    "source": 139,
                    "destination": 230,
                    "base": 85
                },
                "fileModes": {
                    "source": "NORMAL",
                    "destination": "NORMAL",
                    "base": "NORMAL"
                },
                "objectTypes": {
                    "source": "FILE",
                    "destination": "FILE",
                    "base": "FILE"
                },
                "numberOfConflicts": 1,
                "isBinaryFile": {
                    "source": false,
                    "destination": false,
                    "base": false
                },
                "contentConflict": true,
                "fileModeConflict": false,
                "objectTypeConflict": false,
                "mergeOperations": {
                    "source": "M",
                    "destination": "M"
                }
            },
            "mergeHunks": [
                {
                    "isConflict": true,
                    "source": {
                        "startLine": 0,
                        "endLine": 3,
                        "hunkContent": "VGhpcyBpEXAMPLE=="
                    },
                    "destination": {
                        "startLine": 0,
                        "endLine": 1,
                        "hunkContent": "VXNlIHRoEXAMPLE="
                    }
                }
            ]
        }
    ],
    "errors": [],
    "destinationCommitId": "86958e0aEXAMPLE",
    "sourceCommitId": "6ccd57fdEXAMPLE",
    "baseCommitId": "767b6958EXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Resolve Conflicts in a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-resolve-conflict-pull-request.html#batch-describe-merge-conflicts) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchDescribeMergeConflicts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/batch-describe-merge-conflicts.html) 섹션을 참조하세요.

### `batch-disassociate-approval-rule-template-from-repositories`
<a name="codecommit_BatchDisassociateApprovalRuleTemplateFromRepositories_cli_topic"></a>

다음 코드 예시에서는 `batch-disassociate-approval-rule-template-from-repositories`의 사용 방법을 보여줍니다.

**AWS CLI**  
**한 번의 작업으로 여러 리포지토리에서 승인 규칙 템플릿 연결 해제**  
다음 `batch-disassociate-approval-rule-template-from-repositories` 예시는 지정된 승인 규칙 템플릿을 및 이라는 이름의 `MyDemoRepo` 및 `MyOtherDemoRepo` 리포지토리에서 연결 해제합니다.  

```
aws codecommit batch-disassociate-approval-rule-template-from-repositories \
    --repository-names MyDemoRepo, MyOtherDemoRepo  \
    --approval-rule-template-name 1-approval-rule-for-all pull requests
```
출력:  

```
{
    "disassociatedRepositoryNames": [
        "MyDemoRepo",
        "MyOtherDemoRepo"
    ],
    "errors": []
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Disassociate an Approval Rule Template](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-disassociate-template.html#batch-disassociate-template) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchDisassociateApprovalRuleTemplateFromRepositories](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/batch-disassociate-approval-rule-template-from-repositories.html) 섹션을 참조하세요.

### `batch-get-commits`
<a name="codecommit_BatchGetCommits_cli_topic"></a>

다음 코드 예시에서는 `batch-get-commits`의 사용 방법을 보여줍니다.

**AWS CLI**  
**여러 커밋에 대한 정보 보기**  
다음 `batch-get-commits` 예제에서는 지정된 커밋에 대한 세부 정보를 표시합니다.  

```
aws codecommit batch-get-commits  \
    --repository-name MyDemoRepo  \
    --commit-ids 317f8570EXAMPLE 4c925148EXAMPLE
```
출력:  

```
{
    "commits": [
      {
        "additionalData": "",
        "committer": {
            "date": "1508280564 -0800",
            "name": "Mary Major",
            "email": "mary_major@example.com"
        },
        "author": {
            "date": "1508280564 -0800",
            "name": "Mary Major",
            "email": "mary_major@example.com"
        },
        "commitId": "317f8570EXAMPLE",
        "treeId": "1f330709EXAMPLE",
        "parents": [
            "6e147360EXAMPLE"
        ],
        "message": "Change variable name and add new response element"
    },
    {
        "additionalData": "",
        "committer": {
            "date": "1508280542 -0800",
            "name": "Li Juan",
            "email": "li_juan@example.com"
        },
        "author": {
            "date": "1508280542 -0800",
            "name": "Li Juan",
            "email": "li_juan@example.com"
        },
        "commitId": "4c925148EXAMPLE",
        "treeId": "1f330709EXAMPLE",
        "parents": [
            "317f8570EXAMPLE"
        ],
        "message": "Added new class"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [View Commit Details](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-view-commit-details.html#how-to-view-commit-details-cli-batch-get-commits) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchGetCommits](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/batch-get-commits.html) 섹션을 참조하세요.

### `batch-get-repositories`
<a name="codecommit_BatchGetRepositories_cli_topic"></a>

다음 코드 예시에서는 `batch-get-repositories`의 사용 방법을 보여줍니다.

**AWS CLI**  
**여러 리포지토리에 대한 세부 정보 보기**  
이 예시에서는 여러 AWS CodeCommit 리포지토리에 대한 세부 정보를 보여줍니다.  

```
aws codecommit batch-get-repositories \
    --repository-names MyDemoRepo MyOtherDemoRepo
```
출력:  

```
{
    "repositoriesNotFound": [],
    "repositories": [
         {
            "creationDate": 1429203623.625,
            "defaultBranch": "main",
            "repositoryName": "MyDemoRepo",
            "cloneUrlSsh": "ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo",
            "lastModifiedDate": 1430783812.0869999,
            "repositoryDescription": "My demonstration repository",
            "cloneUrlHttp": "https://codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo",
            "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE",
            "Arn": "arn:aws:codecommit:us-east-2:111111111111:MyDemoRepo"
            "accountId": "111111111111"
        },
        {
            "creationDate": 1429203623.627,
            "defaultBranch": "main",
            "repositoryName": "MyOtherDemoRepo",
            "cloneUrlSsh": "ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyOtherDemoRepo",
            "lastModifiedDate": 1430783812.0889999,
            "repositoryDescription": "My other demonstration repository",
            "cloneUrlHttp": "https://codecommit.us-east-2.amazonaws.com/v1/repos/MyOtherDemoRepo",
            "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE",
            "Arn": "arn:aws:codecommit:us-east-2:111111111111:MyOtherDemoRepo"
            "accountId": "111111111111"
        }
    ],
    "repositoriesNotFound": []
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchGetRepositories](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/batch-get-repositories.html) 섹션을 참조하세요.

### `create-approval-rule-template`
<a name="codecommit_CreateApprovalRuleTemplate_cli_topic"></a>

다음 코드 예시에서는 `create-approval-rule-template`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿 생성**  
다음 `create-approval-rule-template` 예시에서는 풀 요청을 `main`브랜치에 병합하기 전에 승인하도록 명명된 승인 규칙 `2-approver-rule-for-main ``. The template requires two users who assume the role of ``CodeCommitReview` 템플릿을 생성합니다.  

```
aws codecommit create-approval-rule-template \
    --approval-rule-template-name 2-approver-rule-for-main \
    --approval-rule-template-description  "Requires two developers from the team to approve the pull request if the destination branch is main" \
    --approval-rule-template-content "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}"
```
출력:  

```
{
    "approvalRuleTemplate": {
        "approvalRuleTemplateName": "2-approver-rule-for-main",
        "creationDate": 1571356106.936,
        "approvalRuleTemplateId": "dd8b17fe-EXAMPLE",
        "approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
        "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
        "approvalRuleTemplateDescription": "Requires two developers from the team to approve the pull request if the destination branch is main",
        "lastModifiedDate": 1571356106.936,
        "ruleContentSha256": "4711b576EXAMPLE"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Create an Approval Rule Template](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-template.html#create-template-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateApprovalRuleTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-approval-rule-template.html) 섹션을 참조하세요.

### `create-branch`
<a name="codecommit_CreateBranch_cli_topic"></a>

다음 코드 예시에서는 `create-branch`의 사용 방법을 보여줍니다.

**AWS CLI**  
**브랜치 생성**  
이 예시에서는 AWS CodeCommit 리포지토리에 브랜치를 생성합니다. 이 명령은 오류가 있는 경우에만 출력을 생성합니다.  
명령:  

```
aws codecommit create-branch --repository-name MyDemoRepo --branch-name MyNewBranch --commit-id 317f8570EXAMPLE
```
출력:  

```
None.
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateBranch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-branch.html) 섹션을 참조하세요.

### `create-commit`
<a name="codecommit_CreateCommit_cli_topic"></a>

다음 코드 예시에서는 `create-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋 생성**  
다음 `create-commit` 예시에서는 `main` 브랜치에 이름이 지정된 리포지토리에 `readme.md` 파일을 추가하는 `MyDemoRepo` 리포지토리에 대한 초기 커밋을 만드는 방법을 보여줍니다.  

```
aws codecommit create-commit \
    --repository-name MyDemoRepo \
    --branch-name main \
    --put-files "filePath=readme.md,fileContent='Welcome to our team repository.'"
```
출력:  

```
{
    "filesAdded": [
        {
            "blobId": "5e1c309d-EXAMPLE",
            "absolutePath": "readme.md",
            "fileMode": "NORMAL"
        }
    ],
    "commitId": "4df8b524-EXAMPLE",
    "treeId": "55b57003-EXAMPLE",
    "filesDeleted": [],
    "filesUpdated": []
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Create a Commit in AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-commit.html#how-to-create-commit-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-commit.html) 섹션을 참조하세요.

### `create-pull-request-approval-rule`
<a name="codecommit_CreatePullRequestApprovalRule_cli_topic"></a>

다음 코드 예시에서는 `create-pull-request-approval-rule`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 규칙 생성**  
다음 `create-pull-request-approval-rule` 예시에서는 지정된 풀 리퀘스트에 대해 이름이 지정된 `Require two approved approvers` 승인 규칙을 만듭니다. 이 규칙은 하나의 승인 풀에서 두 개의 승인이 필요하도록 지정합니다. 이 풀에는 `123456789012` AWS 계정에서 `CodeCommitReview` 역할을 수임하고 CodeCommit에 액세스할 수 있는 모든 사용자가 포함됩니다. 또한 동일한 AWS 계정에서 `Nikhil_Jayashankar` IAM 사용자 또는 페더레이션 사용자도 포함됩니다.  

```
aws codecommit create-pull-request-approval-rule  \
    --approval-rule-name "Require two approved approvers"  \
    --approval-rule-content "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"CodeCommitApprovers:123456789012:Nikhil_Jayashankar\", \"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}"
```
출력:  

```
{
    "approvalRule": {
        "approvalRuleName": "Require two approved approvers",
        "lastModifiedDate": 1570752871.932,
        "ruleContentSha256": "7c44e6ebEXAMPLE",
        "creationDate": 1570752871.932,
        "approvalRuleId": "aac33506-EXAMPLE",
        "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"CodeCommitApprovers:123456789012:Nikhil_Jayashankar\", \"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
        "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Create an Approval Rule](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-pull-request-approval-rule.html#how-to-create-pull-request-approval-rule-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreatePullRequestApprovalRule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-pull-request-approval-rule.html) 섹션을 참조하세요.

### `create-pull-request`
<a name="codecommit_CreatePullRequest_cli_topic"></a>

다음 코드 예시에서는 `create-pull-request`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청 생성**  
다음 `create-pull-request` 예시에서는 'jane-branch' 소스 브랜치를 대상으로 'Please review these changes by Tuesday'라는 설명과 함께 'Pronunciation difficulty analyzer'라는 풀 리퀘스트를 생성하고, 'MyDemoRepo'라는 AWS CodeCommit 리포지토리의 기본 브랜치 'main'에 병합할 것입니다.  

```
aws codecommit create-pull-request \
    --title "My Pull Request" \
    --description "Please review these changes by Tuesday" \
    --client-request-token 123Example \
    --targets repositoryName=MyDemoRepo,sourceReference=MyNewBranch
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approver-rule-for-main",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "originApprovalRuleTemplate": {
                    "approvalRuleTemplateId": "dd3d22fe-EXAMPLE",
                    "approvalRuleTemplateName": "2-approver-rule-for-main"
                },
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::111111111111:user/Jane_Doe",
        "description": "Please review these changes by Tuesday",
        "title": "Pronunciation difficulty analyzer",
        "pullRequestTargets": [
            {
                "destinationCommit": "5d036259EXAMPLE",
                "destinationReference": "refs/heads/main",
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "317f8570EXAMPLE",
                "sourceReference": "refs/heads/jane-branch",
                "mergeMetadata": {
                    "isMerged": false
                }
            }
        ],
        "lastActivityDate": 1508962823.285,
        "pullRequestId": "42",
        "clientRequestToken": "123Example",
        "pullRequestStatus": "OPEN",
        "creationDate": 1508962823.285
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreatePullRequest](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-pull-request.html) 섹션을 참조하세요.

### `create-repository`
<a name="codecommit_CreateRepository_cli_topic"></a>

다음 코드 예시에서는 `create-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리 생성**  
이 예시에서는 리포지토리를 생성하고 사용자의 AWS 계정과 연결합니다.  
명령:  

```
aws codecommit create-repository --repository-name MyDemoRepo --repository-description "My demonstration repository"
```
출력:  

```
{
    "repositoryMetadata": {
        "repositoryName": "MyDemoRepo",
                "cloneUrlSsh": "ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo",
                "lastModifiedDate": 1444766838.027,
        "repositoryDescription": "My demonstration repository",
                "cloneUrlHttp": "https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo",
        "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE",
                "Arn": "arn:aws:codecommit:us-east-1:111111111111EXAMPLE:MyDemoRepo",
        "accountId": "111111111111"
    }
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [CreateRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-repository.html)를 참조하세요.

### `create-unreferenced-merge-commit`
<a name="codecommit_CreateUnreferencedMergeCommit_cli_topic"></a>

다음 코드 예시에서는 `create-unreferenced-merge-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**두 커밋 지정자를 병합한 결과를 나타내는 참조되지 않은 커밋**  
다음 `create-unreferenced-merge-commit` 예시에서는 `MyDemoRepo` 리포지토리에서 `bugfix-1234` 소스 브랜치와 `main` 대상 브랜치 간의 병합 결과를 나타내는 커밋을 생성한다.  

```
aws codecommit create-unreferenced-merge-commit \
    --source-commit-specifier bugfix-1234 \
    --destination-commit-specifier main \
    --merge-option THREE_WAY_MERGE \
    --repository-name MyDemoRepo \
    --name "Maria Garcia" \
    --email "maria_garcia@example.com" \
    --commit-message "Testing the results of this merge."
```
출력:  

```
{
    "commitId": "4f178133EXAMPLE",
    "treeId": "389765daEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Resolve Conflicts in a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-resolve-conflict-pull-request.html#batch-describe-merge-conflicts) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateUnreferencedMergeCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/create-unreferenced-merge-commit.html) 섹션을 참조하세요.

### `credential-helper`
<a name="codecommit_CredentialHelper_cli_topic"></a>

다음 코드 예시에서는 `credential-helper`의 사용 방법을 보여줍니다.

**AWS CLI**  
**AWS CodeCommit을 사용하여 AWS CLI에 포함된 자격 증명 도우미를 설정하는 방법**  
`credential-helper` 유틸리티는 AWS CLI에서 직접 호출하도록 설계되지 않았습니다. 대신 로컬 컴퓨터를 설정하기 위한 `git config` 명령과 함께 파라미터로 사용하기 위한 것입니다. 이를 통해 Git은 CodeCommit 리포지토리와 상호 작용하기 위해 AWS로 인증해야 할 때마다 HTTPS와 암호로 서명된 버전의 IAM 사용자 자격 증명 또는 Amazon EC2 인스턴스 역할을 사용할 수 있습니다.  

```
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
```
출력:  

```
[credential]
    helper = !aws codecommit credential-helper $@
    UseHttpPath = true
```
자세한 내용은 *AWS CodeCommit AWS 사용 설명서*의 Setting up for CodeCommit Using Other Methods 섹션을 참조하세요. 콘텐츠를 주의 깊게 검토한 다음*AWS CodeCommit 사용 설명서*의 Linux, macOS 또는 Unix에서 HTTPS 연결의 경우 또는 Windows에서 HTTPS 연결의 경우 중 하나의 절차를 따르세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CredentialHelper](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/credential-helper.html) 섹션을 참조하세요.

### `delete-approval-rule-template`
<a name="codecommit_DeleteApprovalRuleTemplate_cli_topic"></a>

다음 코드 예시에서는 `delete-approval-rule-template`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿 삭제**  
다음 `delete-approval-rule-template` 예제에서는 지정된 승인 규칙 템플릿을 삭제합니다.  

```
aws codecommit delete-approval-rule-template  \
    --approval-rule-template-name 1-approver-for-all-pull-requests
```
출력:  

```
{
    "approvalRuleTemplateId": "41de97b7-EXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Delete an Approval Rule Template](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-delete-template.html#delete-template) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteApprovalRuleTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-approval-rule-template.html) 섹션을 참조하세요.

### `delete-branch`
<a name="codecommit_DeleteBranch_cli_topic"></a>

다음 코드 예시에서는 `delete-branch`의 사용 방법을 보여줍니다.

**AWS CLI**  
**브랜치 삭제**  
이 예시는 AWS CodeCommit 리포지토리에서 브랜치를 삭제하는 방법을 보여줍니다.  
명령:  

```
aws codecommit delete-branch --repository-name MyDemoRepo --branch-name MyNewBranch
```
출력:  

```
{
  "branch": {
      "commitId": "317f8570EXAMPLE",
      "branchName": "MyNewBranch"
  }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteBranch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-branch.html) 섹션을 참조하세요.

### `delete-comment-content`
<a name="codecommit_DeleteCommentContent_cli_topic"></a>

다음 코드 예시에서는 `delete-comment-content`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋의 설명 내용 삭제**  
설명을 작성한 경우에만 설명의 콘텐츠를 삭제할 수 있습니다. 이 예시에서는 시스템 생성 ID가 `ff30b348EXAMPLEb9aa670f`인 설명의 내용을 삭제하는 방법을 보여줍니다.  

```
aws codecommit delete-comment-content \
    --comment-id ff30b348EXAMPLEb9aa670f
```
출력:  

```
{
    "comment": {
        "creationDate": 1508369768.142,
        "deleted": true,
        "lastModifiedDate": 1508369842.278,
        "clientRequestToken": "123Example",
        "commentId": "ff30b348EXAMPLEb9aa670f",
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "callerReactions": [],
        "reactionCounts":
        {
            "CLAP" : 1
        }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteCommentContent](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-comment-content.html) 섹션을 참조하세요.

### `delete-file`
<a name="codecommit_DeleteFile_cli_topic"></a>

다음 코드 예시에서는 `delete-file`의 사용 방법을 보여줍니다.

**AWS CLI**  
**파일 삭제**  
다음 `delete-file` 예시에서는 `MyDemoRepo` 리포지토리에서 가장 최근 커밋 ID가 `c5709475EXAMPLE`인 `main` 브랜치에서`README.md` 파일을 삭제하는 방법을 보여줍니다.  

```
aws codecommit delete-file \
    --repository-name MyDemoRepo \
    --branch-name main \
    --file-path README.md \
    --parent-commit-id c5709475EXAMPLE
```
출력:  

```
{
    "blobId":"559b44fEXAMPLE",
    "commitId":"353cf655EXAMPLE",
    "filePath":"README.md",
    "treeId":"6bc824cEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit API 참조* 안내서의 [Edit or Delete a File in AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-edit-file.html?shortFooter=true#how-to-edit-file-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteFile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-file.html) 섹션을 참조하세요.

### `delete-pull-request-approval-rule`
<a name="codecommit_DeletePullRequestApprovalRule_cli_topic"></a>

다음 코드 예시에서는 `delete-pull-request-approval-rule`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 규칙 삭제**  
다음 `delete-pull-request-approval-rule` 예제에서는 지정된 풀 요청에 대해 `My Approval Rule` 승인 규칙을 삭제합니다.  

```
aws codecommit delete-pull-request-approval-rule  \
    --approval-rule-name "My Approval Rule"  \
    --pull-request-id 15
```
출력:  

```
{
    "approvalRuleId": "077d8e8a8-EXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Edit or Delete an Approval Rule](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-edit-delete-pull-request-approval-rule.html#delete-pull-request-approval-rule) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeletePullRequestApprovalRule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-pull-request-approval-rule.html) 섹션을 참조하세요.

### `delete-repository`
<a name="codecommit_DeleteRepository_cli_topic"></a>

다음 코드 예시에서는 `delete-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리 삭제**  
이 예시에서는 AWS CodeCommit 리포지토리를 삭제하는 방법을 보여줍니다.  
명령:  

```
aws codecommit delete-repository --repository-name MyDemoRepo
```
출력:  

```
{
  "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE"
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [DeleteRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/delete-repository.html)를 참조하세요.

### `describe-merge-conflicts`
<a name="codecommit_DescribeMergeConflicts_cli_topic"></a>

다음 코드 예시에서는 `describe-merge-conflicts`의 사용 방법을 보여줍니다.

**AWS CLI**  
**병합 충돌에 대한 자세한 정보를 얻으려면**  
다음 `describe-merge-conflicts` 예시에서는 지정된 소스 브랜치와 대상 브랜치에 있는 `readme.md` 파일에 대한 병합 충돌을 THREE\$1WAY\$1MERGE 전략을 사용하여 확인합니다.  

```
aws codecommit describe-merge-conflicts \
    --source-commit-specifier feature-randomizationfeature \
    --destination-commit-specifier main \
    --merge-option THREE_WAY_MERGE \
    --file-path readme.md \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "conflictMetadata": {
        "filePath": "readme.md",
        "fileSizes": {
            "source": 139,
            "destination": 230,
            "base": 85
        },
        "fileModes": {
            "source": "NORMAL",
            "destination": "NORMAL",
            "base": "NORMAL"
        },
        "objectTypes": {
            "source": "FILE",
            "destination": "FILE",
            "base": "FILE"
        },
        "numberOfConflicts": 1,
        "isBinaryFile": {
            "source": false,
            "destination": false,
            "base": false
        },
        "contentConflict": true,
        "fileModeConflict": false,
        "objectTypeConflict": false,
        "mergeOperations": {
            "source": "M",
            "destination": "M"
        }
    },
    "mergeHunks": [
        {
            "isConflict": true,
            "source": {
                "startLine": 0,
                "endLine": 3,
                "hunkContent": "VGhpcyBpEXAMPLE="
            },
            "destination": {
                "startLine": 0,
                "endLine": 1,
                "hunkContent": "VXNlIHRoEXAMPLE="
            }
        }
    ],
    "destinationCommitId": "86958e0aEXAMPLE",
    "sourceCommitId": "6ccd57fdEXAMPLE",
    "baseCommitId": "767b69580EXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Resolve Conflicts in a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-resolve-conflict-pull-request.html#describe-merge-conflicts) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeMergeConflicts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/describe-merge-conflicts.html) 섹션을 참조하세요.

### `describe-pull-request-events`
<a name="codecommit_DescribePullRequestEvents_cli_topic"></a>

다음 코드 예시에서는 `describe-pull-request-events`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에서 이벤트를 보는 방법**  
다음 `describe-pull-request-events` 예시에서는 ID가 '8'인 풀 리퀘스트에 대한 이벤트를 검색합니다.  

```
aws codecommit describe-pull-request-events --pull-request-id 8
```
출력:  

```
{
    "pullRequestEvents": [
        {
            "pullRequestId": "8",
            "pullRequestEventType": "PULL_REQUEST_CREATED",
            "eventDate": 1510341779.53,
            "actor": "arn:aws:iam::111111111111:user/Zhang_Wei"
        },
        {
            "pullRequestStatusChangedEventMetadata": {
                "pullRequestStatus": "CLOSED"
            },
            "pullRequestId": "8",
            "pullRequestEventType": "PULL_REQUEST_STATUS_CHANGED",
            "eventDate": 1510341930.72,
            "actor": "arn:aws:iam::111111111111:user/Jane_Doe"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribePullRequestEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/describe-pull-request-events.html) 섹션을 참조하세요.

### `disassociate-approval-rule-template-from-repository`
<a name="codecommit_DisassociateApprovalRuleTemplateFromRepository_cli_topic"></a>

다음 코드 예시에서는 `disassociate-approval-rule-template-from-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리에서 승인 규칙 템플릿 연결 해제**  
다음 `disassociate-approval-rule-template-from-repository` 예시는 `MyDemoRepo` 리포지토리에서 지정된 승인 규칙 템플릿을 연결 해제합니다.  

```
aws codecommit disassociate-approval-rule-template-from-repository \
    --repository-name MyDemoRepo  \
    --approval-rule-template-name 1-approver-rule-for-all-pull-requests
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Disassociate an Approval Rule Template](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-disassociate-template.html#disassociate-template) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DisassociateApprovalRuleTemplateFromRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/disassociate-approval-rule-template-from-repository.html) 섹션을 참조하세요.

### `evaluate-pull-request-approval-rules`
<a name="codecommit_EvaluatePullRequestApprovalRules_cli_topic"></a>

다음 코드 예시에서는 `evaluate-pull-request-approval-rules`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 모든 승인 규칙이 충족되었는지 평가하는 방법**  
다음 `evaluate-pull-request-approval-rules` 예시는 지정된 풀 리퀘스트에 대한 승인 규칙의 상태를 평가합니다. 이 예시에서는 풀 리퀘스트에 대한 승인 규칙이 충족되지 않았으므로 명령의 출력에 `false`의 값 `approved`가 표시됩니다.  

```
aws codecommit evaluate-pull-request-approval-rules \
    --pull-request-id 27  \
    --revision-id 9f29d167EXAMPLE
```
출력:  

```
{
    "evaluation": {
        "approved": false,
        "approvalRulesNotSatisfied": [
            "Require two approved approvers"
        ],
        "overridden": false,
        "approvalRulesSatisfied": []
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Merge a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-merge-pull-request.html#evaluate-pull-request-approval-rules) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [EvaluatePullRequestApprovalRules](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/evaluate-pull-request-approval-rules.html) 섹션을 참조하세요.

### `get-approval-rule-template`
<a name="codecommit_GetApprovalRuleTemplate_cli_topic"></a>

다음 코드 예시에서는 `get-approval-rule-template`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿의 내용 가져오기**  
다음 `get-approval-rule-template` 예시는 승인 규칙 템플릿 `1-approver-rule-for-all-pull-requests`의 콘텐츠를 가져옵니다.  

```
aws codecommit get-approval-rule-template \
    --approval-rule-template-name 1-approver-rule-for-all-pull-requests
```
출력:  

```
{
    "approvalRuleTemplate": {
        "approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 1,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
        "ruleContentSha256": "621181bbEXAMPLE",
        "lastModifiedDate": 1571356106.936,
        "creationDate": 1571356106.936,
        "approvalRuleTemplateName": "1-approver-rule-for-all-pull-requests",
        "lastModifiedUser": "arn:aws:iam::123456789012:user/Li_Juan",
        "approvalRuleTemplateId": "a29abb15-EXAMPLE",
        "approvalRuleTemplateDescription": "All pull requests must be approved by one developer on the team."
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#get-template) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetApprovalRuleTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-approval-rule-template.html) 섹션을 참조하세요.

### `get-blob`
<a name="codecommit_GetBlob_cli_topic"></a>

다음 코드 예시에서는 `get-blob`의 사용 방법을 보여줍니다.

**AWS CLI**  
**Git BLOB 객체에 대한 정보 보기**  
다음 `get-blob` 예시에서는 AWS CodeCommit 리포지토리 'MyDemoRepo'에 있는 ID가 '2eb4af3bEXAMPLE'인 Git 블롭에 대한 정보를 검색합니다.  

```
aws codecommit get-blob  --repository-name MyDemoRepo  --blob-id 2eb4af3bEXAMPLE
```
출력:  

```
{
    "content": "QSBCaW5hcnkgTGFyToEXAMPLE="
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetBlob](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-blob.html) 섹션을 참조하세요.

### `get-branch`
<a name="codecommit_GetBranch_cli_topic"></a>

다음 코드 예시에서는 `get-branch`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋에 대한 정보 가져오기**  
이 예시에서는 AWS CodeCommit 리포지토리의 브랜치에 대한 정보를 가져옵니다.  
명령:  

```
aws codecommit get-branch --repository-name MyDemoRepo --branch-name MyNewBranch
```
출력:  

```
{
  "BranchInfo": {
        "commitID": "317f8570EXAMPLE",
                "branchName": "MyNewBranch"
  }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetBranch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-branch.html) 섹션을 참조하세요.

### `get-comment-reactions`
<a name="codecommit_GetCommentReactions_cli_topic"></a>

다음 코드 예시에서는 `get-comment-reactions`의 사용 방법을 보여줍니다.

**AWS CLI**  
**설명에 대한 이모티콘 반응 보기**  
다음 `get-comment-reactions` 예시에서는 ID가 `abcd1234EXAMPLEb5678efgh`인 설명에 대한 모든 이모티콘 반응을 나열합니다. 셸의 글꼴이 이모지 버전 1.0 표시를 지원하는 경우 `emoji`의 출력에 이모지가 표시됩니다.  

```
aws codecommit get-comment-reactions \
    --comment-id abcd1234EXAMPLEb5678efgh
```
출력:  

```
{
    "reactionsForComment": {
        [
           {
               "reaction": {
                    "emoji:"??",
                    "shortCode": "thumbsup",
                    "unicode": "U+1F44D"
                },
                "users": [
                    "arn:aws:iam::123456789012:user/Li_Juan",
                    "arn:aws:iam::123456789012:user/Mary_Major",
                    "arn:aws:iam::123456789012:user/Jorge_Souza"
                ]
            },
            {
                "reaction": {
                    "emoji": "??",
                    "shortCode": "thumbsdown",
                    "unicode": "U+1F44E"
                },
                "users": [
                    "arn:aws:iam::123456789012:user/Nikhil_Jayashankar"
                ]
            },
            {
                "reaction": {
                    "emoji": "??",
                    "shortCode": "confused",
                    "unicode": "U+1F615"
                },
                "users": [
                    "arn:aws:iam::123456789012:user/Saanvi_Sarkar"
                ]
            }
        ]
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Comment on a commit in AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#how-to-commit-comment-cli-commit-emoji-view) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetCommentReactions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-comment-reactions.html) 섹션을 참조하세요.

### `get-comment`
<a name="codecommit_GetComment_cli_topic"></a>

다음 코드 예시에서는 `get-comment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**설명에 대한 세부 정보 보기**  
이 예시에서는 시스템에서 생성된 설명 ID가 `ff30b348EXAMPLEb9aa670f`인 설명의 세부 정보를 보는 방법을 설명합니다.  

```
aws codecommit get-comment \
    --comment-id ff30b348EXAMPLEb9aa670f
```
출력:  

```
{
    "comment": {
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "clientRequestToken": "123Example",
        "commentId": "ff30b348EXAMPLEb9aa670f",
        "content": "Whoops - I meant to add this comment to the line, but I don't see how to delete it.",
        "creationDate": 1508369768.142,
        "deleted": false,
        "commentId": "",
        "lastModifiedDate": 1508369842.278,
        "callerReactions": [],
        "reactionCounts":
        {
            "SMILE" : 6,
            "THUMBSUP" : 1
        }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetComment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-comment.html) 섹션을 참조하세요.

### `get-comments-for-compared-commit`
<a name="codecommit_GetCommentsForComparedCommit_cli_topic"></a>

다음 코드 예시에서는 `get-comments-for-compared-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋에 대한 설명 보기**  
예를 들어 `MyDemoRepo` 리포지토리의 두 커밋 간의 비교에 대해 작성된 설명을 보려면 다음을 수행합니다.  

```
aws codecommit get-comments-for-compared-commit \
    --repository-name MyDemoRepo \
    --before-commit-ID 6e147360EXAMPLE \
    --after-commit-id 317f8570EXAMPLE
```
출력:  

```
{
    "commentsForComparedCommitData": [
        {
            "afterBlobId": "1f330709EXAMPLE",
            "afterCommitId": "317f8570EXAMPLE",
            "beforeBlobId": "80906a4cEXAMPLE",
            "beforeCommitId": "6e147360EXAMPLE",
            "comments": [
                {
                    "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                    "clientRequestToken": "123Example",
                    "commentId": "ff30b348EXAMPLEb9aa670f",
                    "content": "Whoops - I meant to add this comment to the line, not the file, but I don't see how to delete it.",
                    "creationDate": 1508369768.142,
                    "deleted": false,
                    "CommentId": "123abc-EXAMPLE",
                    "lastModifiedDate": 1508369842.278,
                    "callerReactions": [],
                    "reactionCounts":
                    {
                        "SMILE" : 6,
                        "THUMBSUP" : 1
                    }
                },
                {
                    "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                    "clientRequestToken": "123Example",
                    "commentId": "553b509bEXAMPLE56198325",
                    "content": "Can you add a test case for this?",
                    "creationDate": 1508369612.240,
                    "deleted": false,
                    "commentId": "456def-EXAMPLE",
                    "lastModifiedDate": 1508369612.240,
                    "callerReactions": [],
                    "reactionCounts":
                    {
                        "THUMBSUP" : 2
                    }
                }
            ],
            "location": {
                "filePath": "cl_sample.js",
                "filePosition": 1232,
                "relativeFileVersion": "after"
            },
            "repositoryName": "MyDemoRepo"
        }
    ],
    "nextToken": "exampleToken"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetCommentsForComparedCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-comments-for-compared-commit.html) 섹션을 참조하세요.

### `get-comments-for-pull-request`
<a name="codecommit_GetCommentsForPullRequest_cli_topic"></a>

다음 코드 예시에서는 `get-comments-for-pull-request`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 리퀘스트에 남긴 설명 보기**  
이 예시에서는 `MyDemoRepo` 리포지토리에서 풀 리퀘스트에 대한 설명을 보는 방법을 보여줍니다.  

```
aws codecommit get-comments-for-pull-request \
    --repository-name MyDemoRepo \
    --before-commit-ID 317f8570EXAMPLE \
    --after-commit-id 5d036259EXAMPLE
```
출력:  

```
{
    "commentsForPullRequestData": [
        {
            "afterBlobId": "1f330709EXAMPLE",
            "afterCommitId": "5d036259EXAMPLE",
            "beforeBlobId": "80906a4cEXAMPLE",
            "beforeCommitId": "317f8570EXAMPLE",
            "comments": [
                {
                    "authorArn": "arn:aws:iam::111111111111:user/Saanvi_Sarkar",
                    "clientRequestToken": "",
                    "commentId": "abcd1234EXAMPLEb5678efgh",
                    "content": "These don't appear to be used anywhere. Can we remove them?",
                    "creationDate": 1508369622.123,
                    "deleted": false,
                    "lastModifiedDate": 1508369622.123,
                    "callerReactions": [],
                    "reactionCounts":
                    {
                        "THUMBSUP" : 6,
                        "CONFUSED" : 1
                    }
                },
                {
                    "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
                    "clientRequestToken": "",
                    "commentId": "442b498bEXAMPLE5756813",
                    "content": "Good catch. I'll remove them.",
                    "creationDate": 1508369829.104,
                    "deleted": false,
                    "lastModifiedDate": 150836912.273,
                    "callerReactions": ["THUMBSUP"]
                    "reactionCounts":
                    {
                        "THUMBSUP" : 14
                    }
                }
            ],
            "location": {
                "filePath": "ahs_count.py",
                "filePosition": 367,
                "relativeFileVersion": "AFTER"
            },
            "repositoryName": "MyDemoRepo",
            "pullRequestId": "42"
        }
    ],
    "nextToken": "exampleToken"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetCommentsForPullRequest](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-comments-for-pull-request.html) 섹션을 참조하세요.

### `get-commit`
<a name="codecommit_GetCommit_cli_topic"></a>

다음 코드 예시에서는 `get-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 커밋에 대한 정보 보기**  
이 예시에서는 'MyDemoRepo'라는 이름의 AWS CodeCommit 리포지토리에 있는 시스템 생성 ID가 '7e9fd3091thisisanexamplethisisanexample1'인 커밋에 대한 세부 정보를 보여줍니다.  
명령:  

```
aws codecommit get-commit --repository-name MyDemoRepo --commit-id 7e9fd3091thisisanexamplethisisanexample1
```
출력:  

```
{
  "commit": {
      "additionalData": "",
      "committer": {
          "date": "1484167798 -0800",
          "name": "Mary Major",
          "email": "mary_major@example.com"
      },
      "author": {
          "date": "1484167798 -0800",
          "name": "Mary Major",
          "email": "mary_major@example.com"
      },
      "treeId": "347a3408thisisanexampletreeidexample",
      "parents": [
          "7aa87a031thisisanexamplethisisanexample1"
      ],
      "message": "Fix incorrect variable name"
  }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-commit.html) 섹션을 참조하세요.

### `get-differences`
<a name="codecommit_GetDifferences_cli_topic"></a>

다음 코드 예시에서는 `get-differences`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 커밋 지정자의 차이점에 대한 정보를 가져오는 방법**  
이 예시에서는 AWS CodeCommit 리포지토리의 이름이 변경된 폴더에서 MyDemoRepo라는 이름의 두 커밋 지정자(브랜치, 태그, HEAD 또는 기타 정규화된 참조(커밋 ID 등)) 간의 변경 사항에 대한 보기 메타데이터 정보를 보여줍니다. 이 예시에서는 이러한 옵션을 사용하여 결과를 제한하는 방법을 보다 완벽하게 설명하기 위해 --before-commit-specifier, --before-path, --after-path 등 필수 옵션이 아닌 몇 가지 옵션을 포함합니다. 응답에는 파일 모드 권한이 포함됩니다.  
명령:  

```
aws codecommit get-differences --repository-name MyDemoRepo --before-commit-specifier 955bba12thisisanexamplethisisanexample --after-commit-specifier 14a95463thisisanexamplethisisanexample --before-path tmp/example-folder --after-path tmp/renamed-folder
```
출력:  

```
{
  "differences": [
      {
          "afterBlob": {
              "path": "blob.txt",
              "blobId": "2eb4af3b1thisisanexamplethisisanexample1",
              "mode": "100644"
          },
          "changeType": "M",
          "beforeBlob": {
              "path": "blob.txt",
              "blobId": "bf7fcf281thisisanexamplethisisanexample1",
              "mode": "100644"
          }
      }
  ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDifferences](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-differences.html) 섹션을 참조하세요.

### `get-file`
<a name="codecommit_GetFile_cli_topic"></a>

다음 코드 예시에서는 `get-file`의 사용 방법을 보여줍니다.

**AWS CLI**  
**AWS CodeCommit 리포지토리에서 파일의 base-64 인코딩 콘텐츠를 가져오는 방법**  
다음 `get-file` 예시에서는 `MyDemoRepo` 리포지토리에 `main` 브랜치에서 `README.md` 파일의 base-64로 인코딩된 내용을 가져오는 방법을 보여줍니다.  

```
aws codecommit get-file \
    --repository-name MyDemoRepo \
    --commit-specifier main \
    --file-path README.md
```
출력:  

```
{
    "blobId":"559b44fEXAMPLE",
    "commitId":"c5709475EXAMPLE",
    "fileContent":"IyBQaHVzEXAMPLE",
    "filePath":"README.md",
    "fileMode":"NORMAL",
    "fileSize":1563
}
```
자세한 내용은 *AWS CodeCommit API 참조* 안내서의 [GetFile](https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetFile.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetFile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-file.html) 섹션을 참조하세요.

### `get-folder`
<a name="codecommit_GetFolder_cli_topic"></a>

다음 코드 예시에서는 `get-folder`의 사용 방법을 보여줍니다.

**AWS CLI**  
**AWS CodeCommit 리포지토리의 폴더 콘텐츠를 가져오는 방법**  
다음 `get-folder` 예시에서는 `MyDemoRepo` 리포지토리에서 최상위 폴더의 콘텐츠를 가져오는 방법을 보여줍니다.  

```
aws codecommit get-folder --repository-name MyDemoRepo --folder-path ""
```
출력:  

```
{
    "commitId":"c5709475EXAMPLE",
    "files":[
        {
            "absolutePath":".gitignore",
            "blobId":"74094e8bEXAMPLE",
            "fileMode":"NORMAL",
            "relativePath":".gitignore"
        },
        {
            "absolutePath":"Gemfile",
            "blobId":"9ceb72f6EXAMPLE",
            "fileMode":"NORMAL",
            "relativePath":"Gemfile"
        },
        {
            "absolutePath":"Gemfile.lock",
            "blobId":"795c4a2aEXAMPLE",
            "fileMode":"NORMAL",
            "relativePath":"Gemfile.lock"
        },
        {
            "absolutePath":"LICENSE.txt",
            "blobId":"0c7932c8EXAMPLE",
            "fileMode":"NORMAL",
            "relativePath":"LICENSE.txt"
        },
        {
            "absolutePath":"README.md",
            "blobId":"559b44feEXAMPLE",
            "fileMode":"NORMAL",
            "relativePath":"README.md"
        }
    ],
    "folderPath":"",
    "subFolders":[
        {
            "absolutePath":"public",
            "relativePath":"public",
            "treeId":"d5e92ae3aEXAMPLE"
        },
        {
            "absolutePath":"tmp",
            "relativePath":"tmp",
            "treeId":"d564d0bcEXAMPLE"
        }
    ],
    "subModules":[],
    "symbolicLinks":[],
    "treeId":"7b3c4dadEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit API 참조* 안내서의 GetFolder 섹션을 참조하세요.  
+  API 세부 정보는 **AWS CLI 명령 참조의 [GetFolder](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-folder.html) 섹션을 참조하세요.

### `get-merge-commit`
<a name="codecommit_GetMergeCommit_cli_topic"></a>

다음 코드 예시에서는 `get-merge-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**병합 커밋에 대한 자세한 정보 얻기**  
다음 `get-merge-commit` 예제에서는 `MyDemoRepo` 리포지토리에서 `main` 대상 브랜치와 `bugfix-bug1234` 소스 브랜치에 대한 병합 커밋에 관한 세부 정보를 표시합니다.  

```
aws codecommit get-merge-commit \
    --source-commit-specifier bugfix-bug1234 \
    --destination-commit-specifier main \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "sourceCommitId": "c5709475EXAMPLE",
    "destinationCommitId": "317f8570EXAMPLE",
    "baseCommitId": "fb12a539EXAMPLE",
    "mergeCommitId": "ffc4d608eEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [View Commit Details](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-view-commit-details.html#how-to-view-commit-details-cli-merge-commit) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetMergeCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-merge-commit.html) 섹션을 참조하세요.

### `get-merge-conflicts`
<a name="codecommit_GetMergeConflicts_cli_topic"></a>

다음 코드 예시에서는 `get-merge-conflicts`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 리퀘스트에 병합 충돌이 있는지 확인**  
다음 `get-merge-conflicts` 예시에서는 `MyDemoRepo` 리포지토리에서 `feature-randomizationfeature` 소스 브랜치 끝과 'main' 대상 브랜치 사이에 병합 충돌이 있는지 표시합니다.  

```
aws codecommit get-merge-conflicts \
    --repository-name MyDemoRepo \
    --source-commit-specifier feature-randomizationfeature \
    --destination-commit-specifier main \
    --merge-option THREE_WAY_MERGE
```
출력:  

```
{
    "mergeable": false,
    "destinationCommitId": "86958e0aEXAMPLE",
    "sourceCommitId": "6ccd57fdEXAMPLE",
    "baseCommitId": "767b6958EXAMPLE",
    "conflictMetadataList": [
        {
            "filePath": "readme.md",
            "fileSizes": {
                "source": 139,
                "destination": 230,
                "base": 85
            },
            "fileModes": {
                "source": "NORMAL",
                "destination": "NORMAL",
                "base": "NORMAL"
            },
            "objectTypes": {
                "source": "FILE",
                "destination": "FILE",
                "base": "FILE"
            },
            "numberOfConflicts": 1,
            "isBinaryFile": {
                "source": false,
                "destination": false,
                "base": false
            },
            "contentConflict": true,
            "fileModeConflict": false,
            "objectTypeConflict": false,
            "mergeOperations": {
                "source": "M",
                "destination": "M"
            }
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetMergeConflicts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-merge-conflicts.html) 섹션을 참조하세요.

### `get-merge-options`
<a name="codecommit_GetMergeOptions_cli_topic"></a>

다음 코드 예시에서는 `get-merge-options`의 사용 방법을 보여줍니다.

**AWS CLI**  
**두 개의 지정된 브랜치를 병합하는 데 사용할 수 있는 병합 옵션에 대한 정보를 가져오는 방법**  
다음 `get-merge-options` 예시에서는 `bugfix-bug1234` 소스 브랜치를 `MyDemoRepo` 리포지토리에 있는 `main` 대상 브랜치와 병합하는 데 사용할 수 있는 병합 옵션을 결정합니다.  

```
aws codecommit get-merge-options \
    --source-commit-specifier bugfix-bug1234 \
    --destination-commit-specifier main \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "mergeOptions": [
        "FAST_FORWARD_MERGE",
        "SQUASH_MERGE",
        "THREE_WAY_MERGE"
    ],
    "sourceCommitId": "18059494EXAMPLE",
    "destinationCommitId": "ffd3311dEXAMPLE",
    "baseCommitId": "ffd3311dEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Resolve Conflicts in a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-resolve-conflict-pull-request.html#get-merge-options) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetMergeOptions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-merge-options.html) 섹션을 참조하세요.

### `get-pull-request-approval-states`
<a name="codecommit_GetPullRequestApprovalStates_cli_topic"></a>

다음 코드 예시에서는 `get-pull-request-approval-states`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 보기**  
다음 `get-pull-request-approval-states` 예시에서는 지정된 풀 리퀘스트에 대한 승인을 반환합니다.  

```
aws codecommit get-pull-request-approval-states \
    --pull-request-id 8 \
    --revision-id 9f29d167EXAMPLE
```
출력:  

```
{
    "approvals": [
        {
            "userArn": "arn:aws:iam::123456789012:user/Mary_Major",
            "approvalState": "APPROVE"
        }
    ]
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [View Pull Requests](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-view-pull-request.html#get-pull-request-approval-state) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetPullRequestApprovalStates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-pull-request-approval-states.html) 섹션을 참조하세요.

### `get-pull-request-override-state`
<a name="codecommit_GetPullRequestOverrideState_cli_topic"></a>

다음 코드 예시에서는 `get-pull-request-override-state`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 리퀘스트의 재정의 상태에 대한 정보 가져오기**  
다음 `get-pull-request-override-state` 예시에서는 지정된 풀 리퀘스트에 대한 재정의 상태를 반환합니다. 이 예시에서는 Mary Major라는 사용자가 풀 리퀘스트에 대한 승인 규칙을 재정의했기 때문에 출력은 `true`라는 값을 반환합니다.  

```
aws codecommit get-pull-request-override-state \
    --pull-request-id 34  \
    --revision-id 9f29d167EXAMPLE
```
출력:  

```
{
    "overridden": true,
    "overrider": "arn:aws:iam::123456789012:user/Mary_Major"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Override Approval Rules on a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-override-approval-rules.html#get-override-status) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetPullRequestOverrideState](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-pull-request-override-state.html) 섹션을 참조하세요.

### `get-pull-request`
<a name="codecommit_GetPullRequest_cli_topic"></a>

다음 코드 예시에서는 `get-pull-request`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청의 세부 정보 보기**  
이 예시에서는 ID가 `27`인 풀 요청에 대한 정보를 보는 방법을 보여줍니다.  

```
aws codecommit get-pull-request \
    --pull-request-id 27
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approver-rule-for-main",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "lastActivityDate": 1562619583.565,
        "pullRequestTargets": [
            {
                "sourceCommit": "ca45e279EXAMPLE",
                "sourceReference": "refs/heads/bugfix-1234",
                "mergeBase": "a99f5ddbEXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": false
                },
                "destinationCommit": "2abfc6beEXAMPLE",
                "repositoryName": "MyDemoRepo"
            }
        ],
        "revisionId": "e47def21EXAMPLE",
        "title": "Quick fix for bug 1234",
        "authorArn": "arn:aws:iam::123456789012:user/Nikhil_Jayashankar",
        "clientRequestToken": "d8d7612e-EXAMPLE",
        "creationDate": 1562619583.565,
        "pullRequestId": "27",
        "pullRequestStatus": "OPEN"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetPullRequest](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-pull-request.html) 섹션을 참조하세요.

### `get-repository-triggers`
<a name="codecommit_GetRepositoryTriggers_cli_topic"></a>

다음 코드 예시에서는 `get-repository-triggers`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 트리거에 대한 정보를 가져오는 방법**  
이 예시에서는 `MyDemoRepo`라는 AWS CodeCommit 리포지토리에 대해 구성된 트리거에 대한 세부 정보를 보여줍니다.  

```
aws codecommit get-repository-triggers \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "configurationId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE",
    "triggers": [
        {
            "destinationArn": "arn:aws:sns:us-east-1:111111111111:MyCodeCommitTopic",
            "branches": [
                "main",
                "preprod"
            ],
            "name": "MyFirstTrigger",
            "customData": "",
            "events": [
                "all"
            ]
        },
        {
            "destinationArn": "arn:aws:lambda:us-east-1:111111111111:function:MyCodeCommitPythonFunction",
            "branches": [],
            "name": "MySecondTrigger",
            "customData": "EXAMPLE",
            "events": [
                "all"
            ]
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetRepositoryTriggers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-repository-triggers.html) 섹션을 참조하세요.

### `get-repository`
<a name="codecommit_GetRepository_cli_topic"></a>

다음 코드 예시에서는 `get-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리 관련 정보를 가져오기**  
이 예시에서는 AWS CodeCommit 리포지토리에 대한 세부 정보를 보여줍니다.  

```
aws codecommit get-repository \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "repositoryMetadata": {
        "creationDate": 1429203623.625,
        "defaultBranch": "main",
        "repositoryName": "MyDemoRepo",
        "cloneUrlSsh": "ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/v1/repos/MyDemoRepo",
        "lastModifiedDate": 1430783812.0869999,
        "repositoryDescription": "My demonstration repository",
        "cloneUrlHttp": "https://codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo",
        "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE",
        "Arn": "arn:aws:codecommit:us-east-1:80398EXAMPLE:MyDemoRepo
        "accountId": "111111111111"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/get-repository.html) 섹션을 참조하세요.

### `list-approval-rule-templates`
<a name="codecommit_ListApprovalRuleTemplates_cli_topic"></a>

다음 코드 예시에서는 `list-approval-rule-templates`의 사용 방법을 보여줍니다.

**AWS CLI**  
**AWS 리전의 모든 승인 규칙 템플릿 나열**  
다음 `list-approval-rule-templates` 예시에서는 지정된 리전의 모든 승인 규칙 템플릿을 나열합니다. AWS 리전이 파라미터로 지정되지 않은 경우 명령은 명령을 실행하는 데 사용되는 AWS CLI 프로파일에 지정된 리전에 대한 승인 규칙 템플릿을 반환합니다.  

```
aws codecommit list-approval-rule-templates \
    --region us-east-2
```
출력:  

```
{
    "approvalRuleTemplateNames": [
        "2-approver-rule-for-main",
        "1-approver-rule-for-all-pull-requests"
    ]
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#list-templates) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListApprovalRuleTemplates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-approval-rule-templates.html) 섹션을 참조하세요.

### `list-associated-approval-rule-templates-for-repository`
<a name="codecommit_ListAssociatedApprovalRuleTemplatesForRepository_cli_topic"></a>

다음 코드 예시에서는 `list-associated-approval-rule-templates-for-repository`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리와 연결된 모든 템플릿 나열**  
다음 `list-associated-approval-rule-templates-for-repository` 예시에서는 `MyDemoRepo` 리포지토리와 연결된 모든 승인 규칙 템플릿을 나열합니다.  

```
aws codecommit list-associated-approval-rule-templates-for-repository \
    --repository-name MyDemoRepo
```
출력:  

```
{
  "approvalRuleTemplateNames": [
    "2-approver-rule-for-main",
    "1-approver-rule-for-all-pull-requests"
  ]
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#list-associated-templates) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListAssociatedApprovalRuleTemplatesForRepository](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-associated-approval-rule-templates-for-repository.html) 섹션을 참조하세요.

### `list-branches`
<a name="codecommit_ListBranches_cli_topic"></a>

다음 코드 예시에서는 `list-branches`의 사용 방법을 보여줍니다.

**AWS CLI**  
**브랜치 이름 목록 보기**  
이 예시에서는 AWS CodeCommit 리포지토리의 모든 브랜치 이름을 나열합니다.  

```
aws codecommit list-branches \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "branches": [
        "MyNewBranch",
        "main"
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListBranches](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-branches.html) 섹션을 참조하세요.

### `list-pull-requests`
<a name="codecommit_ListPullRequests_cli_topic"></a>

다음 코드 예시에서는 `list-pull-requests`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 풀 요청 보기**  
이 예시에서는 ARN이 'arn:aws:iam::111111111111:user/Li\$1Juan'이고 상태가 'CLOSED'인 IAM 사용자가 만든 풀 리퀘스트를 'MyDemoRepo'라는 AWS CodeCommit 리포지토리에 나열하는 방법을 보여줍니다.  

```
aws codecommit list-pull-requests --author-arn arn:aws:iam::111111111111:user/Li_Juan --pull-request-status CLOSED --repository-name MyDemoRepo
```
출력:  

```
{
 "nextToken": "",
 "pullRequestIds": ["2","12","16","22","23","35","30","39","47"]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListPullRequests](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-pull-requests.html) 섹션을 참조하세요.

### `list-repositories-for-approval-rule-template`
<a name="codecommit_ListRepositoriesForApprovalRuleTemplate_cli_topic"></a>

다음 코드 예시에서는 `list-repositories-for-approval-rule-template`의 사용 방법을 보여줍니다.

**AWS CLI**  
**템플릿과 연결된 모든 리포지토리 나열**  
다음 `list-repositories-for-approval-rule-template` 예시에서는 지정된 승인 규칙 템플릿과 연결된 모든 리포지토리를 나열합니다.  

```
aws codecommit list-repositories-for-approval-rule-template \
    --approval-rule-template-name 2-approver-rule-for-main
```
출력:  

```
{
    "repositoryNames": [
        "MyDemoRepo",
        "MyClonedRepo"
    ]
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#list-associated-repositories) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListRepositoriesForApprovalRuleTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-repositories-for-approval-rule-template.html) 섹션을 참조하세요.

### `list-repositories`
<a name="codecommit_ListRepositories_cli_topic"></a>

다음 코드 예시에서는 `list-repositories`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 목록 보기**  
이 예시에서는 사용자의 AWS 계정과 연결된 모든 AWS CodeCommit 리포지토리를 나열합니다.  
명령:  

```
aws codecommit list-repositories
```
출력:  

```
{
  "repositories": [
      {
         "repositoryName": "MyDemoRepo"
         "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE",
      },
      {
         "repositoryName": "MyOtherDemoRepo"
         "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE"
      }
  ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListRepositories](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-repositories.html) 섹션을 참조하세요.

### `list-tags-for-resource`
<a name="codecommit_ListTagsForResource_cli_topic"></a>

다음 코드 예시에서는 `list-tags-for-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 AWS 태그 보기**  
다음 `list-tags-for-resource` 예시에서는 지정된 리포지토리의 태그 키와 태그 값을 나열합니다.  

```
aws codecommit list-tags-for-resource \
    --resource-arn arn:aws:codecommit:us-west-2:111111111111:MyDemoRepo
```
출력:  

```
{
    "tags": {
        "Status": "Secret",
        "Team": "Saanvi"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [View Tags for a Repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-tag-repository-list.html#how-to-tag-repository-list-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/list-tags-for-resource.html)를 참조하세요.

### `merge-branches-by-fast-forward`
<a name="codecommit_MergeBranchesByFastForward_cli_topic"></a>

다음 코드 예시에서는 `merge-branches-by-fast-forward`의 사용 방법을 보여줍니다.

**AWS CLI**  
**빨리 감기 병합 전략을 사용하여 두 브랜치 병합**  
다음 `merge-branches-by-fast-forward` 예시에서는 지정된 소스 브랜치를 `MyDemoRepo` 리포지토리의 지정된 대상 브랜치와 병합합니다.  

```
aws codecommit merge-branches-by-fast-forward \
    --source-commit-specifier bugfix-bug1234 \
    --destination-commit-specifier bugfix-bug1233 \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "commitId": "4f178133EXAMPLE",
    "treeId": "389765daEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Compare and Merge Branches](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-compare-branches.html#merge-branches-by-fast-forward) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergeBranchesByFastForward](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-branches-by-fast-forward.html) 섹션을 참조하세요.

### `merge-branches-by-squash`
<a name="codecommit_MergeBranchesBySquash_cli_topic"></a>

다음 코드 예시에서는 `merge-branches-by-squash`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스쿼시 병합 전략을 사용하여 두 브랜치 병합**  
다음 `merge-branches-by-squash` 예시에서는 지정된 소스 브랜치를 `MyDemoRepo` 리포지토리의 지정된 대상 브랜치와 병합합니다.  

```
aws codecommit merge-branches-by-squash \
    --source-commit-specifier bugfix-bug1234 \
    --destination-commit-specifier bugfix-bug1233 \
    --author-name "Maria Garcia" \
    --email "maria_garcia@example.com" \
    --commit-message "Merging two fix branches to prepare for a general patch." \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "commitId": "4f178133EXAMPLE",
    "treeId": "389765daEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Compare and Merge Branches](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-compare-branches.html#merge-branches-by-squash) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergeBranchesBySquash](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-branches-by-squash.html) 섹션을 참조하세요.

### `merge-branches-by-three-way`
<a name="codecommit_MergeBranchesByThreeWay_cli_topic"></a>

다음 코드 예시에서는 `merge-branches-by-three-way`의 사용 방법을 보여줍니다.

**AWS CLI**  
**3방향 병합 전략을 사용하여 두 브랜치 병합**  
다음 `merge-branches-by-three-way` 예시에서는 지정된 소스 브랜치를 `MyDemoRepo` 리포지토리의 지정된 대상 브랜치와 병합합니다.  

```
aws codecommit merge-branches-by-three-way \
    --source-commit-specifier main \
    --destination-commit-specifier bugfix-bug1234 \
    --author-name "Jorge Souza" --email "jorge_souza@example.com" \
    --commit-message "Merging changes from main to bugfix branch before additional testing." \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "commitId": "4f178133EXAMPLE",
    "treeId": "389765daEXAMPLE"
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Compare and Merge Branches](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-compare-branches.html#merge-branches-by-three-way) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergeBranchesByThreeWay](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-branches-by-three-way.html) 섹션을 참조하세요.

### `merge-pull-request-by-fast-forward`
<a name="codecommit_MergePullRequestByFastForward_cli_topic"></a>

다음 코드 예시에서는 `merge-pull-request-by-fast-forward`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청을 병합하고 닫으려면**  
이 예시에서는 `MyDemoRepo` 리포지토리에서 ID가 '47'이고 소스 커밋 ID가 '99132ab0EXAMPLE'인 풀 리퀘스트를 병합하고 닫는 방법을 보여 줍니다.  

```
aws codecommit merge-pull-request-by-fast-forward \
    --pull-request-id 47 \
    --source-commit-id 99132ab0EXAMPLE \
    --repository-name MyDemoRepo
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 1,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "I want one approver for this pull request",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::123456789012:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.142,
        "description": "Review the latest changes and updates to the global variables",
        "lastActivityDate": 1508887223.155,
        "pullRequestId": "47",
        "pullRequestStatus": "CLOSED",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": true,
                    "mergedBy": "arn:aws:iam::123456789012:user/Mary_Major"
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Merge a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-merge-pull-request.html#merge-pull-request-by-fast-forward) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergePullRequestByFastForward](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-pull-request-by-fast-forward.html) 섹션을 참조하세요.

### `merge-pull-request-by-squash`
<a name="codecommit_MergePullRequestBySquash_cli_topic"></a>

다음 코드 예시에서는 `merge-pull-request-by-squash`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스쿼시 병합 전략을 사용하여 풀 요청을 병합하는 방법**  
다음 `merge-pull-request-by-squash` 예시에서는 `MyDemoRepo` 리포지토리에서 ACCEPT\$1SOURCE의 충돌 해결 전략을 사용하여 지정된 풀 요청을 병합하고 닫습니다.  

```
aws codecommit merge-pull-request-by-squash \
    --pull-request-id 47 \
    --source-commit-id 99132ab0EXAMPLE \
    --repository-name MyDemoRepo \
    --conflict-detail-level LINE_LEVEL \
    --conflict-resolution-strategy ACCEPT_SOURCE \
    --name "Jorge Souza" --email "jorge_souza@example.com" \
    --commit-message "Merging pull request 47 by squash and accepting source in merge conflicts"
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approver-rule-for-main",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "originApprovalRuleTemplate": {
                    "approvalRuleTemplateId": "dd8b17fe-EXAMPLE",
                    "approvalRuleTemplateName": "2-approver-rule-for-main"
                },
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::123456789012:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.142,
        "description": "Review the latest changes and updates to the global variables",
        "lastActivityDate": 1508887223.155,
        "pullRequestId": "47",
        "pullRequestStatus": "CLOSED",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": true,
                    "mergedBy": "arn:aws:iam::123456789012:user/Mary_Major"
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Merge a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-merge-pull-request.html#merge-pull-request-by-squash) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergePullRequestBySquash](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-pull-request-by-squash.html) 섹션을 참조하세요.

### `merge-pull-request-by-three-way`
<a name="codecommit_MergePullRequestByThreeWay_cli_topic"></a>

다음 코드 예시에서는 `merge-pull-request-by-three-way`의 사용 방법을 보여줍니다.

**AWS CLI**  
**3방향 병합 전략을 사용하여 풀 요청을 병합하는 방법**  
다음 `merge-pull-request-by-three-way` 예시에서는 `MyDemoRepo` 리포지토리에서 충돌 세부 정보 및 충돌 해결 전략에 대한 기본 옵션을 사용하여 지정된 풀 요청을 병합하고 닫습니다.  

```
aws codecommit merge-pull-request-by-three-way \
    --pull-request-id 47 \
    --source-commit-id 99132ab0EXAMPLE \
    --repository-name MyDemoRepo \
    --name "Maria Garcia" \
    --email "maria_garcia@example.com" \
    --commit-message "Merging pull request 47 by three-way with default options"
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approver-rule-for-main",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "originApprovalRuleTemplate": {
                    "approvalRuleTemplateId": "dd8b17fe-EXAMPLE",
                    "approvalRuleTemplateName": "2-approver-rule-for-main"
                },
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::123456789012:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.142,
        "description": "Review the latest changes and updates to the global variables",
        "lastActivityDate": 1508887223.155,
        "pullRequestId": "47",
        "pullRequestStatus": "CLOSED",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": true,
                    "mergedBy": "arn:aws:iam::123456789012:user/Mary_Major"
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Merge a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-merge-pull-request.html#merge-pull-request-by-three-way) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [MergePullRequestByThreeWay](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/merge-pull-request-by-three-way.html) 섹션을 참조하세요.

### `override-pull-request-approval-rules`
<a name="codecommit_OverridePullRequestApprovalRules_cli_topic"></a>

다음 코드 예시에서는 `override-pull-request-approval-rules`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 규칙 요구 사항 재정의**  
다음 `override-pull-request-approval-rules` 예시에서는 지정된 풀 요청에 대한 승인 규칙을 재정의합니다. 대신 재정의를 취소하는 방법 `--override-status` 파라미터 값을 로 설정합니다`REVOKE`.  

```
aws codecommit override-pull-request-approval-rules \
    --pull-request-id 34  \
    --revision-id 927df8d8EXAMPLE \
    --override-status OVERRIDE
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Override Approval Rules on a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-override-approval-rules.html#override-approval-rules) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [OverridePullRequestApprovalRules](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/override-pull-request-approval-rules.html) 섹션을 참조하세요.

### `post-comment-for-compared-commit`
<a name="codecommit_PostCommentForComparedCommit_cli_topic"></a>

다음 코드 예시에서는 `post-comment-for-compared-commit`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋에 설명 작성**  
이 예시에서는 `MyDemoRepo` 리포지토리에 있는 두 커밋을 비교하여 `cl_sample.js` 파일에 변경 사항에 대한 설명 `"Can you add a test case for this?"`을 추가하는 방법을 보여줍니다.  

```
aws codecommit post-comment-for-compared-commit \
    --repository-name MyDemoRepo \
    --before-commit-id 317f8570EXAMPLE \
    --after-commit-id 5d036259EXAMPLE \
    --client-request-token 123Example \
    --content "Can you add a test case for this?" \
    --location filePath=cl_sample.js,filePosition=1232,relativeFileVersion=AFTER
```
출력:  

```
{
    "afterBlobId": "1f330709EXAMPLE",
    "afterCommitId": "317f8570EXAMPLE",
    "beforeBlobId": "80906a4cEXAMPLE",
    "beforeCommitId": "6e147360EXAMPLE",
    "comment": {
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "clientRequestToken": "",
        "commentId": "553b509bEXAMPLE56198325",
        "content": "Can you add a test case for this?",
        "creationDate": 1508369612.203,
        "deleted": false,
        "commentId": "abc123-EXAMPLE",
        "lastModifiedDate": 1508369612.203,
        "callerReactions": [],
        "reactionCounts": []
    },
    "location": {
        "filePath": "cl_sample.js",
        "filePosition": 1232,
        "relativeFileVersion": "AFTER"
    ,
    "repositoryName": "MyDemoRepo"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PostCommentForComparedCommit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/post-comment-for-compared-commit.html) 섹션을 참조하세요.

### `post-comment-for-pull-request`
<a name="codecommit_PostCommentForPullRequest_cli_topic"></a>

다음 코드 예시에서는 `post-comment-for-pull-request`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 리퀘스트에 설명 추가**  
다음 `post-comment-for-pull-request` 예시에서는 'These don't appear to be used anywhere Can we remove them?'라는 설명을 `MyDemoRepo` 리포지토리에 있는 풀 리퀘스트의 ID가 `47`인 `ahs_count.py` 파일에 대한 변경 사항에 추가합니다.  

```
aws codecommit post-comment-for-pull-request \
    --pull-request-id "47" \
    --repository-name MyDemoRepo \
    --before-commit-id 317f8570EXAMPLE \
    --after-commit-id 5d036259EXAMPLE \
    --client-request-token 123Example \
    --content "These don't appear to be used anywhere. Can we remove them?" \
    --location filePath=ahs_count.py,filePosition=367,relativeFileVersion=AFTER
```
출력:  

```
{
     "afterBlobId": "1f330709EXAMPLE",
     "afterCommitId": "5d036259EXAMPLE",
     "beforeBlobId": "80906a4cEXAMPLE",
     "beforeCommitId": "317f8570EXAMPLE",
     "comment": {
            "authorArn": "arn:aws:iam::111111111111:user/Saanvi_Sarkar",
            "clientRequestToken": "123Example",
            "commentId": "abcd1234EXAMPLEb5678efgh",
            "content": "These don't appear to be used anywhere. Can we remove them?",
            "creationDate": 1508369622.123,
            "deleted": false,
            "CommentId": "",
            "lastModifiedDate": 1508369622.123,
            "callerReactions": [],
            "reactionCounts": []
        },
        "location": {
            "filePath": "ahs_count.py",
            "filePosition": 367,
            "relativeFileVersion": "AFTER"
         },
     "repositoryName": "MyDemoRepo",
     "pullRequestId": "47"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PostCommentForPullRequest](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/post-comment-for-pull-request.html) 섹션을 참조하세요.

### `post-comment-reply`
<a name="codecommit_PostCommentReply_cli_topic"></a>

다음 코드 예시에서는 `post-comment-reply`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋 또는 풀 리퀘스트의 설명에 답장**  
이 예시에서는 시스템 생성 ID가`abcd1234EXAMPLEb5678efgh`인 설명에 대한 응답 `"Good catch. I'll remove them."`을 추가하는 방법을 보여줍니다.  

```
aws codecommit post-comment-reply \
    --in-reply-to abcd1234EXAMPLEb5678efgh \
    --content "Good catch. I'll remove them." \
    --client-request-token 123Example
```
출력:  

```
{
    "comment": {
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "clientRequestToken": "123Example",
        "commentId": "442b498bEXAMPLE5756813",
        "content": "Good catch. I'll remove them.",
        "creationDate": 1508369829.136,
        "deleted": false,
        "CommentId": "abcd1234EXAMPLEb5678efgh",
        "lastModifiedDate": 150836912.221,
        "callerReactions": [],
        "reactionCounts": []
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PostCommentReply](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/post-comment-reply.html) 섹션을 참조하세요.

### `put-comment-reaction`
<a name="codecommit_PutCommentReaction_cli_topic"></a>

다음 코드 예시에서는 `put-comment-reaction`의 사용 방법을 보여줍니다.

**AWS CLI**  
**이모티콘으로 커밋에 대한 설명에 답글 달기**  
다음 `put-comment-reaction` 예시에서는 ID가 `:thumbsup:`이고 이모티콘 반응 값이 `abcd1234EXAMPLEb5678efgh`인 설명에 응답합니다.  

```
aws codecommit put-comment-reaction \
    --comment-id abcd1234EXAMPLEb5678efgh \
    --reaction-value :thumbsup:
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Comment on a commit in AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#how-to-commit-comment-cli-commit-reply-emoji) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PutCommentReaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/put-comment-reaction.html) 섹션을 참조하세요.

### `put-file`
<a name="codecommit_PutFile_cli_topic"></a>

다음 코드 예시에서는 `put-file`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리에 파일 추가**  
다음 `put-file` 예시에서는 가장 최근 커밋의 ID가 '4c925148EXAMPLE'인 'feature-randomizationfeature'라는 브랜치에 'ExampleSolution.py'라는 파일을 'MyDemoRepo'라는 리포지토리에 추가합니다.  

```
aws codecommit put-file \
    --repository-name MyDemoRepo \
    --branch-name feature-randomizationfeature \
    --file-content file://MyDirectory/ExampleSolution.py \
    --file-path /solutions/ExampleSolution.py \
    --parent-commit-id 4c925148EXAMPLE \
    --name "Maria Garcia" \
    --email "maria_garcia@example.com" \
    --commit-message "I added a third randomization routine."
```
출력:  

```
{
    "blobId": "2eb4af3bEXAMPLE",
    "commitId": "317f8570EXAMPLE",
    "treeId": "347a3408EXAMPLE"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PutFile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/put-file.html) 섹션을 참조하세요.

### `put-repository-triggers`
<a name="codecommit_PutRepositoryTriggers_cli_topic"></a>

다음 코드 예시에서는 `put-repository-triggers`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리에서 트리거를 추가하거나 업데이트하는 방법**  
이 예시에서는 MyDemoRepo라는 리포지토리에 대한 모든 트리거의 구조가 포함된 이미 생성된 JSON 파일(여기서는 MyTriggers.json)을 사용하여 'MyFirstTrigger' 및 'MySecondTrigger'라는 트리거를 업데이트하는 방법을 보여줍니다. 기존 트리거에 대한 JSON을 가져오는 방법을 알아보려면 get-repository-triggers 명령을 참조하세요.  

```
aws codecommit put-repository-triggers \
    --repository-name MyDemoRepo file://MyTriggers.json
```
`MyTriggers.json`의 콘텐츠:  

```
{
    "repositoryName": "MyDemoRepo",
    "triggers": [
        {
            "destinationArn": "arn:aws:sns:us-east-1:80398EXAMPLE:MyCodeCommitTopic",
            "branches": [
                "main",
                "preprod"
            ],
            "name": "MyFirstTrigger",
            "customData": "",
            "events": [
                "all"
            ]
        },
        {
            "destinationArn": "arn:aws:lambda:us-east-1:111111111111:function:MyCodeCommitPythonFunction",
            "branches": [],
            "name": "MySecondTrigger",
            "customData": "EXAMPLE",
            "events": [
                "all"
            ]
        }
    ]
}
```
출력:  

```
{
    "configurationId": "6fa51cd8-35c1-EXAMPLE"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PutRepositoryTriggers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/put-repository-triggers.html) 섹션을 참조하세요.

### `tag-resource`
<a name="codecommit_TagResource_cli_topic"></a>

다음 코드 예시에서는 `tag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**기존 리포지토리에 AWS 태그 추가**  
다음 `tag-resource` 예시에서는 지정된 리포지토리에 두 개의 태그를 지정합니다.  

```
aws codecommit tag-resource \
    --resource-arn arn:aws:codecommit:us-west-2:111111111111:MyDemoRepo \
    --tags Status=Secret,Team=Saanvi
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Add a Tag to a Repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-tag-repository-add.html#how-to-tag-repository-add-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/tag-resource.html)를 참조하세요.

### `test-repository-triggers`
<a name="codecommit_TestRepositoryTriggers_cli_topic"></a>

다음 코드 예시에서는 `test-repository-triggers`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리에서 트리거를 테스트하는 방법**  
이 예시에서는 MyDemoRepo라는 AWS CodeCommit 리포지토리에서 'MyFirstTrigger'라는 트리거를 테스트하는 방법을 보여줍니다. 이 예시에서는 리포지토리의 이벤트가 Amazon Simple Notification Service(Amazon SNS) 주제에서 알림을 트리거합니다.  
명령:  

```
aws codecommit test-repository-triggers --repository-name MyDemoRepo --triggers name=MyFirstTrigger,destinationArn=arn:aws:sns:us-east-1:111111111111:MyCodeCommitTopic,branches=mainline,preprod,events=all
```
출력:  

```
{
  "successfulExecutions": [
      "MyFirstTrigger"
  ],
  "failedExecutions": []
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TestRepositoryTriggers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/test-repository-triggers.html) 섹션을 참조하세요.

### `untag-resource`
<a name="codecommit_UntagResource_cli_topic"></a>

다음 코드 예시에서는 `untag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리에서 AWS 태그 제거**  
다음 `untag-resource` 예시에서는 `MyDemoRepo` 리포지토리에서 지정된 키가 있는 태그를 제거합니다.  

```
aws codecommit untag-resource \
    --resource-arn arn:aws:codecommit:us-west-2:111111111111:MyDemoRepo \
    --tag-keys Status
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Remove a Tag from a Repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-tag-repository-delete.html#how-to-tag-repository-delete-cli) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/untag-resource.html)를 참조하세요.

### `update-approval-rule-template-content`
<a name="codecommit_UpdateApprovalRuleTemplateContent_cli_topic"></a>

다음 코드 예시에서는 `update-approval-rule-template-content`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿의 내용 업데이트**  
다음 `update-approval-rule-template-content` 예시에서는 지정된 승인 규칙 템플릿의 내용을 변경하여 승인 풀을 `CodeCommitReview` 역할을 맡는 사용자로 재정의합니다.  

```
aws codecommit update-approval-rule-template-content \
    --approval-rule-template-name 1-approver-rule  \
    --new-rule-content "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}"
```
출력:  

```
{
    "approvalRuleTemplate": {
        "creationDate": 1571352720.773,
        "approvalRuleTemplateDescription": "Requires 1 approval for all pull requests from the CodeCommitReview pool",
        "lastModifiedDate": 1571358728.41,
        "approvalRuleTemplateId": "41de97b7-EXAMPLE",
        "approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 1,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
        "approvalRuleTemplateName": "1-approver-rule-for-all-pull-requests",
        "ruleContentSha256": "2f6c21a5EXAMPLE",
        "lastModifiedUser": "arn:aws:iam::123456789012:user/Li_Juan"
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#update-template-content) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateApprovalRuleTemplateContent](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-approval-rule-template-content.html) 섹션을 참조하세요.

### `update-approval-rule-template-description`
<a name="codecommit_UpdateApprovalRuleTemplateDescription_cli_topic"></a>

다음 코드 예시에서는 `update-approval-rule-template-description`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿의 설명 업데이트**  
다음 `update-approval-rule-template-description` 예시에서는 지정된 승인 규칙 템플릿의 설명을`Requires 1 approval for all pull requests from the CodeCommitReview pool`로 변경합니다.  

```
aws codecommit update-approval-rule-template-description \
    --approval-rule-template-name 1-approver-rule-for-all-pull-requests  \
    --approval-rule-template-description "Requires 1 approval for all pull requests from the CodeCommitReview pool"
```
출력:  

```
{
  "approvalRuleTemplate": {
    "creationDate": 1571352720.773,
    "approvalRuleTemplateDescription": "Requires 1 approval for all pull requests from the CodeCommitReview pool",
    "lastModifiedDate": 1571358728.41,
    "approvalRuleTemplateId": "41de97b7-EXAMPLE",
    "approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 1,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
    "approvalRuleTemplateName": "1-approver-rule-for-all-pull-requests",
    "ruleContentSha256": "2f6c21a5EXAMPLE",
    "lastModifiedUser": "arn:aws:iam::123456789012:user/Li_Juan"
  }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#update-template-description) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateApprovalRuleTemplateDescription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-approval-rule-template-description.html) 섹션을 참조하세요.

### `update-approval-rule-template-name`
<a name="codecommit_UpdateApprovalRuleTemplateName_cli_topic"></a>

다음 코드 예시에서는 `update-approval-rule-template-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**승인 규칙 템플릿의 이름 업데이트**  
다음 `update-approval-rule-template-name` 예시에서는 승인 규칙 템플릿의 이름을 `1-approver-rule`에서 1-approvers-rule-for-all-pull-requests`로 변경합니다.  

```
aws codecommit update-approval-rule-template-name \
    --old-approval-rule-template-name 1-approver-rule  \
    --new-approval-rule-template-name 1-approver-rule-for-all-pull-requests
```
출력:  

```
{
  "approvalRuleTemplate": {
    "approvalRuleTemplateName": "1-approver-rule-for-all-pull-requests",
    "lastModifiedDate": 1571358241.619,
    "approvalRuleTemplateId": "41de97b7-EXAMPLE",
    "approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 1,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
    "creationDate": 1571352720.773,
    "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
    "approvalRuleTemplateDescription": "All pull requests must be approved by one developer on the team.",
    "ruleContentSha256": "2f6c21a5cEXAMPLE"
  }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Manage Approval Rule Templates](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-manage-templates.html#update-template-description) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateApprovalRuleTemplateName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-approval-rule-template-name.html) 섹션을 참조하세요.

### `update-comment`
<a name="codecommit_UpdateComment_cli_topic"></a>

다음 코드 예시에서는 `update-comment`의 사용 방법을 보여줍니다.

**AWS CLI**  
**커밋에 대한 설명 업데이트**  
이 예시에서는 ID가 `442b498bEXAMPLE5756813`인 설명에 `"Fixed as requested. I'll update the pull request."` 콘텐츠를 추가하는 방법을 보여줍니다.  

```
aws codecommit update-comment \
    --comment-id 442b498bEXAMPLE5756813 \
    --content "Fixed as requested. I'll update the pull request."
```
출력:  

```
{
    "comment": {
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "clientRequestToken": "",
        "commentId": "442b498bEXAMPLE5756813",
        "content": "Fixed as requested. I'll update the pull request.",
        "creationDate": 1508369929.783,
        "deleted": false,
        "lastModifiedDate": 1508369929.287,
        "callerReactions": [],
        "reactionCounts":
            {
                "THUMBSUP" : 2
            }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateComment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-comment.html) 섹션을 참조하세요.

### `update-default-branch`
<a name="codecommit_UpdateDefaultBranch_cli_topic"></a>

다음 코드 예시에서는 `update-default-branch`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 기본 브랜치 변경**  
이 예시에서는 AWS CodeCommit 리포지토리의 기본 브랜치를 변경합니다. 이 명령은 오류가 있는 경우에만 출력을 생성합니다.  
명령:  

```
aws codecommit update-default-branch --repository-name MyDemoRepo --default-branch-name MyNewBranch
```
출력:  

```
None.
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateDefaultBranch](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-default-branch.html) 섹션을 참조하세요.

### `update-pull-request-approval-rule-content`
<a name="codecommit_UpdatePullRequestApprovalRuleContent_cli_topic"></a>

다음 코드 예시에서는 `update-pull-request-approval-rule-content`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 규칙 편집**  
다음 `update-pull-request-approval-rule-content` 예시에서는 `123456789012` AWS 계정의 모든 IAM 사용자를 포함하는 승인 풀에서 한 명의 사용자 승인을 요구하도록 승인 규칙을 지정하여 업데이트합니다.  

```
aws codecommit update-pull-request-approval-rule-content \
    --pull-request-id 27  \
    --approval-rule-name "Require two approved approvers" \
    --approval-rule-content "{Version: 2018-11-08, Statements: [{Type: \"Approvers\", NumberOfApprovalsNeeded: 1, ApprovalPoolMembers:[\"CodeCommitApprovers:123456789012:user/*\"]}]}}"
```
출력:  

```
{
    "approvalRule": {
        "approvalRuleContent": "{Version: 2018-11-08, Statements: [{Type: \"Approvers\", NumberOfApprovalsNeeded: 1, ApprovalPoolMembers:[\"CodeCommitApprovers:123456789012:user/*\"]}]}}",
        "approvalRuleId": "aac33506-EXAMPLE",
        "originApprovalRuleTemplate": {},
        "creationDate": 1570752871.932,
        "lastModifiedDate": 1570754058.333,
        "approvalRuleName": Require two approved approvers",
        "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
        "ruleContentSha256": "cd93921cEXAMPLE",
    }
}
```
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Edit or Delete an Approval Rule](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-edit-delete-pull-request-approval-rule.html#update-pull-request-approval-rule-content) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdatePullRequestApprovalRuleContent](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-pull-request-approval-rule-content.html) 섹션을 참조하세요.

### `update-pull-request-approval-state`
<a name="codecommit_UpdatePullRequestApprovalState_cli_topic"></a>

다음 코드 예시에서는 `update-pull-request-approval-state`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 승인 또는 승인 취소**  
다음 `update-pull-request-approval-state` ID가 `27`이고 개정 ID가 `9f29d167EXAMPLE`인 풀 리퀘스트를 승인합니다. 대신 승인을 취소하려면 `--approval-state` 파라미터 값을 `REVOKE`로 설정합니다.  

```
aws codecommit update-pull-request-approval-state \
    --pull-request-id 27  \
    --revision-id 9f29d167EXAMPLE  \
    --approval-state "APPROVE"
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CodeCommit 사용 설명서*의 [Review a Pull Request](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-review-pull-request.html#update-pull-request-approval-state) 섹션을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdatePullRequestApprovalState](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-pull-request-approval-state.html) 섹션을 참조하세요.

### `update-pull-request-description`
<a name="codecommit_UpdatePullRequestDescription_cli_topic"></a>

다음 코드 예시에서는 `update-pull-request-description`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청에 대한 설명을 변경하는 방법**  
이 예시에서는 ID가 `47`인 풀 리퀘스트에 대한 설명을 변경하는 방법을 보여줍니다.  

```
aws codecommit update-pull-request-description \
    --pull-request-id 47 \
    --description "Updated the pull request to remove unused global variable."
```
출력:  

```
{
    "pullRequest": {
        "authorArn": "arn:aws:iam::111111111111:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.155,
        "description": "Updated the pull request to remove unused global variable.",
        "lastActivityDate": 1508372423.204,
        "pullRequestId": "47",
        "pullRequestStatus": "OPEN",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": false,
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdatePullRequestDescription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-pull-request-description.html) 섹션을 참조하세요.

### `update-pull-request-status`
<a name="codecommit_UpdatePullRequestStatus_cli_topic"></a>

다음 코드 예시에서는 `update-pull-request-status`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청의 상태 변경**  
이 예시에서는 `MyDemoRepo`라는 이름의 AWS CodeCommit 리포지토리에서 ID가 `42`인 풀 리퀘스트의 상태를 `CLOSED`로 변경하는 방법을 보여줍니다.  

```
aws codecommit update-pull-request-status \
    --pull-request-id 42 \
    --pull-request-status CLOSED
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approvers-needed-for-this-change",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::123456789012:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.165,
        "description": "Updated the pull request to remove unused global variable.",
        "lastActivityDate": 1508372423.12,
        "pullRequestId": "47",
        "pullRequestStatus": "CLOSED",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": false,
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdatePullRequestStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-pull-request-status.html) 섹션을 참조하세요.

### `update-pull-request-title`
<a name="codecommit_UpdatePullRequestTitle_cli_topic"></a>

다음 코드 예시에서는 `update-pull-request-title`의 사용 방법을 보여줍니다.

**AWS CLI**  
**풀 요청의 제목을 변경하는 방법**  
이 예시에서는 ID가 `47`인 풀 리퀘스트의 제목을 변경하는 방법을 보여줍니다.  

```
aws codecommit update-pull-request-title \
    --pull-request-id 47 \
    --title "Consolidation of global variables - updated review"
```
출력:  

```
{
    "pullRequest": {
        "approvalRules": [
            {
                "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}",
                "approvalRuleId": "dd8b17fe-EXAMPLE",
                "approvalRuleName": "2-approver-rule-for-main",
                "creationDate": 1571356106.936,
                "lastModifiedDate": 571356106.936,
                "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major",
                "originApprovalRuleTemplate": {
                    "approvalRuleTemplateId": "dd8b26gr-EXAMPLE",
                    "approvalRuleTemplateName": "2-approver-rule-for-main"
                },
                "ruleContentSha256": "4711b576EXAMPLE"
            }
        ],
        "authorArn": "arn:aws:iam::123456789012:user/Li_Juan",
        "clientRequestToken": "",
        "creationDate": 1508530823.12,
        "description": "Review the latest changes and updates to the global variables. I have updated this request with some changes, including removing some unused variables.",
        "lastActivityDate": 1508372657.188,
        "pullRequestId": "47",
        "pullRequestStatus": "OPEN",
        "pullRequestTargets": [
            {
                "destinationCommit": "9f31c968EXAMPLE",
                "destinationReference": "refs/heads/main",
                "mergeMetadata": {
                    "isMerged": false,
                },
                "repositoryName": "MyDemoRepo",
                "sourceCommit": "99132ab0EXAMPLE",
                "sourceReference": "refs/heads/variables-branch"
            }
        ],
        "title": "Consolidation of global variables - updated review"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdatePullRequestTitle](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-pull-request-title.html) 섹션을 참조하세요.

### `update-repository-description`
<a name="codecommit_UpdateRepositoryDescription_cli_topic"></a>

다음 코드 예시에서는 `update-repository-description`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 설명 변경**  
이 예시에서는 AWS CodeCommit 리포지토리에 대한 설명을 변경합니다. 이 명령은 오류가 있는 경우에만 출력을 생성합니다.  
명령:  

```
aws codecommit update-repository-description --repository-name MyDemoRepo --repository-description "This description was changed"
```
출력:  

```
None.
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateRepositoryDescription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-repository-description.html) 섹션을 참조하세요.

### `update-repository-name`
<a name="codecommit_UpdateRepositoryName_cli_topic"></a>

다음 코드 예시에서는 `update-repository-name`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리포지토리의 이름 변경**  
이 예시에서는 AWS CodeCommit 리포지토리의 이름을 변경합니다. 이 명령은 오류가 있는 경우에만 출력을 생성합니다. AWS CodeCommit 리포지토리의 이름을 변경하면 사용자가 리포지토리에 연결하는 데 필요한 SSH 및 HTTPS URL이 변경됩니다. 사용자는 연결 설정을 업데이트할 때까지 이 리포지토리에 연결할 수 없습니다. 또한 리포지토리의 ARN이 변경되므로, 리포지토리 이름을 변경하면 이 리포지토리의 ARN을 사용하는 모든 IAM 사용자 정책이 무효화됩니다.  
명령:  

```
aws codecommit update-repository-name --old-name MyDemoRepo --new-name MyRenamedDemoRepo
```
출력:  

```
None.
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateRepositoryName](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codecommit/update-repository-name.html) 섹션을 참조하세요.