

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

# EventBridgeRule
<a name="sam-property-function-eventbridgerule"></a>

서버리스 함수를 Amazon EventBridge 규칙의 대상으로 설정하는 `EventBridgeRule`이벤트 소스 유형을 설명하는 객체입니다. 자세한 내용은 [Amazon EventBridge 사용자 가이드](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html)의 *Amazon EventBridge란?*을 참조하세요.

AWS SAM 는이 이벤트 유형이 설정되면 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html) 리소스를 생성합니다. AWS SAM 또한가 Lambda를 호출할 `EventBridgeRule` 수 있도록 필요한 `AWS::Lambda::Permission` 리소스를 생성합니다.

## 구문
<a name="sam-property-function-eventbridgerule-syntax"></a>

 AWS Serverless Application Model (AWS SAM) 템플릿에서이 개체를 선언하려면 다음 구문을 사용합니다.

### YAML
<a name="sam-property-function-eventbridgerule-syntax.yaml"></a>

```
  [DeadLetterConfig](#sam-function-eventbridgerule-deadletterconfig): DeadLetterConfig
  [EventBusName](#sam-function-eventbridgerule-eventbusname): String
  [Input](#sam-function-eventbridgerule-input): String
  [InputPath](#sam-function-eventbridgerule-inputpath): String
  InputTransformer: [InputTransformer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html)
  [Pattern](#sam-function-eventbridgerule-pattern): [EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)
  [RetryPolicy](#sam-function-eventbridgerule-retrypolicy): [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)
  RuleName: String 
  State: String
  [Target](#sam-function-eventbridgerule-target): Target
```

## 속성
<a name="sam-property-function-eventbridgerule-properties"></a>

 `DeadLetterConfig`   <a name="sam-function-eventbridgerule-deadletterconfig"></a>
대상 호출이 실패한 경우 EventBridge가 이벤트를 전송하는 Amazon Simple Queue Service(Amazon SQS) 대기열을 구성합니다. 예를 들어 존재하지 않는 Lambda 함수로 이벤트를 전송하거나 EventBridge에 Lambda 함수를 간접 호출할 권한이 충분하지 않은 경우 간접 호출이 실패할 수 있습니다. 자세한 내용은 *Amazon EventBridge 사용자 가이드*의 [이벤트 재시도 정책 및 DLQ(Dead Letter Queue) 사용](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)을 참조하세요.  
[AWS::Serverless::Function](sam-resource-function.md) 리소스 유형에는 유사한 데이터 유형인`DeadLetterQueue`가 있으며, 이는 대상 Lambda 함수를 성공적으로 호출한 후 발생하는 장애를 처리합니다. 이러한 유형의 실패의 예로는 Lambda 제한 또는 Lambda 대상 함수에서 표시되는 오류가 있습니다. 함수 `DeadLetterQueue` 속성에 대한 자세한 내용은 *AWS Lambda 개발자 가이드*의 [DLQ(Dead Letter Queue)](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq)를 참조하세요.
*유형*: [DeadLetterConfig](sam-property-function-deadletterconfig.md)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` `Target` 데이터 유형의 `[DeadLetterConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-deadletterconfig)` 속성과 유사합니다. 이 속성의 AWS SAM 버전에는 배달 못한 편지 대기열 AWS SAM 을 생성하려는 경우 추가 하위 속성이 포함됩니다.

 `EventBusName`   <a name="sam-function-eventbridgerule-eventbusname"></a>
이 규칙과 연결할 이벤트 버스입니다. 이 속성을 생략하면가 기본 이벤트 버스를 AWS SAM 사용합니다.  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*기본값*: 기본 이벤트 버스  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` 리소스의 `[EventBusName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventbusname)` 속성으로 직접 전달됩니다.

 `Input`   <a name="sam-function-eventbridgerule-input"></a>
대상으로 전달되는 유효한 JSON 텍스트입니다. 이 속성을 사용하면 이벤트 텍스트 자체의 어떤 것도 대상으로 전달되지 않습니다.  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule Target` 리소스의 `[Input](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-input)` 속성으로 직접 전달됩니다.

 `InputPath`   <a name="sam-function-eventbridgerule-inputpath"></a>
일치된 이벤트 전체를 전달하지 않으려는 경우 `InputPath` 속성을 사용하여 이벤트의 어떤 부분이 전달되어야 하는지 설명하세요.  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule Target` 리소스의 `[InputPath](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputpath)` 속성으로 직접 전달됩니다.

 `InputTransformer`   <a name="sam-function-eventbridgerule-inputtransformer"></a>
