我正在尝试创建一个以 Lambda 函数作为目标的 AWS Eventbridge 规则。我可以很好地添加规则和目标,但是当我尝试通过RoleArnCloudformation 堆栈部署设置 lambda 权限时失败,并显示:
RoleArn is not supported for target arn:aws:lambda:us-east-1:1234567890:function:contacts-lambda-consume-new-customer. (Service: AmazonCloudWatchEvents; Status Code: 400; Error Code: ValidationException; Request ID: xxxxx-ec5d-45e8-b45d-xxxxxx; Proxy: null)
这是我的 Cloudformation 堆栈代码:
EventRuleNewCustomer:
Type: AWS::Events::Rule
Properties:
Name: new-customer
EventBusName: myEventBus
# RoleArn: !Join ["", ["arn:aws:iam::",!Ref "AWS::AccountId", ":role/my-role"] ] #no error but doesn't add the permissions
Description: "New customer event rule"
EventPattern:
detail-type:
- "NewCustomer"
State: "ENABLED"
Targets:
-
Arn: !Join ["", ["arn:aws:lambda:" ,!Ref "AWS::Region", ":", !Ref "AWS::AccountId", ":function:contacts-lambda-consume-new-customer"] …Run Code Online (Sandbox Code Playgroud) amazon-web-services aws-cloudformation amazon-iam aws-lambda aws-event-bridge
我熟悉 Google Apps 脚本DataValidation对象。获取和设置验证标准。但是如何以编程方式判断单元格值是否实际有效。因此,我可以在电子表格中看到红色的验证失败消息,但是可以通过代码获取单元格当前验证失败的事实吗?
我试图看看是否有一个单元格属性告诉你这一点,但没有。我还寻找了某种 DataValidation“验证”方法 - 即根据验证规则测试一个值,但也没有
有任何想法吗?这可能吗??