ALIYUN::CMS::SlsGroup类型用于为SLS日志的监控项创建Logstore组。
语法
{
"Type": "ALIYUN::CMS::SlsGroup",
"Properties": {
"SlsGroupDescription": String,
"SlsGroupConfig": List,
"SlsGroupName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
SlsGroupConfig | List | 是 | 否 | Logstore组的配置信息。 | 最多支持添加25个配置信息。 更多信息,请参见SlsGroupConfig属性。 |
SlsGroupName | String | 是 | 否 | Logstore组名称。 | 无 |
SlsGroupDescription | String | 否 | 是 | Logstore组描述。 | 无 |
SlsGroupConfig语法
"SlsGroupConfig": [
{
"SlsProject": String,
"SlsRegion": String,
"SlsUserId": String,
"SlsLogstore": String
}
]
SlsGroupConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
SlsLogstore | String | 是 | 否 | 日志库。 | 无 |
SlsProject | String | 是 | 否 | 日志项目。 | 无 |
SlsRegion | String | 是 | 否 | 地域。 | 无 |
SlsUserId | String | 否 | 是 | 成员ID。 | 当您通过管理账号调用ALIYUN::CMS::SlsGroup时,可以选择将资源目录中的任意成员的阿里云产品接入企业云监控。通过资源目录实现企业跨账号统一监控目标阿里云产品。 |
返回值
Fn::GetAtt
SlsGroupDescription:Logstore组描述。
SlsGroupConfig:Logstore组的配置信息。
CreateTime:Logstore组创建时间。
SlsGroupName:Logstore组名称。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SlsGroupConfig:
AssociationPropertyMetadata:
Parameters:
SlsProject:
Type: String
Description:
en: The Simple Log Service project.
Required: true
SlsRegion:
Type: String
Description:
en: The region ID.
Required: true
SlsUserId:
Type: String
Description:
en: The member ID. If you call this operation by using the management account of a resource directory, you can connect the Alibaba Cloud services that are activated for all members in the resource directory to Hybrid Cloud Monitoring. You can use the resource directory to monitor Alibaba Cloud services across enterprise accounts.Note If a member uses CloudMonitor for the first time, you must make sure that the service-linked role AliyunServiceRoleForCloudMonitor is attached to the member. For more information, see Manage the service-linked role for CloudMonitor.
Required: false
SlsLogstore:
Type: String
Description:
en: The Logstore.
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: 'The configurations of the Logstore group.Valid values of N: 1 to 25.'
Required: true
SlsGroupName:
Type: String
Description:
en: The name of the Logstore group.The name must be 2 to 32 characters in length and can contain uppercase letters, lowercase letters, digits, and underscores (_). The name must start with a letter.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::CMS::SlsGroup
Properties:
SlsGroupConfig:
Ref: SlsGroupConfig
SlsGroupName:
Ref: SlsGroupName
Outputs:
SlsGroupDescription:
Description: The description of the Logstore group.
Value:
Fn::GetAtt:
- ExtensionResource
- SlsGroupDescription
SlsGroupConfig:
Description: The configurations of the Logstore group.
Value:
Fn::GetAtt:
- ExtensionResource
- SlsGroupConfig
CreateTime:
Description: The creation time of the Logstore group.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
SlsGroupName:
Description: The name of the Logstore group.
Value:
Fn::GetAtt:
- ExtensionResource
- SlsGroupName
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SlsGroupConfig": {
"AssociationPropertyMetadata": {
"Parameters": {
"SlsProject": {
"Type": "String",
"Description": {
"en": "The Simple Log Service project."
},
"Required": true
},
"SlsRegion": {
"Type": "String",
"Description": {
"en": "The region ID."
},
"Required": true
},
"SlsUserId": {
"Type": "String",
"Description": {
"en": "The member ID. If you call this operation by using the management account of a resource directory, you can connect the Alibaba Cloud services that are activated for all members in the resource directory to Hybrid Cloud Monitoring. You can use the resource directory to monitor Alibaba Cloud services across enterprise accounts.Note If a member uses CloudMonitor for the first time, you must make sure that the service-linked role AliyunServiceRoleForCloudMonitor is attached to the member. For more information, see Manage the service-linked role for CloudMonitor."
},
"Required": false
},
"SlsLogstore": {
"Type": "String",
"Description": {
"en": "The Logstore."
},
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The configurations of the Logstore group.Valid values of N: 1 to 25."
},
"Required": true
},
"SlsGroupName": {
"Type": "String",
"Description": {
"en": "The name of the Logstore group.The name must be 2 to 32 characters in length and can contain uppercase letters, lowercase letters, digits, and underscores (_). The name must start with a letter."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::CMS::SlsGroup",
"Properties": {
"SlsGroupConfig": {
"Ref": "SlsGroupConfig"
},
"SlsGroupName": {
"Ref": "SlsGroupName"
}
}
}
},
"Outputs": {
"SlsGroupDescription": {
"Description": "The description of the Logstore group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SlsGroupDescription"
]
}
},
"SlsGroupConfig": {
"Description": "The configurations of the Logstore group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SlsGroupConfig"
]
}
},
"CreateTime": {
"Description": "The creation time of the Logstore group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"SlsGroupName": {
"Description": "The name of the Logstore group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SlsGroupName"
]
}
}
}
}