遇到不受支持的属性ActionTypeId

时间:2019-07-16 19:19:39

标签: amazon-web-services amazon-cloudformation aws-codepipeline

当我为代码管道创建cloudformation堆栈时,它失败,并且错误消息为“遇到不受支持的属性ActionTypeId”。

我的模板是这样的:

Resources:
  CodePipeline:
    Type: AWS::CodePipeline::Pipeline
    Properties:
      ArtifactStore:
        Location: !Ref BucketLocation
        Type: S3
      Name: !Ref Name
      RestartExecutionOnUpdate: true
      RoleArn: !Ref RoleAnr
      DisableInboundStageTransitions:
        - Reason: Approve Step
          StageName: Build
      Stages:
        - 
          Name: !Ref StagesName
          Actions:
          - 
            InputArtifacts:
              - 
                Name: CodeCommit  
                ActionTypeId:
                  Category: Source
                  Owner: AWS
                  Version: 1
                  Provider: CodeCommit
            OutputArtifacts:
              -
                Name: sourceartifact
            Configuration:
              BranchName:
                !Ref RepositoryBranch              
              RepositoryName:
                !Ref RepositoryName              
            RunOrder: 1
          -  
            Name: Build
            Actions: 
              - 
                Name: BuildAction
                InputArtifacts:               
                  -
                    Name: CodeBuild 
                ActionTypeId: 
                  Category: Build 
                  Owner: AWS 
                  Version: 1 
                  Provider: CodeBuild
                OutputArtifacts:
                -
                  Name: sourceartifact
                Configuration: 
                  ProjectName: 
                    !Ref ProjectName 
                  RunOrder: 1                
          -       



我不知道可能是什么问题。我已经评论了动作类型,但是堆栈仍在消失。

1 个答案:

答案 0 :(得分:0)

修复YAML缩进,使动作属性(如ActionTypeId)处于同一级别。