특정 이벤트 데이터를 기반으로 대상에 사용자 지정 입력을 제공할 수 있게 하는 설정입니다. 이벤트에서 하나 이상의 키-값 페어를 추출한 후 이 데이터를 사용하여 대상에 사용자 지정 입력을 전송할 수 있습니다. 자세한 내용은 [Amazon EventBridge 사용자 가이드](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html)의 *Amazon EventBridge input transformation*를 참조하세요.  
*유형*: [InputTransformer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputtransformer)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` `Target` 데이터 유형의 `[InputTransformer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html)` 속성으로 직접 전달됩니다.

 `Pattern`   <a name="sam-function-eventbridgerule-pattern"></a>
어떤 이벤트가 지정된 대상으로 라우팅되는지를 설명합니다. 자세한 내용은 [Amazon EventBridge 사용자 가이드](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)의 [Amazon EventBridge 이벤트](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html) 및 *EventBridge 이벤트 패턴*을 참조하세요.  
*유형*: [이벤트패턴](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)  
*필수 항목 여부*: 예  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` 리소스의 `[EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)` 속성으로 직접 전달됩니다.

 `RetryPolicy`   <a name="sam-function-eventbridgerule-retrypolicy"></a>
재시도 정책 설정에 대한 정보가 포함된 `RetryPolicy` 객체입니다. 자세한 내용은 *Amazon EventBridge 사용자 가이드*의 [이벤트 재시도 정책 및 DLQ(Dead Letter Queue) 사용](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)을 참조하세요.  
*유형*: [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` `Target` 데이터 유형의 `[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)` 속성으로 직접 전달됩니다.

 `RuleName`   <a name="sam-function-eventbridgerule-rulename"></a>
규칙의 이름입니다.  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` 리소스의 `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name)` 속성으로 직접 전달됩니다.

 `State`   <a name="sam-function-eventbridgerule-state"></a>
규칙의 상태입니다.  
*허용되는 값*: `DISABLED` \$1 `ENABLED` \$1 `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS`  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` 리소스의 `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state) ` 속성으로 직접 전달됩니다.

 `Target`   <a name="sam-function-eventbridgerule-target"></a>
규칙이 트리거될 때 EventBridge가 호출하는 AWS 리소스입니다. 이 속성을 사용하여 대상의 논리적 ID를 지정할 수 있습니다. 이 속성을 지정하지 않으면가 대상의 논리적 ID를 AWS SAM 생성합니다.  
*유형*: [Target](sam-property-function-target.md)  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` 리소스의 `[Targets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-targets)` 속성과 유사합니다. `Amazon EC2 RebootInstances API call`는 대상 속성의 예입니다. 이 속성의 AWS SAM 버전에서는 단일 대상의 논리적 ID만 지정할 수 있습니다.

## 예제
<a name="sam-property-function-eventbridgerule--examples"></a>

### EventBridgeRule
<a name="sam-property-function-eventbridgerule--examples--eventbridgerule"></a>

다음은 `EventBridgeRule` 이벤트 소스 유형의 예입니다.

#### YAML
<a name="sam-property-function-eventbridgerule--examples--eventbridgerule--yaml"></a>

```
EBRule:
  Type: EventBridgeRule
  Properties:
    Input: '{"Key": "Value"}'
    Pattern:
      detail:
        state:
          - terminated
    RetryPolicy:
      MaximumRetryAttempts: 5
      MaximumEventAgeInSeconds: 900
    DeadLetterConfig:
      Type: SQS
      QueueLogicalId: EBRuleDLQ
    Target:
      Id: MyTarget
```

# DeadLetterConfig
<a name="sam-property-function-deadletterconfig"></a>

대상 호출 실패 후 EventBridge가 이벤트를 전송하는 Amazon Simple Queue Service(Amazon SQS) 대기열을 지정하는 데 사용되는 객체입니다. 예를 들어 존재하지 않는 Lambda 함수로 이벤트를 전송하거나 Lambda 함수를 호출할 권한이 충분하지 않은 경우 간접 호출이 실패할 수 있습니다. 자세한 내용은 *Amazon EventBridge 사용자 가이드*의 [이벤트 재시도 정책 및 DLQ(Dead Letter Queue) 사용](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)을 참조하세요.

