

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

# AWS::Serverless::StateMachine
<a name="sam-resource-statemachine"></a>

 AWS Step Functions ステートマシンを作成します。ステートマシンを使用して、 AWS Lambda 関数やその他の AWS リソースをオーケストレーションし、複雑で堅牢なワークフローを形成できます。

Step Functions の詳細については、[AWS Step Functions デベロッパーガイド](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html)を参照してください。

**注記**  
にデプロイすると AWS CloudFormation、 は AWS SAM リソースを CloudFormation リソース AWS SAM に変換します。詳細については、「[の生成済み CloudFormation リソース AWS SAM](sam-specification-generated-resources.md)」を参照してください。

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

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

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

```
Type: AWS::Serverless::StateMachine
Properties:
  AutoPublishAlias: String
  UseAliasAsEventTarget: Boolean
  [Definition](#sam-statemachine-definition): Map
  [DefinitionSubstitutions](#sam-statemachine-definitionsubstitutions): Map
  [DefinitionUri](#sam-statemachine-definitionuri): String | [S3Location](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitions3location)
  DeploymentPreference: [DeploymentPreference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html)
  [Events](#sam-statemachine-events): EventSource
  [Logging](#sam-statemachine-logging): [LoggingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-loggingconfiguration)
  [Name](#sam-statemachine-name): String
  [PermissionsBoundary](#sam-statemachine-permissionsboundary): String
  [Policies](#sam-statemachine-policies): String | List | Map
  PropagateTags: Boolean
  [RolePath](#sam-statemachine-rolepath): String
  [Role](#sam-statemachine-role): String
  [Tags](#sam-statemachine-tags): Map
  [Tracing](#sam-statemachine-tracing): [TracingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tracingconfiguration)
  [Type](#sam-statemachine-type): String
```

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

 `AutoPublishAlias`   <a name="sam-statemachine-autopublishalias"></a>
