

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

# getClusterLogEvents
<a name="get-cluster-log-events"></a>

로그 스트림과 연결된 이벤트를 검색합니다.

**Topics**
+ [요청 구문](#get-cluster-log-events-request)
+ [요청 본문](#get-cluster-log-events-request-body)
+ [응답 구문](#get-cluster-log-events-response)
+ [응답 본문](#get-cluster-log-events-response-body)
+ [예제](#get-cluster-log-events-example)

## 요청 구문
<a name="get-cluster-log-events-request"></a>

```
GET /v3/clusters/{{{clusterName}}}/logstreams/{{{logStreamName}}}
{
  "endTime": datetime,
  "limit": float,
  "nextToken": "string",
  "region": "string",
  "startFromHead": boolean,
  "startTime": datetime
}
```

## 요청 본문
<a name="get-cluster-log-events-request-body"></a>

**clusterName**  
클러스터의 이름입니다.  
유형: string  
필수 항목 여부: 예

**logStreamName**  
로그 스트림의 이름입니다.  
유형: string  
필수 항목 여부: 예

**endTime**  
시간 범위의 끝입니다. ISO 8601 형식으로 표시됩니다. 타임스탬프가 이 시간 이후인 이벤트는 포함되지 않습니다.  
유형: 날짜/시간  
형식: `2021-01-01T20:00:00Z`  
필수 여부: 아니요

**제한**  
반환된 로그 이벤트의 최대 수입니다. 값을 지정하지 않으면 최대값은 응답 크기 1MB 또는 최대 10,000개의 로그 이벤트에 적합할 수 있는 로그 이벤트 수입니다.  
유형: float  
필수 여부: 아니요

**nextToken**  
다음 결과 집합에 대한 토큰입니다.  
유형: string  
필수 항목 여부: 아니요

**region**  
클러스터가 AWS 리전 있는 입니다.  
유형: string  
필수 항목 여부: 아니요

**startFromHead**  
`true`로 설정하면 가장 이른 로그 이벤트가 먼저 반환됩니다. 값이 `false`인 경우 최신 로그 이벤트가 먼저 반환됩니다. 기본값은 `false`입니다.  
유형: boolean  
필수 항목 여부: 아니요

**startTime**  
시간 범위의 시작입니다. ISO 8601 형식으로 표시됩니다. 타임스탬프가 이 시간 이후인 이벤트가 포함됩니다.  
유형: 날짜/시간  
형식: `2021-01-01T20:00:00Z`  
필수 항목 여부: 아니요

## 응답 구문
<a name="get-cluster-log-events-response"></a>

```
{
  "nextToken": "string",
  "prevToken": "string",
  "events": [
    {
      "timestamp": "2019-08-24T14:15:22Z",
      "message": "string"
    }
  ]
}
```

## 응답 본문
<a name="get-cluster-log-events-response-body"></a>

**events**  
필터링된 이벤트 목록입니다.    
**message**  
이벤트 메시지  
유형: string  
**타임스탬프**  
이벤트 타임스탬프입니다.  
유형: 날짜/시간

**nextToken**  
다음 결과 집합을 가져오기 위해 사용할 수 있는 토큰이지만 결과가 더 이상 없는 경우에는 `null`입니다.  
유형: string

**prevToken**  
이전 결과 세트를 검색하거나 추가 결과가 없는 `null` 경우 사용할 수 있는 토큰입니다.  
유형: string

## 예제
<a name="get-cluster-log-events-example"></a>

------
#### [ Python ]

**요청**

```
$ get_cluster_log_events({{cluster_name_3x}}, {{log_stream_name=ip-192-0-2-26.i-abcdef01234567890.cfn-init}})
```

**200 응답**

```
"events": [
  {
    "message": "2022-09-22 16:40:15,127 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-east-1.amazonaws.com",
    "timestamp": "2022-09-22T16:40:15.127Z"
  },
  {
    "message": "2022-09-22 16:40:15,127 [DEBUG] Describing resource HeadNodeLaunchTemplate in stack cluster_name_3x",
    "timestamp": "2022-09-22T16:40:15.127Z"
  },
  ...
]
```

------