AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门。
AWS::GuardDuty::Detector
AWS::GuardDuty::Detector
资源创建单个 Amazon GuardDuty 探测器。探测器是表示 GuardDuty 服务的对象。您必须创建一个探测器,GuardDuty 才能正常运行。
语法
要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:
JSON
{ "Type" : "AWS::GuardDuty::Detector", "Properties" : { "Enable" :
Boolean
} }
YAML
Type: "AWS::GuardDuty::Detector" Properties: Enable:
Boolean
属性
Enable
-
一个指定是否启用探测器的布尔值。
必需:是
类型:布尔值
更新要求:无需中断
返回值
Ref
当您将 AWS::GuardDuty::Detector
资源的逻辑 ID 传递到内部 Ref
函数时,该函数将返回所创建探测器的唯一 ID。
有关使用 Ref
功能的更多信息,请参阅参考。
示例
声明 GuardDuty 探测器资源
以下示例说明如何声明 AWS::GuardDuty::Detector
资源以创建 GuardDuty 探测器。
JSON
"mydetector": { "Type": "AWS::GuardDuty::Detector", "Properties": { "Enable": true } }
YAML
mydetector: Type: "AWS::GuardDuty::Detector" Properties: Enable: true