DATASOURCE::SLS::Logstores is used to query Logstores.
Syntax
{
"Type": "DATASOURCE::SLS::Logstores",
"Properties": {
"Project": String,
"LogstoreName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Project | String | Yes | Yes | The name of the Log Service project. | N/A |
LogstoreName | String | No | Yes | The name of the Logstore. | Fuzzy match is supported.
For example, if you enter test, all Logstores whose name contains test are returned. |
Return values (Fn::GetAtt)
Logstores: the list of Logstores.
Property | Type | Description | Constraint |
---|---|---|---|
Logstores | List | The list of Logstores. | Example: [ "apiserver-cb96ea09fdaa4454399833bc737de****", "audit-cb96ea09fdaa4454399833bc737de****",
"ccm-cb96ea09fdaa4454399833bc737de****"] |
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Project": {
"Type": "String",
"Description": "Project name."
}
},
"Resources": {
"Logstores": {
"Type": "DATASOURCE::SLS::Logstores",
"Properties": {
"Project": {
"Ref": "Project"
}
}
}
},
"Outputs": {
"Logstores": {
"Description": "The list of logstores.",
"Value": {
"Fn::GetAtt": [
"Logstores",
"Logstores"
]
}
}
}
}