Alibaba Cloud v3.37.0, May 15 23
Alibaba Cloud v3.37.0, May 15 23
alicloud.log.Dashboard
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultProject = new AliCloud.Log.Project("defaultProject", new()
{
Description = "tf unit test",
});
var defaultStore = new AliCloud.Log.Store("defaultStore", new()
{
Project = "tf-project",
RetentionPeriod = 3000,
ShardCount = 1,
});
var example = new AliCloud.Log.Dashboard("example", new()
{
Attribute = "{\"type\":\"grid\"}",
CharList = @" [
{
""action"": {},
""title"":""new_title"",
""type"":""map"",
""search"":{
""logstore"":""tf-logstore"",
""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"":""xixihaha911""
}
}
]
",
DashboardName = "tf-dashboard",
ProjectName = "tf-project",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := log.NewProject(ctx, "defaultProject", &log.ProjectArgs{
Description: pulumi.String("tf unit test"),
})
if err != nil {
return err
}
_, err = log.NewStore(ctx, "defaultStore", &log.StoreArgs{
Project: pulumi.String("tf-project"),
RetentionPeriod: pulumi.Int(3000),
ShardCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = log.NewDashboard(ctx, "example", &log.DashboardArgs{
Attribute: pulumi.String("{\"type\":\"grid\"}"),
CharList: pulumi.String(" [\n {\n \"action\": {},\n \"title\":\"new_title\",\n \"type\":\"map\",\n \"search\":{\n \"logstore\":\"tf-logstore\",\n \"topic\":\"new_topic\",\n \"query\":\"* | SELECT COUNT(name) as ct_name, COUNT(product) as ct_product, name,product GROUP BY name,product\",\n \"start\":\"-86400s\",\n \"end\":\"now\"\n },\n \"display\":{\n \"xAxis\":[\n \"ct_name\"\n ],\n \"yAxis\":[\n \"ct_product\"\n ],\n \"xPos\":0,\n \"yPos\":0,\n \"width\":10,\n \"height\":12,\n \"displayName\":\"xixihaha911\"\n }\n }\n ]\n\n"),
DashboardName: pulumi.String("tf-dashboard"),
ProjectName: pulumi.String("tf-project"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 defaultProject = new Project("defaultProject", ProjectArgs.builder()
.description("tf unit test")
.build());
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.project("tf-project")
.retentionPeriod("3000")
.shardCount(1)
.build());
var example = new Dashboard("example", DashboardArgs.builder()
.attribute("{\"type\":\"grid\"}")
.charList("""
[
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"tf-logstore",
"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":"xixihaha911"
}
}
]
""")
.dashboardName("tf-dashboard")
.projectName("tf-project")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_project = alicloud.log.Project("defaultProject", description="tf unit test")
default_store = alicloud.log.Store("defaultStore",
project="tf-project",
retention_period=3000,
shard_count=1)
example = alicloud.log.Dashboard("example",
attribute="{\"type\":\"grid\"}",
char_list=""" [
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"tf-logstore",
"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":"xixihaha911"
}
}
]
""",
dashboard_name="tf-dashboard",
project_name="tf-project")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultProject = new alicloud.log.Project("defaultProject", {description: "tf unit test"});
const defaultStore = new alicloud.log.Store("defaultStore", {
project: "tf-project",
retentionPeriod: 3000,
shardCount: 1,
});
const example = new alicloud.log.Dashboard("example", {
attribute: "{\"type\":\"grid\"}",
charList: ` [
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"tf-logstore",
"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":"xixihaha911"
}
}
]
`,
dashboardName: "tf-dashboard",
projectName: "tf-project",
});
resources:
defaultProject:
type: alicloud:log:Project
properties:
description: tf unit test
defaultStore:
type: alicloud:log:Store
properties:
project: tf-project
retentionPeriod: '3000'
shardCount: 1
example:
type: alicloud:log:Dashboard
properties:
attribute: '{"type":"grid"}'
charList: |2+
[
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"tf-logstore",
"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":"xixihaha911"
}
}
]
dashboardName: tf-dashboard
projectName: tf-project
Create Dashboard Resource
new Dashboard(name: string, args: DashboardArgs, opts?: CustomResourceOptions);
@overload
def Dashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
attribute: Optional[str] = None,
char_list: Optional[str] = None,
dashboard_name: Optional[str] = None,
display_name: Optional[str] = None,
project_name: Optional[str] = None)
@overload
def Dashboard(resource_name: str,
args: DashboardArgs,
opts: Optional[ResourceOptions] = None)
func NewDashboard(ctx *Context, name string, args DashboardArgs, opts ...ResourceOption) (*Dashboard, error)
public Dashboard(string name, DashboardArgs args, CustomResourceOptions? opts = null)
public Dashboard(String name, DashboardArgs args)
public Dashboard(String name, DashboardArgs args, CustomResourceOptions options)
type: alicloud:log:Dashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Dashboard Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Dashboard resource accepts the following input properties:
- Char
List string Configuration of charts in the dashboard.
- Dashboard
Name string The name of the Log Dashboard.
- Project
Name string The name of the log project. It is the only in one Alicloud account.
- Attribute string
Dashboard attribute.
- Display
Name string Dashboard alias.
- Char
List string Configuration of charts in the dashboard.
- Dashboard
Name string The name of the Log Dashboard.
- Project
Name string The name of the log project. It is the only in one Alicloud account.
- Attribute string
Dashboard attribute.
- Display
Name string Dashboard alias.
- char
List String Configuration of charts in the dashboard.
- dashboard
Name String The name of the Log Dashboard.
- project
Name String The name of the log project. It is the only in one Alicloud account.
- attribute String
Dashboard attribute.
- display
Name String Dashboard alias.
- char
List string Configuration of charts in the dashboard.
- dashboard
Name string The name of the Log Dashboard.
- project
Name string The name of the log project. It is the only in one Alicloud account.
- attribute string
Dashboard attribute.
- display
Name string Dashboard alias.
- char_
list str Configuration of charts in the dashboard.
- dashboard_
name str The name of the Log Dashboard.
- project_
name str The name of the log project. It is the only in one Alicloud account.
- attribute str
Dashboard attribute.
- display_
name str Dashboard alias.
- char
List String Configuration of charts in the dashboard.
- dashboard
Name String The name of the Log Dashboard.
- project
Name String The name of the log project. It is the only in one Alicloud account.
- attribute String
Dashboard attribute.
- display
Name String Dashboard alias.
Outputs
All input properties are implicitly available as output properties. Additionally, the Dashboard resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Dashboard Resource
Get an existing Dashboard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DashboardState, opts?: CustomResourceOptions): Dashboard
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attribute: Optional[str] = None,
char_list: Optional[str] = None,
dashboard_name: Optional[str] = None,
display_name: Optional[str] = None,
project_name: Optional[str] = None) -> Dashboard
func GetDashboard(ctx *Context, name string, id IDInput, state *DashboardState, opts ...ResourceOption) (*Dashboard, error)
public static Dashboard Get(string name, Input<string> id, DashboardState? state, CustomResourceOptions? opts = null)
public static Dashboard get(String name, Output<String> id, DashboardState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Attribute string
Dashboard attribute.
- Char
List string Configuration of charts in the dashboard.
- Dashboard
Name string The name of the Log Dashboard.
- Display
Name string Dashboard alias.
- Project
Name string The name of the log project. It is the only in one Alicloud account.
- Attribute string
Dashboard attribute.
- Char
List string Configuration of charts in the dashboard.
- Dashboard
Name string The name of the Log Dashboard.
- Display
Name string Dashboard alias.
- Project
Name string The name of the log project. It is the only in one Alicloud account.
- attribute String
Dashboard attribute.
- char
List String Configuration of charts in the dashboard.
- dashboard
Name String The name of the Log Dashboard.
- display
Name String Dashboard alias.
- project
Name String The name of the log project. It is the only in one Alicloud account.
- attribute string
Dashboard attribute.
- char
List string Configuration of charts in the dashboard.
- dashboard
Name string The name of the Log Dashboard.
- display
Name string Dashboard alias.
- project
Name string The name of the log project. It is the only in one Alicloud account.
- attribute str
Dashboard attribute.
- char_
list str Configuration of charts in the dashboard.
- dashboard_
name str The name of the Log Dashboard.
- display_
name str Dashboard alias.
- project_
name str The name of the log project. It is the only in one Alicloud account.
- attribute String
Dashboard attribute.
- char
List String Configuration of charts in the dashboard.
- dashboard
Name String The name of the Log Dashboard.
- display
Name String Dashboard alias.
- project
Name String The name of the log project. It is the only in one Alicloud account.
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
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.