Class Dashboard
A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application.
To get more information about Dashboards, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Monitoring Dashboard Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dashboard = new Gcp.Monitoring.Dashboard("dashboard", new Gcp.Monitoring.DashboardArgs
{
DashboardJson = @"{
""displayName"": ""Demo Dashboard"",
""gridLayout"": {
""widgets"": [
{
""blank"": {}
}
]
}
}
",
});
}
}
Example Usage - Monitoring Dashboard GridLayout
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dashboard = new Gcp.Monitoring.Dashboard("dashboard", new Gcp.Monitoring.DashboardArgs
{
DashboardJson = @"{
""displayName"": ""Grid Layout Example"",
""gridLayout"": {
""columns"": ""2"",
""widgets"": [
{
""title"": ""Widget 1"",
""xyChart"": {
""dataSets"": [{
""timeSeriesQuery"": {
""timeSeriesFilter"": {
""filter"": ""metric.type=\""agent.googleapis.com/nginx/connections/accepted_count\"""",
""aggregation"": {
""perSeriesAligner"": ""ALIGN_RATE""
}
},
""unitOverride"": ""1""
},
""plotType"": ""LINE""
}],
""timeshiftDuration"": ""0s"",
""yAxis"": {
""label"": ""y1Axis"",
""scale"": ""LINEAR""
}
}
},
{
""text"": {
""content"": ""Widget 2"",
""format"": ""MARKDOWN""
}
},
{
""title"": ""Widget 3"",
""xyChart"": {
""dataSets"": [{
""timeSeriesQuery"": {
""timeSeriesFilter"": {
""filter"": ""metric.type=\""agent.googleapis.com/nginx/connections/accepted_count\"""",
""aggregation"": {
""perSeriesAligner"": ""ALIGN_RATE""
}
},
""unitOverride"": ""1""
},
""plotType"": ""STACKED_BAR""
}],
""timeshiftDuration"": ""0s"",
""yAxis"": {
""label"": ""y1Axis"",
""scale"": ""LINEAR""
}
}
}
]
}
}
",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Monitoring
Assembly: Pulumi.Gcp.dll
Syntax
public class Dashboard : CustomResource
Constructors
View SourceDashboard(String, DashboardArgs, CustomResourceOptions)
Create a Dashboard resource with the given unique name, arguments, and options.
Declaration
public Dashboard(string name, DashboardArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DashboardArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDashboardJson
The JSON representation of a dashboard, following the format at https://cloud.google.com/monitoring/api/ref_v3/rest/v1/projects.dashboards. The representation of an existing dashboard can be found by using the API Explorer
Declaration
public Output<string> DashboardJson { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DashboardState, CustomResourceOptions)
Get an existing Dashboard resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Dashboard Get(string name, Input<string> id, DashboardState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DashboardState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Dashboard |