

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

# 자산 및 모델을 사용한 일괄 작업
<a name="bulk-operations-assets-and-models"></a>

많은 수의 자산 또는 자산 모델을 사용하여 작업하려면 일괄 작업을 사용하여 리소스를 다른 위치로 일괄적으로 가져오고 내보냅니다. 예를 들어 Amazon S3 버킷에서 자산 또는 자산 모델을 정의하는 데이터 파일을 생성하고 AWS IoT SiteWise에서 일괄 가져오기를 사용하여 이들을 생성하거나 업데이트할 수 있습니다. 또는 자산 또는 자산 모델이 많은 경우 Amazon S3로 내보낼 AWS IoT SiteWise수 있습니다.

**참고**  
 AWS IoT TwinMaker API에서 작업을 호출 AWS IoT SiteWise 하여에서 대량 작업을 수행합니다. 워크 AWS IoT TwinMaker 스페이스를 설정 AWS IoT TwinMaker 하거나 생성하지 않고도이 작업을 수행할 수 있습니다. AWS IoT SiteWise 콘텐츠를 배치할 수 있는 Amazon S3 버킷만 있으면 됩니다.  


**Topics**
+ [주요 개념 및 용어](#bulk-operations-terminology)
+ [지원되는 기능](#bulk-operations-functionality)
+ [일괄 작업 사전 조건](bulk-operations-prereqs.md)
+ [일괄 가져오기 작업 실행](running-bulk-operations-import.md)
+ [일괄 내보내기 작업 실행](running-bulk-operations-export.md)
+ [작업 진행 상황 추적 및 오류 처리](jobs-progress-error-handling.md)
+ [메타데이터 가져오기 예시](bulk-operations-import-metadata-example.md)
+ [메타데이터 예시 내보내기](bulk-operations-export-filter-examples.md)
+ [AWS IoT SiteWise 메타데이터 전송 작업 스키마](bulk-operations-schema.md)

## 주요 개념 및 용어
<a name="bulk-operations-terminology"></a>

AWS IoT SiteWise 대량 가져오기 및 내보내기 기능은 다음 개념과 용어에 의존합니다.
+ **가져오기**: Amazon S3 버킷의 파일에서 AWS IoT SiteWise로 자산 또는 자산 모델을 이동하는 작업입니다.
+ **내보내기**: 자산 또는 자산 모델을에서 Amazon S3 버킷 AWS IoT SiteWise 으로 이동하는 작업입니다.
+ **소스**: 콘텐츠를 이동할 시작 위치입니다.

  예를 들어 Amazon S3 버킷은 가져오기 소스이고 AWS IoT SiteWise 는 내보내기 소스입니다.
+ **대상**: 콘텐츠를 이동할 도착 위치입니다.

  예를 들어 Amazon S3 버킷은 내보내기 대상이고는 가져오기 대상 AWS IoT SiteWise 입니다.
+ **AWS IoT SiteWise 스키마**:이 스키마는 메타데이터를 가져오고 내보내는 데 사용됩니다 AWS IoT SiteWise.
+ **최상위 리소스:** 자산 또는 자산 모델과 같이 개별적으로 생성하거나 업데이트할 수 있는 AWS IoT SiteWise 리소스입니다.
+ **하위 리소스:** 최상위 AWS IoT SiteWise 리소스 내의 중첩된 리소스입니다. 예를 들어 속성, 계층 구조 및 복합 모델이 있습니다.
+ **메타데이터 **: 리소스를 성공적으로 가져오거나 내보내는 데 필요한 주요 정보입니다. 메타데이터의 예로는 자산 및 자산 모델의 정의가 있습니다.
+ **metadataTransferJob**: `CreateMetadataTransferJob`을 실행할 때 생성된 객체입니다.

## 지원되는 기능
<a name="bulk-operations-functionality"></a>

이 주제에서는 일괄 작업을 실행할 때 수행할 수 있는 작업에 대해 설명합니다. 일괄 작업은 다음 기능을 지원합니다.
+ **최상위 리소스 생성:** ID를 정의하지 않거나 ID가 기존 ID와 일치하지 않는 자산 또는 자산 모델을 가져오면 새 리소스로 생성됩니다.
+ **최상위 리소스 대체:** ID가 이미 존재하는 ID와 일치하는 자산 또는 자산 모델을 가져오면 기존 리소스가 대체됩니다.
+ **하위 리소스 생성, 대체 또는 삭제:** 가져오기가 자산 또는 자산 모델과 같은 최상위 리소스를 대체하면 속성, 계층 구조 또는 복합 모델과 같은 모든 하위 리소스를 새 정의로 대체합니다.

  예를 들어 일괄 가져오기 중에 자산 모델을 업데이트하고 업데이트된 버전이 원본에 없는 속성을 정의하면 새 속성이 생성됩니다. 이미 존재하는 속성을 정의하면 기존 속성이 업데이트됩니다. 업데이트된 자산 모델이 원본에 있는 속성을 생략하면 속성이 삭제됩니다.
+ **최상위 리소스가 삭제되지 않음:** 일괄 작업은 자산 또는 자산 모델을 삭제하지 않습니다. 일괄 작업은 자산 또는 자산 모델을 생성 또는 업데이트하기만 합니다.

# 일괄 작업 사전 조건
<a name="bulk-operations-prereqs"></a>

이 섹션에서는 AWS 서비스와 로컬 시스템 간에 리소스를 교환하기 위한 AWS Identity and Access Management (IAM) 권한을 포함하여 대량 작업 사전 조건을 설명합니다. 일괄 작업을 시작하기 전에 다음 필수 조건을 총족해야 합니다.
+ 리소스를 저장할 Amazon S3 버킷을 생성합니다. Amazon S3에 대한 자세한 정보는 [Amazon S3란 무엇입니까?](https://docs.aws.amazon.com//AmazonS3/latest/userguide/Welcome.html)에서 확인하세요.

## IAM 권한
<a name="bulk-operations-prereqs-permissions"></a>

대량 작업을 수행하려면 Amazon S3 AWS IoT SiteWise와 로컬 시스템 간에 AWS 리소스를 교환할 수 있는 권한이 있는 AWS Identity and Access Management (IAM) 정책을 생성해야 합니다. IAM 정책을 만드는 방법에 대한 자세한 내용은 [IAM 정책 만들기](https://docs.aws.amazon.com//IAM/latest/UserGuide/access_policies_create.html) 섹션을 참조하세요.

일괄 작업을 수행하려면 다음 정책이 필요합니다.

### AWS IoT SiteWise 정책
<a name="bluk-operations-prereqs-policy"></a>

이 정책은 대량 작업에 필요한 AWS IoT SiteWise API 작업에 대한 액세스를 허용합니다.

```
{
    "Sid": "SiteWiseApiAccess",
    "Effect": "Allow",
    "Action": [
        "iotsitewise:CreateAsset",
        "iotsitewise:CreateAssetModel",
        "iotsitewise:UpdateAsset",
        "iotsitewise:UpdateAssetModel",
        "iotsitewise:UpdateAssetProperty",
        "iotsitewise:ListAssets",
        "iotsitewise:ListAssetModels",
        "iotsitewise:ListAssetProperties",
        "iotsitewise:ListAssetModelProperties",
        "iotsitewise:ListAssociatedAssets",
        "iotsitewise:DescribeAsset",
        "iotsitewise:DescribeAssetModel",
        "iotsitewise:DescribeAssetProperty",
        "iotsitewise:AssociateAssets",
        "iotsitewise:DisassociateAssets",
        "iotsitewise:AssociateTimeSeriesToAssetProperty",
        "iotsitewise:DisassociateTimeSeriesFromAssetProperty",
        "iotsitewise:BatchPutAssetPropertyValue",
        "iotsitewise:BatchGetAssetPropertyValue",
        "iotsitewise:TagResource",
        "iotsitewise:UntagResource",
        "iotsitewise:ListTagsForResource",
        "iotsitewise:CreateAssetModelCompositeModel",
        "iotsitewise:UpdateAssetModelCompositeModel",
        "iotsitewise:DescribeAssetModelCompositeModel",
        "iotsitewise:DeleteAssetModelCompositeModel",
        "iotsitewise:ListAssetModelCompositeModels",
        "iotsitewise:ListCompositionRelationships",
        "iotsitewise:DescribeAssetCompositeModel"
    ],
    "Resource": "*"
}
```

### AWS IoT TwinMaker 정책
<a name="bulk-operations-TwinMaker-policy"></a>

이 정책은 대량 작업을 수행하는 데 사용하는 AWS IoT TwinMaker API 작업에 대한 액세스를 허용합니다.

```
{
    "Sid": "MetadataTransferJobApiAccess",
    "Effect": "Allow",
    "Action": [
        "iottwinmaker:CreateMetadataTransferJob",
        "iottwinmaker:CancelMetadataTransferJob",
        "iottwinmaker:GetMetadataTransferJob",
        "iottwinmaker:ListMetadataTransferJobs"
    ],
    "Resource": "*"
}
```

### Amazon S3 정책
<a name="bulk-operations-S3-policy"></a>

이 정책은 일괄 작업을 위한 메타데이터 전송을 위해 Amazon S3 버킷에 대한 액세스를 제공합니다.

------
#### [ For a specific Amazon S3 bucket ]

일괄 작업 메타데이터 작업에 특정 버킷 하나를 사용하는 경우 이 정책은 해당 버킷에 대한 액세스를 제공합니다.

```
{
    "Effect": "Allow",
    "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:GetBucketLocation",
        "s3:ListBucket",
        "s3:AbortMultipartUpload",
        "s3:ListBucketMultipartUploads",
        "s3:ListMultipartUploadParts"
    ],
    "Resource": [
        "arn:aws:s3:::bucket name",
        "arn:aws:s3:::bucket name/*"
    ]
}
```

------
#### [ To allow any Amazon S3 bucket ]

여러 다른 버킷을 사용하여 일괄 작업 메타데이터 작업을 하는 경우 이 정책은 모든 버킷에 대한 액세스를 제공합니다.

```
{
    "Effect": "Allow",
    "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:GetBucketLocation",
        "s3:ListBucket",
        "s3:AbortMultipartUpload",
        "s3:ListBucketMultipartUploads",
        "s3:ListMultipartUploadParts"
    ],
    "Resource": "*"
}
```

------<a name="bulk-operations-troubleshooting"></a>

가져오기 및 내보내기 작업 문제 해결에 대한 자세한 내용은 [일괄 가져오기 및 내보내기 문제 해결](troubleshooting-bulk.md) 섹션을 참조하세요.

# 일괄 가져오기 작업 실행
<a name="running-bulk-operations-import"></a>

 대량 가져오기는 메타데이터를 AWS IoT SiteWise 워크스페이스로 이동하는 작업입니다. 예를 들어 대량 가져오기는 로컬 파일 또는 Amazon S3 버킷의 파일에서 AWS IoT SiteWise 워크스페이스로 메타데이터를 이동할 수 있습니다.

## 1단계: 가져올 파일 준비
<a name="preparing-import-file"></a>

 AWS IoT SiteWise 네이티브 형식 파일을 다운로드하여 자산과 자산 모델을 가져옵니다. 자세한 내용은 [AWS IoT SiteWise 메타데이터 전송 작업 스키마](bulk-operations-schema.md) 섹션을 참조하세요.

## 2단계: 준비된 파일을 Amazon S3에 업로드
<a name="uploading-import-file"></a>

 Amazon S3로 파일을 업로드합니다. 자세한 내용은 Amazon Simple Storage Service 사용 설명서**의 [Amazon S3에 파일 업로드](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html#uploading-an-object-bucket)를 참조하세요.

## 메타데이터 가져오기(콘솔)
<a name="import-metadata-console"></a>

를 사용하여 메타데이터 AWS IoT SiteWise Console 를 대량으로 가져올 수 있습니다. [1단계: 가져올 파일 준비](#preparing-import-file) 및 [2단계: 준비된 파일을 Amazon S3에 업로드](#uploading-import-file)를 따라 가져올 준비가 된 파일을 준비합니다.

**Amazon S3에서 로 데이터 가져오기 AWS IoT SiteWise Console**

1. [AWS IoT SiteWise 콘솔](https://console.aws.amazon.com/iotsitewise/)로 이동합니다.

1. 탐색 창에서 **일괄 작업 새로 만들기**를 선택합니다.

1. **새 가져오기**를 선택하여 가져오기 프로세스를 시작합니다.

1. **메타데이터 가져오기** 페이지에서 다음을 수행합니다.
   + Amazon S3 버킷 및 파일을 보려면 **Amazon S3 찾아보기**를 선택합니다.
   + 준비된 가져오기 파일이 포함된 Amazon S3 버킷으로 이동합니다.
   + 가져올 파일을 선택합니다.
   + 선택한 파일을 검토하고 **가져오기**를 선택합니다.

1. 의 ** SiteWise 메타데이터에 대한 대량 작업** 페이지에는 새로 생성된 가져오기 작업이 **작업 진행**률 테이블에 AWS IoT SiteWise Console 표시됩니다.

## 메타데이터 가져오기(AWS CLI)
<a name="import-metadata-cli"></a>

가져오기 작업을 수행하려면 다음 절차를 따르세요.

**Amazon S3에서 로 데이터 가져오기 AWS CLI**

1. [AWS IoT SiteWise 메타데이터 전송 작업 스키마](bulk-operations-schema.md)에 따라 가져오려는 리소스를 지정하는 메타데이터 파일을 생성합니다. Amazon S3 버킷에 이 파일을 저장합니다.

   가져올 메타데이터 파일의 예시는 [메타데이터 가져오기 예시](bulk-operations-import-metadata-example.md) 섹션을 참조하세요.

1. 이제 요청 본문이 포함된 JSON 파일을 생성합니다. 요청 본문은 전송 작업의 소스와 대상을 지정합니다. 이 파일은 이전 단계의 파일과는 별개입니다. Amazon S3 버킷을 소스로, `iotsitewise`를 대상으로 지정해야 합니다.

   다음 예시는 요청 본문을 보여 줍니다.

   ```
   {
         "metadataTransferJobId": "your-transfer-job-Id",
         "sources": [{
             "type": "s3",
             "s3Configuration": {
                 "location": "arn:aws:s3:::amzn-s3-demo-bucket/your_import_metadata.json"
             }
         }],
         "destination": {
             "type": "iotsitewise"
         }
     }
   ```

1. 다음 AWS CLI 명령을 실행`CreateMetadataTransferJob`하여를 호출합니다. 이 예시에서는 이전 단계의 요청 본문 파일 이름이 `createMetadataTransferJobExport.json`입니다.

   ```
   aws iottwinmaker create-metadata-transfer-job --region us-east-1 \
     --cli-input-json file://createMetadataTransferJobImport.json
   ```

   이렇게 하면 메타데이터 전송 작업이 생성되고 선택한 리소스 전송 프로세스가 시작됩니다.

# 일괄 내보내기 작업 실행
<a name="running-bulk-operations-export"></a>

 대량 내보내기는 워크 AWS IoT SiteWise 스페이스에서 Amazon S3 버킷으로 메타데이터를 이동하는 작업입니다.

Amazon S3로 AWS IoT SiteWise 콘텐츠를 대량으로 내보낼 때 필터를 지정하여 내보내려는 특정 자산 모델 및 자산을 제한할 수 있습니다.

필터는 JSON 요청의 소스 섹션 내 `iotSiteWiseConfiguration` 섹션에 지정되어야 합니다.

**참고**  
 요청에 여러 필터를 포함할 수 있습니다. 일괄 작업은 어느 필터와든 일치하는 자산 모델과 자산을 내보냅니다.  
 필터를 제공하지 않으면 일괄 작업이 모든 자산 모델과 자산을 내보냅니다.

**Example 필터가 있는 요청 본문**  

```
{
      "metadataTransferJobId": "your-transfer-job-id",
      "sources": [
       {
        "type": "iotsitewise",
        "iotSiteWiseConfiguration": {
          "filters": [
           {
              "filterByAssetModel": {
                  "assetModelId": "asset model ID"
              }
            },
            {
              "filterByAssetModel": {
                  "assetModelId": "asset model ID",
                  "includeAssets": true
              }
            },
            {
              "filterByAssetModel": {
                  "assetModelId": "asset model ID",
                  "includeOffspring": true
               }
             }
           ]
          }
        }
       ],
       "destination": {
          "type": "s3",
          "s3Configuration": {
            "location": "arn:aws:s3:::amzn-s3-demo-bucket"
          }
      }
}
```

## 메타데이터 내보내기(콘솔)
<a name="export-metadata-console"></a>

다음 절차에서는 콘솔 내보내기 작업을 설명합니다.

**에서 내보내기 작업 생성 AWS IoT SiteWise Console**

1.  [AWS IoT SiteWise 콘솔](https://console.aws.amazon.com/iotsitewise/)로 이동합니다.

1. 탐색 창에서 **일괄 작업 새로 만들기**를 선택합니다.

1. **새 내보내기**를 선택하여 내보내기 프로세스를 시작합니다.

1. **메타데이터 내보내기** 페이지에서 다음을 수행합니다.
   +  내보내기 작업의 이름을 입력합니다. Amazon S3 버킷의 내보낸 파일에 사용되는 이름입니다.
   + 내보낼 리소스를 선택하면 작업에 대한 필터가 설정됩니다.
     + 모든 자산 및 자산 모델을 내보냅니다. 자산 및 자산 모델에 필터를 사용합니다.
     + 자산을 내보냅니다. 자산을 필터링합니다.
       + 내보내기 필터에 사용할 자산을 선택합니다.
       + (선택 사항) 파생 자산 또는 관련 자산 모델을 추가합니다.
     + 자산 모델을 내보냅니다. 자산 모델을 필터링합니다.
       + 내보내기 필터에 사용할 자산 모델을 선택합니다.
       + (선택 사항) 파생 자산, 관련 자산 또는 둘 다를 추가합니다.
     + **다음**을 선택합니다.
   + Amazon S3 버킷으로 이동합니다.
     + Amazon S3 버킷 및 파일을 보려면 **Amazon S3 찾아보기**를 선택합니다.
     + 파일을 배치해야 하는 Amazon S3 버킷으로 이동합니다.
     + **다음**을 선택합니다.
   + 내보내기 작업을 검토하고 **내보내기**를 선택합니다.

1. 의 ** SiteWise 메타데이터에 대한 대량 작업** 페이지에는 새로 생성된 가져오기 작업이 **작업 진행**률 테이블에 AWS IoT SiteWise Console 표시됩니다.

메타데이터를 내보낼 때 필터를 사용하는 다양한 방법은 [메타데이터 예시 내보내기](bulk-operations-export-filter-examples.md) 섹션을 참조하세요.

## 메타데이터 내보내기(AWS CLI)
<a name="export-metadata-cli"></a>

다음 절차에서는 AWS CLI 내보내기 작업을 설명합니다.

**에서 Amazon S3 AWS IoT SiteWise 로 데이터 내보내기**

1. 요청 본문이 포함된 JSON 파일을 생성합니다. 요청 본문은 전송 작업의 소스와 대상을 지정합니다. 다음 예시는 요청 본문 예시를 보여 줍니다.

   ```
   {
       "metadataTransferJobId": "your-transfer-job-Id",
       "sources": [{
           "type": "iotsitewise"
       }],
       "destination": {
           "type": "s3",
           "s3Configuration": {
               "location": "arn:aws:s3:::amzn-s3-demo-bucket"
           }
       }
   }
   ```

   Amazon S3 버킷을 메타데이터 전송 작업의 대상으로 지정해야 합니다.
**참고**  
이 예시에서는 모든 자산 모델과 자산을 내보냅니다. 특정 자산 모델 또는 자산으로 내보내기를 제한하려면 요청 본문에 필터를 포함할 수 있습니다. 내보내기 필터 적용에 대한 자세한 내용은 [메타데이터 예시 내보내기](bulk-operations-export-filter-examples.md) 섹션을 참조하세요.

1. 다음 단계에서 사용할 요청 본문 파일을 저장합니다. 이 예시에서 파일의 이름은 `createMetadataTransferJobExport.json`으로 지정됩니다.

1. 다음 AWS CLI 명령을 실행`CreateMetadataTransferJob`하여를 호출합니다.

   ```
   aws iottwinmaker create-metadata-transfer-job --region us-east-1 \ 
            --cli-input-json file://createMetadataTransferJobExport.json
   ```

   입력 JSON 파일을 고유한 전송 파일 이름이 포함된 `createMetadataTransferJobExport.json`으로 바꿉니다.

# 작업 진행 상황 추적 및 오류 처리
<a name="jobs-progress-error-handling"></a>

 일괄 프로세스 작업은 처리하는 데 시간이 걸립니다. 각 작업은 요청을 AWS IoT SiteWise 수신하는 순서대로 처리됩니다. 각 계정에 대해 한 번에 하나씩 처리됩니다. 작업이 완료되면 대기열의 다음가 자동으로 처리를 시작합니다.는 작업을 비동기적으로 AWS IoT SiteWise 해결하고 진행됨에 따라 각의 상태를 업데이트합니다. 각 작업에는 리소스 상태 및 오류 메시지(해당되는 경우)가 포함된 상태 필드가 있습니다.

상태는 다음 값 중 하나일 수 있습니다.
+ `VALIDATING` - 제출된 파일 형식 및 내용을 포함한 작업을 검증하는 중입니다.
+ `PENDING` - 작업이 대기열에 있습니다. AWS IoT SiteWise 콘솔에서 이 상태의 작업을 취소할 수 있지만 다른 모든 상태는 종료될 때까지 계속됩니다.
+ `RUNNING` - 작업을 처리하는 중입니다. 가져오기 파일에 정의된 대로 리소스를 생성 및 업데이트하거나 선택한 내보내기 작업 필터를 기반으로 리소스를 내보내는 중입니다. 취소하면 이 작업에서 가져온 리소스는 삭제되지 않습니다. 자세한 정보는 [작업 진행 상황 및 세부 정보 검토(콘솔)](review-job-progress.md#review-job-progress-console)을 참조하세요.
+ `CANCELLING` - 작업이 적극적으로 취소되고 있습니다.
+ `ERROR` - 하나 이상의 리소스를 처리하지 못했습니다. 자세한 내용은 세부 작업 보고서를 참조하세요. 자세한 정보는 [오류 세부 정보 검사(콘솔)](inspect-errors.md#inspect-errors-console)을 참조하세요.
+ `COMPLETED` – 오류 없이 작업이 완료되었습니다.
+ `CANCELLED` - 작업이 취소되고 대기열에 추가되지 않습니다. `RUNNING` 작업을 취소한 경우 취소 시이 작업에서 이미 가져온 리소스는 삭제되지 않습니다 AWS IoT SiteWise.

**Topics**
+ [작업 진행 상황 추적](review-job-progress.md)
+ [오류 검사 AWS IoT SiteWise](inspect-errors.md)

# 작업 진행 상황 추적
<a name="review-job-progress"></a>

## 작업 진행 상황 및 세부 정보 검토(콘솔)
<a name="review-job-progress-console"></a>

일괄 작업을 시작하려면 [메타데이터 가져오기(콘솔)](running-bulk-operations-import.md#import-metadata-console) 또는 [메타데이터 내보내기(콘솔)](running-bulk-operations-export.md#export-metadata-console) 섹션을 참조하세요.

**AWS IoT SiteWise 콘솔의 작업 진행 상황 개요:**

1. [AWS IoT SiteWise 콘솔](https://console.aws.amazon.com/iotsitewise/)로 이동합니다.

1. 탐색 창에서 **일괄 작업 새로 만들기**를 선택합니다.

1.  AWS IoT SiteWise 콘솔의 **작업 진행**률 테이블에는 대량 작업 작업 목록이 표시됩니다.

1. **작업 유형** 열은 내보내기 또는 가져오기 작업인지 설명합니다. **가져온 날짜** 열에는 작업이 시작된 날짜가 표시됩니다.

1. **상태** 열에는 작업 상태가 표시됩니다. 작업을 선택하여 작업에 대한 세부 정보를 볼 수 있습니다.

1. 선택한 작업은 성공 시 **성공** 또는 작업 실패 시 실패 목록을 표시합니다. 오류 설명도 각 리소스 유형과 함께 표시됩니다.

**AWS IoT SiteWise 콘솔의 작업 세부 정보 개요:**

 AWS IoT SiteWise 콘솔의 **작업 진행**률 테이블에는 대량 작업 작업 목록이 표시됩니다.

1. 더 자세한 정보를 보려면 작업을 선택합니다.

1. **가져오기** 작업의 경우 `Data source ARN`은 가져오기 파일의 Amazon S3 위치를 나타냅니다.

1. **내보내기** 작업의 경우 `Data destination ARN`는 내보내기 후 파일의 Amazon S3 위치를 나타냅니다.

1. `Status` 및 `Status reason`은 현재 작업에 대한 추가 세부 정보를 제공합니다. 자세한 내용은 [작업 진행 상황 추적 및 오류 처리](jobs-progress-error-handling.md) 섹션을 참조하세요.

1. `Queued position`은 프로세스 대기열에서 작업의 위치를 나타냅니다. 작업은 한 번에 하나씩 처리됩니다. 대기열 위치 1은 작업이 다음으로 처리될 것임을 나타냅니다.

1.  작업 세부 정보 페이지에는 작업 진행 상황 개수도 표시됩니다.

   1. 작업 진행 상황 수 유형은 다음과 같습니다.

     1. `Total resources` - 전송 프로세스에 있는 총 자산 수를 나타냅니다.

     1. `Succeeded` - 프로세스 중에 성공적으로 전송된 자산 수를 나타냅니다.

     1. `Failed` - 프로세스 중에 실패한 자산 수를 나타냅니다.

     1. `Skipped` - 프로세스 중에 건너뛴 자산 수를 나타냅니다.

1. `PENDING` 또는 `VALIDATING`의 작업 상태는 모든 작업 진행 상황 수를 `–` 기호로 표시합니다. 이는 작업 진행 상황 수가 평가 중임을 나타냅니다.

1. `RUNNING`의 작업 상태는 처리를 위해 제출된 작업인 `Total resources` 수를 표시합니다. 세부 개수(`Succeeded`, `Failed` 및 `Skipped`)는 처리된 리소스에 적용됩니다. 작업 상태가 `COMPLETED` 또는 `ERROR`가 될 때까지 세부 개수의 합계는 `Total resources` 개수보다 작습니다.

1.  작업의 상태가 `COMPLETED` 또는 `ERROR`인 경우 `Total resources` 개수는 세부 개수(`Succeeded`, `Failed` 및 `Skipped`)의 합계와 같습니다.

1.  작업 상태가 `ERROR`인 경우 **작업 실패** 테이블에서 특정 오류 및 실패에 대한 세부 정보를 확인합니다. 자세한 내용은 [오류 세부 정보 검사(콘솔)](inspect-errors.md#inspect-errors-console) 섹션을 참조하세요.

## 작업 진행 상황 및 세부 정보 검토(AWS CLI)
<a name="review-job-progress-cli"></a>

일괄 작업을 시작한 후 다음 API 작업을 사용하여 상태를 확인하거나 업데이트할 수 있습니다.
+ 특정 작업에 대한 정보를 검색하려면 [GetMetadataTransferJob](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_GetMetadataTransferJob.html) API 작업을 사용합니다.

**`GetMetadataTransferJob` API를 사용하여 정보 검색:**

  1. 전송 작업 생성 및 실행 `GetMetadataTransferJob` API를 직접적으로 호출합니다.  
**Example AWS CLI 명령:**  

     ```
     aws iottwinmaker get-metadata-transfer-job \ 
             --metadata-transfer-job-id your_metadata_transfer_job_id \
             --region your_region
     ```

  1.  `GetMetadataTransferJob` API는 다음 파라미터가 있는 `MetadataTransferJobProgress` 객체를 반환합니다.
     + **succeededCount** - 프로세스에서 성공적으로 전송된 자산 수를 나타냅니다.
     + **failedCount** - 프로세스 중에 실패한 자산 수를 나타냅니다.
     + **skippedCount** - 프로세스 중에 건너뛴 자산 수를 나타냅니다.
     + **totalCount** - 전송 프로세스의 총 자산 수를 나타냅니다.

     이러한 파라미터는 작업 진행 상태를 나타냅니다. 상태가 `RUNNING`인 경우 아직 처리해야 할 리소스 수를 추적하는 데 도움이 됩니다.

     스키마 검증 오류가 발생하거나 **failedCount**가 1보다 크거나 같으면 작업 진행 상태가 `ERROR`로 바뀝니다. 작업에 대한 전체 오류 보고서는 Amazon S3 버킷에 배치됩니다. 자세한 내용은 [오류 검사 AWS IoT SiteWise](inspect-errors.md) 섹션을 참조하세요.
+ 현재 작업을 나열하려면 [ListMetadataTransferJobs](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_ListMetadataTransferJobs.html) API 작업을 사용합니다.

  JSON 파일을 사용하여 반환된 작업을 현재 상태에 따라 필터링합니다. 다음 절차를 참조하세요.

  1. 사용할 필터를 지정하려면 AWS CLI 입력 JSON 파일을 생성합니다.는 다음을 사용합니다.

     ```
     {
         "sourceType": "s3",
         "destinationType": "iottwinmaker",
         "filters": [{
             "state": "COMPLETED"
         }]
     }
     ```

     유효한 `state` 값 목록은AWS IoT TwinMaker API 참조 가이드**의 [ListMetadataTransferJobsFilter](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_ListMetadataTransferJobsFilter.html)를 참조하세요.

  1.  다음 AWS CLI 예제 명령에서 JSON 파일을 인수로 사용합니다.

     ```
     aws iottwinmaker list-metadata-transfer-job --region your_region \
             --cli-input-json file://ListMetadataTransferJobsExample.json
     ```
+ 작업을 취소하려면 [CancelMetadataTransferJob](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_CancelMetadataTransferJob.html) API 작업을 사용합니다. 이 API는 이미 내보내거나 가져온 리소스에 영향을 주지 않고 특정 메타데이터 전송 작업을 취소합니다.

  ```
  aws iottwinmaker cancel-metadata-transfer-job \ 
          --region your_region \ 
          --metadata-transfer-job-id job-to-cancel-id
  ```

# 오류 검사 AWS IoT SiteWise
<a name="inspect-errors"></a>

## 오류 세부 정보 검사(콘솔)
<a name="inspect-errors-console"></a>

**AWS IoT SiteWise 콘솔의 오류 세부 정보:**

1. [AWS IoT SiteWise 콘솔](https://console.aws.amazon.com/iotsitewise/)로 이동합니다.

1. 대량 **작업 목록은의 작업 진행**률 테이블 AWS IoT SiteWise Console 을 참조하세요.

1. 작업을 선택하여 작업 세부 정보를 봅니다.

1. 작업의 상태가 `COMPLETED` 또는 `ERROR`인 경우 `Total resources` 개수는 세부 개수(`Succeeded`, `Failed` 및 `Skipped`)의 합계와 같습니다.

1.  작업 상태가 `ERROR`인 경우 **작업 실패** 테이블에서 특정 오류 및 실패에 대한 세부 정보를 확인합니다.

1. **작업 실패** 테이블에는 작업 보고서의 내용이 표시됩니다. `Resource type` 필드는 다음과 같은 오류 또는 실패의 위치를 나타냅니다.
   + 예를 들어 `Resource type` 필드의 `Bulk operations template`에서 발생한 유효성 검사 오류는 가져오기 템플릿과 메타데이터 스키마 파일 형식이 일치하지 않음을 나타냅니다. 자세한 정보는 [AWS IoT SiteWise 메타데이터 전송 작업 스키마](bulk-operations-schema.md)을 참조하세요.
   + `Resource type` 필드의 `Asset` 실패는 다른 자산과의 충돌로 인해 자산이 생성되지 않았음을 나타냅니다. AWS IoT SiteWise 리소스 [오류 및 충돌에 대한 자세한 내용은 일반](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/CommonErrors.html) 오류를 참조하세요.

## 오류 세부 정보 검사(AWS CLI)
<a name="inspect-errors-cli"></a>

전송 작업 중에 발생한 오류를 처리하고 진단하려면 `GetMetadataTransferJob` API 작업 사용에 대한 다음 절차를 참조하세요.

1. 전송 작업을 생성하고 실행한 후 [GetMetadataTransferJob](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_GetMetadataTransferJob.html)을 호출합니다.

   ```
   aws iottwinmaker get-metadata-transfer-job \
           --metadata-transfer-job-id your_metadata_transfer_job_id \
           --region us-east-1
   ```

1. 작업 상태가 `COMPLETED`로 전환되는 것을 확인하면 작업 결과 확인을 시작할 수 있습니다.

1. `GetMetadataTransferJob`을 호출하면 [https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_MetadataTransferJobProgress.html](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_MetadataTransferJobProgress.html)라는 객체가 반환됩니다.

   MetadataTransferJobProgress 객체는 다음 파라미터를 포함합니다.
   + **failedCount:** 전송 프로세스 중에 실패한 자산 수를 나타냅니다.
   + **skippedCount:** 전송 프로세스 중에 건너뛴 자산 수를 나타냅니다.
   + **succeededCount:** 전송 프로세스 중에 성공한 자산 수를 나타냅니다.
   + **totalCount:** 전송 프로세스와 관련된 총 자산 수를 나타냅니다.

1. 또한 API 직접 호출은 미리 서명된 URL이 포함된 `reportUrl` 요소를 반환합니다. 전송 작업에 추가 조사가 필요한 문제가 있는 경우 이 URL을 참조하세요.

# 메타데이터 가져오기 예시
<a name="bulk-operations-import-metadata-example"></a>

이 섹션에서는 단일 일괄 가져오기 작업으로 자산 모델 및 자산을 가져올 메타데이터 파일을 생성하는 방법을 보여 줍니다.

## 일괄 가져오기의 예
<a name="example-metadata-file"></a>

단일 일괄 가져오기 작업으로 많은 자산 모델과 자산을 가져올 수 있습니다. 다음 예시에서는 이를 위해 메타데이터 파일을 생성하는 방법을 보여 줍니다.

 이 예시 시나리오에는 작업 셀에 산업 로봇이 포함된 다양한 작업 현장이 있습니다.

이 예시에서는 다음의 두 가지 자산 모델을 정의합니다.
+ `RobotModel1`: 이 자산 모델은 작업 현장에 있는 특정 유형의 로봇을 나타냅니다. 로봇에는 측정 속성인 `Temperature`가 있습니다.
+ `WorkCell`: 이 자산 모델은 작업 현장 중 하나에 있는 로봇 모음을 나타냅니다. 자산 모델은 작업 셀에 로봇이 포함된 관계를 나타내기 위해 계층 구조 `robotHierarchyOEM1`을 정의합니다.

이 예시에서는 일부 자산도 정의합니다.
+ `WorkCell1`: Boston 현장 내의 작업 셀
+ `RobotArm123456`: 해당 작업 셀 내의 로봇
+ `RobotArm987654`: 해당 작업 셀 내의 다른 로봇

다음 JSON 메타데이터 파일은 이러한 자산 모델 및 자산을 정의합니다. 이 메타데이터로 대량 가져오기를 실행하면 계층적 관계를 AWS IoT SiteWise포함하여 자산 모델과 자산이 생성됩니다.

### 가져올 메타데이터 파일
<a name="bulk-import-metadata-file"></a>

```
{
    "assetModels": [
        {
            "assetModelExternalId": "Robot.OEM1.3536",
            "assetModelName": "RobotModel1",
            "assetModelProperties": [
                {
                    "dataType": "DOUBLE",
                    "externalId": "Temperature",
                    "name": "Temperature",
                    "type": {
                        "measurement": {
                            "processingConfig": {
                                "forwardingConfig": {
                                    "state": "ENABLED"
                                }
                            }
                        }
                    },
                    "unit": "fahrenheit"
                }
            ]
        },
        {
            "assetModelExternalId": "ISA95.WorkCell",
            "assetModelName": "WorkCell",
            "assetModelProperties": [],
            "assetModelHierarchies": [
                {
                    "externalId": "workCellHierarchyWithOEM1Robot",
                    "name": "robotHierarchyOEM1",
                    "childAssetModelExternalId": "Robot.OEM1.3536"
                }
            ]
        }
    ],
    "assets": [
        {
            "assetExternalId": "Robot.OEM1.3536.123456",
            "assetName": "RobotArm123456",
            "assetModelExternalId": "Robot.OEM1.3536"
        },
        {
            "assetExternalId": "Robot.OEM1.3536.987654",
            "assetName": "RobotArm987654",
            "assetModelExternalId": "Robot.OEM1.3536"
        },
        {
            "assetExternalId": "BostonSite.Area1.Line1.WorkCell1",
            "assetName": "WorkCell1",
            "assetModelExternalId": "ISA95.WorkCell",
            "assetHierarchies": [
                {
                    "externalId": "workCellHierarchyWithOEM1Robot",
                    "childAssetExternalId": "Robot.OEM1.3536.123456"
                },
                {
                    "externalId": "workCellHierarchyWithOEM1Robot",
                    "childAssetExternalId": "Robot.OEM1.3536.987654"
                }
            ]
        }
    ]
}
```

## 모델 및 자산의 초기 온보딩 예시
<a name="example-scenario1"></a>

이 예시 시나리오에서는 회사에 산업 로봇이 포함된 다양한 작업 현장이 있습니다.

이 예시는 다음의 여러 자산 모델을 정의합니다.
+ `Sample_Enterprise` - 이 자산 모델은 현장이 속한 회사를 나타냅니다. 자산 모델은 계층 구조인 `Enterprise to Site`를 정의하여 현장과 엔터프라이즈의 관계를 나타냅니다.
+ `Sample_Site` – 이 자산 모델은 회사 내 제조 현장을 나타냅니다. 자산 모델은 계층 구조인 `Site to Line`을 정의하여 현장과 라인의 관계를 나타냅니다.
+ `Sample_Welding Line` – 이 자산 모델은 작업 현장 내의 조립 라인을 나타냅니다. 자산 모델은 계층 구조인 `Line to Robot`을 정의하여 사이트와 라인의 관계를 나타냅니다.
+ `Sample_Welding Robot` - 이 자산 모델은 작업 현장에 있는 특정 유형의 로봇을 나타냅니다.

이 예시에서는 또한 자산 모델을 기반으로 자산을 정의합니다.
+ `Sample_AnyCompany Motor` – 이 자산은 `Sample_Enterprise` 자산 모델에서 생성됩니다.
+ `Sample_Chicago` – 이 자산은 `Sample_Site` 자산 모델에서 생성됩니다.
+ `Sample_Welding Line 1` – 이 자산은 `Sample_Welding Line` 자산 모델에서 생성됩니다.
+ `Sample_Welding Robot 1` – 이 자산은 `Sample_Welding Robot` 자산 모델에서 생성됩니다.
+ `Sample_Welding Robot 2` – 이 자산은 `Sample_Welding Robot` 자산 모델에서 생성됩니다.

다음 JSON 메타데이터 파일은 이러한 자산 모델 및 자산을 정의합니다. 이 메타데이터로 대량 가져오기를 실행하면 계층적 관계를 AWS IoT SiteWise포함하여 자산 모델과 자산이 생성됩니다.

### 가져올 자산 및 모델을 온보딩하기 위한 JSON 파일
<a name="bulk-import-JSON-file"></a>

```
{
    "assetModels": [
        {
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetModelName": "Sample_Welding Robot",
            "assetModelProperties": [
                {
                    "dataType": "STRING",
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "name": "Serial Number",
                    "type": {
                        "attribute": {
                            "defaultValue": "-"
                        }
                    },
                    "unit": "-"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "name": "CycleCount",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "EA"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "name": "Joint 1 Current",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "Amps"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Joint_1_Max_Current",
                    "name": "Max Joint 1 Current",
                    "type": {
                        "metric": {
                            "expression": "max(joint1current)",
                            "variables": [
                                {
                                    "name": "joint1current",
                                    "value": {
                                        "propertyExternalId": "External_Id_Welding_Robot_Joint_1_Current"
                                    }
                                }
                            ],
                            "window": {
                                "tumbling": {
                                    "interval": "5m"
                                }
                            }
                        }
                    },
                    "unit": "Amps"
                }
            ]
        },
        {
            "assetModelExternalId": "External_Id_Welding_Line",
            "assetModelName": "Sample_Welding Line",
            "assetModelProperties": [
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Line_Availability",
                    "name": "Availability",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "%"
                }
            ],
            "assetModelHierarchies": [
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "name": "Line to Robot",
                    "childAssetModelExternalId": "External_Id_Welding_Robot"
                }
            ]
        },
        {
            "assetModelExternalId": "External_Id_Site",
            "assetModelName": "Sample_Site",
            "assetModelProperties": [
                {
                    "dataType": "STRING",
                    "externalId": "External_Id_Site_Street_Address",
                    "name": "Street Address",
                    "type": {
                        "attribute": {
                            "defaultValue": "-"
                        }
                    },
                    "unit": "-"
                }
            ],
            "assetModelHierarchies": [
                {
                    "externalId": "External_Id_Site_TO_Line",
                    "name": "Site to Line",
                    "childAssetModelExternalId": "External_Id_Welding_Line"
                }
            ]
        },
        {
            "assetModelExternalId": "External_Id_Enterprise",
            "assetModelName": "Sample_Enterprise",
            "assetModelProperties": [
                {
                    "dataType": "STRING",
                    "name": "Company Name",
                    "externalId": "External_Id_Enterprise_Company_Name",
                    "type": {
                        "attribute": {
                            "defaultValue": "-"
                        }
                    },
                    "unit": "-"
                }
            ],
            "assetModelHierarchies": [
                {
                    "externalId": "External_Id_Enterprise_TO_Site",
                    "name": "Enterprise to Site",
                    "childAssetModelExternalId": "External_Id_Site"
                }
            ]
        }
    ],
    "assets": [
        {
            "assetExternalId": "External_Id_Welding_Robot_1",
            "assetName": "Sample_Welding Robot 1",
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetProperties": [
                {
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "attributeValue": "S1000"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "alias": "AnyCompany/Chicago/Welding Line/S1000/Count"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "alias": "AnyCompany/Chicago/Welding Line/S1000/1/Current"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Welding_Robot_2",
            "assetName": "Sample_Welding Robot 2",
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetProperties": [
                {
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "attributeValue": "S2000"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "alias": "AnyCompany/Chicago/Welding Line/S2000/Count"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "alias": "AnyCompany/Chicago/Welding Line/S2000/1/Current"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Welding_Line_1",
            "assetName": "Sample_Welding Line 1",
            "assetModelExternalId": "External_Id_Welding_Line",
            "assetProperties": [
                {
                    "externalId": "External_Id_Welding_Line_Availability",
                    "alias": "AnyCompany/Chicago/Welding Line/Availability"
                }
            ],
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_1"
                },
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_2"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Site_Chicago",
            "assetName": "Sample_Chicago",
            "assetModelExternalId": "External_Id_Site",
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Site_TO_Line",
                    "childAssetExternalId": "External_Id_Welding_Line_1"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Enterprise_AnyCompany",
            "assetName": "Sample_AnyEnterprise Motor",
            "assetModelExternalId": "External_Id_Enterprise",
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Enterprise_TO_Site",
                    "childAssetExternalId": "External_Id_Site_Chicago"
                }
            ]
        }
    ]
}
```

다음 스크린샷은 이전 코드 예제를 실행한 AWS IoT SiteWise Console 후에 표시되는 모델의 스크린샷입니다.

![\[AWS IoT SiteWise 자산 및 자산 모델이 있는 모델.\]](http://docs.aws.amazon.com/ko_kr/iot-sitewise/latest/userguide/images/import-example-asset.png)


다음 스크린샷은 이전 코드 예제를 실행한 AWS IoT SiteWise Console 후에 표시되는 모델, 자산 및 계층 구조입니다.

![\[AWS IoT SiteWise 자산, 자산 모델 및 계층 구조가 있는 모델.\]](http://docs.aws.amazon.com/ko_kr/iot-sitewise/latest/userguide/images/hierarchy-example-import.png)


## 추가 자산 온보딩 예시
<a name="example-scenario2"></a>

이 예시에서는 계정의 기존 자산 모델로 가져올 추가 자산을 정의합니다.
+ `Sample_Welding Line 2` – 이 자산은 `Sample_Welding Line` 자산 모델에서 생성됩니다.
+ `Sample_Welding Robot 3` – 이 자산은 `Sample_Welding Robot` 자산 모델에서 생성됩니다.
+ `Sample_Welding Robot 4` – 이 자산은 `Sample_Welding Robot` 자산 모델에서 생성됩니다.

이 예시의 초기 자산을 생성하려면 [모델 및 자산의 초기 온보딩 예시](#example-scenario1) 섹션을 참조하세요.

다음 JSON 메타데이터 파일은 이러한 자산 모델 및 자산을 정의합니다. 이 메타데이터로 대량 가져오기를 실행하면 계층적 관계를 AWS IoT SiteWise포함하여 자산 모델과 자산이 생성됩니다.

### 추가 자산을 온보딩하기 위한 JSON 파일
<a name="bulk-import-JSON-file-additional-assets"></a>

```
{
    "assets": [
        {
            "assetExternalId": "External_Id_Welding_Robot_3",
            "assetName": "Sample_Welding Robot 3",
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetProperties": [
                {
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "attributeValue": "S3000"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "alias": "AnyCompany/Chicago/Welding Line/S3000/Count"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "alias": "AnyCompany/Chicago/Welding Line/S3000/1/Current"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Welding_Robot_4",
            "assetName": "Sample_Welding Robot 4",
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetProperties": [
                {
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "attributeValue": "S4000"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "alias": "AnyCompany/Chicago/Welding Line/S4000/Count"
                },
                {
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "alias": "AnyCompany/Chicago/Welding Line/S4000/1/Current"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Welding_Line_1",
            "assetName": "Sample_Welding Line 1",
            "assetModelExternalId": "External_Id_Welding_Line",
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_1"
                },
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_2"
                },
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_3"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Welding_Line_2",
            "assetName": "Sample_Welding Line 2",
            "assetModelExternalId": "External_Id_Welding_Line",
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Welding_Line_TO_Robot",
                    "childAssetExternalId": "External_Id_Welding_Robot_4"
                }
            ]
        },
        {
            "assetExternalId": "External_Id_Site_Chicago",
            "assetName": "Sample_Chicago",
            "assetModelExternalId": "External_Id_Site",
            "assetHierarchies": [
                {
                    "externalId": "External_Id_Site_TO_Line",
                    "childAssetExternalId": "External_Id_Welding_Line_1"
                },
                {
                    "externalId": "External_Id_Site_TO_Line",
                    "childAssetExternalId": "External_Id_Welding_Line_2"
                }
            ]
        }
    ]
}
```

다음 스크린샷은 이전 코드 예제를 실행한 AWS IoT SiteWise Console 후에 표시되는 모델, 자산 및 계층 구조입니다.

![\[AWS IoT SiteWise 자산 및 자산 모델이 있는 모델.\]](http://docs.aws.amazon.com/ko_kr/iot-sitewise/latest/userguide/images/additional-assets-import.png)


## 새 속성 온보딩 예시
<a name="example-scenario3"></a>

이 예시에서는 기존 자산 모델의 새 속성을 정의합니다. 추가 자산 및 모델을 온보딩하려면 [추가 자산 온보딩 예시](#example-scenario2) 섹션을 참조하세요.
+ `Joint 1 Temperature` - 이 속성은 `Sample_Welding Robot` 자산 모델에 추가됩니다. 이 새 속성은 `Sample_Welding Robot` 자산 모델에서 생성된 각 자산에도 전파됩니다.

기존 자산 모델에 새 속성을 추가하려면 다음 JSON 메타데이터 파일 예시를 참조하세요. JSON에 표시된 것처럼 기존 `Sample_Welding Robot` 자산 모델 정의 전체를 새 속성과 함께 제공해야 합니다. 기존 정의의 전체 속성 목록이 제공되지 않으면 생략된 속성이 AWS IoT SiteWise 삭제됩니다.

### 새 속성을 온보딩하기 위한 JSON 파일
<a name="bulk-import-JSON-file-new-properties"></a>

이 예시에서는 `Joint 1 Temperature` 자산 모델에 새 속성을 추가합니다.

```
{
    "assetModels": [
        {
            "assetModelExternalId": "External_Id_Welding_Robot",
            "assetModelName": "Sample_Welding Robot",
            "assetModelProperties": [
                {
                    "dataType": "STRING",
                    "externalId": "External_Id_Welding_Robot_Serial_Number",
                    "name": "Serial Number",
                    "type": {
                        "attribute": {
                            "defaultValue": "-"
                        }
                    },
                    "unit": "-"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Cycle_Count",
                    "name": "CycleCount",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "EA"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Joint_1_Current",
                    "name": "Joint 1 Current",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "Amps"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Joint_1_Max_Current",
                    "name": "Max Joint 1 Current",
                    "type": {
                        "metric": {
                            "expression": "max(joint1current)",
                            "variables": [
                                {
                                    "name": "joint1current",
                                    "value": {
                                        "propertyExternalId": "External_Id_Welding_Robot_Joint_1_Current"
                                    }
                                }
                            ],
                            "window": {
                                "tumbling": {
                                    "interval": "5m"
                                }
                            }
                        }
                    },
                    "unit": "Amps"
                },
                {
                    "dataType": "DOUBLE",
                    "externalId": "External_Id_Welding_Robot_Joint_1_Temperature",
                    "name": "Joint 1 Temperature",
                    "type": {
                        "measurement": {}
                    },
                    "unit": "degC"
                }
            ]
        }
    ]
}
```

## 데이터 스트림 관리 예시
<a name="example-managing-data-streams"></a>

 이 예시에서는 자산 속성과 연결된 데이터 스트림을 관리하는 두 가지 방법을 보여 줍니다. 자산 속성 별칭의 이름을 바꿀 때는 자산 속성의 데이터 스트림에 현재 저장된 기록 데이터에 대한 두 가지 옵션이 있습니다.
+  옵션 1 - 현재 데이터 스트림을 유지하고 별칭만 이름을 바꿔 새 별칭으로 기록 데이터에 액세스할 수 있도록 합니다.

   JSON 메타데이터 파일 예시에서 ID가 `External_Id_Welding_Robot_Cycle_Count`인 자산 속성은 별칭이 `AnyCompany/Chicago/Welding Line/S3000/Count-Updated`로 변경됩니다. 이 자산 속성의 기록 데이터는 이 변경 후에도 동일하게 유지됩니다.
+  옵션 2 - 새 별칭으로 액세스할 수 있는 자산 속성에 새 데이터 스트림을 할당합니다. 이전 데이터 스트림은 과거 데이터와 함께 이전 별칭으로도 액세스할 수 있지만 자산 속성과는 연결되지 않습니다.

   JSON 메타데이터 파일 예시에서 ID가 `External_Id_Welding_Robot_Joint_1_Current`인 자산 속성은 별칭이 `AnyCompany/Chicago/Welding Line/S4999/1/Current`로 변경됩니다. 이번에는 추가 값 `retainDataOnAliasChange`가 존재하고 `False`로 설정됩니다. 이 설정을 사용하면 원본 데이터 스트림이 자산 속성과 연결 해제되고 기록 데이터가 포함되지 않은 새 데이터 스트림이 생성됩니다.

 원래 기록 데이터를 사용하여 이전 데이터 스트림에 액세스하려면에서 *데이터 스트림* 페이지로 AWS Console Home이동하여 이전 별칭을 검색합니다`AnyCompany/Chicago/Welding Line/S3000/1/Current`.

### 속성 별칭을 업데이트하기 위한 JSON 파일
<a name="bulk-import-JSON-file-update-aliases"></a>

```
{
    "assetExternalId": "External_Id_Welding_Robot_3",
    "assetName": "Sample_Welding Robot 3",
    "assetModelExternalId": "External_Id_Welding_Robot",
    "assetProperties": [
        {
            "externalId": "External_Id_Welding_Robot_Serial_Number",
            "attributeValue": "S3000"
        },
        {
            "externalId": "External_Id_Welding_Robot_Cycle_Count",
            "alias": "AnyCompany/Chicago/Welding Line/S3000/Count-Updated"
        },
        {
            "externalId": "External_Id_Welding_Robot_Joint_1_Current",
            "alias": "AnyCompany/Chicago/Welding Line/S4999/1/Current",
            "retainDataOnAliasChange": "FALSE"
        }
    ]
}
```

# 메타데이터 예시 내보내기
<a name="bulk-operations-export-filter-examples"></a>

Amazon S3로 AWS IoT SiteWise 콘텐츠를 대량으로 내보낼 때 내보낼 특정 자산 모델 및 자산을 제한하는 *필터를* 지정할 수 있습니다.

요청 본문의 `sources` 섹션에 있는 `iotSiteWiseConfiguration` 섹션에 필터를 지정합니다.

**참고**  
필터는 여러 개 설정할 수 있습니다. 일괄 작업은 그 어느 필터와든 일치하는 모든 자산 모델 또는 자산을 내보냅니다.  
필터를 제공하지 않으면 작업이 모든 자산 모델과 자산을 내보냅니다.

```
{
    "metadataTransferJobId": "your-transfer-job-id",
    "sources": [{
        "type": "iotsitewise",
        "iotSiteWiseConfiguration": {
            "filters": [{
                list of filters
            }]
        }
    }],
    "destination": {
        "type": "s3",
        "s3Configuration": {
            "location": "arn:aws:s3:::amzn-s3-demo-bucket"
        }
    }
}
```



## 자산 모델별 필터링
<a name="bulk-export-filter-asset-model"></a>

특정 자산 모델을 필터링할 수 있습니다. 해당 모델을 사용하는 모든 자산 또는 계층 구조 내의 모든 자산 모델을 포함할 수도 있습니다. 자산과 계층 구조를 모두 포함할 수는 없습니다.

계층 구조에 대한 자세한 정보는 [자산 모델 계층 정의](define-asset-hierarchies.md) 단원을 참조하세요.

------
#### [ Asset model ]

이 필터에는 다음의 지정된 자산 모델이 포함됩니다.

```
"filterByAssetModel": {
    "assetModelId": "asset model ID"
}
```

------
#### [ Asset model and its assets ]

이 필터에는 지정된 자산 모델과 해당 자산 모델을 사용하는 모든 자산이 포함됩니다.

```
"filterByAssetModel": {
    "assetModelId": "asset model ID",
    "includeAssets": true
}
```

------
#### [ Asset model and its hierarchy ]

이 필터에는 해당 계층 구조에 있는 모든 관련 자산 모델과 함께 지정된 자산 모델이 포함됩니다.

```
"filterByAssetModel": {
    "assetModelId": "asset model ID",
    "includeOffspring": true
}
```

------

## 자산별 필터링
<a name="bulk-export-filter-asset"></a>

특정 자산을 필터링할 수 있습니다. 자산 모델 또는 해당 계층 구조 내에 연결된 모든 자산을 포함할 수도 있습니다. 자산 모델과 계층 구조를 모두 포함할 수는 없습니다.

계층 구조에 대한 자세한 정보는 [자산 모델 계층 정의](define-asset-hierarchies.md) 단원을 참조하세요.

------
#### [ Asset ]

이 필터에는 다음의 지정된 자산이 포함됩니다.

```
"filterByAsset": {
    "assetId": "asset ID"
}
```

------
#### [ Asset and its asset model ]

이 필터에는 다음의 지정된 자산과 함께 해당 자산이 사용하는 자산 모델이 포함됩니다.

```
"filterByAsset": {
    "assetId": "asset ID",
    "includeAssetModel": true
}
```

------
#### [ Asset and its hierarchy ]

이 필터에는 해당 계층 구조에 있는 모든 관련 자산과 함께 지정된 자산이 포함됩니다.

```
"filterByAsset": {
    "assetId": "asset ID",
    "includeOffspring": true
}
```

------

# AWS IoT SiteWise 메타데이터 전송 작업 스키마
<a name="bulk-operations-schema"></a>

자체 대량 가져오기 및 내보내기 작업을 수행할 때 AWS IoT SiteWise 메타데이터 전송 작업 스키마를 참조용으로 사용합니다.

```
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "IoTSiteWise",
  "description": "Metadata transfer job resource schema for IoTSiteWise",
  "definitions": {
    "Name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "[^\\u0000-\\u001F\\u007F]+"
    },
    "Description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "[^\\u0000-\\u001F\\u007F]+"
    },
    "ID": {
      "type": "string",
      "minLength": 36,
      "maxLength": 36,
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "ExternalId": {
      "type": "string",
      "minLength": 2,
      "maxLength": 128,
      "pattern": "[a-zA-Z0-9_][a-zA-Z_\\-0-9.:]*[a-zA-Z0-9_]+"
    },
    "AttributeValue": {
      "description": "The value of the property attribute.",
      "type": "string",
      "pattern": "[^\\u0000-\\u001F\\u007F]+"
    },
    "PropertyUnit": {
      "description": "The unit of measure (such as Newtons or RPM) of the asset property.",
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "[^\\u0000-\\u001F\\u007F]+"
    },
    "PropertyAlias": {
      "description": "The property alias that identifies the property.",
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "pattern": "[^\\u0000-\\u001F\\u007F]+"
    },
    "AssetProperty": {
      "description": "The asset property's definition, alias, unit, and notification state.",
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "id"
          ]
        },
        {
          "required": [
            "externalId"
          ]
        }
      ],
      "properties": {
        "id": {
          "description": "The ID of the asset property.",
          "$ref": "#/definitions/ID"
        },
        "externalId": {
          "description": "The ExternalID of the asset property.",
          "$ref": "#/definitions/ExternalId"
        },
        "alias": {
          "$ref": "#/definitions/PropertyAlias"
        },
        "unit": {
          "$ref": "#/definitions/PropertyUnit"
        },
        "attributeValue": {
          "$ref": "#/definitions/AttributeValue"
        },
        "retainDataOnAliasChange": {
          "type": "string",
          "default": "TRUE",
          "enum": [
            "TRUE",
            "FALSE"
          ]
        },
        "propertyNotificationState": {
          "description": "The MQTT notification state (ENABLED or DISABLED) for this asset property.",
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ]
        }
      }
    },
    "AssetHierarchy": {
      "description": "A hierarchy specifies allowed parent/child asset relationships.",
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "id",
            "childAssetId"
          ]
        },
        {
          "required": [
            "externalId",
            "childAssetId"
          ]
        },
        {
          "required": [
            "id",
            "childAssetExternalId"
          ]
        },
        {
          "required": [
            "externalId",
            "childAssetExternalId"
          ]
        }
      ],
      "properties": {
        "id": {
          "description": "The ID of a hierarchy in the parent asset's model.",
          "$ref": "#/definitions/ID"
        },
        "externalId": {
          "description": "The ExternalID of a hierarchy in the parent asset's model.",
          "$ref": "#/definitions/ExternalId"
        },
        "childAssetId": {
          "description": "The ID of the child asset to be associated.",
          "$ref": "#/definitions/ID"
        },
        "childAssetExternalId": {
          "description": "The ExternalID of the child asset to be associated.",
          "$ref": "#/definitions/ExternalId"
        }
      }
    },
    "Tag": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "AssetModelType": {
      "type": "string",
      "default": null,
      "enum": [
        "ASSET_MODEL",
        "COMPONENT_MODEL"
      ]
    },
    "AssetModelCompositeModel": {
      "description": "Contains a composite model definition in an asset model. This composite model definition is applied to all assets created from the asset model.",
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "id"
          ]
        },
        {
          "required": [
            "externalId"
          ]
        }
      ],
      "required": [
        "name",
        "type"
      ],
      "properties": {
        "id": {
          "description": "The ID of the asset model composite model.",
          "$ref": "#/definitions/ID"
        },
        "externalId": {
          "description": "The ExternalID of the asset model composite model.",
          "$ref": "#/definitions/ExternalId"
        },
        "parentId": {
          "description": "The ID of the parent asset model composite model.",
          "$ref": "#/definitions/ID"
        },
        "parentExternalId": {
          "description": "The ExternalID of the parent asset model composite model.",
          "$ref": "#/definitions/ExternalId"
        },
        "composedAssetModelId": {
          "description": "The ID of the composed asset model.",
          "$ref": "#/definitions/ID"
        },
        "composedAssetModelExternalId": {
          "description": "The ExternalID of the composed asset model.",
          "$ref": "#/definitions/ExternalId"
        },
        "description": {
          "description": "A description for the asset composite model.",
          "$ref": "#/definitions/Description"
        },
        "name": {
          "description": "A unique, friendly name for the asset composite model.",
          "$ref": "#/definitions/Name"
        },
        "type": {
          "description": "The type of the composite model. For alarm composite models, this type is AWS/ALARM.",
          "$ref": "#/definitions/Name"
        },
        "properties": {
          "description": "The property definitions of the asset model.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetModelProperty"
          }
        }
      }
    },
    "AssetModelProperty": {
      "description": "Contains information about an asset model property.",
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "id"
          ]
        },
        {
          "required": [
            "externalId"
          ]
        }
      ],
      "required": [
        "name",
        "dataType",
        "type"
      ],
      "properties": {
        "id": {
          "description": "The ID of the asset model property.",
          "$ref": "#/definitions/ID"
        },
        "externalId": {
          "description": "The ExternalID of the asset model property.",
          "$ref": "#/definitions/ExternalId"
        },
        "name": {
          "description": "The name of the asset model property.",
          "$ref": "#/definitions/Name"
        },
        "dataType": {
          "description": "The data type of the asset model property.",
          "$ref": "#/definitions/DataType"
        },
        "dataTypeSpec": {
          "description": "The data type of the structure for this property.",
          "$ref": "#/definitions/Name"
        },
        "unit": {
          "description": "The unit of the asset model property, such as Newtons or RPM.",
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "[^\\u0000-\\u001F\\u007F]+"
        },
        "type": {
          "description": "The property type",
          "$ref": "#/definitions/PropertyType"
        }
      }
    },
    "DataType": {
      "type": "string",
      "enum": [
        "STRING",
        "INTEGER",
        "DOUBLE",
        "BOOLEAN",
        "STRUCT"
      ]
    },
    "PropertyType": {
      "description": "Contains a property type, which can be one of attribute, measurement, metric, or transform.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "attribute": {
          "$ref": "#/definitions/Attribute"
        },
        "transform": {
          "$ref": "#/definitions/Transform"
        },
        "metric": {
          "$ref": "#/definitions/Metric"
        },
        "measurement": {
          "$ref": "#/definitions/Measurement"
        }
      }
    },
    "Attribute": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "defaultValue": {
          "type": "string",
          "pattern": "[^\\u0000-\\u001F\\u007F]+"
        }
      }
    },
    "Transform": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "expression",
        "variables"
      ],
      "properties": {
        "expression": {
          "description": "The mathematical expression that defines the transformation function.",
          "type": "string",
          "minLength": 1,
          "maxLength": 1024
        },
        "variables": {
          "description": "The list of variables used in the expression.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpressionVariable"
          }
        },
        "processingConfig": {
          "$ref": "#/definitions/TransformProcessingConfig"
        }
      }
    },
    "TransformProcessingConfig": {
      "description": "The processing configuration for the given transform property.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "computeLocation"
      ],
      "properties": {
        "computeLocation": {
          "description": "The compute location for the given transform property.",
          "$ref": "#/definitions/ComputeLocation"
        },
        "forwardingConfig": {
          "description": "The forwarding configuration for a given property.",
          "$ref": "#/definitions/ForwardingConfig"
        }
      }
    },
    "Metric": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "expression",
        "variables",
        "window"
      ],
      "properties": {
        "expression": {
          "description": "The mathematical expression that defines the metric aggregation function.",
          "type": "string",
          "minLength": 1,
          "maxLength": 1024
        },
        "variables": {
          "description": "The list of variables used in the expression.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpressionVariable"
          }
        },
        "window": {
          "description": "The window (time interval) over which AWS IoT SiteWise computes the metric's aggregation expression",
          "$ref": "#/definitions/MetricWindow"
        },
        "processingConfig": {
          "$ref": "#/definitions/MetricProcessingConfig"
        }
      }
    },
    "MetricProcessingConfig": {
      "description": "The processing configuration for the metric.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "computeLocation"
      ],
      "properties": {
        "computeLocation": {
          "description": "The compute location for the given metric property.",
          "$ref": "#/definitions/ComputeLocation"
        }
      }
    },
    "ComputeLocation": {
      "type": "string",
      "enum": [
        "EDGE",
        "CLOUD"
      ]
    },
    "ForwardingConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ]
        }
      }
    },
    "MetricWindow": {
      "description": "Contains a time interval window used for data aggregate computations (for example, average, sum, count, and so on).",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tumbling": {
          "description": "The tumbling time interval window.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "interval"
          ],
          "properties": {
            "interval": {
              "description": "The time interval for the tumbling window.",
              "type": "string",
              "minLength": 2,
              "maxLength": 23
            },
            "offset": {
              "description": "The offset for the tumbling window.",
              "type": "string",
              "minLength": 2,
              "maxLength": 25
            }
          }
        }
      }
    },
    "ExpressionVariable": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "description": "The friendly name of the variable to be used in the expression.",
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[a-z][a-z0-9_]*$"
        },
        "value": {
          "description": "The variable that identifies an asset property from which to use values.",
          "$ref": "#/definitions/VariableValue"
        }
      }
    },
    "VariableValue": {
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "propertyId"
          ]
        },
        {
          "required": [
            "propertyExternalId"
          ]
        }
      ],
      "properties": {
        "propertyId": {
          "$ref": "#/definitions/ID"
        },
        "propertyExternalId": {
          "$ref": "#/definitions/ExternalId"
        },
        "hierarchyId": {
          "$ref": "#/definitions/ID"
        },
        "hierarchyExternalId": {
          "$ref": "#/definitions/ExternalId"
        }
      }
    },
    "Measurement": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "processingConfig": {
          "$ref": "#/definitions/MeasurementProcessingConfig"
        }
      }
    },
    "MeasurementProcessingConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "forwardingConfig"
      ],
      "properties": {
        "forwardingConfig": {
          "description": "The forwarding configuration for the given measurement property.",
          "$ref": "#/definitions/ForwardingConfig"
        }
      }
    },
    "AssetModelHierarchy": {
      "description": "Contains information about an asset model hierarchy.",
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "id",
            "childAssetModelId"
          ]
        },
        {
          "required": [
            "id",
            "childAssetModelExternalId"
          ]
        },
        {
          "required": [
            "externalId",
            "childAssetModelId"
          ]
        },
        {
          "required": [
            "externalId",
            "childAssetModelExternalId"
          ]
        }
      ],
      "required": [
        "name"
      ],
      "properties": {
        "id": {
          "description": "The ID of the asset model hierarchy.",
          "$ref": "#/definitions/ID"
        },
        "externalId": {
          "description": "The ExternalID of the asset model hierarchy.",
          "$ref": "#/definitions/ExternalId"
        },
        "name": {
          "description": "The name of the asset model hierarchy.",
          "$ref": "#/definitions/Name"
        },
        "childAssetModelId": {
          "description": "The ID of the asset model. All assets in this hierarchy must be instances of the child AssetModelId asset model.",
          "$ref": "#/definitions/ID"
        },
        "childAssetModelExternalId": {
          "description": "The ExternalID of the asset model. All assets in this hierarchy must be instances of the child AssetModelId asset model.",
          "$ref": "#/definitions/ExternalId"
        }
      }
    },
    "AssetModel": {
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "assetModelId"
          ]
        },
        {
          "required": [
            "assetModelExternalId"
          ]
        }
      ],
      "required": [
        "assetModelName"
      ],
      "properties": {
        "assetModelId": {
          "description": "The ID of the asset model.",
          "$ref": "#/definitions/ID"
        },
        "assetModelExternalId": {
          "description": "The ID of the asset model.",
          "$ref": "#/definitions/ExternalId"
        },
        "assetModelName": {
          "description": "A unique, friendly name for the asset model.",
          "$ref": "#/definitions/Name"
        },
        "assetModelDescription": {
          "description": "A description for the asset model.",
          "$ref": "#/definitions/Description"
        },
        "assetModelType": {
          "description": "The type of the asset model.",
          "$ref": "#/definitions/AssetModelType"
        },
        "assetModelProperties": {
          "description": "The property definitions of the asset model.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetModelProperty"
          }
        },
        "assetModelCompositeModels": {
          "description": "The composite asset models that are part of this asset model. Composite asset models are asset models that contain specific properties.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetModelCompositeModel"
          }
        },
        "assetModelHierarchies": {
          "description": "The hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetModelHierarchy"
          }
        },
        "tags": {
          "description": "A list of key-value pairs that contain metadata for the asset model.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tag"
          }
        }
      }
    },
    "Asset": {
      "type": "object",
      "additionalProperties": false,
      "anyOf": [
        {
          "required": [
            "assetId",
            "assetModelId"
          ]
        },
        {
          "required": [
            "assetExternalId",
            "assetModelId"
          ]
        },
        {
          "required": [
            "assetId",
            "assetModelExternalId"
          ]
        },
        {
          "required": [
            "assetExternalId",
            "assetModelExternalId"
          ]
        }
      ],
      "required": [
        "assetName"
      ],
      "properties": {
        "assetId": {
          "description": "The ID of the asset",
          "$ref": "#/definitions/ID"
        },
        "assetExternalId": {
          "description": "The external ID of the asset",
          "$ref": "#/definitions/ExternalId"
        },
        "assetModelId": {
          "description": "The ID of the asset model from which to create the asset.",
          "$ref": "#/definitions/ID"
        },
        "assetModelExternalId": {
          "description": "The ExternalID of the asset model from which to create the asset.",
          "$ref": "#/definitions/ExternalId"
        },
        "assetName": {
          "description": "A unique, friendly name for the asset.",
          "$ref": "#/definitions/Name"
        },
        "assetDescription": {
          "description": "A description for the asset",
          "$ref": "#/definitions/Description"
        },
        "assetProperties": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetProperty"
          }
        },
        "assetHierarchies": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AssetHierarchy"
          }
        },
        "tags": {
          "description": "A list of key-value pairs that contain metadata for the asset.",
          "type": "array",
          "uniqueItems": false,
          "items": {
            "$ref": "#/definitions/Tag"
          }
        }
      }
    }
  },
  "additionalProperties": false,
  "properties": {
    "assetModels": {
      "type": "array",
      "uniqueItems": false,
      "items": {
        "$ref": "#/definitions/AssetModel"
      }
    },
    "assets": {
      "type": "array",
      "uniqueItems": false,
      "items": {
        "$ref": "#/definitions/Asset"
      }
    }
  }
}
```