AWS CloudFormation 指定時產生AWS::Serverless::StateMachine的資源 - AWS Serverless Application Model

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

AWS CloudFormation 指定時產生AWS::Serverless::StateMachine的資源

指定AWS::Serverless::StateMachine時, AWS Serverless Application Model (AWS SAM) 會產生AWS::StepFunctions::StateMachine基底 AWS CloudFormation 資源。

AWS::StepFunctions::StateMachine

LogicalId: <statemachine‑LogicalId>

可參考屬性:N/A (您必須使用LogicalId來參照此 AWS CloudFormation 資源)

除了此資 AWS CloudFormation 源之外,如果AWS::Serverless::StateMachine有指定, AWS SAM 也會針對下列案例產生 AWS CloudFormation 資源:

未指定角色屬性

指定的RoleAWS::Serverless::StateMachine性時, AWS SAM 會產生資AWS::IAM::Role AWS CloudFormation 源。

AWS::IAM::Role

LogicalId: <statemachine‑LogicalId>Role

可參考屬性:N/A (您必須使用LogicalId來參照此 AWS CloudFormation 資源)

已指定 API 事件來源

當 a 的Event屬性設定為Api,但指定RestApiId屬性時, AWS SAM 會產生資AWS::ApiGateway::RestApi AWS CloudFormation 源。AWS::Serverless::StateMachine

AWS::ApiGateway::RestApi

LogicalId: ServerlessRestApi

可參考屬性:N/A (您必須使用LogicalId來參照此 AWS CloudFormation 資源)

已指定事件橋接器 (或事件匯流排) 事件來源

將 a 的Event屬性設定AWS::Serverless::StateMachine為其中一個事件橋接器 (或事件匯流排) 類型時, AWS SAM 會產生AWS::Events::Rule AWS CloudFormation 資源。這適用於下列類型:EventBridgeRuleSchedule、和CloudWatchEvents

AWS::Events::Rule

LogicalId: <statemachine‑LogicalId><event‑LogicalId>

可參考屬性:N/A (您必須使用LogicalId來參照此 AWS CloudFormation 資源)