

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 블루프린트 작업 CLI
<a name="bda-blueprint-operations"></a>

이 가이드에서는 Amazon Bedrock데이터 자동화(BDA)를 위한 AWS 명령줄 인터페이스(CLI)를 통해 사용할 수 있는 블루프린트 작업을 다룹니다.

## 블루프린트 생성
<a name="create-blueprints-cli"></a>

블루프린트는 문서, 이미지, 오디오 또는 비디오 파일에서 추출하려는 데이터의 구조와 속성을 정의합니다. create-blueprint 명령을 사용하여 새 블루프린트를 정의합니다.

다음 명령은 여권 이미지에서 데이터를 추출하도록 조정된 새 블루프린트를 생성합니다.

**구문**

```
aws bedrock-data-automation create-blueprint \
      --blueprint-name "passport-blueprint" \
      --type "IMAGE" \
      --blueprint-stage "DEVELOPMENT" \
      --schema '{
        "class": "Passport",
        "description": "Blueprint for processing passport images",
        "properties": {
          "passport_number": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The passport identification number"
          },
          "full_name": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The full name of the passport holder"
          },
          "expiration_date": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The passport expiration date"
          }
        }
      }'
```

## 전체 파라미터 참조
<a name="create-blueprint-parameters"></a>

다음 테이블은 `create-blueprint` 명령에 사용 가능한 모든 파라미터를 보여 줍니다.


**create-blueprint용 파라미터**  

| 파라미터 | 필수 | 기본값 | 설명 | 
| --- | --- | --- | --- | 
| --blueprint-name | 예 | 해당 사항 없음 | 블루프린트 이름 | 
| --type | 예 | 해당 사항 없음 | 콘텐츠 유형(이미지, 문서, 오디오, 비디오) | 
| --blueprint-stage | 아니요 | LIVE | 블루프린트 단계(개발 또는 라이브) | 
| --schema | 예 | 해당 사항 없음 | 블루프린트 구조를 정의하는 JSON 스키마 | 
| --client-token | 아니요 | 자동 생성됨 | 요청 멱등성을 위한 고유 식별자 | 

## 블루프린트 구성 보기
<a name="view-blueprint-cli"></a>

**모든 블루프린트 나열**

list-blueprints 명령을 사용하여 계정에 연결된 모든 블루프린트 목록을 검색합니다.

**구문**

```
aws bedrock-data-automation list-blueprints
```

**블루프린트 세부 정보 보기**

스키마 및 구성을 포함하여 특정 블루프린트에 대한 자세한 정보를 보려면 get-blueprint 명령을 사용합니다.

**구문**

```
aws bedrock-data-automation get-blueprint \
      --blueprint-arn "Amazon Resource Name (ARN)"
```

**특정 버전 검사**

버전이 지정된 블루프린트로 작업할 때는 get-blueprint 명령을 --blueprint-version 옵션과 함께 사용하여 특정 버전을 확인합니다.

**구문**

```
      aws bedrock-data-automation get-blueprint \
      --blueprint-arn "Amazon Resource Name (ARN)" \
      --blueprint-version "version-number"
```

**특정 단계 검사**

개발 또는 라이브 단계에서 블루프린트를 보려면 다음을 사용합니다.

```
      aws bedrock-data-automation get-blueprint \
      --blueprint-arn "Amazon Resource Name (ARN)" \
      --blueprint-stage "LIVE"
```

## 블루프린트 사양 편집
<a name="edit-blueprint-cli"></a>

**블루프린트 설정 업데이트**

기존 블루프린트의 스키마 또는 속성을 수정하려면 update-blueprint 명령을 사용합니다.

**구문**

```
aws bedrock-data-automation update-blueprint \
      --blueprint-arn "Amazon Resource Name (ARN)" \
      --schema '{
        "class": "Passport",
        "description": "Updated blueprint for processing passport images",
        "properties": {
          "passport_number": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The passport identification number"
          },
          "full_name": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The full name of the passport holder"
          },
          "expiration_date": {
            "type": "string",
            "inferenceType": "explicit",
            "instruction": "The passport expiration date"
          }
        }
      }'
```

**참고:** 블루프린트를 업데이트할 때는 변경하지 않는 필드에도 전체 스키마를 제공해야 합니다.

**라이브로 승격**

프로덕션을 위해 블루프린트를 개발 단계에서 라이브 단계로 이동하려면 update-blueprint 명령을 --blueprint-stage 옵션과 함께 사용합니다.

**구문**

```
aws bedrock-data-automation update-blueprint \
      --blueprint-arn "Amazon Resource Name (ARN)" \
      --blueprint-stage "LIVE"
```