ステートマシンエイリアスの名前です。Step Functions ステートマシンエイリアスの使用に関する詳細については、「AWS Step Functions デベロッパーガイド」の「[Versions and Aliases を使用して継続的なデプロイを管理する](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-cd-aliasing-versioning.html)」を参照してください。  
`DeploymentPreference` を使用して、エイリアスのデプロイ設定を実行します。を指定しない場合`DeploymentPreference`、 AWS SAM は新しいステートマシンバージョンに一度に移行するようにトラフィックを設定します。  
AWS SAM は、`Retain`デフォルトでバージョンの `DeletionPolicy`と `UpdateReplacePolicy`を に設定します。以前のバージョンは自動的に削除されません。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachineAlias`リソースの ` [ Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-name)`プロパティに直接渡されます。

 `UseAliasAsEventTarget`   <a name="sam-statemachine-usealiasaseventtarget"></a>
`AutoPublishAlias` プロパティを使用して作成されたエイリアスを、[Events](#sam-statemachine-events)として定義されたイベントソースのターゲットに渡すかどうかを指定します。  
エイリアスをイベントのターゲットとして使用するには、`True` を指定します。  
型: ブール  
*必須:* いいえ  
*デフォルト*: `False`  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Definition`   <a name="sam-statemachine-definition"></a>
ステートマシン定義は オブジェクトで、オブジェクトの形式は JSON や YAML などの AWS SAM テンプレートファイルの形式と一致します。ステートマシンの定義は、[Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) に準拠しています。  
インラインステートマシンの定義例については、「[例](#sam-resource-statemachine--examples)」を参照してください。  
`Definition` または `DefinitionUri` を提供する必要があります。  
*タイプ*: マップ  
*必須*: 条件に応じて異なります  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のプロパティはありません。

 `DefinitionSubstitutions`   <a name="sam-statemachine-definitionsubstitutions"></a>
ステートマシン定義内のプレースホルダー変数のマッピングを指定する文字列対文字列のマップです。これは、実行時に取得した値 (組み込み関数からの値など) をステートマシン定義に挿入できるようにします。  
*タイプ*: マップ  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[DefinitionSubstitutions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitionsubstitutions)`プロパティに似ています。インラインステートマシン定義で組み込み関数が指定されている場合、 はこのプロパティにエントリ AWS SAM を追加してステートマシン定義に挿入します。

 `DefinitionUri`   <a name="sam-statemachine-definitionuri"></a>
[Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) で記述されたステートマシン定義の Amazon Simple Storage Service (Amazon S3) URI またはローカルファイルパスです。  
ローカルファイルパスを指定する場合は、定義が適切に変換されるようにするために、テンプレートが `sam deploy` または `sam package` コマンドを含むワークフローを実行する必要があります。これを行うには、バージョン 0.52.0 以降の AWS SAM CLI を使用する必要があります。  
`Definition` または `DefinitionUri` を提供する必要があります。  
*タイプ*: 文字列 \$1 [S3Location](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitions3location)  
*必須*: 条件に応じて異なります  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[DefinitionS3Location](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitions3location)`プロパティに直接渡されます。

 `DeploymentPreference`   <a name="sam-statemachine-deploymentpreference"></a>
段階的なステートマシンデプロイを有効化して設定する設定です。Step Functions の段階的なデプロイに関する詳細については、「*AWS Step Functions Developer Guide*」の「[ Manage continuous deployments with versions and aliases](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-cd-aliasing-versioning.html)」を参照してください。  
このプロパティを設定する前に、`AutoPublishAlias` を指定してください。`DeploymentPreference` 設定は、`AutoPublishAlias` で指定されたエイリアスに適用されます。  
を指定すると`DeploymentPreference`、 は`StateMachineVersionArn`サブプロパティ値を自動的に AWS SAM 生成します。  
*タイプ*: [DeploymentPreference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html)  
*必須:* いいえ  
*CloudFormation compatibility*: `StateMachineVersionArn`プロパティ値 AWS SAM を生成して にアタッチ`DeploymentPreference`し、 `AWS::StepFunctions::StateMachineAlias`リソースの `[DeploymentPreference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-deploymentpreference)`プロパティ`DeploymentPreference`に渡します。

 `Events`   <a name="sam-statemachine-events"></a>
このステートマシンをトリガーするイベントを指定します。イベントは、1 つのタイプと、そのタイプに依存する一連のプロパティで構成されます。  
*タイプ*: [EventSource](sam-property-statemachine-statemachineeventsource.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Logging`   <a name="sam-statemachine-logging"></a>
どの実行履歴イベントがどこにログされるかを定義します。  
*タイプ*: [LoggingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-loggingconfiguration)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[LoggingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-loggingconfiguration)`プロパティに直接渡されます。

 `Name`   <a name="sam-statemachine-name"></a>
ステートマシンの名前です。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[StateMachineName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-statemachinename)`プロパティに直接渡されます。

 `PermissionsBoundary`   <a name="sam-statemachine-permissionsboundary"></a>
このステートマシンの実行ロールに使用するアクセス許可境界の ARN です。このプロパティは、ユーザーのためにロールが生成される場合にのみ機能します。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::IAM::Role`リソースの `[PermissionsBoundary](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-permissionsboundary)`プロパティに直接渡されます。

 `Policies`   <a name="sam-statemachine-policies"></a>
このステートマシンの許可ポリシー。ポリシーは、ステートマシンのデフォルト AWS Identity and Access Management (IAM) 実行ロールに追加されます。  
このプロパティは、単一の値または値のリストを受け入れます。使用できる値は次のとおりです。  
+ [AWS SAMポリシーテンプレート](serverless-policy-templates.md).
+ [AWS  管理ポリシー](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)または[カスタマー管理ポリシー](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#customer-managed-policies)の ARN。
+ 次の[リストから](https://github.com/aws/serverless-application-model/blob/develop/samtranslator/internal/data/aws_managed_policies.json)の AWS 管理ポリシーの名前。
+ マップとして YAML でフォーマットされた[インライン IAM ポリシー](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#inline-policies)。
`Role` プロパティを設定する場合、このプロパティは無視されます。
*タイプ*: 文字列 \$1 リスト \$1 マップ  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

`PropagateTags`  <a name="sam-statemachine-propagatetags"></a>
[AWS::Serverless::StateMachine](sam-specification-generated-resources-statemachine.md) が生成したリソースに `Tags` プロパティからのタグを渡すかどうかを指定します。`True` を指定して、生成されたリソースにタグを伝播します。  
型: ブール  
*必須:* いいえ  
*デフォルト*: `False`  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Role`   <a name="sam-statemachine-role"></a>
このステートマシンの実行ロールとして使用する IAM ロールの ARN です。  
*タイプ*: 文字列  
*必須*: 条件に応じて異なります  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[ RoleArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-rolearn)`プロパティに直接渡されます。

 `RolePath`   <a name="sam-statemachine-rolepath"></a>
ステートマシンの IAM 実行ロールへのパス。  
このプロパティは、ユーザーのためにロールが生成される場合にのみ機能します。`Role` プロパティでロールが指定されている場合は使用しないでください。  
*タイプ*: 文字列  
*必須*: 条件に応じて異なります  
*CloudFormation 互換性*: このプロパティは、 `AWS::IAM::Role`リソースの `[Path](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-path)`プロパティに直接渡されます。

 `Tags`   <a name="sam-statemachine-tags"></a>
ステートマシンと対応する実行ロールに追加されるタグを指定する文字列対文字列マップです。タグの有効なキーと値についての情報は、[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html) リソースの [Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tags) プロパティを参照してください。  
*タイプ*: マップ  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine` resource の `[Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tags)` プロパティに似ています。 は、このリソースと、それに対して生成されるデフォルトのロールに`stateMachine:createdBy:SAM`タグ AWS SAM を自動的に追加します。

 `Tracing`   <a name="sam-statemachine-tracing"></a>
ステートマシンで AWS X-Ray を有効にするかどうかを選択します。X-Ray の Step Functions との使用に関する詳細については、*AWS Step Functions デベロッパーガイド*の「[AWS X-Ray and Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-xray-tracing.html)」を参照してください。  
*タイプ*: [TracingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tracingconfiguration)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[TracingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tracingconfiguration)`プロパティに直接渡されます。

 `Type`   <a name="sam-statemachine-type"></a>
ステートマシンのタイプです。  
*有効な値*: `STANDARD` または `EXPRESS`  
タイプ：文字列  
*必須:* いいえ  
*デフォルト*: `STANDARD`  
*CloudFormation 互換性*: このプロパティは、 `AWS::StepFunctions::StateMachine`リソースの `[StateMachineType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-statemachinetype)`プロパティに直接渡されます。

## 戻り値
<a name="sam-resource-statemachine-return-values"></a>

### 参照番号
<a name="sam-resource-statemachine-return-values-ref"></a>

このリソースの論理 ID を Ref 組み込み関数に提供すると、Ref は基盤となる `AWS::StepFunctions::StateMachine` リソースの Amazon リソースネーム (ARN) を返します。

`Ref` 関数の使用方法の詳細については、*AWS CloudFormation ユーザーガイド*の「[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)」を参照してください。

### Fn::GetAtt
<a name="sam-resource-statemachine-return-values-fn--getatt"></a>

`Fn::GetAtt` は、このタイプの指定された属性の値を返します。利用可能な属性とサンプル戻り値は以下のとおりです。

`Fn::GetAtt` の使用の詳細については、*AWS CloudFormation ユーザーガイド*の「[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html)」を参照してください。

`Name`  <a name="Name-fn::getatt"></a>
ステートマシンの名前 (`HelloWorld-StateMachine` など) を返します。

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

### ステートマシン定義ファイル
<a name="sam-resource-statemachine--examples--state-machine-definition-file"></a>

以下は、Lambda 関数によるステートマシンの呼び出しを許可するインラインステートマシン定義の例です。この例では、呼び出しを許可する適切なポリシーが `Role` プロパティで設定されることを想定している点に注意してください。`my_state_machine.asl.json` ファイルは [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) で記述される必要があります。

この例では、`DefinitionSubstitution`エントリにより、ステートマシンは AWS SAM テンプレートファイルに宣言されたリソースを含めることができます。

#### YAML
<a name="sam-resource-statemachine--examples--state-machine-definition-file--yaml"></a>

```
MySampleStateMachine:
  Type: AWS::Serverless::StateMachine
  Properties:
    DefinitionUri: statemachine/my_state_machine.asl.json
    Role: arn:aws:iam::123456123456:role/service-role/my-sample-role
    Tracing:
      Enabled: true
    DefinitionSubstitutions:
      MyFunctionArn: !GetAtt MyFunction.Arn
      MyDDBTable: !Ref TransactionTable
```

### インラインステートマシン定義
<a name="sam-resource-statemachine--examples--inline-state-machine-definition"></a>

以下は、インラインステートマシン定義の例です。

この例では、 AWS SAM テンプレートファイルは YAML で書き込まれるため、ステートマシン定義も YAML にあります。インラインステートマシン定義を JSON で宣言するには、 AWS SAM テンプレートファイルを JSON で書き込みます。

#### YAML
<a name="sam-resource-statemachine--examples--inline-state-machine-definition--yaml"></a>

```
MySampleStateMachine:
  Type: AWS::Serverless::StateMachine
  Properties:
    Definition:
      StartAt: MyLambdaState
      States:
        MyLambdaState:
          Type: Task
          Resource: arn:aws:lambda:us-east-1:123456123456:function:my-sample-lambda-app
          End: true
    Role: arn:aws:iam::123456123456:role/service-role/my-sample-role
    Tracing:
      Enabled: true
```

# EventSource
<a name="sam-property-statemachine-statemachineeventsource"></a>

ステートマシンをトリガーするイベントのソースを説明するオブジェクトです。各イベントは、1 つのタイプと、そのタイプに依存する一連のプロパティで構成されます。各イベントソースのプロパティの詳細については、そのタイプに対応するサブトピックを参照してください。

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

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

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

```
  [Properties](#sam-statemachine-statemachineeventsource-properties): Schedule | ScheduleV2 | CloudWatchEvent | EventBridgeRule | Api
  [Type](#sam-statemachine-statemachineeventsource-type): String
```

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

 `Properties`   <a name="sam-statemachine-statemachineeventsource-properties"></a>
このイベントマッピングのプロパティを説明するオブジェクトです。プロパティのセットは、定義された `Type` に準拠する必要があります。  
タイプ: [Schedule](sam-property-statemachine-statemachineschedule.md) \$1 [ScheduleV2](sam-property-statemachine-statemachineschedulev2.md) \$1 [CloudWatchEvent](sam-property-statemachine-statemachinecloudwatchevent.md) \$1 [EventBridgeRule](sam-property-statemachine-statemachineeventbridgerule.md) \$1 [Api](sam-property-statemachine-statemachineapi.md)  
*必須:* はい  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のプロパティはありません。

 `Type`   <a name="sam-statemachine-statemachineeventsource-type"></a>
イベントタイプです。  
有効な値: `Api`、`Schedule`、`ScheduleV2`、`CloudWatchEvent`、`EventBridgeRule`  
*タイプ*: 文字列  
*必須*: はい  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

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

### API
<a name="sam-property-statemachine-statemachineeventsource--examples--api"></a>

以下は、`API` タイプのイベントの例です。

#### YAML
<a name="sam-property-statemachine-statemachineeventsource--examples--api--yaml"></a>

```
ApiEvent:
  Type: Api
  Properties:
    Method: get
    Path: /group/{user}
    RestApiId: 
      Ref: MyApi
```

# Api
<a name="sam-property-statemachine-statemachineapi"></a>

`Api` イベントソースタイプを説明するオブジェクトです。[AWS::Serverless::Api](sam-resource-api.md) リソースが定義されている場合、パスとメソッドの値は、API の OpenApi 定義にあるオペレーションに対応している必要があります。

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

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

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

```
  [Auth](#sam-statemachine-statemachineapi-auth): ApiStateMachineAuth
  [Method](#sam-statemachine-statemachineapi-method): String
  [Path](#sam-statemachine-statemachineapi-path): String
  [RestApiId](#sam-statemachine-statemachineapi-restapiid): String
  UnescapeMappingTemplate: Boolean
```

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

 `Auth`   <a name="sam-statemachine-statemachineapi-auth"></a>
この API、パス、およびメソッドの認可設定です。  
このプロパティを使用して、`DefaultAuthorizer` が指定されていない場合、またはデフォルトの `ApiKeyRequired` 設定を上書きするために、個々のパスに対する API の `DefaultAuthorizer` 設定を上書きします。  
*タイプ*: [ApiStateMachineAuth](sam-property-statemachine-apistatemachineauth.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Method`   <a name="sam-statemachine-statemachineapi-method"></a>
この関数が呼び出される HTTP メソッドです。  
*タイプ*: 文字列  
*必須*: はい  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Path`   <a name="sam-statemachine-statemachineapi-path"></a>
この関数が呼び出される URI パスです。値は `/` で始める必要があります。  
*タイプ*: 文字列  
*必須*: はい  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `RestApiId`   <a name="sam-statemachine-statemachineapi-restapiid"></a>
`RestApi` リソースの識別子で、所定のパスとメソッドでのオペレーションが含まれている必要があります。これは通常、このテンプレートで定義された [AWS::Serverless::Api](sam-resource-api.md) リソースを参照するように設定されます。  
このプロパティを定義しない場合、 は生成された`OpenApi`ドキュメントを使用してデフォルトの[AWS::Serverless::Api](sam-resource-api.md)リソース AWS SAM を作成します。そのリソースには、`RestApiId` を指定しない同じテンプレート内の `Api` イベントによって定義されるすべてのパスとメソッドの和集合が含まれます。  
このプロパティは、別のテンプレートで定義された [AWS::Serverless::Api](sam-resource-api.md) リソースを参照できません。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `UnescapeMappingTemplate`   <a name="sam-statemachine-statemachineapi-unescapemappingtemplate"></a>
`\'` を `'` に置き換えて、ステートマシンに渡される入力の一重引用符のエスケープを解除します。入力に一重引用符が含まれている場合に使用します。  
`False` に設定し、入力に一重引用符が含まれている場合、エラーが発生します。
型: ブール  
*必須:* いいえ  
*デフォルト*: False  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、同等の CloudFormation ものはありません。

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

### ApiEvent
<a name="sam-property-statemachine-statemachineapi--examples--apievent"></a>

以下は、`Api` タイプのイベントの例です。

#### YAML
<a name="sam-property-statemachine-statemachineapi--examples--apievent--yaml"></a>

```
Events:
  ApiEvent:
    Type: Api
    Properties:
      Path: /path
      Method: get
```

# ApiStateMachineAuth
<a name="sam-property-statemachine-apistatemachineauth"></a>

特定の API、パス、およびメソッドに対して、イベントレベルで認可を設定します。

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

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

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

```
  [ApiKeyRequired](#sam-statemachine-apistatemachineauth-apikeyrequired): Boolean
  [AuthorizationScopes](#sam-statemachine-apistatemachineauth-authorizationscopes): List
  [Authorizer](#sam-statemachine-apistatemachineauth-authorizer): String
  [ResourcePolicy](#sam-statemachine-apistatemachineauth-resourcepolicy): ResourcePolicyStatement
```

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

 `ApiKeyRequired`   <a name="sam-statemachine-apistatemachineauth-apikeyrequired"></a>
この API、パス、およびメソッドの API キーが必要です。  
型: ブール  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `AuthorizationScopes`   <a name="sam-statemachine-apistatemachineauth-authorizationscopes"></a>
この API、パス、およびメソッドに適用する認可スコープです。  
指定するスコープは、`DefaultAuthorizer` プロパティが適用するスコープ (指定されている場合) を上書きします。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Authorizer`   <a name="sam-statemachine-apistatemachineauth-authorizer"></a>
特定のステートマシンの `Authorizer` です。  
API のグローバルオーソライザーが指定されているときにこのステートマシンを公開したい場合は、`Authorizer` を `NONE` に設定してグローバルオーソライザーを上書きします。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `ResourcePolicy`   <a name="sam-statemachine-apistatemachineauth-resourcepolicy"></a>
API とパスのリソースポリシーを設定します。  
*タイプ*: [ResourcePolicyStatement](sam-property-statemachine-resourcepolicystatement.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

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

### Statemachine-Auth
<a name="sam-property-statemachine-apistatemachineauth--examples--statemachine-auth"></a>

以下の例は、ステートマシンレベルで認可を指定します。

#### YAML
<a name="sam-property-statemachine-apistatemachineauth--examples--statemachine-auth--yaml"></a>

```
Auth:
  ApiKeyRequired: true
  Authorizer: NONE
```

# ResourcePolicyStatement
<a name="sam-property-statemachine-resourcepolicystatement"></a>

API 上のすべてのメソッドとパスのリソースポリシーを設定します。リソースポリシーの詳細については、*API Gateway デベロッパーガイド*の「[API Gateway リソースポリシーを使用して API へのアクセスを制御する](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-resource-policies.html)」を参照してください。

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

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

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

```
  [AwsAccountBlacklist](#sam-statemachine-resourcepolicystatement-awsaccountblacklist): List
  [AwsAccountWhitelist](#sam-statemachine-resourcepolicystatement-awsaccountwhitelist): List
  [CustomStatements](#sam-statemachine-resourcepolicystatement-customstatements): List
  [IntrinsicVpcBlacklist](#sam-statemachine-resourcepolicystatement-intrinsicvpcblacklist): List
  [IntrinsicVpcWhitelist](#sam-statemachine-resourcepolicystatement-intrinsicvpcwhitelist): List
  [IntrinsicVpceBlacklist](#sam-statemachine-resourcepolicystatement-intrinsicvpceblacklist): List
  [IntrinsicVpceWhitelist](#sam-statemachine-resourcepolicystatement-intrinsicvpcewhitelist): List
  [IpRangeBlacklist](#sam-statemachine-resourcepolicystatement-iprangeblacklist): List
  [IpRangeWhitelist](#sam-statemachine-resourcepolicystatement-iprangewhitelist): List
  [SourceVpcBlacklist](#sam-statemachine-resourcepolicystatement-sourcevpcblacklist): List
  [SourceVpcWhitelist](#sam-statemachine-resourcepolicystatement-sourcevpcwhitelist): List
```

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

 `AwsAccountBlacklist`   <a name="sam-statemachine-resourcepolicystatement-awsaccountblacklist"></a>
ブロックする AWS アカウント。  
型: 文字列のリスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `AwsAccountWhitelist`   <a name="sam-statemachine-resourcepolicystatement-awsaccountwhitelist"></a>
許可する AWS アカウント。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
型: 文字列のリスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のプロパティはありません。

 `CustomStatements`   <a name="sam-statemachine-resourcepolicystatement-customstatements"></a>
この API に適用するカスタムリソースポリシーステートメントのリストです。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `IntrinsicVpcBlacklist`   <a name="sam-statemachine-resourcepolicystatement-intrinsicvpcblacklist"></a>
ブロックする仮想プライベートクラウド (VPC) のリストで、各 VPC が[動的参照](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)または `Ref` [組み込み関数](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)などのリファレンスとして指定されます。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `IntrinsicVpcWhitelist`   <a name="sam-statemachine-resourcepolicystatement-intrinsicvpcwhitelist"></a>
許可する VPC のリストで、各 VPC が[動的参照](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)または `Ref` [組み込み関数](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)などのリファレンスとして指定されます。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のプロパティはありません。

 `IntrinsicVpceBlacklist`   <a name="sam-statemachine-resourcepolicystatement-intrinsicvpceblacklist"></a>
ブロックする VPC エンドポイントのリストで、各 VPC エンドポイントが[動的参照](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)または `Ref` [組み込み関数](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)などのリファレンスとして指定されます。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `IntrinsicVpceWhitelist`   <a name="sam-statemachine-resourcepolicystatement-intrinsicvpcewhitelist"></a>
許可する VPC エンドポイントのリストで、各 VPC エンドポイントが[動的参照](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)または `Ref` [組み込み関数](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)などのリファレンスとして指定されます。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `IpRangeBlacklist`   <a name="sam-statemachine-resourcepolicystatement-iprangeblacklist"></a>
ブロックする IP アドレスまたはアドレス範囲です。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `IpRangeWhitelist`   <a name="sam-statemachine-resourcepolicystatement-iprangewhitelist"></a>
許可する IP アドレスまたはアドレス範囲です。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `SourceVpcBlacklist`   <a name="sam-statemachine-resourcepolicystatement-sourcevpcblacklist"></a>
ブロックするソース VPC またはソース VPC エンドポイントです。ソース VPC 名は `"vpc-"` で始まり、ソース VPC エンドポイント名は `"vpce-"` で始まる必要があります。このプロパティの使用例については、このページの下部にある「例」セクションを参照してください。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `SourceVpcWhitelist`   <a name="sam-statemachine-resourcepolicystatement-sourcevpcwhitelist"></a>
許可するソース VPC またはソース VPC エンドポイントです。ソース VPC 名は `"vpc-"` で始まり、ソース VPC エンドポイント名は `"vpce-"` で始まる必要があります。  
*タイプ*: リスト  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

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

### リソースポリシーの例
<a name="sam-property-statemachine-resourcepolicystatement--examples--resource-policy-example"></a>

次の例では、2 つの IP アドレスとソース VPC をブロックし、 AWS アカウントを許可します。

#### YAML
<a name="sam-property-statemachine-resourcepolicystatement--examples--resource-policy-example--yaml"></a>

```
Auth:
  ResourcePolicy:
    CustomStatements: [{
                         "Effect": "Allow",
                         "Principal": "*",
                         "Action": "execute-api:Invoke",
                         "Resource": "execute-api:/Prod/GET/pets",
                         "Condition": {
                           "IpAddress": {
                             "aws:SourceIp": "1.2.3.4"
                           }
                         }
                       }]
    IpRangeBlacklist:
      - "10.20.30.40"
      - "1.2.3.4"
    SourceVpcBlacklist:
      - "vpce-1a2b3c4d"
    AwsAccountWhitelist:
      - "111122223333"
    IntrinsicVpcBlacklist:
      - "{{resolve:ssm:SomeVPCReference:1}}" 
      - !Ref MyVPC
    IntrinsicVpceWhitelist:
      - "{{resolve:ssm:SomeVPCEReference:1}}" 
      - !Ref MyVPCE
```

# CloudWatchEvent
<a name="sam-property-statemachine-statemachinecloudwatchevent"></a>

`CloudWatchEvent` イベントソースタイプを説明するオブジェクトです。

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

**重要な注意**: [EventBridgeRule](sam-property-statemachine-statemachineeventbridgerule.md)は、 の代わりに使用する優先イベントソースタイプです`CloudWatchEvent`。 `EventBridgeRule`および は、同じ基盤となるサービス、API、 CloudFormation リソース`CloudWatchEvent`を使用します。ただし、 AWS SAM は新機能のサポートを にのみ追加します`EventBridgeRule`。

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

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

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

```
  [EventBusName](#sam-statemachine-statemachinecloudwatchevent-eventbusname): String
  [Input](#sam-statemachine-statemachinecloudwatchevent-input): String
  [InputPath](#sam-statemachine-statemachinecloudwatchevent-inputpath): String
  [Pattern](#sam-statemachine-statemachinecloudwatchevent-pattern): [EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)
```

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

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

 `Pattern`   <a name="sam-statemachine-statemachinecloudwatchevent-pattern"></a>
どのイベントが指定されたターゲットにルーティングされるかを説明します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Events andEvent Patterns in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html)」を参照してください。  
*タイプ*: [EventPattern](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)`プロパティに直接渡されます。

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

### CloudWatchEvent
<a name="sam-property-statemachine-statemachinecloudwatchevent--examples--cloudwatchevent"></a>

以下は、`CloudWatchEvent` イベントソースタイプの例です。

#### YAML
<a name="sam-property-statemachine-statemachinecloudwatchevent--examples--cloudwatchevent--yaml"></a>

```
CWEvent:
  Type: CloudWatchEvent
  Properties:
    Input: '{"Key": "Value"}'
    Pattern:
      detail:
        state:
          - running
```

# EventBridgeRule
<a name="sam-property-statemachine-statemachineeventbridgerule"></a>

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

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-statemachineeventbridgerule-syntax"></a>

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

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

```
  DeadLetterConfig: DeadLetterConfig
  EventBusName: String
  Input: String
  InputPath: String
  InputTransformer: [InputTransformer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html)
  Pattern: [EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)
  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: Target
```

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

 `DeadLetterConfig`   <a name="sam-statemachine-statemachineeventbridgerule-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-statemachinedeadletterconfig.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-statemachine-statemachineeventbridgerule-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-statemachine-statemachineeventbridgerule-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-statemachine-statemachineeventbridgerule-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-statemachine-statemachineeventbridgerule-inputtransformer"></a>
特定のイベントデータに基づいてターゲットにカスタム入力を提供できるための設定。イベントから 1 つ以上のキーと値のペアを抽出し、そのデータを使用して、カスタマイズされた入力をターゲットに送信できます。詳細については、「Amazon EventBridge ユーザーガイド」の「[Amazon EventBridge の入力変換](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html)」を参照してください。  
*Type*: [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-statemachine-statemachineeventbridgerule-pattern"></a>
どのイベントが指定されたターゲットにルーティングされるかを説明します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Events andEvent Patterns in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html)」を参照してください。  
*タイプ*: [EventPattern](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-statemachine-statemachineeventbridgerule-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)`プロパティに直接渡されます。

 `RuleName`   <a name="sam-statemachine-statemachineeventbridgerule-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-statemachine-statemachineeventbridgerule-state"></a>
ルールの状態。  
*有効な値:* `[ DISABLED | ENABLED ]`  
*タイプ*: 文字列  
*必須:* いいえ  
*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-statemachineeventbridgerule-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-statemachineeventbridgerule--examples"></a>

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

以下は、`EventBridgeRule` イベントソースタイプの例です。

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

```
EBRule:
  Type: EventBridgeRule
  Properties:
    Input: '{"Key": "Value"}'
    Pattern:
      detail:
        state:
          - terminated
```

# DeadLetterConfig
<a name="sam-property-statemachine-statemachinedeadletterconfig"></a>

ターゲットの呼び出しに失敗した後で EventBridge がイベントを送信する Amazon Simple Queue Service (Amazon SQS) キューを指定するために使用されるオブジェクトです。呼び出しコールは、存在しないステートマシンにイベントを送信した場合、またはステートマシンを呼び出すために十分な許可がない場合などに失敗します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Event retry policy and using dead-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)」を参照してください。

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

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

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

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

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

 `Arn`   <a name="sam-statemachine-statemachinedeadletterconfig-arn"></a>
デッドレターキューのターゲットとして指定された 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-statemachine-statemachinedeadletterconfig-queuelogicalid"></a>
`Type` が指定されている場合に が AWS SAM 作成するデッドレターキューのカスタム名。  
`Type` プロパティが設定されていない場合、このプロパティは無視されます。
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のプロパティはありません。

 `Type`   <a name="sam-statemachine-statemachinedeadletterconfig-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-statemachine-statemachinedeadletterconfig--examples"></a>

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

DeadLetterConfig

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

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

# Target
<a name="sam-property-statemachine-statemachinetarget"></a>

ルールがトリガーされたときに EventBridge が呼び出す AWS リソースを設定します。

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

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

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

```
  [Id](#sam-statemachine-statemachinetarget-id): String
```

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

 `Id`   <a name="sam-statemachine-statemachinetarget-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-statemachine-statemachinetarget--examples"></a>

### ターゲット
<a name="sam-property-statemachine-statemachinetarget--examples--target"></a>

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

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

# 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
```

# DeadLetterConfig
<a name="sam-property-statemachine-statemachinescheduledeadletterconfig"></a>

ターゲットの呼び出しに失敗した後で EventBridge がイベントを送信する Amazon Simple Queue Service (Amazon SQS) キューを指定するために使用されるオブジェクトです。呼び出しコールは、存在しないステートマシンにイベントを送信した場合、またはステートマシンを呼び出すために十分な許可がない場合などに失敗します。詳細については、*Amazon EventBridge ユーザーガイド*の「[Event retry policy and using dead-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html)」を参照してください。

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

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

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

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

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

 `Arn`   <a name="sam-statemachine-statemachinescheduledeadletterconfig-arn"></a>
デッドレターキューのターゲットとして指定された 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-statemachine-statemachinescheduledeadletterconfig-queuelogicalid"></a>
`Type` が指定されている場合に が AWS SAM 作成するデッドレターキューのカスタム名。  
`Type` プロパティが設定されていない場合、このプロパティは無視されます。
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、 CloudFormation 同等のものはありません。

 `Type`   <a name="sam-statemachine-statemachinescheduledeadletterconfig-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-statemachine-statemachinescheduledeadletterconfig--examples"></a>

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

DeadLetterConfig

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

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

# Target
<a name="sam-property-statemachine-statemachinescheduletarget"></a>

ルールがトリガーされたときに EventBridge が呼び出す AWS リソースを設定します。

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

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

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

```
  [Id](#sam-statemachine-statemachinescheduletarget-id): String
```

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

 `Id`   <a name="sam-statemachine-statemachinescheduletarget-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-statemachine-statemachinescheduletarget--examples"></a>

### ターゲット
<a name="sam-property-statemachine-statemachinescheduletarget--examples--target"></a>

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

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

# ScheduleV2
<a name="sam-property-statemachine-statemachineschedulev2"></a>

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

AWS Serverless Application Model (AWS SAM) このイベントタイプが設定されている場合、 は [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html)リソースを生成します。

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

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

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

```
DeadLetterConfig: DeadLetterConfig
[Description](#sam-statemachine-statemachineschedulev2-description): String
[EndDate](#sam-statemachine-statemachineschedulev2-enddate): String
[FlexibleTimeWindow](#sam-statemachine-statemachineschedulev2-flexibletimewindow): FlexibleTimeWindow
[GroupName](#sam-statemachine-statemachineschedulev2-groupname): String
[Input](#sam-statemachine-statemachineschedulev2-input): String
[KmsKeyArn](#sam-statemachine-statemachineschedulev2-kmskeyarn): String
[Name](#sam-statemachine-statemachineschedulev2-name): String
OmitName: Boolean
[PermissionsBoundary](#sam-statemachine-statemachineschedulev2-permissionsboundary): String
[RetryPolicy](#sam-statemachine-statemachineschedulev2-retrypolicy): RetryPolicy
[RoleArn](#sam-statemachine-statemachineschedulev2-rolearn): String
[ScheduleExpression](#sam-statemachine-statemachineschedulev2-scheduleexpression): String
[ScheduleExpressionTimezone](#sam-statemachine-statemachineschedulev2-scheduleexpressiontimezone): String
[StartDate](#sam-statemachine-statemachineschedulev2-startdate): String
[State](#sam-statemachine-statemachineschedulev2-state): String
```

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

 `DeadLetterConfig`   <a name="sam-statemachine-statemachineschedulev2-deadletterconfig"></a>
ターゲットの呼び出しに失敗した後で EventBridge がイベントを送信する Amazon Simple Queue Service (Amazon SQS) キューを設定します。呼び出しは、存在しない Lambda 関数にイベントを送信した場合、または Lambda 関数を呼び出すために十分な許可が EventBridge にない場合などに失敗します。詳細については、「EventBridge スケジューラユーザーガイド」の「[Configuring a dead-letter queue for EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/configuring-schedule-dlq.html)」(EventBridge スケジューラのデッドレターキューの設定) を参照してください。  
*タイプ*: [DeadLetterConfig](sam-property-statemachine-statemachinescheduledeadletterconfig.md)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule` `Target` データ型の `[DeadLetterConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-deadletterconfig)`プロパティに似ています。このプロパティ AWS SAM のバージョンには、デッドレターキュー AWS SAM を作成する場合に備えて、追加のサブプロパティが含まれています。

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

 `EndDate`   <a name="sam-statemachine-statemachineschedulev2-enddate"></a>
スケジュールがターゲットを呼び出すことができる日付 (UTC)。スケジュールの繰り返し式によっては、指定した **EndDate** またはそれより前に呼び出しが停止する場合があります。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[EndDate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-enddate)`プロパティに直接渡されます。

 `FlexibleTimeWindow`   <a name="sam-statemachine-statemachineschedulev2-flexibletimewindow"></a>
スケジュールを呼び出すことができるウィンドウを設定できます。  
*タイプ*: [FlexibleTimeWindow](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-flexibletimewindow)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[FlexibleTimeWindow](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler.html#cfn-scheduler-schedule-flexibletimewindow)`プロパティに直接渡されます。

 `GroupName`   <a name="sam-statemachine-statemachineschedulev2-groupname"></a>
このスケジュールに関連付けるスケジュールグループの名前。定義されていない場合、デフォルトグループが使用されます。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[GroupName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-groupname)`プロパティに直接渡されます。

 `Input`   <a name="sam-statemachine-statemachineschedulev2-input"></a>
ターゲットに渡された有効な JSON テキストです。このプロパティを使用する場合、イベントテキスト自体からはターゲットに何も渡されません。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule Target`リソースの `[Input](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-input)`プロパティに直接渡されます。

 `KmsKeyArn`   <a name="sam-statemachine-statemachineschedulev2-kmskeyarn"></a>
お客様のデータの暗号化に使用する KMS キーの ARN。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[KmsKeyArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-kmskeyarn)`プロパティに直接渡されます。

 `Name`   <a name="sam-statemachine-statemachineschedulev2-name"></a>
スケジュールの名前。名前を指定しない場合、 は 形式で名前 AWS SAM を生成`StateMachine-Logical-IDEvent-Source-Name`し、その ID をスケジュール名として使用します。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-name)`プロパティに直接渡されます。

`OmitName`  <a name="sam-statemachine-statemachineschedulev2-omitname"></a>
デフォルトでは、 は *<State-machine-logical-ID><event-source-name> *形式のスケジュール名 AWS SAM を生成して使用します。このプロパティ`true`を に設定すると、 は一意の物理 ID CloudFormation を生成し、代わりにスケジュール名に使用します。  
型: ブール  
*必須:* いいえ  
*デフォルト*: `false`  
*CloudFormation 互換性*: このプロパティは に固有 AWS SAM であり、同等の CloudFormation ものはありません。

 `PermissionsBoundary`   <a name="sam-statemachine-statemachineschedulev2-permissionsboundary"></a>
ロールのアクセス許可の境界を設定するために使用するポリシーの ARN。  
`PermissionsBoundary` が定義されている場合、 AWS SAM はスケジューラスケジュールのターゲット IAM ロールに同じ境界を適用します。
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::IAM::Role`リソースの `[PermissionsBoundary](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html#cfn-iam-role-permissionsboundary)`プロパティに直接渡されます。

 `RetryPolicy`   <a name="sam-statemachine-statemachineschedulev2-retrypolicy"></a>
再試行ポリシーの設定に関する情報が含まれた `RetryPolicy` オブジェクトです。  
タイプ: [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-retrypolicy)  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule` `Target` データ型の `[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-target.html#cfn-scheduler-schedule-target-retrypolicy)`プロパティに直接渡されます。

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

 `ScheduleExpression`   <a name="sam-statemachine-statemachineschedulev2-scheduleexpression"></a>
スケジュールがいつ、どのくらいの頻度で実行されるかを決定するスケジューリング式です。  
*タイプ*: 文字列  
*必須*: はい  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[ScheduleExpression](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-scheduleexpression)`プロパティに直接渡されます。

 `ScheduleExpressionTimezone`   <a name="sam-statemachine-statemachineschedulev2-scheduleexpressiontimezone"></a>
スケジュール式が評価されるタイムゾーン。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[ScheduleExpressionTimezone](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-scheduleexpressiontimezone)`プロパティに直接渡されます。

 `StartDate`   <a name="sam-statemachine-statemachineschedulev2-startdate"></a>
スケジュールがターゲットの呼び出しを開始できる日付 (UTC)。スケジュールの繰り返し式によっては、指定した **StartDate** またはそれより後に呼び出しが発生する場合があります。  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[StartDate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-startdate)`プロパティに直接渡されます。

 `State`   <a name="sam-statemachine-statemachineschedulev2-state"></a>
スケジュールの状態。  
使用できる値: `DISABLED | ENABLED`  
*タイプ*: 文字列  
*必須:* いいえ  
*CloudFormation 互換性*: このプロパティは、 `AWS::Scheduler::Schedule`リソースの `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-state)`プロパティに直接渡されます。

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

### ScheduleV2 リソースを定義する基本的な例
<a name="sam-property-statemachine-statemachineschedulev2--examples--example1"></a>

```
StateMachine:
  Type: AWS::Serverless::StateMachine
  Properties:
    Name: MyStateMachine
    Events:
      ScheduleEvent:
        Type: ScheduleV2
        Properties:
          ScheduleExpression: "rate(1 minute)"
      ComplexScheduleEvent:
        Type: ScheduleV2
        Properties:
          ScheduleExpression: rate(1 minute)
          FlexibleTimeWindow:
            Mode: FLEXIBLE
            MaximumWindowInMinutes: 5
          StartDate: '2022-12-28T12:00:00.000Z'
          EndDate: '2023-01-28T12:00:00.000Z'
          ScheduleExpressionTimezone: UTC
          RetryPolicy:
            MaximumRetryAttempts: 5
            MaximumEventAgeInSeconds: 300
          DeadLetterConfig:
            Type: SQS
    DefinitionUri:
      Bucket: sam-sam-s3-demo-bucket
      Key: my-state-machine.asl.json
      Version: 3
    Policies:
      - LambdaInvokePolicy:
          FunctionName: !Ref MyFunction
```