

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Schedule
<a name="sam-property-statemachine-statemachineschedule"></a>

`Schedule` イベントソースタイプを説明するオブジェクトです。これは、ステートマシンをスケジュールに従ってトリガーする EventBridge ルールのターゲットとして設定します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Amazon EventBridge とは](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html)」を参照してください。

AWS Serverless Application Model (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)リソースを生成します。

## 構文
<a name="sam-property-statemachine-statemachineschedule-syntax"></a>

 AWS Serverless Application Model (AWS SAM) テンプレートでこのエンティティを宣言するには、次の構文を使用します。

### YAML
<a name="sam-property-statemachine-statemachineschedule-syntax.yaml"></a>

```
  [DeadLetterConfig](#sam-statemachine-statemachineschedule-deadletterconfig): {{DeadLetterConfig}}
  [Description](#sam-statemachine-statemachineschedule-description): {{String}}
  [Enabled](#sam-statemachine-statemachineschedule-enabled): {{Boolean}}
  [Input](#sam-statemachine-statemachineschedule-input): {{String}}
  [Name](#sam-statemachine-statemachineschedule-name): {{String}}
  [RetryPolicy](#sam-statemachine-statemachineschedule-retrypolicy): {{[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)}}
  [RoleArn](#sam-statemachine-statemachineschedulev-rolearn): {{String}}
  [Schedule](#sam-statemachine-statemachineschedule-schedule): {{String}}
  [State](#sam-statemachine-statemachineschedule-state): {{String}}
  Target: {{Target}}
```

## プロパティ
<a name="sam-property-statemachine-statemachineschedule-properties"></a>

 `DeadLetterConfig`   <a name="sam-statemachine-statemachineschedule-deadletterconfig"></a>
ターゲットの呼び出しに失敗した後で EventBridge がイベントを送信する Amazon Simple Queue Service (Amazon SQS) キューを設定します。呼び出しは、存在しない Lambda 関数にイベントを送信した場合、または Lambda 関数を呼び出すために十分な許可が EventBridge にない場合などに失敗します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Event retry policy and using dead-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)」を参照してください。  
*タイプ*: [DeadLetterConfig](sam-property-statemachine-statemachinescheduledeadletterconfig.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 を作成する場合に備えて、追加のサブプロパティが含まれています。

 `Description`   <a name="sam-statemachine-statemachineschedule-description"></a>
ルールの説明です。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Events::Rule`リソースの `[Description](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-description)`プロパティに直接渡されます。

 `Enabled`   <a name="sam-statemachine-statemachineschedule-enabled"></a>
ルールが有効かどうかを示します。  
ルールを無効にするには、このプロパティを `false` に設定します。  
`Enabled` プロパティと `State` プロパティは、両方ではなく、どちらか一方を指定してください。
型: ブール  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Events::Rule`リソースの `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state)`プロパティに似ています。このプロパティが に設定されている場合、 は `ENABLED`を AWS SAM 渡`true`します。それ以外の場合は を渡します`DISABLED`。

 `Input`   <a name="sam-statemachine-statemachineschedule-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)`プロパティに直接渡されます。

 `Name`   <a name="sam-statemachine-statemachineschedule-name"></a>
 ルールの名前。名前を指定しない場合、 は一意の物理 ID CloudFormation を生成し、その ID をルール名として使用します。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Events::Rule`リソースの `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name)`プロパティに直接渡されます。

 `RetryPolicy`   <a name="sam-statemachine-statemachineschedule-retrypolicy"></a>
再試行ポリシーの設定に関する情報が含まれた `RetryPolicy` オブジェクトです。詳細については、*Amazon EventBridge ユーザーガイド*の「[Event retry policy and using dead-letter queues](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)`プロパティに直接渡されます。

 `RoleArn`   <a name="sam-statemachine-statemachineschedulev-rolearn"></a>
スケジュールが呼び出されたときに EventBridge スケジューラがターゲットとして使用する IAM ロールの ARN。  
*タイプ*: [RoleArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-rolearn)  
必須:いいえ。指定しない場合、新しいロールが作成されて適用されます。  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule` `Target` データ型の `[RoleArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-rolearn)`プロパティに直接渡されます。

 `Schedule`   <a name="sam-statemachine-statemachineschedule-schedule"></a>
ルールがいつ、どのくらいの頻度で実行されるかを決定するスケジューリング式です。詳細については、「[Schedule Expressions for Rules](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html)」を参照してください。  
*タイプ*: 文字列  
*必須*: はい  
*CloudFormation 互換性*: このプロパティは、 `AWS::Events::Rule`リソースの `[ScheduleExpression](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression)`プロパティに直接渡されます。

 `State`   <a name="sam-statemachine-statemachineschedule-state"></a>
ルールの状態。  
使用できる値: `DISABLED | ENABLED`  
`Enabled` プロパティと `State` プロパティは、両方ではなく、どちらか一方を指定してください。
*タイプ*: 文字列  
*必須:* いいえ  
*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-statemachine-statemachineschedule-target"></a>
ルールがトリガーされたときに EventBridge が呼び出す AWS リソース。このプロパティを使用して、ターゲットの論理 ID を指定できます。このプロパティが指定されていない場合、 はターゲットの論理 ID AWS SAM を生成します。  
*タイプ*: [Target](sam-property-statemachine-statemachinetarget.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Events::Rule`リソースの `[Targets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-targets)`プロパティに似ています。このプロパティ AWS SAM のバージョンでは、単一のターゲットの論理 ID のみを指定できます。

## 例
<a name="sam-property-statemachine-statemachineschedule--examples"></a>

### CloudWatch スケジュールイベント
<a name="sam-property-statemachine-statemachineschedule--examples--cloudwatch-schedule-event"></a>

CloudWatch スケジュールイベントの例

#### YAML
<a name="sam-property-statemachine-statemachineschedule--examples--cloudwatch-schedule-event--yaml"></a>

```
CWSchedule:
  Type: Schedule
  Properties:
    Schedule: 'rate(1 minute)'
    Name: TestSchedule
    Description: test schedule
    Enabled: false
```