Cloudformation AWS :: Events :: Rule目标

时间:2019-07-17 12:31:41

标签: amazon-web-services templates amazon-cloudformation

我想创建目标为ssm runco​​mmand的事件规则。我无法选择文档并通过shell命令

  CreateEventRule:
    Type: AWS::Events::Rule
    Properties:
      Description: print message
      Name: ssc_put_to_s3
      Input: " echo hello"
      RoleArn: !GetAtt CreateSSMRole.Arn
      ScheduleExpression: "rate(6 hours)"
      State: ENABLED
      Targets:
        - Arn: !Join ['',['arn:aws:ssm:' , !Ref AWS::Region , ':' ,
           !Ref AWS::AccountId , ':document/AWS-RunShellScript']]
          Id: 123
          RoleArn: !GetAtt CreateEC2RoleForS3.Arn
          RunCommandParameters:
            RunCommandTargets:
              - Key: InstanceIds
                Values:
                  - i-0088d3eb49c7caa37
                  - i-0088d3eb49c7caa75

我想要的是创建一条规则,其中目标是ssm runco​​mmand文档是AWS-RunShellScript并通过shell命令作为参数

0 个答案:

没有答案