Dashboard Args
data class DashboardArgs(val attribute: Output<String>? = null, val charList: Output<String>? = null, val dashboardName: Output<String>? = null, val displayName: Output<String>? = null, val projectName: Output<String>? = null) : ConvertibleToJava<DashboardArgs>
The dashboard is a real-time data analysis platform provided by the log service. You can display frequently used query and analysis statements in the form of charts and save statistical charts to the dashboard. Refer to details.
NOTE: Available in 1.86.0, parameter "action" in char_list is supported since 1.164.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Dashboard;
import com.pulumi.alicloud.log.DashboardArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleDashboard = new Dashboard("exampleDashboard", DashboardArgs.builder()
.projectName(exampleProject.name())
.dashboardName("terraform-example")
.attribute("{\"type\":\"grid\"}")
.charList("""
[
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"example-store",
"topic":"new_topic",
"query":"* | SELECT COUNT(name) as ct_name, COUNT(product) as ct_product, name,product GROUP BY name,product",
"start":"-86400s",
"end":"now"
},
"display":{
"xAxis":[
"ct_name"
],
"yAxis":[
"ct_product"
],
"xPos":0,
"yPos":0,
"width":10,
"height":12,
"displayName":"terraform-example"
}
}
]
""")
.build());
}
}
Content copied to clipboard
Import
Log Dashboard can be imported using the id or name, e.g.
$ pulumi import alicloud:log/dashboard:Dashboard example tf-project:tf-logstore:tf-dashboard
Content copied to clipboard