

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

# 를 사용하여 대시보드 생성 AWS CLI
<a name="create-dashboards-ai-dashboard-cli"></a>

**참고**  
SiteWise Monitor 기능은 더 이상 신규 고객이 사용할 수 없습니다. 기존 고객은 정상적으로 서비스를 계속 이용할 수 있습니다. 자세한 내용은 [SiteWise Monitor 가용성 변경을](https://docs.aws.amazon.com/iot-sitewise/latest/appguide/iotsitewise-monitor-availability-change.html) 참조하세요.

를 사용하여 대시보드에서 시각화(또는 위젯)를 정의할 때 `dashboardDefinition` JSON 문서에 다음 정보를 지정 AWS CLI해야 합니다. 이 정의는 [CreateDashboard](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateDashboard.html) 및 [UpdateDashboard](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UpdateDashboard.html) 작업의 파라미터입니다.

`displaySettings`  
다음 파라미터가 포함된 표시 설정:  
+ `numRows` - 대시보드 레이아웃의 행 수입니다. 각 행은 **cellSize** 너비입니다.
+ `numColumbs` - 대시보드 레이아웃의 열 수입니다. 각 열은 **cellSize** 너비입니다.
+ `cellSize` – (선택 사항) 레이아웃에 있는 셀의 크기를 픽셀 단위로 표시합니다. 양수여야 합니다. 기본값은 10입니다.
+ `significantDigits` – (선택 사항) 대시보드에 표시할 유효 자릿수입니다. 기본값은 4입니다.

`querySettings`  
다음 파라미터가 포함된 쿼리 정보입니다.  
+ `refreshRate` – (선택 사항) 밀리초 단위로 데이터를 새로 고치는 비율입니다. 1000, 5000, 10000, 60000, 300000 값을 허용합니다.

`defaultViewport`  
제공되지 않은 경우 기본값은 지난 5분입니다. 다음 파라미터를 포함합니다.  
+ `duration` – (선택 사항) 현재 시간부터 데이터를 쿼리할 과거의 거리를 결정합니다.
+ `start` – (선택 사항) Date 유형입니다. 데이터를 쿼리할 시작 시간 범위입니다. `end` 날짜를 지정해야 합니다.
+ `end` – (선택 사항) Date 유형입니다. 데이터를 쿼리할 종료 시간 범위입니다. `start` 날짜를 지정해야 합니다.

`widgets`  
다음 정보가 포함된 위젯 정의 구조의 목록입니다.    
`type`  
위젯 유형은 다음과 같은 위젯 유형을 AWS IoT SiteWise 제공합니다.  
+ <a name="xy-plot"></a>`xy-plot` - 구성에 따라 선 차트 또는 산점도입니다.
+ <a name="bar-chart"></a>`bar-chart` – 막대 차트입니다.
+ <a name="kpi-chart"></a>`kpi-chart` - 주요 성과 지표 차트입니다.
+ <a name="status-timeline"></a>`status-timeline` - 하나 이상의 데이터 소스에서 시계열 데이터를 시각화하고 탐색하는 상태 위젯입니다.
+ <a name="text-widget"></a>`text` - 텍스트 위젯입니다.
+ <a name="table-widget"></a>`table` - 테이블 위젯입니다.  
`id`  
위젯의 고유 식별자입니다.  
`x`  
대시보드 왼쪽부터 위젯의 가로 위치입니다. 이 값은 대시보드 그리드에서 위젯의 위치를 나타냅니다.  
`y`  
대시보드 상단부터 위젯의 세로 위치입니다. 이 값은 대시보드 그리드에서 위젯의 위치를 나타냅니다.  
`z`  
위젯의 상대적 순서입니다. 더 큰 Z 값 위젯은 겹치는 경우 더 낮은 Z 값 위젯 앞에 표시됩니다.  
`width`  
대시보드의 셀 수로 표시되는 위젯의 너비입니다.  
`height`  
대시보드의 셀 수로 표시되는 위젯의 높이입니다.  
`properties`  
위젯의 속성 목록입니다. 위젯 유형에 따라 다릅니다. 자세한 내용은 [IoT 앱 키트를](https://awslabs.github.io/iot-app-kit/?path=/docs/components-statustimeline--docs) 참조하세요.

**Example 대시보드 정의 예**  
다음 예제에서는 JSON 파일에 저장된 페이로드로 대시보드를 정의합니다.  

```
aws iotsitewise create-dashboard \
  --project-id a1b2c3d4-5678-90ab-cdef-eeeeeEXAMPLE \
  --dashboard-name "Example Dashboard" \
  --dashboard-definition file://dashboard-definition.json
```
`dashboard-definition.json`에 대한 다음 JSON 예제는 다음과 같은 시각화 위젯으로 대시보드를 정의합니다.  

```
{
    "displaySettings": {
        "numColumns": 200,
        "numRows": 1000,
        "cellSize": 20,
        "significantDigits": 4
    },
    "widgets": [{
        "id": "Ot73JcxUoc6oEXAMPLE",
        "type": "xy-plot",
        "width": 33,
        "height": 20,
        "x": 0,
        "y": 0,
        "z": 0,
        "properties": {
            "aggregationType": "AVERAGE",
            "queryConfig": {
                "source": "iotsitewise",
                "query": {
                    "assets": [{
                        "assetId": "97c97abf-e883-47bb-a3f4-EXAMPLE",
                        "properties": [{
                            "propertyId": "97cc61f4-57a4-4c5f-a82c-EXAMPLE",
                            "refId": "692ce941-f3d9-4074-a297-EXAMPLE",
                            "aggregationType": "AVERAGE",
                            "color": "#7d2105",
                            "resolution": "1m"
                        }]
                    }],
                    "properties": [],
                    "assetModels": [],
                    "alarms": [],
                    "alarmModels": []
                }
            },
            "line": {
                "connectionStyle": "linear",
                "style": "solid"
            },
            "symbol": {
                "style": "filled-circle"
            },
            "axis": {
                "yVisible": true,
                "xVisible": true
            },
            "legend": {
                "visible": true,
                "position": "right",
                "width": "30%",
                "height": "30%",
                "visibleContent": {
                    "unit": true,
                    "asset": true,
                    "latestValue": true,
                    "latestAlarmStateValue": true,
                    "maxValue": false,
                    "minValue": false
                }
            }
        }
    }, {
        "id": "fto7rF40Ny1EXAMPLE-G",
        "type": "bar-chart",
        "width": 33,
        "height": 20,
        "x": 0,
        "y": 20,
        "z": 0,
        "properties": {
            "aggregationType": "AVERAGE",
            "queryConfig": {
                "source": "iotsitewise",
                "query": {
                    "assets": [{
                        "assetId": "97c97abf-e883-47bb-a3f4-EXAMPLE",
                        "properties": [{
                            "propertyId": "c84ca8f3-3dea-478a-afec-EXAMPLE",
                            "aggregationType": "AVERAGE",
                            "refId": "2960b958-2034-4d6e-bcc2-EXAMPLE"
                        }]
                    }],
                    "properties": [],
                    "assetModels": [],
                    "alarms": [],
                    "alarmModels": [],
                    "requestSettings": {
                        "aggregation": "AVERAGE"
                    }
                }
            },
            "axis": {
                "showX": true,
                "showY": true
            },
            "styleSettings": {
                "2960b958-2034-4d6e-bcc2-360f1f02e505": {
                    "color": "#7d2105"
                }
            }
        }
    }],
    "querySettings": {
        "refreshRate": 5000
    }
}
```