Class Dashboard
Provides a CloudWatch Dashboard resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.CloudWatch.Dashboard("main", new Aws.CloudWatch.DashboardArgs
{
DashboardBody = @" {
""widgets"": [
{
""type"":""metric"",
""x"":0,
""y"":0,
""width"":12,
""height"":6,
""properties"":{
""metrics"":[
[
""AWS/EC2"",
""CPUUtilization"",
""InstanceId"",
""i-012345""
]
],
""period"":300,
""stat"":""Average"",
""region"":""us-east-1"",
""title"":""EC2 Instance CPU""
}
},
{
""type"":""text"",
""x"":0,
""y"":7,
""width"":3,
""height"":3,
""properties"":{
""markdown"":""Hello world""
}
}
]
}
",
DashboardName = "my-dashboard",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.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 SourceDashboardArn
The Amazon Resource Name (ARN) of the dashboard.
Declaration
public Output<string> DashboardArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DashboardBody
The detailed information about the dashboard, including what widgets are included and their location on the dashboard. You can read more about the body structure in the documentation.
Declaration
public Output<string> DashboardBody { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DashboardName
The name of the dashboard.
Declaration
public Output<string> DashboardName { 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 |