**블루프린트 버전 관리**

create-blueprint-version 명령을 사용하여 크게 변경하기 전에 블루프린트의 새 버전을 생성하여 현재 상태를 유지합니다.

**구문**

```
aws bedrock-data-automation create-blueprint-version \
      --blueprint-arn "Amazon Resource Name (ARN)"
```

## 블루프린트 태그 관리
<a name="tag-management-cli"></a>

태그는 사용자가 블루프린트를 구성 및 분류하여 관리를 단순화하는 데 도움이 됩니다.

**태그 추가**

태그를 추가하여 블루프린트에 메타데이터를 적용합니다.

**구문**

```
aws bedrock-data-automation tag-resource \
      --resource-arn "Amazon Resource Name (ARN)" \
      --tags '{"Department":"Finance","Project":"PassportProcessing"}'
```

**태그 제거**

untag-resource 명령을 사용하여 블루프린트에서 특정 태그를 제거합니다.

**구문**

```
aws bedrock-data-automation untag-resource \
      --resource-arn "Amazon Resource Name (ARN)" \
      --tag-keys '["Department","Project"]'
```

**태그 보기**

list-tags-for-resource 명령을 사용하여 블루프린트에 연결된 모든 태그를 나열합니다.

**구문**

```
aws bedrock-data-automation list-tags-for-resource \
      --resource-arn "Amazon Resource Name (ARN)"
```

## 블루프린트 삭제
<a name="delete-blueprint-cli"></a>

**전체 블루프린트 삭제**

delete-blueprint 명령을 사용하여 블루프린트와 모든 버전을 영구적으로 제거합니다.

**구문**

```
aws bedrock-data-automation delete-blueprint \
          --blueprint-arn "Amazon Resource Name (ARN)"
```

**주의:** 이 명령을 사용하면 블루프린트가 영구적으로 삭제되며 복구할 수 없습니다.

**중요:** 현재 프로젝트에서 사용 중인 블루프린트는 삭제할 수 없습니다. 삭제하기 전에 프로젝트의 사용자 지정 출력 구성에서 블루프린트가 참조되지 않았는지 확인하세요.

## 블루프린트 최적화
<a name="blueprint-optimization-cli"></a>

### 블루프린트 최적화 호출
<a name="invoking-blueprint-optimization"></a>

비동기 블루프린트 최적화 작업을 시작하여 각 블루프린트 필드에 대한 블루프린트의 지침과 결과 정확도를 개선합니다.

**구문**

```
aws bedrock-data-automation invoke-blueprint-optimization-async \
    --blueprint blueprintArn="arn:aws:bedrock:<region>:<account_id>:blueprint/<blueprint_id>",stage="DEVELOPMENT" \
    --samples '[
        {
            "assetS3Object": {
                "s3Uri": "s3://my-optimization-bucket/samples/document1.pdf"
            },
            "groundTruthS3Object": {
                "s3Uri": "s3://my-optimization-bucket/ground-truth/document1-expected.json"
            }
        }
    ]' \
    --output-configuration s3Object='{s3Uri="s3://my-optimization-bucket/results/optimization-output"}' \
    --data-automation-profile-arn "Amazon Resource Name (ARN):data-automation-profile/default"
```

### 블루프린트 최적화 상태 확인
<a name="checking-blueprint-optimization-status"></a>

블루프린트 최적화 작업의 진행 상황과 결과를 모니터링합니다.

**구문**

```
aws bedrock-data-automation get-blueprint-optimization-status \
    --invocation-arn "arn:aws:bedrock:<region>:<account_id>:blueprint-optimization-invocation/opt-12345abcdef"
```

이 명령을 사용하여 최적화 작업 상태를 추적합니다. 응답에는 현재 상태(생성됨, InProgress, 성공, ServiceError 또는 ClientError)와 완료되면 출력 구성 세부 정보가 포함됩니다.

### 블루프린트 단계 복사
<a name="copying-blueprint-stages"></a>

한 단계에서 다른 단계로 블루프린트 복사

**구문**

```
aws bedrock-data-automation copy-blueprint-stage \
    --blueprint-arn "arn:aws:bedrock:<region>:<account_id>:blueprint/<blueprint_id>" \
    --source-stage "DEVELOPMENT" \
    --target-stage "LIVE"
```

**주의:**이 명령은 소스 단계에서 대상 단계로 전체 블루프린트 구성을 복사하여 대상 단계의 기존 구성을 덮어씁니다.

**중요:** 프로덕션(라이브) 단계로 복사하기 전에 소스 단계에서 블루프린트를 철저히 테스트해야 합니다. 이 작업은 쉽게 실행 취소할 수 없습니다.