**참고**  
[AWS::Serverless::Function](sam-resource-function.md) 리소스 유형에는 유사한 데이터 유형인`DeadLetterQueue`가 있으며, 이는 대상 Lambda 함수를 성공적으로 호출한 후 발생하는 장애를 처리합니다. 이러한 유형의 실패의 예로는 Lambda 제한 또는 Lambda 대상 함수에서 반환되는 오류가 있습니다. 함수 `DeadLetterQueue` 속성에 대한 자세한 내용은 *AWS Lambda 개발자 가이드*의 [DLQ(Dead Letter Queue)](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq)를 참조하세요.

## 구문
<a name="sam-property-function-deadletterconfig-syntax"></a>

 AWS Serverless Application Model (AWS SAM) 템플릿에서이 개체를 선언하려면 다음 구문을 사용합니다.

### YAML
<a name="sam-property-function-deadletterconfig-syntax.yaml"></a>

```
  [Arn](#sam-function-deadletterconfig-arn): String
  [QueueLogicalId](#sam-function-deadletterconfig-queuelogicalid): String
  [Type](#sam-function-deadletterconfig-type): String
```

## 속성
<a name="sam-property-function-deadletterconfig-properties"></a>

 `Arn`   <a name="sam-function-deadletterconfig-arn"></a>
DLQ(Dead Letter Queue)의 대상으로 지정된 Amazon SQS 대기열의 Amazon 리소스 이름(ARN)입니다.  
`Type` 속성 또는 `Arn` 속성 중 하나만 지정해야 하며, 둘 다 지정할 수는 없습니다.
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` `DeadLetterConfig` 데이터 유형의 `[Arn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html#cfn-events-rule-deadletterconfig-arn)` 속성으로 직접 전달됩니다.

 `QueueLogicalId`   <a name="sam-function-deadletterconfig-queuelogicalid"></a>
가 지정된 경우가 AWS SAM 생성하는 배달 못한 편지 대기열의 사용자 지정 이름`Type`입니다.  
`Type` 속성이 설정되지 않은 경우 이 속성은 무시됩니다.
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

 `Type`   <a name="sam-function-deadletterconfig-type"></a>
대기열 유형. 이 속성이 설정되면는 배달 못한 편지 대기열을 AWS SAM 자동으로 생성하고 필요한 [리소스 기반 정책을](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html#dlq-perms) 연결하여 대기열로 이벤트를 전송할 수 있는 규칙 리소스에 권한을 부여합니다.  
`Type` 속성 또는 `Arn` 속성 중 하나만 지정해야 하며, 둘 다 지정할 수는 없습니다.
*유효한 값*: `SQS`  
*유형*: 문자열  
*필수 항목 여부*: 아니요  
*CloudFormation 호환성*:이 속성은에 고유 AWS SAM 하며 CloudFormation 동등한 속성이 없습니다.

## 예제
<a name="sam-property-function-deadletterconfig--examples"></a>

### DeadLetterConfig
<a name="sam-property-function-deadletterconfig--examples--deadletterconfig"></a>

DeadLetterConfig

#### YAML
<a name="sam-property-function-deadletterconfig--examples--deadletterconfig--yaml"></a>

```
DeadLetterConfig:
  Type: SQS
  QueueLogicalId: MyDLQ
```

# Target
<a name="sam-property-function-target"></a>

규칙이 트리거될 때 EventBridge가 호출하는 AWS 리소스를 구성합니다.

## 구문
<a name="sam-property-function-target-syntax"></a>

 AWS Serverless Application Model (AWS SAM) 템플릿에서이 개체를 선언하려면 다음 구문을 사용합니다.

### YAML
<a name="sam-property-function-target-syntax.yaml"></a>

```
  [Id](#sam-function-target-id): String
```

## 속성
<a name="sam-property-function-target-properties"></a>

 `Id`   <a name="sam-function-target-id"></a>
대상의 논리적 ID.  
`Id`의 값은 영숫자 문자, 마침표(`.`), 하이픈(`-`), 밑줄(`_`)을 포함할 수 있습니다.  
*유형*: 문자열  
*필수 항목 여부:* 예  
*CloudFormation 호환성*:이 속성은 `AWS::Events::Rule` `Target` 데이터 유형의 `[Id](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-id)` 속성으로 직접 전달됩니다.

## 예제
<a name="sam-property-function-target--examples"></a>

### 대상
<a name="sam-property-function-target--examples--target"></a>

#### YAML
<a name="sam-property-function-target--examples--target--yaml"></a>

```
EBRule:
  Type: EventBridgeRule
  Properties:
    Target:
      Id: MyTarget
```