ALIYUN::SLS::ServiceLog类型用于激活服务日志。
语法
{
"Type": "ALIYUN::SLS::ServiceLog",
"Properties": {
"ServiceLogTypes": List,
"ProjectName": String,
"LogStorageLocation": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ServiceLogTypes | List | 是 | 否 | 需要激活的服务日志类型。 | 取值:
|
ProjectName | String | 是 | 否 | 需要激活的项目的名称。 | 如果它已经被激活,它将再次被重新激活。 |
LogStorageLocation | String | 是 | 否 | 服务日志的位置。 | 无 |
返回值
Fn::GetAtt
ProjectName:项目的名称。
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: LogStorageLocation: Description: en: The location of the service log. Required: true Type: String ProjectName: Description: en: The name of the project that needs to be activated. If it has been activated, it will be reactivated again. Required: true Type: String ServiceLogTypes: AssociationProperty: List[Parameter] AssociationPropertyMetadata: Parameter: AllowedValues: - DetailedLogs - ImportantLogs - JobOperationalLogs Description: en: "Type of service log that needs to be activated. Allowed values: \n\ DetailedLogs: If you turn on the Detailed Logs switch and select a project,\ \ a Logstore and a dashboard are automatically created in the project.\ \ You are charged for using the Logstore.\nImportantLogs: If you turn\ \ on Important Logs and select a project, a Logstore is automatically\ \ created in the project to store the logs, such as consumption delay\ \ logs of consumer groups and Logtail heartbeat logs. The Logstore is\ \ provided free of charge. \nJobOperationalLogs: A Logstore named internal-diagnostic_log\ \ is created in the specified project to store job operational logs. The\ \ operational logs of data import jobs, Scheduled SQL jobs, and data shipping\ \ jobs are recorded. The Logstore is provided free of charge." Required: true Type: String Description: en: 'Types of service log that needs to be activated. ' MaxLength: 3 MinLength: 1 Required: true Type: Json Resources: ServiceLog: Properties: LogStorageLocation: Ref: LogStorageLocation ProjectName: Ref: ProjectName ServiceLogTypes: Ref: ServiceLogTypes Type: ALIYUN::SLS::ServiceLog Outputs: ProjectName: Description: The name of the project that needs to be activated. Value: Fn::GetAtt: - ServiceLog - ProjectName
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "ServiceLogTypes": { "AssociationPropertyMetadata": { "Parameter": { "Type": "String", "Description": { "en": "Type of service log that needs to be activated. Allowed values: \nDetailedLogs: If you turn on the Detailed Logs switch and select a project, a Logstore and a dashboard are automatically created in the project. You are charged for using the Logstore.\nImportantLogs: If you turn on Important Logs and select a project, a Logstore is automatically created in the project to store the logs, such as consumption delay logs of consumer groups and Logtail heartbeat logs. The Logstore is provided free of charge. \nJobOperationalLogs: A Logstore named internal-diagnostic_log is created in the specified project to store job operational logs. The operational logs of data import jobs, Scheduled SQL jobs, and data shipping jobs are recorded. The Logstore is provided free of charge." }, "AllowedValues": [ "DetailedLogs", "ImportantLogs", "JobOperationalLogs" ], "Required": true } }, "AssociationProperty": "List[Parameter]", "Type": "Json", "Description": { "en": "Types of service log that needs to be activated. " }, "Required": true, "MinLength": 1, "MaxLength": 3 }, "ProjectName": { "Type": "String", "Description": { "en": "The name of the project that needs to be activated. If it has been activated, it will be reactivated again." }, "Required": true }, "LogStorageLocation": { "Type": "String", "Description": { "en": "The location of the service log." }, "Required": true } }, "Resources": { "ServiceLog": { "Type": "ALIYUN::SLS::ServiceLog", "Properties": { "ServiceLogTypes": { "Ref": "ServiceLogTypes" }, "ProjectName": { "Ref": "ProjectName" }, "LogStorageLocation": { "Ref": "LogStorageLocation" } } } }, "Outputs": { "ProjectName": { "Description": "The name of the project that needs to be activated.", "Value": { "Fn::GetAtt": [ "ServiceLog", "ProjectName" ] } } } }
文档内容是否对您有帮助?