AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption

添加 Amazon CloudWatch 日志流来监控应用程序配置错误。

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption", "Properties" : { "ApplicationName" : String, "CloudWatchLoggingOption" : CloudWatchLoggingOption } }

YAML

Type: AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption Properties: ApplicationName: String CloudWatchLoggingOption: CloudWatchLoggingOption

属性

ApplicationName

应用程序名称。

必需:是

类型:字符串

最低1

最高128

模式[a-zA-Z0-9_.-]+

Update requires: Replacement

CloudWatchLoggingOption

提供有关 Amazon CloudWatch 日志记录选项的描述,包括日志流 Amazon 资源名称 (ARN)。

必需:是

类型CloudWatchLoggingOption

Update requires: No interruption

示例

创建 ApplicationCloudWatchLoggingOption 资源

JSON

{ "BasicApplicationV2CloudWatchLoggingOption": { "Type": "AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption", "Properties": { "ApplicationName": { "Ref": "BasicApplication" }, "CloudWatchLoggingOption": { "LogStreamARN": { "Fn::Join": [ ":", [ "arn:aws:logs", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "log-group", { "Ref": "TestCWLogGroup" }, "log-stream", { "Ref": "TestCWLogStream" } ] ] } } } } }

YAML

BasicApplicationV2CloudWatchLoggingOption: Type: 'AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption' Properties: ApplicationName: !Ref BasicApplication CloudWatchLoggingOption: LogStreamARN: !Join - ':' - - 'arn:aws:logs' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - log-group - !Ref TestCWLogGroup - log-stream - !Ref TestCWLogStream

另请参阅